Skip to content

Commit

Permalink
🛠️ 全面改用 Scss 编写样式
Browse files Browse the repository at this point in the history
  • Loading branch information
Skywt2003 committed Feb 4, 2024
1 parent 10f21d3 commit 299d97a
Show file tree
Hide file tree
Showing 17 changed files with 302 additions and 180 deletions.
189 changes: 189 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@astrojs/tailwind": "^5.1.0",
"astro": "^4.1.1",
"remixicon": "^4.0.1",
"sass": "^1.70.0",
"tailwindcss": "^3.4.1",
"tailwindcss-animated": "^1.0.1",
"typeit": "^8.8.3",
Expand Down
Binary file removed public/quzhou_tower_copy.png
Binary file not shown.
15 changes: 7 additions & 8 deletions src/components/Menu.astro
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ const { includeHome = true } = Astro.props;
</li>
</ul>

<style>
<style lang="scss">
ul {
@apply inline-block;
}

li {
@apply inline-block ml-2;
}

li:first-child {
@apply ml-0 !important;
li {
@apply inline-block ml-2;
&:first-child {
@apply ml-0;
}
}
}
</style>
8 changes: 4 additions & 4 deletions src/components/Rating.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---

<div class="primary-color">
<div class="primary-color mt-2">
<div class="align-center">
<span>感觉如何?</span>
<div class="inline-flex px-2">
Expand Down Expand Up @@ -72,9 +72,9 @@
});
</script>

<style>
i {
@apply p-1 text-xl text-gray-500;
<style class="scss">
.star {
@apply px-1 text-xl;
}

.active {
Expand Down
33 changes: 7 additions & 26 deletions src/components/bento/Bento.astro
Original file line number Diff line number Diff line change
Expand Up @@ -207,46 +207,27 @@ import LearnMore from "./LearnMore.astro";
<div id="bento-placeholder"></div>
</div>

<style>
@media (max-width: 319px) {
#bento-wrapper {
<style lang="scss">
#bento-wrapper {
@media (max-width: 319px) {
@apply hidden;
}
}
@media (min-width: 320px) {
#too-small-hint {

#too-small-hint {
@media (min-width: 320px) {
@apply hidden;
}
}

#bento-placeholder {
padding-bottom: 500%;
}

@screen lg {
#bento-placeholder {
@screen lg {
padding-bottom: 125%;
}
}

h3 {
@apply font-black;
}

:global(.bento-border) {
@apply rounded-2xl shadow-md shadow-gray-200 dark:shadow-neutral-800;
}

:global(.bento-bg) {
@apply bg-white dark:bg-neutral-800;
}

:global(.clickable) {
@apply cursor-pointer transition-all;
@apply hover:bg-gray-200 dark:hover:bg-neutral-600;
}

:global(.clickable:active) {
transform: scale(0.98);
}
</style>
2 changes: 1 addition & 1 deletion src/components/bento/BgBox.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const { bg_image, dim = true } = Astro.props;
<slot />
</div>

<style define:vars={{ bg_image }}>
<style define:vars={{ bg_image }} lang="scss">
#inner-wrapper {
@apply bg-center bg-cover bg-no-repeat bg-blend-overlay text-white;
background-image: var(--bg_image);
Expand Down
Loading

0 comments on commit 299d97a

Please sign in to comment.