update tailwind v4, remove sass and postcss dependency
This commit is contained in:
1
exampleSite/assets/css/custom.css
Executable file
1
exampleSite/assets/css/custom.css
Executable file
@@ -0,0 +1 @@
|
||||
/* Add your own custom styles here */
|
||||
@@ -1 +0,0 @@
|
||||
// Add your own custom styles here
|
||||
@@ -9,7 +9,7 @@
|
||||
"theme_dark": ""
|
||||
},
|
||||
"text_color": {
|
||||
"default": "#444444",
|
||||
"text": "#444444",
|
||||
"dark": "#040404",
|
||||
"light": "#717171"
|
||||
}
|
||||
@@ -23,7 +23,7 @@
|
||||
"theme_dark": ""
|
||||
},
|
||||
"text_color": {
|
||||
"default": "#B4AFB6",
|
||||
"text": "#B4AFB6",
|
||||
"dark": "#fff",
|
||||
"light": "#B4AFB6"
|
||||
}
|
||||
|
||||
@@ -3,29 +3,29 @@ module hugoplate.netlify.app
|
||||
go 1.21
|
||||
|
||||
require (
|
||||
github.com/gethugothemes/hugo-modules/accordion v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/adsense v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/announcement v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/render-link v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/social-share v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/gallery-slider v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/gzip-caching v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/icons/font-awesome v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/images v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/modal v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/pwa v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/search v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/basic-seo v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/site-verifications v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/button v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/notice v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/tab v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/videos v0.0.0-20250112030311-a0de82520a5a // indirect
|
||||
github.com/gethugothemes/hugo-modules/accordion v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/adsense v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/announcement v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/render-link v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/social-share v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/gallery-slider v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/gzip-caching v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/icons/font-awesome v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/images v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/modal v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/pwa v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/search v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/basic-seo v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/site-verifications v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/button v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/notice v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/tab v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/gethugothemes/hugo-modules/videos v0.0.0-20250213104422-d6c69545f20a // indirect
|
||||
github.com/hugomods/mermaid v0.1.4 // indirect
|
||||
github.com/zeon-studio/hugoplate v0.0.0-20250116040859-e767a2ce9068 // indirect
|
||||
github.com/zeon-studio/hugoplate v0.0.0-20250205092428-3b220f635d99 // indirect
|
||||
)
|
||||
|
||||
@@ -38,40 +38,23 @@ pagerSize = 10
|
||||
path = 'page'
|
||||
|
||||
|
||||
############################# Modules ############################
|
||||
[module]
|
||||
[[module.mounts]]
|
||||
source = "assets"
|
||||
target = "assets"
|
||||
|
||||
[[module.mounts]]
|
||||
source = "hugo_stats.json"
|
||||
target = "assets/watching/hugo_stats.json"
|
||||
|
||||
############################# Build ##############################
|
||||
[build]
|
||||
noJSConfigInAssets = false
|
||||
useResourceCacheWhen = 'fallback'
|
||||
[build.buildStats]
|
||||
enable = true
|
||||
[[build.cachebusters]]
|
||||
source = 'assets/watching/hugo_stats\.json'
|
||||
target = 'style\.css'
|
||||
[[build.cachebusters]]
|
||||
source = '(postcss|tailwind)\.config\.js'
|
||||
source = 'assets/notwatching/hugo_stats\.json'
|
||||
target = 'css'
|
||||
[[build.cachebusters]]
|
||||
source = 'assets/.*\.(js|ts|jsx|tsx)'
|
||||
target = 'js'
|
||||
[[build.cachebusters]]
|
||||
source = 'assets/.*\.(css|scss|sass)'
|
||||
target = 'css'
|
||||
[[build.cachebusters]]
|
||||
source = 'data/.*\.(.*)$'
|
||||
target = 'css'
|
||||
[[build.cachebusters]]
|
||||
source = 'assets/.*\.(.*)$'
|
||||
target = '$1'
|
||||
|
||||
############################# Modules ############################
|
||||
[module]
|
||||
[[module.mounts]]
|
||||
source = 'assets'
|
||||
target = 'assets'
|
||||
[[module.mounts]]
|
||||
disableWatch = true
|
||||
source = 'hugo_stats.json'
|
||||
target = 'assets/notwatching/hugo_stats.json'
|
||||
|
||||
|
||||
############################# Outputs ############################
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const themePath = path.join(__dirname, "data/theme.json");
|
||||
const themeRead = fs.readFileSync(themePath, "utf8");
|
||||
const theme = JSON.parse(themeRead);
|
||||
|
||||
let font_base = Number(theme.fonts.font_size.base.replace("px", ""));
|
||||
let font_scale = Number(theme.fonts.font_size.scale);
|
||||
let h6 = font_scale;
|
||||
let h5 = h6 * font_scale;
|
||||
let h4 = h5 * font_scale;
|
||||
let h3 = h4 * font_scale;
|
||||
let h2 = h3 * font_scale;
|
||||
let h1 = h2 * font_scale;
|
||||
let fontPrimary, fontPrimaryType, fontSecondary, fontSecondaryType;
|
||||
if (theme.fonts.font_family.primary) {
|
||||
fontPrimary = theme.fonts.font_family.primary
|
||||
.replace(/\+/g, " ")
|
||||
.replace(/:[ital,]*[ital@]*[wght@]*[0-9,;.]+/gi, "");
|
||||
fontPrimaryType = theme.fonts.font_family.primary_type;
|
||||
}
|
||||
if (theme.fonts.font_family.secondary) {
|
||||
fontSecondary = theme.fonts.font_family.secondary
|
||||
.replace(/\+/g, " ")
|
||||
.replace(/:[ital,]*[ital@]*[wght@]*[0-9,;.]+/gi, "");
|
||||
fontSecondaryType = theme.fonts.font_family.secondary_type;
|
||||
}
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: ["./hugo_stats.json"],
|
||||
safelist: [{ pattern: /^swiper-/ }],
|
||||
darkMode: "class",
|
||||
theme: {
|
||||
screens: {
|
||||
sm: "540px",
|
||||
md: "768px",
|
||||
lg: "1024px",
|
||||
xl: "1280px",
|
||||
"2xl": "1536px",
|
||||
},
|
||||
container: {
|
||||
center: true,
|
||||
padding: "2rem",
|
||||
},
|
||||
extend: {
|
||||
colors: {
|
||||
text: theme.colors.default.text_color.default,
|
||||
light: theme.colors.default.text_color.light,
|
||||
dark: theme.colors.default.text_color.dark,
|
||||
primary: theme.colors.default.theme_color.primary,
|
||||
secondary: theme.colors.default.theme_color.secondary,
|
||||
body: theme.colors.default.theme_color.body,
|
||||
border: theme.colors.default.theme_color.border,
|
||||
"theme-light": theme.colors.default.theme_color.theme_light,
|
||||
"theme-dark": theme.colors.default.theme_color.theme_dark,
|
||||
darkmode: {
|
||||
text: theme.colors.darkmode.text_color.default,
|
||||
light: theme.colors.darkmode.text_color.light,
|
||||
dark: theme.colors.darkmode.text_color.dark,
|
||||
primary: theme.colors.darkmode.theme_color.primary,
|
||||
secondary: theme.colors.darkmode.theme_color.secondary,
|
||||
body: theme.colors.darkmode.theme_color.body,
|
||||
border: theme.colors.darkmode.theme_color.border,
|
||||
"theme-light": theme.colors.darkmode.theme_color.theme_light,
|
||||
"theme-dark": theme.colors.darkmode.theme_color.theme_dark,
|
||||
},
|
||||
},
|
||||
fontSize: {
|
||||
base: font_base + "px",
|
||||
"base-sm": font_base * 0.8 + "px",
|
||||
h1: h1 + "rem",
|
||||
"h1-sm": h1 * 0.9 + "rem",
|
||||
h2: h2 + "rem",
|
||||
"h2-sm": h2 * 0.9 + "rem",
|
||||
h3: h3 + "rem",
|
||||
"h3-sm": h3 * 0.9 + "rem",
|
||||
h4: h4 + "rem",
|
||||
h5: h5 + "rem",
|
||||
h6: h6 + "rem",
|
||||
},
|
||||
fontFamily: {
|
||||
primary: [fontPrimary, fontPrimaryType],
|
||||
secondary: [fontSecondary, fontSecondaryType],
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
require("@tailwindcss/typography"),
|
||||
require("@tailwindcss/forms"),
|
||||
require("tailwind-bootstrap-grid")({
|
||||
generateContainer: false,
|
||||
gridGutterWidth: "2rem",
|
||||
gridGutters: {
|
||||
1: "0.25rem",
|
||||
2: "0.5rem",
|
||||
3: "1rem",
|
||||
4: "1.5rem",
|
||||
5: "3rem",
|
||||
},
|
||||
}),
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user