Adding Skeleventy-based site sources.

This commit is contained in:
Benjamin A. Shelton 2022-11-04 23:25:35 -06:00
commit 28a89401ff
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01
79 changed files with 2183 additions and 0 deletions

View file

@ -0,0 +1,193 @@
//========== Gorko CSS Config ==========//
/**
* BASE SIZE
* All calculations are based on this. It’s recommended that
* you keep it at 1rem because that is the root font size. You
* can set it to whatever you like and whatever unit you like.
*/
$gorko-base-size: 1rem;
/**
* SIZE SCALE
* This is a Major Third scale that powers all the utilities that
* it is relevant for (font-size, margin, padding). All items are
* calcuated off the base size, so change that and cascade across
* your whole project.
*/
$gorko-size-scale: (
'300': $gorko-base-size * 0.8,
'400': $gorko-base-size,
'500': $gorko-base-size * 1.25,
'600': $gorko-base-size * 1.56,
'700': $gorko-base-size * 1.95,
'800': $gorko-base-size * 2.44,
'900': $gorko-base-size * 3.05,
'1000': $gorko-base-size * 3.81,
'1100': $gorko-base-size * 4.76
);
/**
* COLORS
* Colors are shared between backgrounds and text by default.
* You can also use them to power borders, fills or shadows, for example.
*/
$gorko-colors: (
'base': #1c1c1c,
'primary': #01093c,
'secondary': #24e0d0,
'tertiary': #7cdce9,
'highlighter': #f1f0a1,
'grey': #4e5b71,
'white': #fff
);
/**
* CORE CONFIG
* This powers everything from utility class generation to breakpoints
* to enabling/disabling pre-built components/utilities.
*/
$gorko-config: (
'bg': (
'items': $gorko-colors,
'output': 'standard',
'property': 'background'
),
'color': (
'items': $gorko-colors,
'output': 'standard',
'property': 'color'
),
'font': (
'items': (
'base': 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif',
'heading': 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif'
),
'output': 'standard',
'property': 'font-family'
),
'box': (
'items': (
'block': 'block',
'inline-block': 'inline-block',
'flex': 'flex',
'grid': 'grid',
'hidden': 'none'
),
'output': 'responsive',
'property': 'display'
),
'mt': (
'items': $gorko-size-scale,
'output': 'standard',
'property': 'margin-top'
),
'mb': (
'items': $gorko-size-scale,
'output': 'standard',
'property': 'margin-bottom'
),
'ml': (
'items': $gorko-size-scale,
'output': 'standard',
'property': 'margin-left'
),
'mr': (
'items': $gorko-size-scale,
'output': 'standard',
'property': 'margin-right'
),
'pt': (
'items': $gorko-size-scale,
'output': 'standard',
'property': 'padding-top'
),
'pb': (
'items': $gorko-size-scale,
'output': 'standard',
'property': 'padding-bottom'
),
'pl': (
'items': $gorko-size-scale,
'output': 'standard',
'property': 'padding-left'
),
'pr': (
'items': $gorko-size-scale,
'output': 'standard',
'property': 'padding-right'
),
'text': (
'items': $gorko-size-scale,
'output': 'standard',
'property': 'font-size'
),
'leading': (
'items': (
'tight': '1.1',
'normal': '1.6',
'loose': '2'
),
'output': 'standard',
'property': 'line-height'
),
'weight': (
'items': (
'thin': '300',
'regular': '400',
'bold': '700'
),
'output': 'standard',
'property': 'font-weight'
),
'width': (
'items': (
'full': '100%',
'screen': '100vw',
'half': percentage(1/2),
'quarter': percentage(1/4),
'third': percentage(1/3)
),
'output': 'responsive',
'property': 'width'
),
'height': (
'items': (
'full': '100%',
'screen': '100vh'
),
'output': 'standard',
'property': 'height'
),
'length': (
'items': (
'compact': 25ch,
'optimal': 75ch
),
'output': 'standard',
'property': 'max-width'
),
'z': (
'items': (
'-1': -1,
'1': 1,
'2': 2,
'10': 10,
'20': 20
),
'output': 'standard',
'property': 'z-index'
),
'breakpoints': (
'mobileL' : '(min-width : 22.5em)', // 360px
'mobileXL' : '(min-width : 40em)', // 640px
'tablet' : '(min-width : 48em)', // 768px
'laptop' : '(min-width : 64em)', // 1024px
'desktop' : '(min-width : 80em)', // 1280px
'desktopL' : '(min-width : 90em)', // 1440px
'desktopXL' : '(min-width : 120em)' // 1920px
)
);

