Skip to content

Commit

Permalink
feat: improve style
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Sketon committed Oct 20, 2024
1 parent 0410198 commit f580a2a
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 21 deletions.
6 changes: 1 addition & 5 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,7 @@ const totalmin2read = await totalReadingTime();
opacity: 0.3;
width: 200%;
height: 10px;
background-image: linear-gradient(
to left,
rgba(255, 0, 0, 0.75) 50%,
transparent 0%
);
background: linear-gradient(to left, var(--red-1) 50%, transparent 0%) repeat-x 0 0 / 100px 10px;
background-size: 100px 10px;
background-repeat: repeat-x;
transition: opacity 0.3s;
Expand Down
4 changes: 2 additions & 2 deletions src/components/FriendCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import { FRIEND } from "../utils/config";
---

<div class="friend-wrap" data-aos="fade-up">
<div class="friend-wrap">
{
FRIEND.map(({ name, desc, url, avatar }) => {
return (
<div class="friend-item-wrap">
<div class="friend-item-wrap" data-aos="zoom-in">
<a href={url} target="_blank" />
<div class="friend-icon-wrap">
<div class="friend-icon">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const posts = await getCollection("blog");
{
cover === `${BASE_URL}/images/banner.webp` ? (
<>
<picture>
<picture style="user-select: none;">
<source
media="(max-width: 479px)"
srcset={`${BASE_URL}/images/banner-600w.webp`}
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeaderSubTitle.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Props = {
const { subtitle, url } = Astro.props;
---

<h2 id="subtitle-wrap" slot="header">
<h2 id="subtitle-wrap" slot="header" data-aos="slide-down">
<a href={url} id="subtitle">
{subtitle}
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeaderTitle.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const { title, url } = Astro.props;

<div>
<a href={url} id="logo">
<h1>{title}</h1>
<h1 data-aos="slide-up">{title}</h1>
</a>
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/components/Pagination.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const lowerBound = currentPage - 2 > 0 ? currentPage - 2 : 1;
const upperBound = currentPage + 2 < lastPage ? currentPage + 2 : lastPage;
---

<nav id="page-nav">
<nav id="page-nav" data-aos="fade-up">
{
prevUrl && (
<a href={`${BASE_URL}${prevUrl}`} class="extend prev" rel="prev">
Expand Down Expand Up @@ -70,7 +70,7 @@ const upperBound = currentPage + 2 < lastPage ? currentPage + 2 : lastPage;
text-align: center;
color: var(--color-grey);
overflow: hidden;
transition: 0.3s;
transition: 1s;

&:hover {
box-shadow: 0 0 10px 3px var(--color-hover-shadow);
Expand Down
4 changes: 2 additions & 2 deletions src/components/post/Date.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ type Props = {
const { pubDate } = Astro.props;
---

<div class="article-date" data-aos="fade-left">
<span class="article-date-span">
<div class="article-date">
<span class="article-date-span" data-aos="zoom-in">
<Icon name="tabler:clock" />
<time datetime={pubDate.toISOString()} itemprop="datePublished"
>{pubDate.toLocaleDateString().replace(/\//g, "-")}</time
Expand Down
3 changes: 2 additions & 1 deletion src/components/post/Tag.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { tags } = Astro.props;
{
tags.map((tag) => {
return (
<li class="article-tag-list-item">
<li class="article-tag-list-item" data-aos="zoom-in">
<Icon name="tabler:tag-filled" style="margin-right: 10px"/>
<a
class="article-tag-list-link"
Expand Down Expand Up @@ -50,5 +50,6 @@ const { tags } = Astro.props;
display: flex;
align-items: center;
font-size: 12px;
box-shadow: 0 0 5px 3px var(--color-meta-shadow);
}
</style>
1 change: 1 addition & 0 deletions src/layouts/MarkdownLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const {
itemprop="blogPost"
itemscope
itemtype="https://schema.org/BlogPosting"
data-aos="fade-up"
>
<div class="article-inner">
<div class="article-meta">
Expand Down
8 changes: 2 additions & 6 deletions src/styles/base.stylus
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,8 @@
margin: 10px 0;
opacity: 0.3;
height: 2px;
background-image: linear-gradient(
to right,
rgba(255, 0, 0, 0.75) 50%,
transparent 0%
);
background-size: 20px 2px;
background-image: linear-gradient(to right, var(--red-0) 50%, transparent 0%);
background-size: 25px 2px;
background-repeat: repeat-x;
border: none;
filter: drop-shadow(0px 0px 2px red);
Expand Down

0 comments on commit f580a2a

Please sign in to comment.