Merge branch 'main' of github.com:zeon-studio/hugoplate
This commit is contained in:
commit
9629eaed56
@ -38,16 +38,6 @@ main {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.share-icons {
|
|
||||||
.share-link {
|
|
||||||
@apply h-9 w-9 rounded leading-9;
|
|
||||||
@apply bg-primary hover:bg-primary dark:bg-darkmode-primary dark:hover:bg-darkmode-primary;
|
|
||||||
}
|
|
||||||
.share-icon svg {
|
|
||||||
@apply dark:fill-dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// swiper pagination
|
// swiper pagination
|
||||||
.swiper-pagination-bullet {
|
.swiper-pagination-bullet {
|
||||||
@apply bg-theme-light dark:bg-darkmode-theme-light h-2.5 w-2.5 opacity-100;
|
@apply bg-theme-light dark:bg-darkmode-theme-light h-2.5 w-2.5 opacity-100;
|
||||||
|
@ -3,6 +3,17 @@
|
|||||||
@apply overflow-hidden rounded;
|
@apply overflow-hidden rounded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// share icons
|
||||||
|
.share-icons {
|
||||||
|
.share-link {
|
||||||
|
@apply h-9 w-9 rounded leading-9;
|
||||||
|
@apply bg-primary hover:bg-primary dark:bg-darkmode-primary dark:hover:bg-darkmode-primary;
|
||||||
|
}
|
||||||
|
.share-icon svg {
|
||||||
|
@apply dark:fill-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// tab
|
// tab
|
||||||
.tab {
|
.tab {
|
||||||
@apply border-border dark:border-darkmode-border overflow-hidden rounded-lg border;
|
@apply border-border dark:border-darkmode-border overflow-hidden rounded-lg border;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "hugoplate",
|
"name": "hugoplate",
|
||||||
"description": "hugo tailwindcss boilerplate",
|
"description": "hugo tailwindcss boilerplate",
|
||||||
"version": "1.0.1",
|
"version": "1.0.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "zeon.studio",
|
"author": "zeon.studio",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -9,14 +9,15 @@
|
|||||||
"test": "cd exampleSite; hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify 2> /dev/null || hugo server --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify",
|
"test": "cd exampleSite; hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify 2> /dev/null || hugo server --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify",
|
||||||
"build": "cd exampleSite; hugo --gc --minify --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --forceSyncStatic 2> /dev/null || hugo --themesDir ../.. --gc --minify --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --forceSyncStatic",
|
"build": "cd exampleSite; hugo --gc --minify --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --forceSyncStatic 2> /dev/null || hugo --themesDir ../.. --gc --minify --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --forceSyncStatic",
|
||||||
"update-modules": "hugo mod clean && hugo mod get -u ./... && hugo mod tidy",
|
"update-modules": "hugo mod clean && hugo mod get -u ./... && hugo mod tidy",
|
||||||
"format": "prettier -w ."
|
"format": "prettier -w .",
|
||||||
|
"remove-darkmode": "node ./scripts/removeDarkmode.js && yarn format"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fullhuman/postcss-purgecss": "^5.0.0",
|
"@fullhuman/postcss-purgecss": "^5.0.0",
|
||||||
"@tailwindcss/forms": "^0.5.3",
|
"@tailwindcss/forms": "^0.5.3",
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"postcss": "^8.4.23",
|
"postcss": "^8.4.24",
|
||||||
"postcss-cli": "^10.1.0",
|
"postcss-cli": "^10.1.0",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"prettier-plugin-go-template": "0.0.13",
|
"prettier-plugin-go-template": "0.0.13",
|
||||||
|
48
scripts/removeDarkmode.js
Normal file
48
scripts/removeDarkmode.js
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
const fs = require("fs");
|
||||||
|
const path = require("path");
|
||||||
|
|
||||||
|
const rootDirs = ["assets/scss", "layouts"];
|
||||||
|
const configFiles = [
|
||||||
|
{
|
||||||
|
filePath: "exampleSite/tailwind.config.js",
|
||||||
|
patterns: ["darkmode:\\s*{[^}]*},", 'darkMode:\\s*"class",'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filePath: "exampleSite/config.toml",
|
||||||
|
patterns: ["\\S*\\.darkmode[^\\]]*\\]\\n*([\\s\\S]*?)(?=\\[|$)"],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
rootDirs.forEach(removeDarkModeFromPages);
|
||||||
|
configFiles.forEach(removeDarkMode);
|
||||||
|
|
||||||
|
function removeDarkModeFromFiles(filePath, regexPatterns) {
|
||||||
|
const fileContent = fs.readFileSync(filePath, "utf8");
|
||||||
|
let updatedContent = fileContent;
|
||||||
|
regexPatterns.forEach((pattern) => {
|
||||||
|
const regex = new RegExp(pattern, "g");
|
||||||
|
updatedContent = updatedContent.replace(regex, "");
|
||||||
|
});
|
||||||
|
fs.writeFileSync(filePath, updatedContent, "utf8");
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeDarkModeFromPages(directoryPath) {
|
||||||
|
const files = fs.readdirSync(directoryPath);
|
||||||
|
|
||||||
|
files.forEach((file) => {
|
||||||
|
const filePath = path.join(directoryPath, file);
|
||||||
|
const stats = fs.statSync(filePath);
|
||||||
|
if (stats.isDirectory()) {
|
||||||
|
removeDarkModeFromPages(filePath);
|
||||||
|
} else if (stats.isFile()) {
|
||||||
|
removeDarkModeFromFiles(filePath, [
|
||||||
|
'(?:(?!["])\\S)*dark:(?:(?![,;"])\\S)*',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeDarkMode(configFile) {
|
||||||
|
const { filePath, patterns } = configFile;
|
||||||
|
removeDarkModeFromFiles(filePath, patterns);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user