View file

@ -0,0 +1,3 @@
@import 'config';
@import '../../../node_modules/gorko/gorko.scss';

View file

@ -0,0 +1,17 @@
//========== Functions ==========//
// declare CSS variables quicker in SCSS
// SCSS: v(bg-color);
// output CSS: var(--bg-color);
// also accepts fallbacks
@function v($var, $fallback: null) {
@if($fallback) {
@return var(--#{$var}, #{$fallback});
}
@else {
@return var(--#{$var});
}
}

View file

@ -0,0 +1,5 @@
@import 'variables';
@import 'functions';
@import 'mixins';
@import 'utilities';

View file

@ -0,0 +1,3 @@
//========== Mixins ==========//

View file

@ -0,0 +1,44 @@
//========== Utilities ==========//
// container
.inner {
@include apply-utility('width', 'full');
margin: 0 auto;
max-width: v(max-width);
@include apply-utility('pl', '600');
@include apply-utility('pr', '600');
}
// better vertical rhythm
.flow > * + * {
margin-top: v(gap);
@include media-query('tablet') {
--gap: #{get-size('700')};
}
}
// subtle fade in to lazyloaded images
[data-src] {
opacity: 0;
}
.loaded {
opacity: 1;
transition: opacity v(transition-duration) v(transition-timing);
}
// content only for screen readers
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}

View file

@ -0,0 +1,41 @@
//========== Variables ==========//
:root {
// site
--max-width: 80rem;
// spacing
--gap: #{get-size('600')};
// typography
--base-font-size: #{$gorko-base-size};
--ratio: 1.1;
--text-300: calc((var(--base-font-size) / var(--ratio)) / var(--ratio));
--text-400: calc(var(--text-300) * var(--ratio));
--text-500: calc(var(--text-400) * var(--ratio) * var(--ratio));
--text-600: calc(var(--text-500) * var(--ratio));
--text-700: calc(var(--text-600) * var(--ratio));
--text-800: calc(var(--text-700) * var(--ratio));
--text-900: calc(var(--text-800) * var(--ratio));
--text-1000: calc(var(--text-900) * var(--ratio));
--text-1100: calc(var(--text-1000) * var(--ratio));
// borders
--border-radius: .25rem;
--border-size: .15rem;
--border-size-thick: .3rem;
// transitions
--transition-duration: .25s;
--transition-timing: ease-out;
@include media-query('tablet') {
--ratio: 1.2;
}
@include media-query('laptop') {
--ratio: 1.25;
}
}

View file

@ -0,0 +1,4 @@
@import 'reset';
@import 'typography';
@import 'links';

View file

@ -0,0 +1,24 @@
//========== Links ==========//
a {
text-decoration: none;
transition: color v(transition-duration) v(transition-timing);
&:not([class]) {
color: currentColor;
border-bottom: v(border-size-thick) solid get-color('tertiary');
padding-bottom: .1rem;
text-decoration-skip-ink: auto;
&:hover {
@include apply-utility('color', 'tertiary');
}
}
}
:focus {
outline: 1px solid get-color('tertiary');
outline-offset: .25rem;
}

View file

@ -0,0 +1,70 @@
//========== Modern CSS reset inspired by https://github.com/hankchizljaw/modern-css-reset ==========//
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Set core root defaults */
html {
min-height: 100%;
scroll-behavior: smooth;
}
/* Set core body defaults */
body {
overflow-x: hidden;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
}
/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote,
dl,
dd {
margin: 0;
}
/* Make images easier to work with */
img {
display: block;
max-width: 100%;
height: auto;
}
/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
font: inherit;
}
/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
/* Remove default padding and list styles on ul, ol elements with a class attribute */
ul[class],
ol[class] {
list-style: none;
padding: 0;
}

