mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-18 14:13:30 +09:00
update theme variable
This commit is contained in:
@@ -6,9 +6,9 @@ import { getSinglePage } from "@/lib/contentParser.astro";
|
||||
import dateFormat from "@/lib/utils/dateFormat";
|
||||
import similarItems from "@/lib/utils/similarItems";
|
||||
import { humanize, markdownify, slugify } from "@/lib/utils/textConverter";
|
||||
import { render } from "astro:content";
|
||||
import { FaRegClock, FaRegFolder, FaRegUserCircle } from "react-icons/fa";
|
||||
import ImageMod from "./components/ImageMod.astro";
|
||||
import { render } from "astro:content";
|
||||
|
||||
const COLLECTION_FOLDER = "blog";
|
||||
const { post } = Astro.props;
|
||||
@@ -72,7 +72,7 @@ const { title, description, author, categories, image, date, tags } = post.data;
|
||||
tags.map((tag: string) => (
|
||||
<li class="inline-block">
|
||||
<a
|
||||
class="m-1 block rounded bg-theme-light px-3 py-1 hover:bg-primary hover:text-white dark:bg-darkmode-theme-light dark:hover:bg-darkmode-primary dark:hover:text-dark"
|
||||
class="m-1 block rounded bg-light px-3 py-1 hover:bg-primary hover:text-white dark:bg-darkmode-light dark:hover:bg-darkmode-primary dark:hover:text-text-dark"
|
||||
href={`/tags/${slugify(tag)}`}
|
||||
>
|
||||
{humanize(tag)}
|
||||
|
||||
@@ -7,9 +7,7 @@ const { data } = Astro.props;
|
||||
const { title, image, social } = data.data;
|
||||
---
|
||||
|
||||
<div
|
||||
class="rounded bg-theme-light p-8 text-center dark:bg-darkmode-theme-light"
|
||||
>
|
||||
<div class="rounded bg-light p-8 text-center dark:bg-darkmode-light">
|
||||
{
|
||||
image && (
|
||||
<ImageMod
|
||||
|
||||
@@ -34,7 +34,9 @@ paths.forEach((label: string, i: number) => {
|
||||
{label}
|
||||
</a>
|
||||
) : (
|
||||
<span class="text-light dark:text-darkmode-light">{label}</span>
|
||||
<span class="text-text-light dark:text-darkmode-text-light">
|
||||
{label}
|
||||
</span>
|
||||
)}
|
||||
</li>
|
||||
))
|
||||
|
||||
@@ -30,7 +30,7 @@ for (let i = 1; i <= totalPages; i++) {
|
||||
? `${section ? "/" + section : "/"}`
|
||||
: `${section ? "/" + section : ""}/page/${currentPage - 1}`
|
||||
}
|
||||
class="rounded px-2 py-1.5 text-dark hover:bg-theme-light dark:text-darkmode-dark dark:hover:bg-darkmode-theme-light"
|
||||
class="rounded px-2 py-1.5 text-text-dark hover:bg-light dark:text-darkmode-text-dark dark:hover:bg-darkmode-light"
|
||||
>
|
||||
<span class="sr-only">Previous</span>
|
||||
<svg
|
||||
@@ -48,7 +48,7 @@ for (let i = 1; i <= totalPages; i++) {
|
||||
</svg>
|
||||
</a>
|
||||
) : (
|
||||
<span class="rounded px-2 py-1.5 text-light">
|
||||
<span class="rounded px-2 py-1.5 text-text-light">
|
||||
<span class="sr-only">Previous</span>
|
||||
<svg
|
||||
viewBox="0 0 20 20"
|
||||
@@ -71,7 +71,7 @@ for (let i = 1; i <= totalPages; i++) {
|
||||
pagination === currentPage ? (
|
||||
<span
|
||||
aria-current="page"
|
||||
class="rounded bg-primary px-4 py-2 text-white dark:bg-darkmode-primary dark:text-dark"
|
||||
class="rounded bg-primary px-4 py-2 text-white dark:bg-darkmode-primary dark:text-text-dark"
|
||||
>
|
||||
{pagination}
|
||||
</span>
|
||||
@@ -83,7 +83,7 @@ for (let i = 1; i <= totalPages; i++) {
|
||||
: `${section ? "/" + section : ""}/page/${pagination}`
|
||||
}
|
||||
aria-current="page"
|
||||
class="rounded px-4 py-2 text-dark hover:bg-theme-light dark:text-darkmode-dark dark:hover:bg-darkmode-theme-light"
|
||||
class="rounded px-4 py-2 text-text-dark hover:bg-light dark:text-darkmode-text-dark dark:hover:bg-darkmode-light"
|
||||
>
|
||||
{pagination}
|
||||
</a>
|
||||
@@ -94,7 +94,7 @@ for (let i = 1; i <= totalPages; i++) {
|
||||
{hasNextPage ? (
|
||||
<a
|
||||
href={`${section ? "/" + section : ""}/page/${currentPage + 1}`}
|
||||
class="rounded px-2 py-1.5 text-dark hover:bg-theme-light dark:text-darkmode-dark dark:hover:bg-darkmode-theme-light"
|
||||
class="rounded px-2 py-1.5 text-text-dark hover:bg-light dark:text-darkmode-text-dark dark:hover:bg-darkmode-light"
|
||||
>
|
||||
<span class="sr-only">Next</span>
|
||||
<svg
|
||||
@@ -112,7 +112,7 @@ for (let i = 1; i <= totalPages; i++) {
|
||||
</svg>
|
||||
</a>
|
||||
) : (
|
||||
<span class="rounded px-2 py-1.5 text-light">
|
||||
<span class="rounded px-2 py-1.5 text-text-light">
|
||||
<span class="sr-only">Next</span>
|
||||
<svg
|
||||
viewBox="0 0 20 20"
|
||||
|
||||
@@ -8,7 +8,7 @@ const { call_to_action } = Astro.props;
|
||||
call_to_action.data.enable && (
|
||||
<section class="mb-28">
|
||||
<div class="container">
|
||||
<div class="rounded-xl bg-theme-light px-4 py-16 dark:bg-darkmode-theme-light xl:p-20">
|
||||
<div class="rounded-xl bg-light px-4 py-16 dark:bg-darkmode-light xl:p-20">
|
||||
<div class="row items-center justify-between">
|
||||
<div class="mb-10 md:col-5 lg:col-4 md:order-2 md:mb-0">
|
||||
<ImageMod
|
||||
|
||||
@@ -9,7 +9,7 @@ import { markdownify } from "@/lib/utils/textConverter";
|
||||
const { footer }: { footer: { name: string; url: string }[] } = menu;
|
||||
---
|
||||
|
||||
<footer class="bg-theme-light dark:bg-darkmode-theme-light">
|
||||
<footer class="bg-light dark:bg-darkmode-light">
|
||||
<div class="container">
|
||||
<div class="row items-center py-10">
|
||||
<div class="mb-8 text-center lg:col-3 lg:mb-0 lg:text-left">
|
||||
@@ -32,7 +32,9 @@ const { footer }: { footer: { name: string; url: string }[] } = menu;
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-t border-border py-7 dark:border-darkmode-border">
|
||||
<div class="container text-center text-light dark:text-darkmode-light">
|
||||
<div
|
||||
class="container text-center text-text-light dark:text-darkmode-text-light"
|
||||
>
|
||||
<p set:html={markdownify(config.params.copyright)} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@ const { pathname } = Astro.url;
|
||||
<input id="nav-toggle" type="checkbox" class="hidden" />
|
||||
<label
|
||||
for="nav-toggle"
|
||||
class="order-3 cursor-pointer flex items-center lg:hidden text-dark dark:text-white lg:order-1"
|
||||
class="order-3 cursor-pointer flex items-center lg:hidden text-text-dark dark:text-white lg:order-1"
|
||||
>
|
||||
<svg id="show-button" class="h-6 fill-current block" viewBox="0 0 20 20">
|
||||
<title>Menu Open</title>
|
||||
@@ -121,7 +121,7 @@ const { pathname } = Astro.url;
|
||||
{
|
||||
settings.search && (
|
||||
<button
|
||||
class="border-border text-dark hover:text-primary dark:border-darkmode-border mr-5 inline-block border-r pr-5 text-xl dark:text-white dark:hover:text-darkmode-primary"
|
||||
class="border-border text-text-dark hover:text-primary dark:border-darkmode-border mr-5 inline-block border-r pr-5 text-xl dark:text-white dark:hover:text-darkmode-primary"
|
||||
aria-label="search"
|
||||
data-search-trigger
|
||||
>
|
||||
|
||||
@@ -8,7 +8,7 @@ const { title = "" }: { title?: string } = Astro.props;
|
||||
<section>
|
||||
<div class="container text-center">
|
||||
<div
|
||||
class="rounded-2xl bg-gradient-to-b from-body to-theme-light px-8 py-14 dark:from-darkmode-body dark:to-darkmode-theme-light"
|
||||
class="rounded-2xl bg-gradient-to-b from-body to-light px-8 py-14 dark:from-darkmode-body dark:to-darkmode-light"
|
||||
>
|
||||
<h1 set:text={humanize(title)} />
|
||||
<Breadcrumbs className="mt-6" />
|
||||
|
||||
@@ -8,7 +8,7 @@ const { tags, categories, allCategories } = Astro.props;
|
||||
<!-- categories -->
|
||||
<div class="mb-8">
|
||||
<h5 class="mb-6">Categories</h5>
|
||||
<div class="rounded bg-theme-light p-8 dark:bg-darkmode-theme-light">
|
||||
<div class="rounded bg-light p-8 dark:bg-darkmode-light">
|
||||
<ul class="space-y-4">
|
||||
{
|
||||
categories.map((category: any) => {
|
||||
@@ -33,14 +33,14 @@ const { tags, categories, allCategories } = Astro.props;
|
||||
<!-- tags -->
|
||||
<div class="mb-8">
|
||||
<h5 class="mb-6">Tags</h5>
|
||||
<div class="rounded bg-theme-light p-6 dark:bg-darkmode-theme-light">
|
||||
<div class="rounded bg-light p-6 dark:bg-darkmode-light">
|
||||
<ul>
|
||||
{
|
||||
tags.map((tag: any) => {
|
||||
return (
|
||||
<li class="inline-block">
|
||||
<a
|
||||
class="m-1 block rounded bg-white px-3 py-1 hover:bg-primary hover:text-white dark:bg-darkmode-body dark:hover:bg-darkmode-primary dark:hover:text-dark"
|
||||
class="m-1 block rounded bg-white px-3 py-1 hover:bg-primary hover:text-white dark:bg-darkmode-body dark:hover:bg-darkmode-primary dark:hover:text-text-dark"
|
||||
href={`/tags/${tag}`}
|
||||
>
|
||||
{humanize(tag)}
|
||||
|
||||
@@ -24,8 +24,8 @@ const { testimonial } = Astro.props;
|
||||
designation: string;
|
||||
}) => (
|
||||
<div class="swiper-slide">
|
||||
<div class="rounded-lg bg-theme-light px-7 py-10 dark:bg-darkmode-theme-light">
|
||||
<div class="text-dark dark:text-white">
|
||||
<div class="rounded-lg bg-light px-7 py-10 dark:bg-darkmode-light">
|
||||
<div class="text-text-dark dark:text-white">
|
||||
<svg
|
||||
width="33"
|
||||
height="20"
|
||||
@@ -44,7 +44,7 @@ const { testimonial } = Astro.props;
|
||||
set:html={markdownify(item.content)}
|
||||
/>
|
||||
<div class="mt-11 flex items-center">
|
||||
<div class="text-dark dark:text-white">
|
||||
<div class="text-text-dark dark:text-white">
|
||||
<ImageMod
|
||||
height={50}
|
||||
width={50}
|
||||
@@ -61,13 +61,13 @@ const { testimonial } = Astro.props;
|
||||
/>
|
||||
<p
|
||||
set:text={item.designation}
|
||||
class="text-dark dark:text-white"
|
||||
class="text-text-dark dark:text-white"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
<div class="testimonial-slider-pagination mt-9 flex items-center justify-center text-center" />
|
||||
|
||||
Reference in New Issue
Block a user