Skip to content

Commit

Permalink
feat: change to new link cards styles
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyxguo committed Sep 10, 2023
1 parent 248b42c commit c95eda1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/components/Link/LinkCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export default defineComponent({
@apply relative;
&.highlighted.category-mode .article .article-content p {
@apply h-12 sm:h-14 lg:h-[4.6rem];
-webkit-line-clamp: 3;
@apply h-8 sm:h-10 lg:h-10;
-webkit-line-clamp: 2;
}
&.article-container {
Expand All @@ -99,7 +99,7 @@ export default defineComponent({
}
.article .article-content p {
@apply h-10 sm:h-10 lg:h-12;
@apply h-10 sm:h-10 lg:h-10 text-sm;
display: -webkit-box;
margin: 0 auto;
-webkit-line-clamp: 2;
Expand Down
15 changes: 10 additions & 5 deletions src/components/Link/LinkCategoryList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<span class="text-ob-dim mb-8 text-lg">
{{ t(`${convertToLocale(category)}-desc`) }}
</span>
<ul
class="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-8"
>
<ul :class="linkWrapperClasses(category)">
<template v-for="[i, link] of links[category].entries()" :key="i">
<LinkCard
:nick="link.nick"
Expand Down Expand Up @@ -50,8 +48,15 @@ export default defineComponent({
const { t } = useI18n()
return {
t,
convertToLocale
linkWrapperClasses: (category: string) => {
return {
'grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-6': true,
'xl:grid-cols-5': category !== 'links-badge-vip',
'xl:grid-cols-4': category === 'links-badge-vip'
}
},
convertToLocale,
t
}
}
})
Expand Down
4 changes: 1 addition & 3 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ b {
}

.highlighted {
@apply border-solid;
border-width: 1px;
border-color: var(--bg-sub-accent-55);
@apply relative;
}

.highlighted:before {
Expand Down

0 comments on commit c95eda1

Please sign in to comment.