implements tailwind v4 and removes scss
This commit is contained in:
parent
255cd357c5
commit
fbc26ed89c
45
assets/css/components/wompum.css
Normal file
45
assets/css/components/wompum.css
Normal file
@ -0,0 +1,45 @@
|
||||
.wompum-container {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.wompum-container .wompum-grid,
|
||||
.wompum-container .wompum-article-grid {
|
||||
gap: 2px;
|
||||
height: 100%;
|
||||
min-height: 2px;
|
||||
grid-template-rows: repeat(var(--grid-rows, 5), 1fr);
|
||||
}
|
||||
|
||||
.wompum-container--aspect-ratio {
|
||||
aspect-ratio: 3/1;
|
||||
}
|
||||
|
||||
.wompum-container--wide-gap .wompum-grid,
|
||||
.wompum-container--wide-gap .wompum-article-grid {
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.wompum-container--no-gap .wompum-grid,
|
||||
.wompum-container--no-gap .wompum-article-grid {
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.wompum-grid,
|
||||
.wompum-article-grid {
|
||||
display: grid;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wompum-cell {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transition: background-color 0.3s ease;
|
||||
background-color: var(--sand-500);
|
||||
}
|
||||
|
||||
.wompum-cell--narrator,
|
||||
.wompum-cell--subject,
|
||||
.wompum-cell--facilitator {
|
||||
min-height: unset;
|
||||
}
|
46
assets/css/main.css
Normal file
46
assets/css/main.css
Normal file
@ -0,0 +1,46 @@
|
||||
body {
|
||||
@apply font-garamond;
|
||||
}
|
||||
|
||||
.interviewer-question {
|
||||
font-style: italic;
|
||||
color: #444;
|
||||
margin-left: -1rem;
|
||||
}
|
||||
|
||||
.article-title--single .article-title__narrator {
|
||||
@apply mb-2 block font-light;
|
||||
}
|
||||
|
||||
.article-title--single .article-title__subject {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.article-title--list .article-title__narrator::after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
.article-title--list .article-title__subject {
|
||||
@apply font-light;
|
||||
}
|
||||
|
||||
.wompum-radial-grid {
|
||||
@apply absolute w-full h-full top-0 left-0;
|
||||
}
|
||||
|
||||
.narrator__container {
|
||||
@apply relative;
|
||||
}
|
||||
|
||||
.narrator__frame {
|
||||
@apply relative p-4;
|
||||
}
|
||||
|
||||
.narrator__image {
|
||||
@apply w-full rounded-full object-cover relative z-10 bg-white text-center border-4 border-white grid place-items-center;
|
||||
aspect-ratio: 1;
|
||||
}
|
||||
|
||||
.narrator__wompum {
|
||||
@apply absolute inset-0 w-full h-full;
|
||||
}
|
14
assets/css/styles.css
Normal file
14
assets/css/styles.css
Normal file
@ -0,0 +1,14 @@
|
||||
@import "tailwindcss";
|
||||
@plugin "@tailwindcss/typography";
|
||||
|
||||
@theme {
|
||||
--font-garamond: 'EB Garamond 12', 'Garamond', 'Baskerville', 'Baskerville Old Face', 'Hoefler Text', 'Times New Roman', serif;
|
||||
--font-iosevka: 'Iosevka', Consolas, 'Liberation Mono', Menlo, monospace;
|
||||
}
|
||||
|
||||
body {
|
||||
@apply antialiased;
|
||||
}
|
||||
|
||||
@import "components/wompum.css";
|
||||
@import "main.css";
|
@ -1,79 +0,0 @@
|
||||
@font-face {
|
||||
font-family: 'EB Garamond 12';
|
||||
src: local('EB Garamond 12 Italic'), local('EBGaramond12-Italic'),
|
||||
url('/fonts/EBGaramond12-Italic.woff2') format('woff2'),
|
||||
url('/fonts/EBGaramond12-Italic.woff') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'EB Garamond 12';
|
||||
src: local('EB Garamond 12 Regular'), local('EBGaramond12-Regular'),
|
||||
url('/fonts/EBGaramond12-Regular.woff2') format('woff2'),
|
||||
url('/fonts/EBGaramond12-Regular.woff') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Iosevka';
|
||||
src: local('Iosevka'),
|
||||
url('/fonts/Iosevka.woff2') format('woff2'),
|
||||
url('/fonts/Iosevka.woff') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Iosevka';
|
||||
src: local('Iosevka Bold'), local('Iosevka-Bold'),
|
||||
url('/fonts/Iosevka-Bold.woff2') format('woff2'),
|
||||
url('/fonts/Iosevka-Bold.woff') format('woff');
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Iosevka';
|
||||
src: local('Iosevka Bold Italic'), local('Iosevka-Bold-Italic'),
|
||||
url('/fonts/Iosevka-Bold-Italic.woff2') format('woff2'),
|
||||
url('/fonts/Iosevka-Bold-Italic.woff') format('woff');
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Iosevka';
|
||||
src: local('Iosevka Light'), local('Iosevka-Light'),
|
||||
url('/fonts/Iosevka-Light.woff2') format('woff2'),
|
||||
url('/fonts/Iosevka-Light.woff') format('woff');
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Iosevka';
|
||||
src: local('Iosevka Light Italic'), local('Iosevka-Light-Italic'),
|
||||
url('/fonts/Iosevka-Light-Italic.woff2') format('woff2'),
|
||||
url('/fonts/Iosevka-Light-Italic.woff') format('woff');
|
||||
font-weight: 300;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Iosevka';
|
||||
src: local('Iosevka Oblique'), local('Iosevka-Oblique'),
|
||||
url('/fonts/Iosevka-Oblique.woff2') format('woff2'),
|
||||
url('/fonts/Iosevka-Oblique.woff') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
$font-garamond: 'EB Garamond 12', 'Garamond', 'Baskerville', 'Baskerville Old Face', 'Hoefler Text', 'Times New Roman', serif;
|
||||
$font-iosevka: 'Iosevka', Consolas, 'Liberation Mono', Menlo, monospace;
|
@ -1,49 +0,0 @@
|
||||
.wompum {
|
||||
&-container {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
|
||||
& .wompum-grid,
|
||||
& .wompum-article-grid {
|
||||
gap: 2px;
|
||||
height: 100%; // Fill container height
|
||||
min-height: 2px;
|
||||
grid-template-rows: repeat(var(--grid-rows, 5), 1fr); // Default 5 rows
|
||||
}
|
||||
|
||||
// When no height is set, use aspect ratio
|
||||
&--aspect-ratio {
|
||||
aspect-ratio: 3/1;
|
||||
}
|
||||
|
||||
&--wide-gap .wompum-grid,
|
||||
&--wide-gap .wompum-article-grid {
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
&--no-gap .wompum-grid,
|
||||
&--no-gap .wompum-article-grid {
|
||||
gap: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-grid,
|
||||
&-article-grid {
|
||||
display: grid;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&-cell {
|
||||
width: 100%;
|
||||
height: 100%; // Ensure cells fill their grid areas
|
||||
transition: background-color 0.3s ease;
|
||||
background-color: var(--sand-500);
|
||||
|
||||
// Remove fixed heights since we're using aspect ratio now
|
||||
&--narrator,
|
||||
&--subject,
|
||||
&--facilitator {
|
||||
min-height: unset;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
// Tailwind
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
// Variables
|
||||
@import "variables";
|
||||
|
||||
// Fonts
|
||||
@import "fonts";
|
||||
|
||||
// Components
|
||||
@import "components/wompum";
|
||||
|
||||
body {
|
||||
font-family: $font-garamond;
|
||||
}
|
||||
|
||||
.interviewer-question {
|
||||
font-style: italic;
|
||||
color: #444;
|
||||
margin-left: -1rem;
|
||||
}
|
||||
|
||||
.article-title {
|
||||
&--single {
|
||||
.article-title__narrator {
|
||||
@apply mb-2 block font-light;
|
||||
}
|
||||
.article-title__subject {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
&--list {
|
||||
.article-title__narrator {
|
||||
&::after {
|
||||
content: ":";
|
||||
}
|
||||
}
|
||||
.article-title__subject {
|
||||
@apply font-light;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Narrator Image Component
|
||||
.wompum-radial-grid {
|
||||
@apply absolute w-full h-full top-0 left-0;
|
||||
}
|
||||
|
||||
.narrator {
|
||||
&__container {
|
||||
@apply relative;
|
||||
}
|
||||
|
||||
&__frame {
|
||||
@apply relative p-4;
|
||||
}
|
||||
|
||||
&__image {
|
||||
@apply w-full rounded-full object-cover relative z-10 bg-white text-center border-4 border-white grid place-items-center;
|
||||
aspect-ratio: 1;
|
||||
}
|
||||
|
||||
&__wompum {
|
||||
@apply absolute inset-0 w-full h-full;
|
||||
}
|
||||
}
|
@ -82,16 +82,7 @@
|
||||
<!-- CSS Variables and Styles -->
|
||||
{{ partial "css-variables.html" . }}
|
||||
|
||||
{{/* Main Styles */}}
|
||||
{{ $styles := resources.Get "scss/main.scss" }}
|
||||
{{ $styles = $styles | resources.ToCSS (dict "targetPath" "css/styles.css" "enableSourceMap" true) }}
|
||||
{{ $styles = $styles | resources.PostCSS }}
|
||||
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $styles = $styles | minify | fingerprint | resources.PostProcess }}
|
||||
{{ end }}
|
||||
|
||||
<link href="{{ $styles.RelPermalink }}" rel="stylesheet" />
|
||||
{{ partial "css.html" . }}
|
||||
</head>
|
||||
<body class="">
|
||||
{{ partial "header.html" . }}
|
||||
|
23
layouts/partials/css.html
Normal file
23
layouts/partials/css.html
Normal file
@ -0,0 +1,23 @@
|
||||
{{ with (templates.Defer (dict "key" "global")) }}
|
||||
{{ $t := debug.Timer "tailwindcss" }}
|
||||
{{ with resources.Get "css/styles.css" }}
|
||||
{{ $opts := dict
|
||||
"inlineImports" true
|
||||
"optimize" (not hugo.IsDevelopment)
|
||||
}}
|
||||
{{ with . | css.TailwindCSS $opts }}
|
||||
{{ if hugo.IsDevelopment }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" />
|
||||
{{ else }}
|
||||
{{ with . | minify | fingerprint }}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="{{ .RelPermalink }}"
|
||||
integrity="{{ .Data.Integrity }}"
|
||||
crossorigin="anonymous" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $t.Stop }}
|
||||
{{ end }}
|
2832
package-lock.json
generated
2832
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@ -1,26 +1,8 @@
|
||||
{
|
||||
"comments": {
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/typography": "hugo-starter-tailwind-basic",
|
||||
"autoprefixer": "hugo-starter-tailwind-basic",
|
||||
"postcss": "hugo-starter-tailwind-basic",
|
||||
"postcss-cli": "hugo-starter-tailwind-basic",
|
||||
"postcss-purgecss": "hugo-starter-tailwind-basic",
|
||||
"tailwindcss": "hugo-starter-tailwind-basic"
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/typography": "^0.5.9",
|
||||
"autoprefixer": "^10.3.1",
|
||||
"postcss": "^8.3.6",
|
||||
"postcss-cli": "^8.3.1",
|
||||
"postcss-purgecss": "^2.0.3",
|
||||
"tailwindcss": "^3.3.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build:css": "postcss assets/css/main.scss -o static/css/main.css",
|
||||
"watch:css": "postcss assets/css/main.scss -o static/css/main.css --watch"
|
||||
"@tailwindcss/cli": "^4.0.0",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"@tailwindcss/typography": "^0.5.16"
|
||||
},
|
||||
"name": "protocol-oral-history-project",
|
||||
"version": "0.1.0"
|
||||
|
@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
@ -1,19 +1,8 @@
|
||||
module.exports = {
|
||||
content: [
|
||||
'./hugo_stats.json',
|
||||
'./layouts/**/*.html',
|
||||
'./content/**/*.{html,md}',
|
||||
'./themes/**/layouts/**/*.html'
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
'garamond': ['EB Garamond 12', 'serif'],
|
||||
'iosevka': ['Iosevka', 'monospace'],
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/typography'),
|
||||
],
|
||||
};
|
||||
/*
|
||||
This file is present to satisy a requiremenet of the Tailwind CSS IntelliSense
|
||||
extension for Visual Studio Code.
|
||||
|
||||
https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss
|
||||
|
||||
The rest of this file is intentionally empty.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user