@geckou/ui-vue 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/README.md +8 -1
  2. package/dist/components/ArticleList/Card/Artistic.vue.d.ts +10 -0
  3. package/dist/components/ArticleList/Card/Entertainment.vue.d.ts +10 -0
  4. package/dist/components/ArticleList/Card/Gallery.vue.d.ts +10 -0
  5. package/dist/components/ArticleList/Card/Grid.vue.d.ts +11 -0
  6. package/dist/components/ArticleList/Card/News.vue.d.ts +9 -0
  7. package/dist/components/ArticleList/Card/Rounded.vue.d.ts +10 -0
  8. package/dist/components/ArticleList/Card/Row.vue.d.ts +9 -0
  9. package/dist/components/ArticleList/Card/Simple.vue.d.ts +10 -0
  10. package/dist/components/ArticleList/Card/Standard.vue.d.ts +10 -0
  11. package/dist/components/ArticleList/Card/Tile.vue.d.ts +10 -0
  12. package/dist/components/ArticleList/GenericArticleList.vue.d.ts +11 -0
  13. package/dist/components/ArticleList/List/Artistic.vue.d.ts +8 -0
  14. package/dist/components/ArticleList/List/Entertainment.vue.d.ts +8 -0
  15. package/dist/components/ArticleList/List/Gallery.vue.d.ts +8 -0
  16. package/dist/components/ArticleList/List/Grid.vue.d.ts +11 -0
  17. package/dist/components/ArticleList/List/News.vue.d.ts +8 -0
  18. package/dist/components/ArticleList/List/Rounded.vue.d.ts +8 -0
  19. package/dist/components/ArticleList/List/Row.vue.d.ts +8 -0
  20. package/dist/components/ArticleList/List/Simple.vue.d.ts +8 -0
  21. package/dist/components/ArticleList/List/Standard.vue.d.ts +8 -0
  22. package/dist/components/ArticleList/List/Tile.vue.d.ts +8 -0
  23. package/dist/components/ArticleList/Parts/AuthorInfo.vue.d.ts +31 -0
  24. package/dist/components/ArticleList/Parts/CardContainer.vue.d.ts +20 -0
  25. package/dist/components/ArticleList/Parts/CardHeading.vue.d.ts +12 -0
  26. package/dist/components/ArticleList/Parts/CategoryList.vue.d.ts +19 -0
  27. package/dist/components/ArticleList/Parts/ExcerptText.vue.d.ts +12 -0
  28. package/dist/components/ArticleList/Parts/MetadataList.vue.d.ts +32 -0
  29. package/dist/components/ArticleList/Parts/NoImage.vue.d.ts +2 -0
  30. package/dist/components/ArticleList/Parts/PostedDate.vue.d.ts +14 -0
  31. package/dist/components/ArticleList/Parts/TagList.vue.d.ts +18 -0
  32. package/dist/components/ArticleList/Parts/ThumbnailImage.vue.d.ts +17 -0
  33. package/dist/components/BasicButton.vue.d.ts +26 -0
  34. package/dist/components/CheckBox.vue.d.ts +34 -0
  35. package/dist/components/CheckBoxes.vue.d.ts +18 -0
  36. package/dist/components/CheckButton.vue.d.ts +31 -0
  37. package/dist/components/DatePicker.vue.d.ts +27 -0
  38. package/dist/components/DateRangePicker.vue.d.ts +31 -0
  39. package/dist/components/DateSelector.vue.d.ts +17 -0
  40. package/dist/components/DropdownUi.vue.d.ts +37 -0
  41. package/dist/components/ErrorMessage.vue.d.ts +9 -0
  42. package/dist/components/Icon/CalendarIcon.vue.d.ts +2 -0
  43. package/dist/components/Icon/CheckIcon.vue.d.ts +2 -0
  44. package/dist/components/Icon/CloseIcon.vue.d.ts +2 -0
  45. package/dist/components/Icon/Folder.vue.d.ts +2 -0
  46. package/dist/components/Icon/Image.vue.d.ts +2 -0
  47. package/dist/components/Icon/KeyboardArrowDownIcon.vue.d.ts +2 -0
  48. package/dist/components/Icon/Tag.vue.d.ts +2 -0
  49. package/dist/components/InputBox.vue.d.ts +27 -0
  50. package/dist/components/InputGroup.vue.d.ts +17 -0
  51. package/dist/components/LabeledCheckbox.vue.d.ts +20 -0
  52. package/dist/components/LabeledFieldset.vue.d.ts +21 -0
  53. package/dist/components/LoadingSpinner.vue.d.ts +2 -0
  54. package/dist/components/ModalBox.vue.d.ts +27 -0
  55. package/dist/components/PopupBox.vue.d.ts +30 -0
  56. package/dist/components/RadioButtons.vue.d.ts +20 -0
  57. package/dist/components/SelectBox.vue.d.ts +37 -0
  58. package/dist/components/SlideDownUi.vue.d.ts +37 -0
  59. package/dist/components/TabUI.vue.d.ts +54 -0
  60. package/dist/components/TextArea.vue.d.ts +33 -0
  61. package/dist/components/TextBox.vue.d.ts +44 -0
  62. package/dist/components/TextButton.vue.d.ts +10 -0
  63. package/dist/components/ToggleButton.vue.d.ts +23 -0
  64. package/dist/const/index.d.ts +1 -0
  65. package/dist/const/list-theme.d.ts +62 -0
  66. package/dist/index.d.ts +43 -0
  67. package/dist/index.js +3519 -0
  68. package/dist/scripts/form-validation-manager.d.ts +30 -0
  69. package/dist/scripts/unique-id.d.ts +1 -0
  70. package/dist/scripts/use-click-outside.d.ts +13 -0
  71. package/dist/scripts/utils.d.ts +15 -0
  72. package/dist/style.css +1 -0
  73. package/dist/types/index.d.ts +48 -77
  74. package/package.json +16 -8
  75. package/dist/assets/scss/functions.scss +0 -6
  76. package/dist/assets/scss/mixin.scss +0 -33
  77. package/dist/components/ArticleList/Card/Artistic.vue +0 -311
  78. package/dist/components/ArticleList/Card/Entertainment.vue +0 -245
  79. package/dist/components/ArticleList/Card/Gallery.vue +0 -255
  80. package/dist/components/ArticleList/Card/Grid.vue +0 -248
  81. package/dist/components/ArticleList/Card/News.vue +0 -151
  82. package/dist/components/ArticleList/Card/Rounded.vue +0 -155
  83. package/dist/components/ArticleList/Card/Row.vue +0 -168
  84. package/dist/components/ArticleList/Card/Simple.vue +0 -233
  85. package/dist/components/ArticleList/Card/Standard.vue +0 -188
  86. package/dist/components/ArticleList/Card/Tile.vue +0 -172
  87. package/dist/components/ArticleList/GenericArticleList.vue +0 -143
  88. package/dist/components/ArticleList/List/Artistic.vue +0 -24
  89. package/dist/components/ArticleList/List/Entertainment.vue +0 -24
  90. package/dist/components/ArticleList/List/Gallery.vue +0 -24
  91. package/dist/components/ArticleList/List/Grid.vue +0 -216
  92. package/dist/components/ArticleList/List/News.vue +0 -24
  93. package/dist/components/ArticleList/List/Rounded.vue +0 -24
  94. package/dist/components/ArticleList/List/Row.vue +0 -24
  95. package/dist/components/ArticleList/List/Simple.vue +0 -24
  96. package/dist/components/ArticleList/List/Standard.vue +0 -24
  97. package/dist/components/ArticleList/List/Tile.vue +0 -24
  98. package/dist/components/ArticleList/Parts/AuthorInfo.vue +0 -100
  99. package/dist/components/ArticleList/Parts/CardContainer.vue +0 -23
  100. package/dist/components/ArticleList/Parts/CardHeading.vue +0 -43
  101. package/dist/components/ArticleList/Parts/CategoryList.vue +0 -41
  102. package/dist/components/ArticleList/Parts/ExcerptText.vue +0 -43
  103. package/dist/components/ArticleList/Parts/MetadataList.vue +0 -120
  104. package/dist/components/ArticleList/Parts/NoImage.vue +0 -36
  105. package/dist/components/ArticleList/Parts/PostedDate.vue +0 -41
  106. package/dist/components/ArticleList/Parts/TagList.vue +0 -41
  107. package/dist/components/ArticleList/Parts/ThumbnailImage.vue +0 -85
  108. package/dist/components/BasicButton.vue +0 -143
  109. package/dist/components/CheckBox.vue +0 -140
  110. package/dist/components/CheckBoxes.vue +0 -101
  111. package/dist/components/CheckButton.vue +0 -127
  112. package/dist/components/DatePicker.vue +0 -234
  113. package/dist/components/DateRangePicker.vue +0 -85
  114. package/dist/components/DateSelector.vue +0 -273
  115. package/dist/components/DropdownUi.vue +0 -118
  116. package/dist/components/ErrorMessage.vue +0 -61
  117. package/dist/components/Icon/CalendarIcon.vue +0 -8
  118. package/dist/components/Icon/CheckIcon.vue +0 -8
  119. package/dist/components/Icon/CloseIcon.vue +0 -8
  120. package/dist/components/Icon/Folder.vue +0 -8
  121. package/dist/components/Icon/Image.vue +0 -14
  122. package/dist/components/Icon/KeyboardArrowDownIcon.vue +0 -8
  123. package/dist/components/Icon/Tag.vue +0 -8
  124. package/dist/components/InputBox.vue +0 -134
  125. package/dist/components/InputGroup.vue +0 -41
  126. package/dist/components/LabeledCheckbox.vue +0 -82
  127. package/dist/components/LabeledFieldset.vue +0 -41
  128. package/dist/components/LoadingSpinner.vue +0 -56
  129. package/dist/components/ModalBox.vue +0 -192
  130. package/dist/components/PopupBox.vue +0 -93
  131. package/dist/components/RadioButtons.vue +0 -163
  132. package/dist/components/SelectBox.vue +0 -166
  133. package/dist/components/SlideDownUi.vue +0 -123
  134. package/dist/components/TabUI.vue +0 -123
  135. package/dist/components/TextArea.vue +0 -115
  136. package/dist/components/TextBox.vue +0 -111
  137. package/dist/components/TextButton.vue +0 -47
  138. package/dist/components/ToggleButton.vue +0 -179
  139. package/dist/const/index.ts +0 -2
  140. package/dist/const/list-theme.ts +0 -62
  141. package/dist/index.ts +0 -126
  142. package/dist/scripts/form-validation-manager.ts +0 -63
  143. package/dist/scripts/utils.ts +0 -44
  144. package/dist/types/custom.d.ts +0 -1
  145. package/dist/types/vue-shim.d.ts +0 -5
