Skip to content

Commit 0ed6faa

Browse files
authored
trying to update to new theme
1 parent 142b20d commit 0ed6faa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+4143
-957
lines changed

src/config/config.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"site": {
3+
"title": "Astroplate",
4+
"base_url": "https://astroplate.netlify.app",
5+
"base_path": "/",
6+
"trailing_slash": false,
7+
"favicon": "/images/favicon.png",
8+
"logo": "/images/logo.png",
9+
"logo_darkmode": "/images/logo-darkmode.png",
10+
"logo_width": "150",
11+
"logo_height": "30",
12+
"logo_text": "Astroplate"
13+
},
14+
15+
"settings": {
16+
"search": true,
17+
"sticky_header": true,
18+
"theme_switcher": true,
19+
"default_theme": "system",
20+
"pagination": 2,
21+
"summary_length": 200,
22+
"blog_folder": "blog"
23+
},
24+
25+
"announcement": {
26+
"enable": true,
27+
"content": "<span class='text-center block'>♥️ Loving Astroplate? <a class='underline' href='https://github.com/zeon-studio/astroplate' target='_blank' rel='noopener'>Please ⭐️ on Github</a></span>",
28+
"expire_days": 7
29+
},
30+
31+
"params": {
32+
"contact_form_action": "#",
33+
"copyright": "Designed And Developed by [Zeon Studio](https://zeon.studio)"
34+
},
35+
36+
"navigation_button": {
37+
"enable": true,
38+
"label": "Get Started",
39+
"link": "https://github.com/zeon-studio/astroplate"
40+
},
41+
42+
"google_tag_manager": {
43+
"enable": false,
44+
"gtm_id": "GTM-XXXXXX"
45+
},
46+
47+
"disqus": {
48+
"enable": true,
49+
"shortname": "themefisher-template",
50+
"settings": {}
51+
},
52+
53+
"metadata": {
54+
"meta_author": "zeon.studio",
55+
"meta_image": "/images/og-image.png",
56+
"meta_description": "astro and tailwind boilerplate"
57+
}
58+
}

src/config/menu.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"main": [
3+
{
4+
"name": "Home",
5+
"url": "/"
6+
},
7+
{
8+
"name": "About",
9+
"url": "/about"
10+
},
11+
{
12+
"name": "Elements",
13+
"url": "/elements"
14+
},
15+
{
16+
"name": "Pages",
17+
"url": "",
18+
"hasChildren": true,
19+
"children": [
20+
{
21+
"name": "Contact",
22+
"url": "/contact"
23+
},
24+
{
25+
"name": "Blog",
26+
"url": "/blog"
27+
},
28+
{
29+
"name": "Authors",
30+
"url": "/authors"
31+
},
32+
{
33+
"name": "Categories",
34+
"url": "/categories"
35+
},
36+
{
37+
"name": "Tags",
38+
"url": "/tags"
39+
},
40+
{
41+
"name": "404 Page",
42+
"url": "/404"
43+
}
44+
]
45+
}
46+
],
47+
"footer": [
48+
{
49+
"name": "Elements",
50+
"url": "/elements"
51+
},
52+
{
53+
"name": "Privacy Policy",
54+
"url": "/privacy-policy"
55+
}
56+
]
57+
}

src/config/social.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"main": [
3+
{
4+
"name": "facebook",
5+
"icon": "FaFacebook",
6+
"link": "https://www.facebook.com/"
7+
},
8+
{
9+
"name": "x",
10+
"icon": "FaXTwitter",
11+
"link": "https://x.com/"
12+
},
13+
{
14+
"name": "github",
15+
"icon": "FaGithub",
16+
"link": "https://www.github.com/"
17+
},
18+
{
19+
"name": "linkedin",
20+
"icon": "FaLinkedin",
21+
"link": "https://www.linkedin.com/"
22+
}
23+
]
24+
}

src/config/theme.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"colors": {
3+
"default": {
4+
"theme_color": {
5+
"primary": "#121212",
6+
"body": "#fff",
7+
"border": "#eaeaea",
8+
"light": "#f6f6f6",
9+
"dark": "#040404"
10+
},
11+
"text_color": {
12+
"text": "#444444",
13+
"text_dark": "#040404",
14+
"text_light": "#717171"
15+
}
16+
},
17+
"darkmode": {
18+
"theme_color": {
19+
"primary": "#fff",
20+
"body": "#1c1c1c",
21+
"border": "#3E3E3E",
22+
"light": "#222222",
23+
"dark": "#fff"
24+
},
25+
"text_color": {
26+
"text": "#B4AFB6",
27+
"text_dark": "#fff",
28+
"text_light": "#B4AFB6"
29+
}
30+
}
31+
},
32+
"fonts": {
33+
"font_family": {
34+
"primary": "Heebo:wght@400;600",
35+
"primary_type": "sans-serif",
36+
"secondary": "Signika:wght@500;700",
37+
"secondary_type": "sans-serif"
38+
},
39+
"font_size": {
40+
"base": "16",
41+
"scale": "1.2"
42+
}
43+
}
44+
}