View file

@ -0,0 +1,49 @@
//========== Typography ==========//
// set base font size
body {
font-size: v(text-500);
}
// headings
h1,
h2,
h3 {
@include apply-utility('leading', 'tight');
letter-spacing: -.01rem;
}
h1 {
--gap: #{get-size('700')};
font-size: v(text-900);
margin: 0 0 v(gap);
}
h2 {
font-size: v(text-800);
}
h3 {
font-size: v(text-700);
}
.content {
word-wrap: break-word;
}
// sub-heading
.sub-heading {
font-size: v(text-700);
line-height: 1.5;
}
// lists
ol,
ul {
padding: 0 0 0 get-size('500');
}
.highlight {
background-color: get-color('highlighter');
}

View file

@ -0,0 +1,7 @@
//========== Footer ==========//
.footer-inner {
align-items: center;
justify-content: space-between;
}

View file

@ -0,0 +1,31 @@
//========== Header ==========//
// logo
.logo {
--logo-size: #{get-size('500')};
font-size: v(logo-size);
margin: 0 auto;
&:hover {
@include apply-utility('color', 'secondary');
}
}
@include media-query('mobileXL') {
.logo {
--logo-size: #{get-size('600')};
margin: 0 auto 0 0;
}
}
@include media-query('mobileXL') {
.header-inner {
align-items: center;
justify-content: space-between;
}
}

View file

@ -0,0 +1,2 @@
//========== Hero ==========//

View file

@ -0,0 +1,8 @@
@import 'site';
@import 'header';
@import 'nav';
@import 'mobile-nav';
@import 'hero';
@import 'main';
@import 'footer';

View file

@ -0,0 +1,25 @@
//========== Main ==========//
.main {
flex-direction: column;
flex: 1;
&:focus {
outline: 0;
}
}
// page header
.page-header {
--gap: #{get-size('800')};
margin-bottom: v(gap);
}
@include media-query('tablet') {
.page-header {
--gap: #{get-size('900')};
}
}

View file

@ -0,0 +1,78 @@
//========== Mobile Nav ==========//
.mobile-nav {
--transition-duration: .3s;
position: fixed;
top: 0;
left: 0;
overflow-y: auto;
transform: translate3d(-100%, 0, 0);
transition: transform v(transition-duration) cubic-bezier(.77, 0, .175, 1);
transition-delay: .1s;
will-change: transform;
// when menu is visible
&.menu-visible {
transform: translate3d(0, 0, 0);
}
.link {
--gap: .25rem;
padding: v(gap) 0;
&.active,
&:hover {
color: get-color('secondary');
}
}
}
// Mobile menu
.mobile-nav-toggle {
position: fixed;
bottom: 0;
height: get-size('900');
align-items: center;
justify-content: center;
border: 0;
outline: none;
.mobile-nav-icon {
flex-direction: column;
}
.icon-line {
--transition-duration: .2s;
--transition-timing: cubic-bezier(0, 0, .2, 1);
height: 2px;
width: get-size('500');
transform-origin: 7px 1px;
transition: transform v(transition-duration) v(transition-timing),
opacity v(transition-duration) v(transition-timing);
&:not(:last-child) {
margin-bottom: .25rem;
}
}
// when menu toggle is clicked
&.expanded {
.icon-line {
margin: 0;
&:first-child {
transform: rotate(45deg);
}
&:nth-child(2) {
opacity: 0;
}
&:last-child {
transform: rotate(-45deg);
}
}
}
}

