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