@@ -1,255 +0,0 @@
1
- <script setup lang="ts">
2
- import { returnAuthor } from '../../../scripts/utils'
3
- import type {
4
- Article,
5
- Category,
6
- PostConfig,
7
- } from '../../../types'
8
- import CardContainer from '../../../components/ArticleList/Parts/CardContainer.vue'
9
- import ThumbnailImage from '../../../components/ArticleList/Parts/ThumbnailImage.vue'
10
- import AuthorInfo from '../../../components/ArticleList/Parts/AuthorInfo.vue'
11
- import CardHeading from '../../../components/ArticleList/Parts/CardHeading.vue'
12
- import CategoryList from '../../../components/ArticleList/Parts/CategoryList.vue'
13
- import TagList from '../../../components/ArticleList/Parts/TagList.vue'
14
- import PostedDate from '../../../components/ArticleList/Parts/PostedDate.vue'
15
- import ExcerptText from '../../../components/ArticleList/Parts/ExcerptText.vue'
16
-
17
- defineProps<{
18
- article: Article
19
- path: string
20
- isPickUpItem: boolean
21
- postConfig: PostConfig
22
- categories: Category[]
23
- }>()
24
- </script>
25
-
26
- <template>
27
- <CardContainer
28
- v-if="article"
29
- :class="[$style.container, { [$style.pickup]: isPickUpItem} ]"
30
- :path="path"
31
- >
32
- <ThumbnailImage
33
- :article="article"
34
- :aspectRatio="{
35
- desktop: isPickUpItem ? '2.85/1' : '4/3',
36
- tablet : isPickUpItem ? '16/9' : '4/3',
37
- mobile : isPickUpItem ? '4/3' : '4/3',
38
- }"
39
- :class="$style.thumbnail"
40
- style="grid-area: thumbnail;"
41
- />
42
- <CardHeading
43
- :heading="article.title.rendered"
44
- :class="$style.heading"
45
- color="var(--white)"
46
- style="grid-area: heading;"
47
- />
48
- <PostedDate
49
- :date="article.date"
50
- :class="$style.date"
51
- :fontSize="isPickUpItem ? 'medium' : 'small'"
52
- formatString="yyyy.M.d"
53
- color="var(--white)"
54
- fontWeight="bold"
55
- style="grid-area: date;"
56
- />
57
- <AuthorInfo
58
- v-if="postConfig.author && returnAuthor(article)"
59
- :name="returnAuthor(article)?.name"
60
- :class="$style.author"
61
- :text="{
62
- color : 'var(--white)',
63
- fontSize : isPickUpItem ? 'medium' : 'small',
64
- fontWeight: 'bold',
65
- }"
66
- style="grid-area: author;"
67
- />
68
- <CategoryList
69
- v-if="postConfig.category && article.categories"
70
- :categoryIds="article.categories"
71
- :categoryData="categories"
72
- :label="{
73
- color : 'var(--white)',
74
- fontSize: isPickUpItem ? 'medium': 'small',
75
- }"
76
- :class="$style.category"
77
- style="grid-area: category;"
78
- />
79
- <TagList
80
- v-if="postConfig.tag"
81
- :article="article"
82
- :label="{
83
- color : 'var(--white)',
84
- fontSize: isPickUpItem ? 'medium': 'small',
85
- }"
86
- :class="$style.tag"
87
- delimiter="/"
88
- style="grid-area: tag;"
89
- />
90
- <ExcerptText
91
- :excerpt="article.excerpt.rendered"
92
- :class="$style.excerpt"
93
- color="var(--white)"
94
- fontSize="small"
95
- :row="2"
96
- style="grid-area: excerpt;"
97
- />
98
- </CardContainer>
99
- </template>
100
-
101
- <style lang="scss" module>
102
- @use '../../../assets/scss/mixin' as *;
103
-
104
- .container {
105
- grid-template-columns: auto 1fr;
106
- grid-template-rows : 0 auto 1fr auto auto fit-content(20%);
107
- grid-template-areas :
108
- 'thumbnail thumbnail'
109
- 'heading heading'
110
- 'date author'
111
- 'category category'
112
- 'tag tag'
113
- 'excerpt excerpt';
114
- position : relative;
115
- width : 100%;
116
- aspect-ratio: 4/3;
117
- overflow : hidden;
118
-
119
- &:hover {
120
- &::before {
121
- opacity: 0;
122
- }
123
-
124
- &::after {
125
- opacity: 1;
126
- }
127
-
128
- .thumbnail {
129
- img {
130
- filter: blur(2px);
131
- scale: 1.04;
132
- }
133
- }
134
-
135
- .category,
136
- .tag,
137
- .excerpt {
138
- opacity: 1;
139
- }
140
- }
141
-
142
- &::before,
143
- &::after {
144
- content : '';
145
- display : block;
146
- width : 100%;
147
- height : 100%;
148
- aspect-ratio : 4/3;
149
- mix-blend-mode: hard-light;
150
- position : absolute;
151
- top : 0;
152
- left : 0;
153
- transition : all var(--animation-duration);
154
- z-index : 2;
155
- }
156
-
157
- &::before {
158
- background-image: linear-gradient(
159
- to bottom,
160
- rgba(var(--black-rgb), .6) 0%,
161
- rgba(var(--black-rgb), 0) 62%,
162
- rgba(var(--black-rgb), 0) 100%
163
- );
164
- opacity: 1;
165
- }
166
-
167
- &::after {
168
- background-color: rgba(var(--black-rgb), .8);
169
- opacity : 0;
170
- }
171
-
172
- > *:not(.thumbnail) {
173
- transition : opacity var(--animation-duration);
174
- position : relative;
175
- z-index : 3;
176
- padding-inline: var(--sp-medium);
177
- }
178
-
179
- @include media('tablet') {
180
- &.pickup {
181
- aspect-ratio: 16/9;
182
-
183
- @include media('desktop') {
184
- aspect-ratio: 2.85/1;
185
- }
186
-
187
- > *:not(.thumbnail) {
188
- padding-left : var(--sp-large);
189
- padding-right: var(--sp-large);
190
- }
191
-
192
- &::before {
193
- aspect-ratio: 16/9;
194
-
195
- @include media('desktop') {
196
- aspect-ratio: 2.85/1;
197
- }
198
- }
199
-
200
- .heading {
201
- font-size: xx-large;
202
- }
203
-
204
- .tag {
205
- margin-block: var(--sp-medium) var(--sp-large);
206
- }
207
-
208
- .excerpt {
209
- padding: var(--sp-large);
210
- }
211
- }
212
- }
213
- }
214
-
215
- .thumbnail {
216
- position : absolute;
217
- top : 0;
218
- left : 0;
219
- transition: filter var(--animation-duration);
220
- z-index : 1;
221
-
222
- > img {
223
- transition: scale var(--animation-duration);
224
- }
225
- }
226
-
227
- .category,
228
- .tag,
229
- .excerpt {
230
- opacity: 0;
231
- }
232
-
233
- .heading {
234
- margin-block: var(--sp-medium);
235
- }
236
-
237
- .date,
238
- .author {
239
- align-items: flex-start;
240
- }
241
-
242
- .author {
243
- padding-left: 0;
244
- }
245
-
246
- .category,
247
- .tag {
248
- margin-block-end: var(--sp-medium);
249
- }
250
-
251
- .excerpt {
252
- padding-block : var(--sp-medium);
253
- border-block-start: 1px solid var(--white);
254
- }
255
- </style>
@@ -1,248 +0,0 @@
1
- <script setup lang="ts">
2
- import { returnAuthor } from '../../../scripts/utils'
3
- import type {
4
- Article,
5
- Category,
6
- PostConfig,
7
- } from '../../../types'
8
- import CardContainer from '../../../components/ArticleList/Parts/CardContainer.vue'
9
- import ThumbnailImage from '../../../components/ArticleList/Parts/ThumbnailImage.vue'
10
- import AuthorInfo from '../../../components/ArticleList/Parts/AuthorInfo.vue'
11
- import CardHeading from '../../../components/ArticleList/Parts/CardHeading.vue'
12
- import CategoryList from '../../../components/ArticleList/Parts/CategoryList.vue'
13
- import TagList from '../../../components/ArticleList/Parts/TagList.vue'
14
- import PostedDate from '../../../components/ArticleList/Parts/PostedDate.vue'
15
- import ExcerptText from '../../../components/ArticleList/Parts/ExcerptText.vue'
16
-
17
- defineProps<{
18
- article: Article
19
- path: string
20
- isPickUpItem: boolean
21
- postConfig: PostConfig
22
- categories: Category[]
23
- direction: 'horizontal' | 'vertical'
24
- }>()
25
-
26
- </script>
27
-
28
- <template>
29
- <CardContainer
30
- v-if="article"
31
- :class="[
32
- $style.container,
33
- { [$style.pickup]: isPickUpItem},
34
- $style[direction],
35
- ]"
36
- :path="path"
37
- >
38
- <ThumbnailImage
39
- :article="article"
40
- :aspectRatio="{
41
- desktop: isPickUpItem ? '21/9' : '4/3',
42
- tablet : isPickUpItem ? '21/9' : '4/3',
43
- mobile : '4/3',
44
- }"
45
- :class="$style.thumbnail"
46
- style="grid-area: thumbnail;"
47
- />
48
-
49
- <div
50
- :class="$style.date"
51
- style="grid-area: date;"
52
- >
53
- <PostedDate
54
- :date="article.date"
55
- formatString="M.d"
56
- color="var(--white)"
57
- fontWeight="bold"
58
- />
59
- <PostedDate
60
- :date="article.date"
61
- formatString="yyyy"
62
- color="var(--white)"
63
- fontWeight="bold"
64
- />
65
- </div>
66
- <CardHeading
67
- :heading="article.title.rendered"
68
- :class="$style.heading"
69
- :fontSize="isPickUpItem ? 'large' : 'medium'"
70
- :color="isPickUpItem && direction === 'horizontal' ? 'var(--white)' : 'var(--text-color)'"
71
- style="grid-area: heading;"
72
- />
73
- <ExcerptText
74
- :excerpt="article.excerpt.rendered"
75
- :class="$style.excerpt"
76
- :row="2"
77
- fontSize="small"
78
- style="grid-area: excerpt;"
79
- />
80
- <AuthorInfo
81
- v-if="postConfig.author && returnAuthor(article)"
82
- :avatarUrls="returnAuthor(article)?.avatar_urls"
83
- :thumbnail="{
84
- size : 'large',
85
- shape: 'square',
86
- }"
87
- :class="$style.author"
88
- style="grid-area: author;"
89
- />
90
- <CategoryList
91
- v-if="postConfig.category && article.categories"
92
- :categoryIds="article.categories"
93
- :categoryData="categories"
94
- :label="{
95
- color : 'var(--gray)',
96
- fontSize: 'smaller',
97
- }"
98
- :class="$style.category"
99
- style="grid-area: category;"
100
- />
101
- <TagList
102
- v-if="postConfig.tag"
103
- :article="article"
104
- :label="{
105
- color : 'var(--gray)',
106
- fontSize: 'smaller',
107
- }"
108
- :class="$style.tag"
109
- style="grid-area: tag;"
110
- />
111
- </CardContainer>
112
- </template>
113
-
114
- <style lang="scss" module>
115
- @use '../../../assets/scss/mixin' as *;
116
-
117
- .container {
118
- --date-size: calc(var(--bv) * 7);
119
- grid-template-columns: auto 1fr auto;
120
- grid-template-rows : fit-content(50%) auto 1fr auto auto;
121
- grid-template-areas :
122
- 'thumbnail thumbnail thumbnail'
123
- 'date heading heading'
124
- 'excerpt excerpt excerpt'
125
- 'category category author'
126
- 'tag tag author';
127
- height : 100%;
128
- box-shadow: 0 0 1px 0 rgba(var(--black-rgb), .4);
129
- transition: box-shadow var(--animation-duration) linear;
130
-
131
- &:hover {
132
- box-shadow: 0 0 var(--sp-small) 2px rgba(var(--black-rgb), .2);
133
- }
134
-
135
- @include media('tablet') {
136
- &.horizontal {
137
- grid-template-columns: fit-content(50%) auto 1fr auto;
138
- grid-template-rows : auto 1fr auto auto;
139
- grid-template-areas :
140
- 'thumbnail date heading heading'
141
- 'thumbnail excerpt excerpt excerpt'
142
- 'thumbnail category category author'
143
- 'thumbnail tag tag author';
144
- }
145
-
146
- &.pickup {
147
- grid-template-columns: 1fr;
148
- grid-template-rows : 1fr 0 0;
149
- grid-template-areas :
150
- 'thumbnail'
151
- 'heading'
152
- 'date';
153
- text-align: left;
154
-
155
- .thumbnail {
156
- position: relative;
157
-
158
- &::before {
159
- content : '';
160
- display : block;
161
- width : 100%;
162
- height : 100%;
163
- background-color: rgba(var(--black-rgb), .6);
164
- mix-blend-mode : multiply;
165
- pointer-events : none;
166
- position : absolute;
167
- top : 0;
168
- left : 0;
169
- z-index : 1;
170
- transition : all var(--animation-duration);
171
- }
172
- }
173
-
174
- .heading,
175
- .date {
176
- position: absolute;
177
- z-index : 2;
178
- }
179
-
180
- .heading {
181
- padding : 0;
182
- padding-right: var(--sp-medium);
183
- left : calc(var(--date-size) + var(--sp-medium) * 2);
184
- bottom : var(--sp-medium);
185
- }
186
-
187
- .date {
188
- margin: 0;
189
- bottom: var(--sp-medium);
190
- left : var(--sp-medium);
191
- }
192
-
193
- .excerpt,
194
- .category,
195
- .tag,
196
- .author {
197
- display: none;
198
- }
199
- }
200
- }
201
- }
202
-
203
- .date {
204
- display : flex;
205
- flex-direction : column;
206
- justify-content : center;
207
- align-items : center;
208
- gap : var(--sp-min);
209
- width : var(--date-size);
210
- height : var(--date-size);
211
- margin : var(--sp-medium);
212
- background-color: var(--black);
213
-
214
- > * {
215
- letter-spacing: .1em;
216
- line-height : 1;
217
- }
218
- }
219
-
220
- .heading {
221
- display : flex;
222
- align-items : center;
223
- padding : var(--sp-medium);
224
- padding-inline-start: 0;
225
-
226
- > h2 {
227
- @include textEllipsis(2);
228
- }
229
- }
230
-
231
- .category,
232
- .tag {
233
- margin-inline-start: var(--sp-medium);
234
- padding-block-end : var(--sp-medium);
235
- }
236
-
237
- .category {
238
- align-items: flex-end;
239
- }
240
-
241
- .author {
242
- padding: var(--sp-medium);
243
- }
244
-
245
- .excerpt {
246
- padding: var(--sp-medium);
247
- }
248
- </style>
@@ -1,151 +0,0 @@
1
- <script setup lang="ts">
2
- import { returnAuthor } from '../../../scripts/utils'
3
- import type {
4
- Article,
5
- Category,
6
- PostConfig,
7
- } from '../../../types'
8
- import CardContainer from '../../../components/ArticleList/Parts/CardContainer.vue'
9
- import ThumbnailImage from '../../../components/ArticleList/Parts/ThumbnailImage.vue'
10
- import AuthorInfo from '../../../components/ArticleList/Parts/AuthorInfo.vue'
11
- import CardHeading from '../../../components/ArticleList/Parts/CardHeading.vue'
12
- import CategoryList from '../../../components/ArticleList/Parts/CategoryList.vue'
13
- import TagList from '../../../components/ArticleList/Parts/TagList.vue'
14
- import PostedDate from '../../../components/ArticleList/Parts/PostedDate.vue'
15
- import ExcerptText from '../../../components/ArticleList/Parts/ExcerptText.vue'
16
-
17
- defineProps<{
18
- article: Article
19
- path: string
20
- postConfig: PostConfig
21
- categories: Category[]
22
- }>()
23
- </script>
24
-
25
- <template>
26
- <CardContainer
27
- v-if="article"
28
- :class="$style.container"
29
- :path="path"
30
- >
31
- <ThumbnailImage
32
- :article="article"
33
- :aspectRatio="{
34
- desktop: '16/9',
35
- tablet : '4/3',
36
- mobile : '1/1',
37
- }"
38
- :class="$style.thumbnail"
39
- style="grid-area: thumbnail;"
40
- />
41
- <PostedDate
42
- :date="article.date"
43
- :class="$style.date"
44
- formatString="yyyy.M.d"
45
- fontWeight="bold"
46
- style="grid-area: date;"
47
- />
48
- <CategoryList
49
- v-if="postConfig.category && article.categories"
50
- :categoryIds="article.categories"
51
- :categoryData="categories"
52
- :label="{
53
- color : 'var(--main-color)',
54
- fontSize: 'small',
55
- }"
56
- :class="$style.category"
57
- style="grid-area: category;"
58
- />
59
- <CardHeading
60
- :heading="article.title.rendered"
61
- :class="$style.heading"
62
- style="grid-area: heading;"
63
- />
64
- <ExcerptText
65
- :excerpt="article.excerpt.rendered"
66
- :class="$style.excerpt"
67
- style="grid-area: excerpt;"
68
- />
69
- <TagList
70
- v-if="postConfig.tag"
71
- :article="article"
72
- :label="{
73
- color : 'var(--gray)',
74
- fontSize: 'small',
75
- }"
76
- :class="$style.tag"
77
- style="grid-area: tag;"
78
- />
79
- <AuthorInfo
80
- v-if="postConfig.author && returnAuthor(article)"
81
- :name="returnAuthor(article)?.name"
82
- :class="$style.author"
83
- :text="{
84
- color : 'var(--gray)',
85
- preposition: 'by',
86
- }"
87
- fontSize="small"
88
- style="grid-area: author;"
89
- />
90
- </CardContainer>
91
- </template>
92
-
93
- <style lang="scss" module>
94
- @use '../../../assets/scss/mixin' as *;
95
-
96
- .container {
97
- grid-template-columns : 28% auto auto;
98
- grid-template-rows : auto auto 1fr auto;
99
- grid-template-areas :
100
- 'thumbnail date category'
101
- 'thumbnail heading heading'
102
- 'thumbnail excerpt excerpt'
103
- 'thumbnail tag author';
104
- row-gap : var(--sp-small);
105
- column-gap: var(--sp-large);
106
-
107
- @include media('mobile') {
108
- grid-template-columns: 33% auto auto;
109
- column-gap : var(--sp-medium);
110
- }
111
-
112
- &:hover {
113
- .thumbnail {
114
- opacity: .8;
115
- }
116
- }
117
- }
118
-
119
- .thumbnail {
120
- transition: opacity var(--animation-duration);
121
- }
122
-
123
- .heading {
124
- @include textEllipsis();
125
- }
126
-
127
- .category,
128
- .tag {
129
- li {
130
- @include media('mobile') {
131
- @include textEllipsis();
132
- }
133
- }
134
- }
135
-
136
- .category {
137
- justify-content: flex-end;
138
- }
139
-
140
- .excerpt {
141
- > p {
142
- @include media('mobile') {
143
- @include textEllipsis(2);
144
- }
145
- }
146
- }
147
-
148
- .author {
149
- justify-content: flex-end;
150
- }
151
- </style>