1
This commit is contained in:
21
themes/hugo-w2ng/assets/css/dev/postcss.config.js
Normal file
21
themes/hugo-w2ng/assets/css/dev/postcss.config.js
Normal file
@@ -0,0 +1,21 @@
|
||||
// Custom PurgeCSS extractor for Tailwind that allows special characters in
|
||||
// class names.
|
||||
//
|
||||
// https://github.com/FullHuman/purgecss#extractor
|
||||
class TailwindExtractor {
|
||||
static extract(content) {
|
||||
return content.match(/[A-Za-z0-9-_:\/]+/g) || [];
|
||||
}
|
||||
}
|
||||
|
||||
const themeDir = __dirname + '/../../../';
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('postcss-import')({
|
||||
path: [themeDir]
|
||||
}),
|
||||
require('tailwindcss')(themeDir + 'assets/css/tailwind.config.js'),
|
||||
require('autoprefixer'),
|
||||
]
|
||||
}
|
||||
33
themes/hugo-w2ng/assets/css/postcss.config.js
Normal file
33
themes/hugo-w2ng/assets/css/postcss.config.js
Normal file
@@ -0,0 +1,33 @@
|
||||
// Custom PurgeCSS extractor for Tailwind that allows special characters in
|
||||
// class names.
|
||||
//
|
||||
// https://github.com/FullHuman/purgecss#extractor
|
||||
class TailwindExtractor {
|
||||
static extract(content) {
|
||||
return content.match(/[A-Za-z0-9-_:\/]+/g) || [];
|
||||
}
|
||||
}
|
||||
|
||||
const themeDir = __dirname + '/../../';
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('postcss-import')({
|
||||
path: [themeDir]
|
||||
}),
|
||||
require('tailwindcss')(themeDir + 'assets/css/tailwind.config.js'),
|
||||
require('@fullhuman/postcss-purgecss')({
|
||||
content: [themeDir + 'layouts/**/*.html'],
|
||||
extractors: [
|
||||
{
|
||||
extractor: TailwindExtractor,
|
||||
extensions: ['html']
|
||||
}],
|
||||
fontFace: true
|
||||
}),
|
||||
require('autoprefixer')({
|
||||
grid: true
|
||||
}),
|
||||
require('postcss-reporter'),
|
||||
]
|
||||
}
|
||||
7
themes/hugo-w2ng/assets/css/site.css
Normal file
7
themes/hugo-w2ng/assets/css/site.css
Normal file
@@ -0,0 +1,7 @@
|
||||
body {
|
||||
font-family: Optima, Candara, Calibri, Arial, sans-serif;
|
||||
}
|
||||
code {
|
||||
font-family: "Lucida Console", Monaco, monospace;
|
||||
font-size: 85%;
|
||||
}
|
||||
71
themes/hugo-w2ng/assets/css/styles.css
Normal file
71
themes/hugo-w2ng/assets/css/styles.css
Normal file
@@ -0,0 +1,71 @@
|
||||
/* Tailwind base - put variables under: tailwind.config.js */
|
||||
@import "node_modules/tailwindcss/base";
|
||||
/* Tailwind component classes registered by plugins*/
|
||||
@import "node_modules/tailwindcss/components";
|
||||
/* Site Specific */
|
||||
@import "assets/css/site";
|
||||
/* Tailwind's utility classes - generated based on config file */
|
||||
@import "node_modules/tailwindcss/utilities";
|
||||
|
||||
h1 {
|
||||
@apply text-4xl;
|
||||
}
|
||||
h2 {
|
||||
@apply text-2xl;
|
||||
}
|
||||
h3 {
|
||||
@apply text-lg;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
@apply font-bold leading-loose;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 5px solid #ccc;
|
||||
@apply bg-gray-100 p-3 mx-3 my-2;
|
||||
}
|
||||
|
||||
table {
|
||||
@apply m-auto;
|
||||
border-top: 1px solid #666;
|
||||
border-bottom: 1px solid #666;
|
||||
}
|
||||
table thead th {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
th,
|
||||
td {
|
||||
@apply p-1;
|
||||
}
|
||||
thead,
|
||||
tfoot,
|
||||
tr:nth-child(even) {
|
||||
@apply bg-gray-200;
|
||||
}
|
||||
|
||||
pre {
|
||||
border: 1px solid #ddd;
|
||||
box-shadow: 5px 5px 5px #eee;
|
||||
@apply overflow-x-auto p-4;
|
||||
}
|
||||
code {
|
||||
@apply bg-gray-200;
|
||||
}
|
||||
pre code {
|
||||
@apply bg-transparent;
|
||||
}
|
||||
|
||||
ul {
|
||||
@apply text-base pl-8 list-disc;
|
||||
}
|
||||
|
||||
ol {
|
||||
@apply text-base pl-8 list-decimal;
|
||||
}
|
||||
|
||||
kbd {
|
||||
@apply text-xs inline-block rounded border px-1 py-5 align-middle font-normal font-mono shadow;
|
||||
}
|
||||
7
themes/hugo-w2ng/assets/css/tailwind.config.js
Normal file
7
themes/hugo-w2ng/assets/css/tailwind.config.js
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
theme: {
|
||||
extend: {}
|
||||
},
|
||||
variants: {},
|
||||
plugins: []
|
||||
}
|
||||
Reference in New Issue
Block a user