View file

@ -0,0 +1,25 @@
//========== Nav ==========//
.nav {
.link {
height: get-size('900');
line-height: get-size('900');
&.active,
&:hover {
@include apply-utility('color', 'secondary');
}
&-get-started {
border-radius: v(border-radius);
transition: background-color v(transition-duration) v(transition-timing);
&:hover {
@include apply-utility('bg', 'white');
@include apply-utility('color', 'primary');
}
}
}
}

View file

@ -0,0 +1,16 @@
//========== Site ==========//
// wrapper
.wrapper {
min-height: 100vh;
flex-direction: column;
}
@include media-query('mobileXL') {
.wrapper {
padding-bottom: 0;
}
}

View file

@ -0,0 +1,17 @@
//========== Buttons ==========//
.button {
display: inline-block;
background-color: get-color('secondary');
border: 0;
border-radius: v(border-radius);
color: get-color('primary');
padding: get-size('300') get-size('500');
transition: background-color v(transition-duration) v(transition-timing);
@include apply-utility('weight', 'bold');
&:hover {
@include apply-utility('bg', 'white');
}
}

View file

@ -0,0 +1,17 @@
//========== Forms ==========//
.textarea,
.input {
border: 0;
border-radius: v(border-radius);
padding: 0 .5rem;
}
.input {
height: get-size('800');
}
.textarea {
height: get-size('1100');
}

View file

@ -0,0 +1,5 @@
@import 'buttons';
@import 'pagination';
@import 'forms';
@import 'social-icons';

View file

@ -0,0 +1,11 @@
//========== Pagination ==========//
.pagination {
--gap: #{get-size('1000')};
.items {
justify-content: space-between;
padding: 0;
}
}

View file

@ -0,0 +1,18 @@
//========== Social icons ==========//
.social-icons {
.icon-link {
&:hover {
@include apply-utility('color', 'secondary');
}
}
.icon {
--social-icon-size: #{get-size('500')};
width: v(social-icon-size);
height: v(social-icon-size);
}
}

View file

@ -0,0 +1,67 @@
//========== Blog page ==========//
.posts {
--gap: #{get-size('1100')};
align-items: stretch;
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
gap: v(gap);
padding-bottom: 15vh;
}
.card {
position: relative;
&-header {
position: relative;
}
&-image {
border-radius: v(border-radius);
}
&-categories {
position: absolute;
bottom: 0;
left: get-size('300');
transform: translateY(50%);
.category {
--border-radius: .15rem;
border-radius: v(border-radius);
padding: .25rem .5rem;
}
}
&-title-link {
border-bottom: v(border-size) solid get-color('secondary');
transition: border-color v(transition-duration) v(transition-timing);
&:hover {
border-bottom-color: get-color('primary');
}
}
.datetime {
position: absolute;
bottom: 0;
}
}
@include media-query('tablet') {
.card {
&-title-link {
font-size: v(text-700);
}
}
}
@include media-query('laptop') {
.posts {
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}
}

View file

@ -0,0 +1,2 @@
//========== Homepage ==========//

View file

@ -0,0 +1,4 @@
@import 'post';
@import 'blog';
@import 'home';

View file

@ -0,0 +1,36 @@
//========== Post page ==========//
.type-post {
.length-optimal {
margin-left: auto;
margin-right: auto;
}
.categories {
.category {
&:first-child {
&:before {
content: '\00a0\00a0/\00a0\00a0';
}
}
}
}
}
.post-image {
border-radius: v(border-radius);
}
// blog post title
.post-title {
font-size: v(text-1100);
}
.post-image-caption {
text-align: center;
}

View file

@ -0,0 +1,24 @@
//========== Imports ==========//
// Config
@import '01-config';
// Utilities
@import '02-utilities';
// Base
@import '03-base';
// Layout
@import '04-layout';
// Components
@import '05-components';
// Pages
@import '06-pages';