src/content.config.ts

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
import { glob } from "astro/loaders";
2+
import { defineCollection, z } from "astro:content";
3+
4+
const commonFields = {
5+
title: z.string(),
6+
description: z.string(),
7+
meta_title: z.string().optional(),
8+
date: z.date().optional(),
9+
image: z.string().optional(),
10+
draft: z.boolean(),
11+
};
12+
13+
// Post collection schema
14+
const blogCollection = defineCollection({
15+
loader: glob({ pattern: "**/*.{md,mdx}", base: "src/content/apps" }),
16+
schema: z.object({
17+
title: z.string(),
18+
meta_title: z.string().optional(),
19+
description: z.string().optional(),
20+
date: z.date().optional(),
21+
image: z.string().optional(),
22+
author: z.string().default("Admin"),
23+
categories: z.array(z.string()).default(["others"]),
24+
tags: z.array(z.string()).default(["others"]),
25+
draft: z.boolean().optional(),
26+
}),
27+
});
28+
29+
// Author collection schema
30+
const authorsCollection = defineCollection({
31+
loader: glob({ pattern: "**/*.{md,mdx}", base: "src/content/authors" }),
32+
schema: z.object({
33+
...commonFields,
34+
social: z
35+
.array(
36+
z
37+
.object({
38+
name: z.string().optional(),
39+
icon: z.string().optional(),
40+
link: z.string().optional(),
41+
})
42+
.optional(),
43+
)
44+
.optional(),
45+
draft: z.boolean().optional(),
46+
}),
47+
});
48+
49+
// Pages collection schema
50+
const pagesCollection = defineCollection({
51+
loader: glob({ pattern: "**/*.{md,mdx}", base: "src/content/pages" }),
52+
schema: z.object({
53+
...commonFields,
54+
}),
55+
});
56+
57+
// about collection schema
58+
const aboutCollection = defineCollection({
59+
loader: glob({ pattern: "**/*.{md,mdx}", base: "src/content/about" }),
60+
schema: z.object({
61+
...commonFields,
62+
}),
63+
});
64+
65+
// contact collection schema
66+
const contactCollection = defineCollection({
67+
loader: glob({ pattern: "**/*.{md,mdx}", base: "src/content/contact" }),
68+
schema: z.object({
69+
...commonFields,
70+
}),
71+
});
72+
73+
// Homepage collection schema
74+
const homepageCollection = defineCollection({
75+
loader: glob({ pattern: "**/-*.{md,mdx}", base: "src/content/homepage" }),
76+
schema: z.object({
77+
banner: z.object({
78+
title: z.string(),
79+
content: z.string(),
80+
image: z.string(),
81+
button: z.object({
82+
enable: z.boolean(),
83+
label: z.string(),
84+
link: z.string(),
85+
}),
86+
}),
87+
features: z.array(
88+
z.object({
89+
title: z.string(),
90+
image: z.string(),
91+
content: z.string(),
92+
bulletpoints: z.array(z.string()),
93+
button: z.object({
94+
enable: z.boolean(),
95+
label: z.string(),
96+
link: z.string(),
97+
}),
98+
}),
99+
),
100+
}),
101+
});
102+
103+
// Call to Action collection schema
104+
const ctaSectionCollection = defineCollection({
105+
loader: glob({
106+
pattern: "call-to-action.{md,mdx}",
107+
base: "src/content/sections",
108+
}),
109+
schema: z.object({
110+
enable: z.boolean(),
111+
title: z.string(),
112+
description: z.string(),
113+
image: z.string(),
114+
button: z.object({
115+
enable: z.boolean(),
116+
label: z.string(),
117+
link: z.string(),
118+
}),
119+
}),
120+
});
121+
122+
// Testimonials Section collection schema
123+
const testimonialSectionCollection = defineCollection({
124+
loader: glob({
125+
pattern: "testimonial.{md,mdx}",
126+
base: "src/content/sections",
127+
}),
128+
schema: z.object({
129+
enable: z.boolean(),
130+
title: z.string(),
131+
description: z.string(),
132+
testimonials: z.array(
133+
z.object({
134+
name: z.string(),
135+
avatar: z.string(),
136+
designation: z.string(),
137+
content: z.string(),
138+
}),
139+
),
140+
}),
141+
});
142+
143+
// Export collections
144+
export const collections = {
145+
// Pages
146+
homepage: homepageCollection,
147+
blog: blogCollection,
148+
authors: authorsCollection,
149+
pages: pagesCollection,
150+
about: aboutCollection,
151+
contact: contactCollection,
152+
153+
// sections
154+
ctaSection: ctaSectionCollection,
155+
testimonialSection: testimonialSectionCollection,
156+
};

src/hooks/useTheme.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { useEffect, useState } from "react";
2+
3+
const useTheme = (): string => {
4+
const [themeValue, setThemeValue] = useState("");
5+
6+
useEffect(() => {
7+
setThemeValue(
8+
document.documentElement.classList.contains("dark") ? "dark" : "light",
9+
);
10+
}, []);
11+
12+
return themeValue;
13+
};
14+
15+
export default useTheme;

0 commit comments

Comments
 (0)