Skip to content

Commit

Permalink
fix(theme): improve theme style
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo-Messi committed Sep 25, 2024
1 parent a074067 commit 1ce63d7
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 34 deletions.
56 changes: 32 additions & 24 deletions packages/Solis/components/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,23 @@
<p class="describe" v-html="article.frontMatter.description"></p>
</a>
<div class="post-info">
<i
class="fa-solid fa-calendar-week"
style="margin-right: 0.25rem; color: var(--vp-c-brand-1)"
></i>
{{ article.frontMatter.date }}
<span v-for="item in article.frontMatter.tags" :key="item">
<a :href="withBase(`/pages/tags.html?tag=${item}`)">
{{ item }}
</a>
<span>
<span v-for="(item, index) in article.frontMatter.tags" :key="item">
<i
v-if="index === 0"
class="fa-solid fa-tags"
style="margin-right: 0.25rem; color: var(--vp-c-brand-1)"
></i>
<a :href="withBase(`/pages/tags.html?tag=${item}`)">
{{ item
}}<span v-if="index < article.frontMatter.tags.length - 1"></span>
</a>
</span>
</span>
</div>
</div>
Expand Down Expand Up @@ -74,8 +86,8 @@ const sortedPosts = computed(() => {

<style lang="scss" scoped>
.post-list {
border-bottom: 1px dashed var(--vp-c-brand-soft);
padding: 14px 0;
// border-bottom: 1px dashed var(--vp-c-brand-soft);
padding: 20px 0;
}
.post-header {
Expand All @@ -86,21 +98,26 @@ const sortedPosts = computed(() => {
.post-title {
font-size: 1.125rem;
font-weight: 500;
margin: 0.1rem 0;
a {
color: var(--vp-c-text-1);
&:hover {
color: var(--vp-c-text-1);
}
}
}
.describe {
font-size: 0.9375rem;
font-size: 0.9rem;
color: var(--vp-c-text-2);
margin: 5px 0;
margin: 0.5rem 0;
line-height: 1.5rem;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
font-weight: 400;
font-weight: 450;
}
.pagination {
Expand All @@ -111,26 +128,17 @@ const sortedPosts = computed(() => {
.link {
display: inline-block;
font-size: 0.9rem;
font-weight: 500 !important;
width: 24px;
text-align: center;
border-right: none;
&.active {
color: var(--vp-c-text-1);
color: var(--vp-c-text-1) !important;
&:hover {
color: var(--vp-c-brand-3);
color: var(--vp-c-brand-3) !important;
}
}
&:first-child {
border-bottom-left-radius: 2px;
border-top-left-radius: 2px;
}
&:last-child {
border-bottom-right-radius: 2px;
border-top-right-radius: 2px;
border-right: 1px solid var(--vp-c-divider-light);
}
}
</style>
2 changes: 1 addition & 1 deletion packages/Solis/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@theojs/solis",
"version": "2.1.2",
"version": "2.2.0",
"type": "module",
"description": "VitePress的博客主题",
"repository": {
Expand Down
27 changes: 18 additions & 9 deletions packages/Solis/style/styles.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '@fortawesome/fontawesome-free/css/all.min.css';

:root {
--vp-c-brand: var(--vp-c-brand-1) !important;
--li-dot-color: var(--vp-c-brand);
Expand All @@ -9,16 +11,17 @@
}

.vp-doc a {
color: var(--vp-c-brand-1);
font-weight: 500;
font-weight: 900 !important;
text-decoration: none !important;
}

.content {
a[rel~='noreferrer']:link,
a[rel~='noreferrer']:visited {
color: var(--vp-c-brand);
border-bottom: 1px solid var(--vp-c-brand);
font-weight: 500 !important;
font-size: 1rem;
text-decoration: underline solid !important;
}
}

Expand Down Expand Up @@ -85,19 +88,25 @@

.date {
font-size: 0.875rem;
font-weight: 500;
color: var(--date-color);
}
.post-info {
font-size: 12px;
display: flex;
align-items: center;
margin-right: 1em;
font-size: 0.75rem;
color: var(--vp-c-brand-1);

span {
display: inline-block;
padding: 0 8px;
background-color: var(--vp-c-bg-alt);
margin-right: 10px;
margin-left: 0.25rem;
transition: 0.4s;
border-radius: 2px;
color: var(--vp-c-text-1);
a {
font-size: 0.8rem;
font-weight: 500 !important;
color: var(--vp-c-brand-1) !important;
}
}
}
@media (min-width: 768px) {
Expand Down

0 comments on commit 1ce63d7

Please sign in to comment.