Skip to content

Commit

Permalink
📝 Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Ice-Hazymoon committed Feb 20, 2023
1 parent 2abd266 commit 0d72b1d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p align="center">
<a href="https://github.com/gohugoio/hugo" target="_blank"><img src="https://img.shields.io/badge/Hugo-≥0.97-green?style=for-the-badge&logo=hugo&logoColor=white" /></a>
<!-- <a href="https://github.com/Ice-Hazymoon/hugo-theme-luna/actions/workflows/main.yml" target="_blank"><img src="https://img.shields.io/github/workflow/status/Ice-Hazymoon/hugo-theme-luna/CI?style=for-the-badge&logo=github&logoColor=white" /></a> -->
<a href="https://github.com/Ice-Hazymoon/hugo-theme-luna/actions/workflows/main.yml" target="_blank"><img src="https://img.shields.io/github/actions/workflow/status/Ice-Hazymoon/hugo-theme-luna/main.yml?style=for-the-badge&branch=master&logo=github&logoColor=white" /></a>
<a href="https://github.com/Ice-Hazymoon/hugo-theme-luna/blob/master/LICENSE" target="_blank"><img src="https://img.shields.io/github/license/Ice-Hazymoon/hugo-theme-luna?style=for-the-badge" /></a>
</p>

Expand Down
9 changes: 3 additions & 6 deletions assets/sass/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,17 @@
$opacities: 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90;

@each $opacity in $opacities {
$alpha: $opacity / 100;
.bg-theme\/#{$opacity} {
background-color: rgba(
$color: $theme,
$alpha: (
$opacity / 100,
)
$alpha: $alpha
);
}
.hover\:bg-theme\/#{$opacity}:hover {
background-color: rgba(
$color: $theme,
$alpha: (
$opacity / 100,
)
$alpha: $alpha
);
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "Ice-Hazymoon",
"scripts": {
"updateModules": "node ./updateModules.js",
"generateCss": "postcss ./assets/sass/main.scss -o ./assets/main.scss",
"generateCss": "postcss ./assets/sass/main.scss -o ./assets/sass/main-without-postcss.scss",
"prettier": "npx prettier --write ./layouts/**/*.html ./assets/sass/**/*.scss"
},
"homepage": "https://github.com/Ice-Hazymoon/hugo-theme-luna",
Expand Down Expand Up @@ -55,4 +55,4 @@
"browserslist": [
"last 1 Chrome versions"
]
}
}
42 changes: 20 additions & 22 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
const path = require('path');

const isDev = process.env.HUGO_ENVIRONMENT !== 'production';

module.exports = {
modules: true,
plugins: !isDev ? {
tailwindcss: {
config: path.join(__dirname, '/tailwind.config.js'),
},
'postcss-pxtorem': {
plugins: !isDev ? [
require('tailwindcss')({
config: path.join(__dirname, '/tailwind.config.js')
}),
require('postcss-pxtorem')({
rootValue: 16,
propList: ['*'],
selectorBlackList: ['html']
},
autoprefixer: {},
'postcss-easing-gradients': {},
'postcss-font-display': {
}),
require('autoprefixer')({}),
require('postcss-easing-gradients')({}),
require('postcss-font-display')({
display: 'swap',
replace: false
},
'@fullhuman/postcss-purgecss': {
}),
require('@fullhuman/postcss-purgecss')({
content: [
path.join(__dirname, '/data/luna/icon.yaml').split(path.sep).join(path.posix.sep),
path.join(__dirname, '/layouts/**/*.html').split(path.sep).join(path.posix.sep),
Expand All @@ -38,18 +36,18 @@ module.exports = {
fontFace: false,
variables: false,
rejected: true,
},
cssnano: {
}),
require('cssnano')({
preset: ['cssnano-preset-advanced', {
discardComments: {
removeAll: true,
}
}]
},
}: {
tailwindcss: {
config: path.join(__dirname, '/tailwind.config.js'),
},
'postcss-easing-gradients': {},
}
}),
] : [
require('tailwindcss')({
config: path.join(__dirname, '/tailwind.config.js')
}),
require('postcss-easing-gradients')({}),
]
}

0 comments on commit 0d72b1d

Please sign in to comment.