mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-11 18:56:06 +09:00
format code
This commit is contained in:
+12
-12
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "astroplate",
|
"name": "astroplate",
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"description": "Astro and Tailwindcss boilerplate",
|
"description": "Astro and Tailwindcss boilerplate",
|
||||||
"author": "zeon.studio",
|
"author": "zeon.studio",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -9,20 +9,20 @@
|
|||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
"json": "node scripts/jsonGenerator.js",
|
"json": "node scripts/jsonGenerator.js",
|
||||||
"format": "prettier -w ."
|
"format": "prettier -w ./src"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/image": "^0.16.8",
|
"@astrojs/image": "^0.16.9",
|
||||||
"@astrojs/mdx": "^0.19.1",
|
"@astrojs/mdx": "^0.19.2",
|
||||||
"@astrojs/react": "^2.1.3",
|
"@astrojs/react": "^2.2.0",
|
||||||
"@astrojs/rss": "^2.4.1",
|
"@astrojs/rss": "^2.4.2",
|
||||||
"@astrojs/sitemap": "^1.3.1",
|
"@astrojs/sitemap": "^1.3.1",
|
||||||
"@astrojs/tailwind": "^3.1.2",
|
"@astrojs/tailwind": "^3.1.3",
|
||||||
"@tailwindcss/forms": "^0.5.3",
|
"@tailwindcss/forms": "^0.5.3",
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
"@types/marked": "^4.3.0",
|
"@types/marked": "^5.0.0",
|
||||||
"@types/react": "^18.2.6",
|
"@types/react": "^18.2.6",
|
||||||
"astro": "^2.4.5",
|
"astro": "^2.5.1",
|
||||||
"astro-auto-import": "^0.3.0",
|
"astro-auto-import": "^0.3.0",
|
||||||
"date-fns": "^2.30.0",
|
"date-fns": "^2.30.0",
|
||||||
"date-fns-tz": "^2.0.0",
|
"date-fns-tz": "^2.0.0",
|
||||||
@@ -33,8 +33,8 @@
|
|||||||
"marked": "^5.0.2",
|
"marked": "^5.0.2",
|
||||||
"postcss": "^8.4.23",
|
"postcss": "^8.4.23",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"prettier-plugin-astro": "^0.8.1",
|
"prettier-plugin-astro": "^0.9.0",
|
||||||
"prettier-plugin-tailwindcss": "^0.2.8",
|
"prettier-plugin-tailwindcss": "^0.3.0",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
"remark-toc": "^8.0.1",
|
"remark-toc": "^8.0.1",
|
||||||
"sass": "^1.62.1",
|
"sass": "^1.62.1",
|
||||||
"sharp": "^0.32.1",
|
"sharp": "^0.32.1",
|
||||||
"swiper": "^9.3.1",
|
"swiper": "^9.3.2",
|
||||||
"tailwind-bootstrap-grid": "^5.0.1",
|
"tailwind-bootstrap-grid": "^5.0.1",
|
||||||
"tailwindcss": "^3.3.2"
|
"tailwindcss": "^3.3.2"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ features:
|
|||||||
image: "/images/service-1.png"
|
image: "/images/service-1.png"
|
||||||
content: "Astroplate is a comprehensive starter template that includes everything you need to get started with your Astro project. What's Included in Astroplate"
|
content: "Astroplate is a comprehensive starter template that includes everything you need to get started with your Astro project. What's Included in Astroplate"
|
||||||
bulletpoints:
|
bulletpoints:
|
||||||
- "10+ Pre-build pages"
|
- "10+ Pre-build pages"
|
||||||
- "95+ Google Pagespeed Score"
|
- "95+ Google Pagespeed Score"
|
||||||
- "Build with Astro and TailwindCSS for easy and customizable styling"
|
- "Build with Astro and TailwindCSS for easy and customizable styling"
|
||||||
- "Fully responsive on all devices"
|
- "Fully responsive on all devices"
|
||||||
- "SEO-optimized for better search engine rankings"
|
- "SEO-optimized for better search engine rankings"
|
||||||
- "**Open-source and free** for personal and commercial use"
|
- "**Open-source and free** for personal and commercial use"
|
||||||
button:
|
button:
|
||||||
enable: false
|
enable: false
|
||||||
label: "Get Started Now"
|
label: "Get Started Now"
|
||||||
@@ -30,9 +30,9 @@ features:
|
|||||||
image: "/images/service-2.png"
|
image: "/images/service-2.png"
|
||||||
content: "Astro is an all-in-one web framework for building fast, content-focused websites. It offers a range of exciting features for developers and website creators. Some of the key features are:"
|
content: "Astro is an all-in-one web framework for building fast, content-focused websites. It offers a range of exciting features for developers and website creators. Some of the key features are:"
|
||||||
bulletpoints:
|
bulletpoints:
|
||||||
- "Zero JS, by default: No JavaScript runtime overhead to slow you down."
|
- "Zero JS, by default: No JavaScript runtime overhead to slow you down."
|
||||||
- "Customizable: Tailwind, MDX, and 100+ other integrations to choose from."
|
- "Customizable: Tailwind, MDX, and 100+ other integrations to choose from."
|
||||||
- "UI-agnostic: Supports React, Preact, Svelte, Vue, Solid, Lit and more."
|
- "UI-agnostic: Supports React, Preact, Svelte, Vue, Solid, Lit and more."
|
||||||
button:
|
button:
|
||||||
enable: true
|
enable: true
|
||||||
label: "Get Started Now"
|
label: "Get Started Now"
|
||||||
@@ -42,10 +42,10 @@ features:
|
|||||||
image: "/images/service-3.png"
|
image: "/images/service-3.png"
|
||||||
content: "With Astro, you can build modern and content-focused websites without sacrificing performance or ease of use."
|
content: "With Astro, you can build modern and content-focused websites without sacrificing performance or ease of use."
|
||||||
bulletpoints:
|
bulletpoints:
|
||||||
- "Instantly load static sites for better user experience and SEO."
|
- "Instantly load static sites for better user experience and SEO."
|
||||||
- "Intuitive syntax and support for popular frameworks make learning and using Astro a breeze."
|
- "Intuitive syntax and support for popular frameworks make learning and using Astro a breeze."
|
||||||
- "Use any front-end library or framework, or build custom components, for any project size."
|
- "Use any front-end library or framework, or build custom components, for any project size."
|
||||||
- "Built on cutting-edge technology to keep your projects up-to-date with the latest web standards."
|
- "Built on cutting-edge technology to keep your projects up-to-date with the latest web standards."
|
||||||
button:
|
button:
|
||||||
enable: false
|
enable: false
|
||||||
label: ""
|
label: ""
|
||||||
|
|||||||
@@ -103,7 +103,8 @@ Some text to show that the reference links can follow later.
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="about/">About</a>
|
<a class="nav-link" href="about/">About</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>`}
|
</ul>
|
||||||
|
`}
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -126,7 +127,7 @@ img {
|
|||||||
```javascript
|
```javascript
|
||||||
window.addEventListener("load", (e) => {
|
window.addEventListener("load", (e) => {
|
||||||
document.querySelector(".preloader").style.display = "none";
|
document.querySelector(".preloader").style.display = "none";
|
||||||
})
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -146,19 +147,19 @@ window.addEventListener("load", (e) => {
|
|||||||
### Notice
|
### Notice
|
||||||
|
|
||||||
<Notice type="note">
|
<Notice type="note">
|
||||||
This is a simple note.
|
This is a simple note.
|
||||||
</Notice>
|
</Notice>
|
||||||
|
|
||||||
<Notice type="tip">
|
<Notice type="tip">
|
||||||
This is a simple note.
|
This is a simple note.
|
||||||
</Notice>
|
</Notice>
|
||||||
|
|
||||||
<Notice type="info">
|
<Notice type="info">
|
||||||
This is a simple note.
|
This is a simple note.
|
||||||
</Notice>
|
</Notice>
|
||||||
|
|
||||||
<Notice type="warning">
|
<Notice type="warning">
|
||||||
This is a simple note.
|
This is a simple note.
|
||||||
</Notice>
|
</Notice>
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -172,6 +173,7 @@ window.addEventListener("load", (e) => {
|
|||||||
#### Did you come here for something in particular?
|
#### Did you come here for something in particular?
|
||||||
|
|
||||||
Did you come here for something in particular or just general Riker-bashing? And blowing into maximum warp speed, you appeared for an instant to be in two places at once. We have a saboteur aboard. We know you’re dealing in stolen ore. But I wanna talk about the assassination attempt on Lieutenant Worf.
|
Did you come here for something in particular or just general Riker-bashing? And blowing into maximum warp speed, you appeared for an instant to be in two places at once. We have a saboteur aboard. We know you’re dealing in stolen ore. But I wanna talk about the assassination attempt on Lieutenant Worf.
|
||||||
|
|
||||||
</Tab>
|
</Tab>
|
||||||
|
|
||||||
<Tab name="Tab 2">
|
<Tab name="Tab 2">
|
||||||
@@ -181,6 +183,7 @@ Did you come here for something in particular or just general Riker-bashing? And
|
|||||||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
||||||
|
|
||||||
</Tab>
|
</Tab>
|
||||||
|
|
||||||
<Tab name="Tab 3">
|
<Tab name="Tab 3">
|
||||||
@@ -190,6 +193,7 @@ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
|
|||||||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
|
||||||
|
|
||||||
</Tab>
|
</Tab>
|
||||||
|
|
||||||
</Tabs>
|
</Tabs>
|
||||||
@@ -206,7 +210,7 @@ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Collapse
|
### Accordion
|
||||||
|
|
||||||
<Accordion client:load title="Why should you need to do this?">
|
<Accordion client:load title="Why should you need to do this?">
|
||||||
|
|
||||||
@@ -254,4 +258,7 @@ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
|
|||||||
|
|
||||||
### Custom video
|
### Custom video
|
||||||
|
|
||||||
<Video width="100%" src="https://joy1.videvo.net/videvo_files/video/free/video0467/large_watermarked/_import_61516692993d77.04238324_preview.mp4" />
|
<Video
|
||||||
|
width="100%"
|
||||||
|
src="https://joy1.videvo.net/videvo_files/video/free/video0467/large_watermarked/_import_61516692993d77.04238324_preview.mp4"
|
||||||
|
/>
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ button:
|
|||||||
enable: true
|
enable: true
|
||||||
label: "Get Started Now"
|
label: "Get Started Now"
|
||||||
link: "https://github.com/zeon-studio/astroplate"
|
link: "https://github.com/zeon-studio/astroplate"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -5,23 +5,23 @@ description: "Don't just take our word for it - hear from some of our satisfied
|
|||||||
|
|
||||||
# Testimonials
|
# Testimonials
|
||||||
testimonials:
|
testimonials:
|
||||||
- name: "Marvin McKinney"
|
- name: "Marvin McKinney"
|
||||||
designation: "Web Designer"
|
designation: "Web Designer"
|
||||||
avatar: "/images/avatar-sm.png"
|
avatar: "/images/avatar-sm.png"
|
||||||
content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
|
content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
|
||||||
|
|
||||||
- name: "Marvin McKinney"
|
- name: "Marvin McKinney"
|
||||||
designation: "Web Designer"
|
designation: "Web Designer"
|
||||||
avatar: "/images/avatar-sm.png"
|
avatar: "/images/avatar-sm.png"
|
||||||
content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
|
content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
|
||||||
|
|
||||||
- name: "Marvin McKinney"
|
- name: "Marvin McKinney"
|
||||||
designation: "Web Designer"
|
designation: "Web Designer"
|
||||||
avatar: "/images/avatar-sm.png"
|
avatar: "/images/avatar-sm.png"
|
||||||
content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
|
content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
|
||||||
|
|
||||||
- name: "Marvin McKinney"
|
- name: "Marvin McKinney"
|
||||||
designation: "Web Designer"
|
designation: "Web Designer"
|
||||||
avatar: "/images/avatar-sm.png"
|
avatar: "/images/avatar-sm.png"
|
||||||
content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
|
content: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Qui iusto illo molestias, assumenda expedita commodi inventore non itaque molestiae voluptatum dolore, facilis sapiente, repellat veniam."
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
const useTheme = (): string => {
|
const useTheme = (): string => {
|
||||||
const [themeValue, setThemeValue] = useState("");
|
const [themeValue, setThemeValue] = useState("");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setThemeValue(document.documentElement.classList.contains('dark')? 'dark' : 'light');
|
setThemeValue(
|
||||||
|
document.documentElement.classList.contains("dark") ? "dark" : "light"
|
||||||
|
);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return themeValue;
|
return themeValue;
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ import Disqus from "@/function-components/Disqus";
|
|||||||
import { getSinglePage } from "@/lib/contentParser.astro";
|
import { getSinglePage } from "@/lib/contentParser.astro";
|
||||||
import dateFormat from "@/lib/utils/dateFormat";
|
import dateFormat from "@/lib/utils/dateFormat";
|
||||||
import similerItems from "@/lib/utils/similarItems";
|
import similerItems from "@/lib/utils/similarItems";
|
||||||
import { humanize,markdownify,slugify } from "@/lib/utils/textConverter";
|
import { humanize, markdownify, slugify } from "@/lib/utils/textConverter";
|
||||||
import { Image } from "@astrojs/image/components";
|
import { Image } from "@astrojs/image/components";
|
||||||
import {
|
import {
|
||||||
FaRegClock,
|
FaRegClock,
|
||||||
FaRegFolder,
|
FaRegFolder,
|
||||||
FaRegUserCircle,
|
FaRegUserCircle,
|
||||||
} from "react-icons/fa/index.js";
|
} from "react-icons/fa/index.js";
|
||||||
|
|
||||||
const { blog_folder } = config.settings;
|
const { blog_folder } = config.settings;
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ import config from "@/config/config.json";
|
|||||||
import { humanize, plainify, slugify } from "@/lib/utils/textConverter";
|
import { humanize, plainify, slugify } from "@/lib/utils/textConverter";
|
||||||
import { FaRegFolder, FaRegUserCircle } from "react-icons/fa/index.js";
|
import { FaRegFolder, FaRegUserCircle } from "react-icons/fa/index.js";
|
||||||
|
|
||||||
const { summary_length, blog_folder }: {summary_length: number, blog_folder: string} = config.settings;
|
const {
|
||||||
|
summary_length,
|
||||||
|
blog_folder,
|
||||||
|
}: { summary_length: number; blog_folder: string } = config.settings;
|
||||||
const { data } = Astro.props;
|
const { data } = Astro.props;
|
||||||
const { title, image, date, author, categories } = data.data;
|
const { title, image, date, author, categories } = data.data;
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { humanize } from "@/lib/utils/textConverter";
|
import { humanize } from "@/lib/utils/textConverter";
|
||||||
|
|
||||||
const { className }: {className?: string} = Astro.props;
|
const { className }: { className?: string } = Astro.props;
|
||||||
|
|
||||||
const paths = Astro.url.pathname.split("/").filter((x) => x);
|
const paths = Astro.url.pathname.split("/").filter((x) => x);
|
||||||
let parts = [
|
let parts = [
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
import { Image } from "@astrojs/image/components";
|
import { Image } from "@astrojs/image/components";
|
||||||
import config from "@/config/config.json";
|
import config from "@/config/config.json";
|
||||||
|
|
||||||
const { src, srcDarkmode } : {src?: string, srcDarkmode?: string} = Astro.props;
|
const { src, srcDarkmode }: { src?: string; srcDarkmode?: string } =
|
||||||
|
Astro.props;
|
||||||
const {
|
const {
|
||||||
logo,
|
logo,
|
||||||
logo_darkmode,
|
logo_darkmode,
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
---
|
---
|
||||||
type Pagination = {
|
type Pagination = {
|
||||||
section?: string, currentPage?: number, totalPages?: number
|
section?: string;
|
||||||
}
|
currentPage?: number;
|
||||||
const { section, currentPage=1, totalPages=1 }: Pagination = Astro.props;
|
totalPages?: number;
|
||||||
|
};
|
||||||
|
const { section, currentPage = 1, totalPages = 1 }: Pagination = Astro.props;
|
||||||
|
|
||||||
const indexPageLink = currentPage === 2;
|
const indexPageLink = currentPage === 2;
|
||||||
const hasPrevPage = currentPage > 1;
|
const hasPrevPage = currentPage > 1;
|
||||||
|
|||||||
@@ -7,8 +7,14 @@ import {
|
|||||||
IoLogoTwitter,
|
IoLogoTwitter,
|
||||||
} from "react-icons/io5/index.js";
|
} from "react-icons/io5/index.js";
|
||||||
|
|
||||||
const { base_url }: {base_url: string} = config.site;
|
const { base_url }: { base_url: string } = config.site;
|
||||||
const { title, description, slug, className }: {title?: string, description?: string, slug?: string, className?: string} = Astro.props;
|
const {
|
||||||
|
title,
|
||||||
|
description,
|
||||||
|
slug,
|
||||||
|
className,
|
||||||
|
}: { title?: string; description?: string; slug?: string; className?: string } =
|
||||||
|
Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<ul class={`${className}`}>
|
<ul class={`${className}`}>
|
||||||
|
|||||||
@@ -36,38 +36,38 @@ import {
|
|||||||
} from "react-icons/io5/index.js";
|
} from "react-icons/io5/index.js";
|
||||||
|
|
||||||
type SocialLink = {
|
type SocialLink = {
|
||||||
facebook: string,
|
facebook: string;
|
||||||
twitter: string,
|
twitter: string;
|
||||||
mastodon: string,
|
mastodon: string;
|
||||||
instagram: string,
|
instagram: string;
|
||||||
youtube: string,
|
youtube: string;
|
||||||
linkedin: string,
|
linkedin: string;
|
||||||
github: string,
|
github: string;
|
||||||
gitlab: string,
|
gitlab: string;
|
||||||
discord: string,
|
discord: string;
|
||||||
slack: string,
|
slack: string;
|
||||||
medium: string,
|
medium: string;
|
||||||
codepen: string,
|
codepen: string;
|
||||||
bitbucket: string,
|
bitbucket: string;
|
||||||
dribbble: string,
|
dribbble: string;
|
||||||
behance: string,
|
behance: string;
|
||||||
pinterest: string,
|
pinterest: string;
|
||||||
soundcloud: string,
|
soundcloud: string;
|
||||||
tumblr: string,
|
tumblr: string;
|
||||||
reddit: string,
|
reddit: string;
|
||||||
vk: string,
|
vk: string;
|
||||||
whatsapp: string,
|
whatsapp: string;
|
||||||
snapchat: string,
|
snapchat: string;
|
||||||
vimeo: string,
|
vimeo: string;
|
||||||
tiktok: string,
|
tiktok: string;
|
||||||
foursquare: string,
|
foursquare: string;
|
||||||
rss: string,
|
rss: string;
|
||||||
email: string,
|
email: string;
|
||||||
phone: string,
|
phone: string;
|
||||||
address: string,
|
address: string;
|
||||||
skype: string,
|
skype: string;
|
||||||
website: string,
|
website: string;
|
||||||
}
|
};
|
||||||
const {
|
const {
|
||||||
facebook,
|
facebook,
|
||||||
twitter,
|
twitter,
|
||||||
|
|||||||
@@ -1,47 +1,46 @@
|
|||||||
---
|
---
|
||||||
import config from "@/config/config.json";
|
import config from "@/config/config.json";
|
||||||
|
|
||||||
const { theme_switcher, default_theme }: { theme_switcher: boolean, default_theme: string } = config.settings;
|
const {
|
||||||
const {className}: {className?: string} = Astro.props;
|
theme_switcher,
|
||||||
|
default_theme,
|
||||||
|
}: { theme_switcher: boolean; default_theme: string } = config.settings;
|
||||||
|
const { className }: { className?: string } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
{
|
{
|
||||||
theme_switcher && (
|
theme_switcher && (
|
||||||
<div class={`theme-switcher ${className}`}>
|
<div class={`theme-switcher ${className}`}>
|
||||||
<input id="theme-switcher" data-theme-switcher type="checkbox" />
|
<input id="theme-switcher" data-theme-switcher type="checkbox" />
|
||||||
<label for="theme-switcher">
|
<label for="theme-switcher">
|
||||||
<span class="sr-only">theme switcher</span>
|
<span class="sr-only">theme switcher</span>
|
||||||
<span>
|
<span>
|
||||||
<!-- sun -->
|
<svg
|
||||||
<svg
|
class="absolute left-[4px] top-[4px] z-10 opacity-100 dark:opacity-0"
|
||||||
class="absolute left-[4px] top-[4px] z-10 opacity-100 dark:opacity-0"
|
viewBox="0 0 56 56"
|
||||||
viewBox="0 0 56 56"
|
fill="#fff"
|
||||||
fill="#fff"
|
height="16"
|
||||||
height="16"
|
width="16"
|
||||||
width="16"
|
>
|
||||||
>
|
<path d="M30 4.6c0-1-.9-2-2-2a2 2 0 0 0-2 2v5c0 1 .9 2 2 2s2-1 2-2Zm9.6 9a2 2 0 0 0 0 2.8c.8.8 2 .8 2.9 0L46 13a2 2 0 0 0 0-2.9 2 2 0 0 0-3 0Zm-26 2.8c.7.8 2 .8 2.8 0 .8-.7.8-2 0-2.9L13 10c-.7-.7-2-.8-2.9 0-.7.8-.7 2.1 0 3ZM28 16a12 12 0 0 0-12 12 12 12 0 0 0 12 12 12 12 0 0 0 12-12 12 12 0 0 0-12-12Zm23.3 14c1.1 0 2-.9 2-2s-.9-2-2-2h-4.9a2 2 0 0 0-2 2c0 1.1 1 2 2 2ZM4.7 26a2 2 0 0 0-2 2c0 1.1.9 2 2 2h4.9c1 0 2-.9 2-2s-1-2-2-2Zm37.8 13.6a2 2 0 0 0-3 0 2 2 0 0 0 0 2.9l3.6 3.5a2 2 0 0 0 2.9 0c.8-.8.8-2.1 0-3ZM10 43.1a2 2 0 0 0 0 2.9c.8.7 2.1.8 3 0l3.4-3.5c.8-.8.8-2.1 0-2.9-.8-.8-2-.8-2.9 0Zm20 3.4c0-1.1-.9-2-2-2a2 2 0 0 0-2 2v4.9c0 1 .9 2 2 2s2-1 2-2Z" />
|
||||||
<path
|
</svg>
|
||||||
d="M30 4.6c0-1-.9-2-2-2a2 2 0 0 0-2 2v5c0 1 .9 2 2 2s2-1 2-2Zm9.6 9a2 2 0 0 0 0 2.8c.8.8 2 .8 2.9 0L46 13a2 2 0 0 0 0-2.9 2 2 0 0 0-3 0Zm-26 2.8c.7.8 2 .8 2.8 0 .8-.7.8-2 0-2.9L13 10c-.7-.7-2-.8-2.9 0-.7.8-.7 2.1 0 3ZM28 16a12 12 0 0 0-12 12 12 12 0 0 0 12 12 12 12 0 0 0 12-12 12 12 0 0 0-12-12Zm23.3 14c1.1 0 2-.9 2-2s-.9-2-2-2h-4.9a2 2 0 0 0-2 2c0 1.1 1 2 2 2ZM4.7 26a2 2 0 0 0-2 2c0 1.1.9 2 2 2h4.9c1 0 2-.9 2-2s-1-2-2-2Zm37.8 13.6a2 2 0 0 0-3 0 2 2 0 0 0 0 2.9l3.6 3.5a2 2 0 0 0 2.9 0c.8-.8.8-2.1 0-3ZM10 43.1a2 2 0 0 0 0 2.9c.8.7 2.1.8 3 0l3.4-3.5c.8-.8.8-2.1 0-2.9-.8-.8-2-.8-2.9 0Zm20 3.4c0-1.1-.9-2-2-2a2 2 0 0 0-2 2v4.9c0 1 .9 2 2 2s2-1 2-2Z"
|
<svg
|
||||||
></path>
|
class="absolute left-[4px] top-[4px] z-10 opacity-0 dark:opacity-100"
|
||||||
</svg>
|
viewBox="0 0 24 24"
|
||||||
<!-- moon -->
|
fill="none"
|
||||||
<svg
|
height="16"
|
||||||
class="absolute left-[4px] top-[4px] z-10 opacity-0 dark:opacity-100"
|
width="16"
|
||||||
viewBox="0 0 24 24"
|
>
|
||||||
fill="none"
|
<path
|
||||||
height="16"
|
fill="#000"
|
||||||
width="16"
|
fill-rule="evenodd"
|
||||||
>
|
clip-rule="evenodd"
|
||||||
<path
|
d="M8.2 2.2c1-.4 2 .6 1.6 1.5-1 3-.4 6.4 1.8 8.7a8.4 8.4 0 0 0 8.7 1.8c1-.3 2 .5 1.5 1.5v.1a10.3 10.3 0 0 1-9.4 6.2A10.3 10.3 0 0 1 3.2 6.7c1-2 2.9-3.5 4.9-4.4Z"
|
||||||
fill="#000"
|
/>
|
||||||
fill-rule="evenodd"
|
</svg>
|
||||||
clip-rule="evenodd"
|
</span>
|
||||||
d="M8.2 2.2c1-.4 2 .6 1.6 1.5-1 3-.4 6.4 1.8 8.7a8.4 8.4 0 0 0 8.7 1.8c1-.3 2 .5 1.5 1.5v.1a10.3 10.3 0 0 1-9.4 6.2A10.3 10.3 0 0 1 3.2 6.7c1-2 2.9-3.5 4.9-4.4Z"
|
</label>
|
||||||
></path>
|
</div>
|
||||||
</svg>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
process.env.NODE_ENV === "development" && (
|
process.env.NODE_ENV === "development" && (
|
||||||
<div class="fixed top-0 left-0 z-50 flex w-[30px] items-center justify-center bg-gray-200 py-[2.5px] text-[12px] uppercase text-black sm:bg-red-200 md:bg-yellow-200 lg:bg-green-200 xl:bg-blue-200 2xl:bg-pink-200">
|
<div class="fixed left-0 top-0 z-50 flex w-[30px] items-center justify-center bg-gray-200 py-[2.5px] text-[12px] uppercase text-black sm:bg-red-200 md:bg-yellow-200 lg:bg-green-200 xl:bg-blue-200 2xl:bg-pink-200">
|
||||||
<span class="block sm:hidden">all</span>
|
<span class="block sm:hidden">all</span>
|
||||||
<span class="hidden sm:block md:hidden">sm</span>
|
<span class="hidden sm:block md:hidden">sm</span>
|
||||||
<span class="hidden md:block lg:hidden">md</span>
|
<span class="hidden md:block lg:hidden">md</span>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import menu from "@/config/menu.json";
|
|||||||
import social from "@/config/social.json";
|
import social from "@/config/social.json";
|
||||||
import { markdownify } from "@/lib/utils/textConverter";
|
import { markdownify } from "@/lib/utils/textConverter";
|
||||||
|
|
||||||
const {footer}: {footer: {name: string, url: string}[]} = menu;
|
const { footer }: { footer: { name: string; url: string }[] } = menu;
|
||||||
---
|
---
|
||||||
|
|
||||||
<footer class="bg-theme-light dark:bg-darkmode-theme-light">
|
<footer class="bg-theme-light dark:bg-darkmode-theme-light">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import Breadcrumbs from "@/components/Breadcrumbs.astro";
|
import Breadcrumbs from "@/components/Breadcrumbs.astro";
|
||||||
import { humanize } from "@/lib/utils/textConverter";
|
import { humanize } from "@/lib/utils/textConverter";
|
||||||
|
|
||||||
const { title="" }: {title?: string} = Astro.props;
|
const { title = "" }: { title?: string } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const Button = ({
|
|||||||
href: string;
|
href: string;
|
||||||
style: string | null;
|
style: string | null;
|
||||||
rel: string | null;
|
rel: string | null;
|
||||||
children: any;
|
children: string;
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<a
|
<a
|
||||||
@@ -18,9 +18,9 @@ const Button = ({
|
|||||||
rel={`noopener noreferrer ${
|
rel={`noopener noreferrer ${
|
||||||
rel ? (rel === "follow" ? "" : rel) : "nofollow"
|
rel ? (rel === "follow" ? "" : rel) : "nofollow"
|
||||||
}`}
|
}`}
|
||||||
className={`btn mb-4 me-4 ${
|
className={`btn mb-4 me-4 hover:text-white hover:no-underline ${
|
||||||
style === "outline" ? "btn-outline-primary" : "btn-primary"
|
style === "outline" ? "btn-outline-primary" : "btn-primary"
|
||||||
} border-primary hover:text-white hover:no-underline`}
|
}`}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
import { marked } from "marked";
|
import { marked } from "marked";
|
||||||
import React, { useEffect, useRef, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
|
|
||||||
const Tabs = ({ children }: {children: React.ReactElement}) => {
|
marked.use({
|
||||||
|
mangle: false,
|
||||||
|
headerIds: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
const Tabs = ({ children }: { children: React.ReactElement }) => {
|
||||||
const [active, setActive] = useState<number>(0);
|
const [active, setActive] = useState<number>(0);
|
||||||
const [defaultFocus, setDefaultFocus] = useState<boolean>(false);
|
const [defaultFocus, setDefaultFocus] = useState<boolean>(false);
|
||||||
|
|
||||||
@@ -22,7 +27,10 @@ const Tabs = ({ children }: {children: React.ReactElement}) => {
|
|||||||
(match: RegExpMatchArray) => ({ name: match[1], children: match[0] })
|
(match: RegExpMatchArray) => ({ name: match[1], children: match[0] })
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleKeyDown = (event: React.KeyboardEvent<EventTarget>, index: number) => {
|
const handleKeyDown = (
|
||||||
|
event: React.KeyboardEvent<EventTarget>,
|
||||||
|
index: number
|
||||||
|
) => {
|
||||||
if (event.key === "Enter" || event.key === " ") {
|
if (event.key === "Enter" || event.key === " ") {
|
||||||
setActive(index);
|
setActive(index);
|
||||||
} else if (event.key === "ArrowRight") {
|
} else if (event.key === "ArrowRight") {
|
||||||
@@ -35,26 +43,29 @@ const Tabs = ({ children }: {children: React.ReactElement}) => {
|
|||||||
return (
|
return (
|
||||||
<div className="tab">
|
<div className="tab">
|
||||||
<ul className="tab-nav">
|
<ul className="tab-nav">
|
||||||
{tabLinks.map((item: {name: string, children: string}, index: number) => (
|
{tabLinks.map(
|
||||||
<li
|
(item: { name: string; children: string }, index: number) => (
|
||||||
key={index}
|
<li
|
||||||
className={`tab-nav-item ${index === active && "active"}`}
|
key={index}
|
||||||
role="tab"
|
className={`tab-nav-item ${index === active && "active"}`}
|
||||||
tabIndex={index === active ? 0 : -1}
|
role="tab"
|
||||||
onKeyDown={(event) => handleKeyDown(event, index)}
|
tabIndex={index === active ? 0 : -1}
|
||||||
onClick={() => setActive(index)}
|
onKeyDown={(event) => handleKeyDown(event, index)}
|
||||||
//@ts-ignore
|
onClick={() => setActive(index)}
|
||||||
ref={(ref) => (tabRefs.current[index] = ref)}
|
//@ts-ignore
|
||||||
>
|
ref={(ref) => (tabRefs.current[index] = ref)}
|
||||||
{item.name}
|
>
|
||||||
</li>
|
{item.name}
|
||||||
))}
|
</li>
|
||||||
|
)
|
||||||
|
)}
|
||||||
</ul>
|
</ul>
|
||||||
{tabLinks.map((item: {name: string, children: string}, i: number) => (
|
{tabLinks.map((item: { name: string; children: string }, i: number) => (
|
||||||
<div
|
<div
|
||||||
className={active === i ? "tab-content block px-5" : "hidden"} key={i}
|
className={active === i ? "tab-content block px-5" : "hidden"}
|
||||||
|
key={i}
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: marked.parseInline(item.children),
|
__html: marked.parse(item.children),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import { formatInTimeZone } from "date-fns-tz";
|
import { formatInTimeZone } from "date-fns-tz";
|
||||||
|
|
||||||
const dateFormat = (date:Date | string, format:string = "dd MMM, yyyy"): string => {
|
const dateFormat = (
|
||||||
|
date: Date | string,
|
||||||
|
format: string = "dd MMM, yyyy"
|
||||||
|
): string => {
|
||||||
return formatInTimeZone(date, "America/New_York", format);
|
return formatInTimeZone(date, "America/New_York", format);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// sort by date
|
// sort by date
|
||||||
export const sortByDate = (array: any[]) => {
|
export const sortByDate = (array: any[]) => {
|
||||||
const sortedArray = array.sort(
|
const sortedArray = array.sort(
|
||||||
(a:any, b:any) =>
|
(a: any, b: any) =>
|
||||||
new Date(b.data.date && b.data.date).valueOf() -
|
new Date(b.data.date && b.data.date).valueOf() -
|
||||||
new Date(a.data.date && a.data.date).valueOf()
|
new Date(a.data.date && a.data.date).valueOf()
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { slug } from 'github-slugger';
|
import { slug } from "github-slugger";
|
||||||
import { marked } from "marked";
|
import { marked } from "marked";
|
||||||
|
|
||||||
marked.use({
|
marked.use({
|
||||||
@@ -8,18 +8,16 @@ marked.use({
|
|||||||
|
|
||||||
// slugify
|
// slugify
|
||||||
export const slugify = (content: string): string => {
|
export const slugify = (content: string): string => {
|
||||||
|
|
||||||
return slug(content);
|
return slug(content);
|
||||||
};
|
};
|
||||||
|
|
||||||
// markdownify
|
// markdownify
|
||||||
export const markdownify = (content: string, div?:boolean): string => {
|
export const markdownify = (content: string, div?: boolean): string => {
|
||||||
return div? marked.parse(content) : marked.parseInline(content);
|
return div ? marked.parse(content) : marked.parseInline(content);
|
||||||
};
|
};
|
||||||
|
|
||||||
// humanize
|
// humanize
|
||||||
export const humanize = (content: string): string => {
|
export const humanize = (content: string): string => {
|
||||||
|
|
||||||
return content
|
return content
|
||||||
.replace(/^[\s_]+|[\s_]+$/g, "")
|
.replace(/^[\s_]+|[\s_]+$/g, "")
|
||||||
.replace(/[_\s]+/g, " ")
|
.replace(/[_\s]+/g, " ")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from "@/layouts/Base.astro";
|
|||||||
import { getSinglePage } from "@/lib/contentParser.astro";
|
import { getSinglePage } from "@/lib/contentParser.astro";
|
||||||
import PageHeader from "@/partials/PageHeader.astro";
|
import PageHeader from "@/partials/PageHeader.astro";
|
||||||
|
|
||||||
export async function getStaticPaths(): Promise<{params: {regular: string}}[]> {
|
export async function getStaticPaths() {
|
||||||
const pages = await getSinglePage("pages");
|
const pages = await getSinglePage("pages");
|
||||||
|
|
||||||
const paths = pages.map((page) => ({
|
const paths = pages.map((page) => ({
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
---
|
---
|
||||||
import { Image } from "@astrojs/image/components";
|
|
||||||
import BlogCard from "@/components/BlogCard.astro";
|
import BlogCard from "@/components/BlogCard.astro";
|
||||||
import Social from "@/components/Social.astro";
|
import Social from "@/components/Social.astro";
|
||||||
import config from "@/config/config.json";
|
import config from "@/config/config.json";
|
||||||
import Base from "@/layouts/Base.astro";
|
import Base from "@/layouts/Base.astro";
|
||||||
import { getSinglePage } from "@/lib/contentParser.astro";
|
import { getSinglePage } from "@/lib/contentParser.astro";
|
||||||
import { slugify } from "@/lib/utils/textConverter";
|
import { slugify } from "@/lib/utils/textConverter";
|
||||||
import type { Blog_folder } from "types";
|
import { Image } from "@astrojs/image/components";
|
||||||
|
|
||||||
export async function getStaticPaths(): Promise<{params: {single: string}, props: {author: string}}[]> {
|
export async function getStaticPaths(): Promise<
|
||||||
|
{ params: { single: string }; props: { author: string } }[]
|
||||||
|
> {
|
||||||
const authors = await getSinglePage("authors");
|
const authors = await getSinglePage("authors");
|
||||||
|
|
||||||
const paths = authors.map((author) => ({
|
const paths = authors.map((author) => ({
|
||||||
@@ -20,7 +21,7 @@ export async function getStaticPaths(): Promise<{params: {single: string}, props
|
|||||||
return paths;
|
return paths;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { blog_folder }: Blog_folder = config.settings;
|
const { blog_folder }: { blog_folder: string } = config.settings;
|
||||||
const { author } = Astro.props;
|
const { author } = Astro.props;
|
||||||
const { title, social, meta_title, description, image } = author.data;
|
const { title, social, meta_title, description, image } = author.data;
|
||||||
const { Content } = await author.render();
|
const { Content } = await author.render();
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ import { getTaxonomy } from "@/lib/taxonomyParser.astro";
|
|||||||
import taxonomyFilter from "@/lib/utils/taxonomyFilter";
|
import taxonomyFilter from "@/lib/utils/taxonomyFilter";
|
||||||
import PageHeader from "@/partials/PageHeader.astro";
|
import PageHeader from "@/partials/PageHeader.astro";
|
||||||
|
|
||||||
export async function getStaticPaths(): Promise<{params: {category: string}}[]> {
|
export async function getStaticPaths(): Promise<
|
||||||
|
{ params: { category: string } }[]
|
||||||
|
> {
|
||||||
const categories = await getTaxonomy(
|
const categories = await getTaxonomy(
|
||||||
config.settings.blog_folder,
|
config.settings.blog_folder,
|
||||||
"categories"
|
"categories"
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ import Base from "@/layouts/Base.astro";
|
|||||||
import { getAllTaxonomy, getTaxonomy } from "@/lib/taxonomyParser.astro";
|
import { getAllTaxonomy, getTaxonomy } from "@/lib/taxonomyParser.astro";
|
||||||
import { humanize } from "@/lib/utils/textConverter";
|
import { humanize } from "@/lib/utils/textConverter";
|
||||||
import PageHeader from "@/partials/PageHeader.astro";
|
import PageHeader from "@/partials/PageHeader.astro";
|
||||||
import type { Blog_folder } from "types";
|
|
||||||
|
|
||||||
const { blog_folder }: Blog_folder = config.settings;
|
const { blog_folder }: { blog_folder: string } = config.settings;
|
||||||
const categories = await getTaxonomy(blog_folder, "categories");
|
const categories = await getTaxonomy(blog_folder, "categories");
|
||||||
const allCategories = await getAllTaxonomy(blog_folder, "categories");
|
const allCategories = await getAllTaxonomy(blog_folder, "categories");
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import PageHeader from "@/partials/PageHeader.astro";
|
|||||||
import { getEntryBySlug } from "astro:content";
|
import { getEntryBySlug } from "astro:content";
|
||||||
|
|
||||||
const entry = await getEntryBySlug("pages", "contact");
|
const entry = await getEntryBySlug("pages", "contact");
|
||||||
const { contact_form_action }: {contact_form_action: string} = config.params;
|
const { contact_form_action }: { contact_form_action: string } = config.params;
|
||||||
const { title, description, meta_title, image } = entry.data;
|
const { title, description, meta_title, image } = entry.data;
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+41
-53
@@ -10,12 +10,12 @@ import type { Button, Feature } from "types";
|
|||||||
|
|
||||||
interface Homepage {
|
interface Homepage {
|
||||||
banner: {
|
banner: {
|
||||||
title: string
|
title: string;
|
||||||
content: string,
|
content: string;
|
||||||
image: string,
|
image: string;
|
||||||
button: Button,
|
button: Button;
|
||||||
}
|
};
|
||||||
features: Feature[]
|
features: Feature[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const homepage = await getEntryBySlug("homepage", "index");
|
const homepage = await getEntryBySlug("homepage", "index");
|
||||||
@@ -59,55 +59,43 @@ const { banner, features }: Homepage = homepage.data;
|
|||||||
|
|
||||||
<!-- Features -->
|
<!-- Features -->
|
||||||
{
|
{
|
||||||
features.map(
|
features.map((feature, index: number) => (
|
||||||
(
|
<section class={`section-sm ${index % 2 === 0 && "bg-gradient"}`}>
|
||||||
feature,
|
<div class="container">
|
||||||
index: number
|
<div class="row items-center justify-between">
|
||||||
) => (
|
<div
|
||||||
<section class={`section-sm ${index % 2 === 0 && "bg-gradient"}`}>
|
class={`mb:md-0 mb-6 md:col-5 ${index % 2 !== 0 && "md:order-2"}`}
|
||||||
<div class="container">
|
>
|
||||||
<div class="row items-center justify-between">
|
<Image
|
||||||
<div
|
src={feature.image}
|
||||||
class={`mb:md-0 mb-6 md:col-5 ${
|
height={480}
|
||||||
index % 2 !== 0 && "md:order-2"
|
width={520}
|
||||||
}`}
|
fit="contain"
|
||||||
>
|
background="rgba(0,0,0,0)"
|
||||||
<Image
|
alt={feature.title}
|
||||||
src={feature.image}
|
/>
|
||||||
height={480}
|
</div>
|
||||||
width={520}
|
<div class={`md:col-7 lg:col-6 ${index % 2 !== 0 && "md:order-1"}`}>
|
||||||
fit="contain"
|
<h2 set:html={markdownify(feature.title)} class="mb-4" />
|
||||||
background="rgba(0,0,0,0)"
|
<p set:html={markdownify(feature.content)} class="mb-8 text-lg" />
|
||||||
alt={feature.title}
|
<ul>
|
||||||
/>
|
{feature.bulletpoints.map((bullet: string) => (
|
||||||
</div>
|
<li class="relative mb-4 pl-6">
|
||||||
<div
|
<FaCheck className={"absolute left-0 top-1.5"} />
|
||||||
class={`md:col-7 lg:col-6 ${index % 2 !== 0 && "md:order-1"}`}
|
<span set:html={markdownify(bullet)} />
|
||||||
>
|
</li>
|
||||||
<h2 set:html={markdownify(feature.title)} class="mb-4" />
|
))}
|
||||||
<p
|
</ul>
|
||||||
set:html={markdownify(feature.content)}
|
{feature.button.enable && (
|
||||||
class="mb-8 text-lg"
|
<a class="btn btn-primary mt-5" href={feature.button.link}>
|
||||||
/>
|
{feature.button.label}
|
||||||
<ul>
|
</a>
|
||||||
{feature.bulletpoints.map((bullet: string) => (
|
)}
|
||||||
<li class="relative mb-4 pl-6">
|
|
||||||
<FaCheck className={"absolute left-0 top-1.5"} />
|
|
||||||
<span set:html={markdownify(bullet)} />
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
{feature.button.enable && (
|
|
||||||
<a class="btn btn-primary mt-5" href={feature.button.link}>
|
|
||||||
{feature.button.label}
|
|
||||||
</a>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div>
|
||||||
)
|
</section>
|
||||||
)
|
))
|
||||||
}
|
}
|
||||||
<!-- /Features -->
|
<!-- /Features -->
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ import Base from "@/layouts/Base.astro";
|
|||||||
import PostSingle from "@/layouts/PostSingle.astro";
|
import PostSingle from "@/layouts/PostSingle.astro";
|
||||||
import { getSinglePage } from "@/lib/contentParser.astro";
|
import { getSinglePage } from "@/lib/contentParser.astro";
|
||||||
|
|
||||||
export async function getStaticPaths(): Promise<{params: {single: string}, props: {post: any}}[]> {
|
export async function getStaticPaths(): Promise<
|
||||||
|
{ params: { single: string }; props: { post: any } }[]
|
||||||
|
> {
|
||||||
const posts = await getSinglePage(config.settings.blog_folder);
|
const posts = await getSinglePage(config.settings.blog_folder);
|
||||||
|
|
||||||
const paths = posts.map((post) => ({
|
const paths = posts.map((post) => ({
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ import Base from "@/layouts/Base.astro";
|
|||||||
import { getAllTaxonomy, getTaxonomy } from "@/lib/taxonomyParser.astro";
|
import { getAllTaxonomy, getTaxonomy } from "@/lib/taxonomyParser.astro";
|
||||||
import { humanize } from "@/lib/utils/textConverter";
|
import { humanize } from "@/lib/utils/textConverter";
|
||||||
import PageHeader from "@/partials/PageHeader.astro";
|
import PageHeader from "@/partials/PageHeader.astro";
|
||||||
import type { Blog_folder } from "types";
|
|
||||||
|
|
||||||
const { blog_folder }: Blog_folder = config.settings;
|
const { blog_folder }: { blog_folder: string } = config.settings;
|
||||||
const tags = await getTaxonomy(blog_folder, "tags");
|
const tags = await getTaxonomy(blog_folder, "tags");
|
||||||
const allTags = await getAllTaxonomy(blog_folder, "tags");
|
const allTags = await getAllTaxonomy(blog_folder, "tags");
|
||||||
---
|
---
|
||||||
|
|||||||
Vendored
+11
-13
@@ -1,15 +1,13 @@
|
|||||||
export type Feature = {
|
export type Feature = {
|
||||||
button: button
|
button: button;
|
||||||
image: string
|
image: string;
|
||||||
bulletpoints: string[]
|
bulletpoints: string[];
|
||||||
content: string
|
content: string;
|
||||||
title: string
|
title: string;
|
||||||
}
|
};
|
||||||
|
|
||||||
export type Button = {
|
export type Button = {
|
||||||
enable: boolean
|
enable: boolean;
|
||||||
label: string
|
label: string;
|
||||||
link: string
|
link: string;
|
||||||
}
|
};
|
||||||
|
|
||||||
export type Blog_folder = {blog_folder: string};
|
|
||||||
|
|||||||
Reference in New Issue
Block a user