chore: fonts + improve color scales

This commit is contained in:
Cory Dransfeldt 2024-09-26 11:45:17 -07:00
parent bda81f70dd
commit db0b5b33eb
No known key found for this signature in database
12 changed files with 94 additions and 61 deletions

10
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "coryd.dev",
"version": "24.19.12",
"version": "24.20.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "coryd.dev",
"version": "24.19.12",
"version": "24.20.1",
"license": "MIT",
"dependencies": {
"@cdransf/api-text": "^1.5.0",
@ -3163,9 +3163,9 @@
}
},
"node_modules/package-json-from-dist": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz",
"integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
"dev": true,
"license": "BlueOak-1.0.0"
},

View file

@ -1,6 +1,6 @@
{
"name": "coryd.dev",
"version": "24.19.12",
"version": "24.20.1",
"description": "The source for my personal site. Built using 11ty (and other tools).",
"type": "module",
"scripts": {

BIN
src/assets/fonts/ml.woff2 Normal file

Binary file not shown.

BIN
src/assets/fonts/mlb.woff2 Normal file

Binary file not shown.

BIN
src/assets/fonts/mlbi.woff2 Normal file

Binary file not shown.

BIN
src/assets/fonts/mli.woff2 Normal file

Binary file not shown.

View file

@ -13,6 +13,8 @@ html {
body {
font-size: var(--font-size-base);
line-height: var(--line-height-base);
letter-spacing: -.025rem;
word-spacing: -.05rem;
}
::-moz-selection {

View file

@ -0,0 +1,31 @@
@font-face {
font-family: MonoLisa;
src: url('/assets/fonts/ml.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: MonoLisa;
src: url('/assets/fonts/mlb.woff2') format('woff2');
font-weight: 700;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: MonoLisa;
src: url('/assets/fonts/mli.woff2') format('woff2');
font-weight: 400;
font-style: italic;
font-display: swap;
}
@font-face {
font-family: MonoLisa;
src: url('/assets/fonts/mlbi.woff2') format('woff2');
font-weight: 700;
font-style: italic;
font-display: swap;
}

View file

@ -1,45 +1,42 @@
:root {
/* colors */
--blue-100: #e2ecff;
--blue-200: #c5d8ff;
--blue-300: #a8c4ff;
--blue-400: #7aa6ff;
--blue-500: #4b88ff;
--blue-600: #3168e9;
--blue-700: #2458d4;
--blue-800: #1d4bac;
--blue-900: #1c3e91;
--blue-100: #c5d8ff;
--blue-200: #7aa6ff;
--blue-300: #4b88ff;
--blue-400: #3168e9;
--blue-500: #2458d4;
--blue-600: #1d4bac;
--gray-50: #f6f7f8;
--gray-100: #eceef1;
--gray-200: #dfe3e8;
--gray-300: #c5ccd5;
--gray-400: #adb4c0;
--gray-500: #959eae;
--gray-600: #7f899b;
--gray-700: #707b8e;
--gray-800: #626d7f;
--gray-900: #545e71;
--gray-950: #4a5365;
--gray-1000: #1a1d22;
--gray-100: #f6f7f8;
--gray-200: #eceef1;
--gray-300: #dfe3e8;
--gray-400: #959eae;
--gray-500: #7f899b;
--gray-600: #626d7f;
--gray-700: #545e71;
--gray-800: #4a5365;
--gray-900: #1a1d22;
--white: #fff;
--black: #000;
--gray-light: var(--gray-200);
--gray-lighter: var(--gray-100);
--gray-medium: var(--gray-500);
--gray-dark: var(--gray-950);
--gray-light: var(--gray-300);
--gray-lighter: var(--gray-200);
--gray-medium: var(--gray-400);
--gray-dark: var(--gray-800);
/* base theme */
--color-lightest: var(--gray-50);
--color-darkest: var(--gray-1000);
--color-lightest: var(--gray-100);
--color-darkest: var(--gray-900);
--text-color: var(--color-darkest);
--background-color: var(--color-lightest);
--text-color-inverted: var(--color-lightest);
--background-color-inverted: var(--color-darkest);
--accent-color: var(--blue-600);
--accent-color-hover: var(--blue-800);
--accent-color: var(--blue-400);
--accent-color-hover: var(--blue-600);
--brand-github-light: #333;
--brand-github-dark: #f5f5f5;
--brand-gmail: #ea4335;
--brand-github: #333;
@ -74,7 +71,7 @@
--border-gray: 1px solid var(--gray-light);
/* fonts */
--font-mono: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, ui-monospace, monospace;
--font-mono: MonoLisa, Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, ui-monospace, monospace;
/* text */
--font-size-xs: .7rem;
@ -149,12 +146,12 @@
--background-color: var(--color-lightest);
--text-color-inverted: var(--color-lightest);
--background-color-inverted: var(--color-darkest);
--accent-color: var(--blue-600);
--accent-color-hover: var(--blue-800);
--gray-light: var(--gray-200);
--gray-lighter: var(--gray-100);
--gray-dark: var(--gray-950);
--brand-github: #333;
--accent-color: var(--blue-400);
--accent-color-hover: var(--blue-600);
--gray-light: var(--gray-300);
--gray-lighter: var(--gray-200);
--gray-dark: var(--gray-800);
--brand-github: var(--brand-github-light);
}
/* dark theme */
@ -163,12 +160,12 @@
--background-color: var(--color-darkest);
--text-color-inverted: var(--color-darkest);
--background-color-inverted: var(--color-lightest);
--accent-color: var(--blue-400);
--accent-color-hover: var(--blue-200);
--gray-light: var(--gray-800);
--gray-lighter: var(--gray-900);
--gray-dark: var(--gray-200);
--brand-github: #f5f5f5;
--accent-color: var(--blue-200);
--accent-color-hover: var(--blue-100);
--gray-light: var(--gray-600);
--gray-lighter: var(--gray-700);
--gray-dark: var(--gray-300);
--brand-github: var(--brand-github-dark);
}
@media (prefers-color-scheme: dark) {
@ -177,11 +174,11 @@
--background-color: var(--color-darkest);
--text-color-inverted: var(--color-darkest);
--background-color-inverted: var(--color-lightest);
--accent-color: var(--blue-400);
--accent-color-hover: var(--blue-200);
--gray-light: var(--gray-800);
--gray-lighter: var(--gray-900);
--gray-dark: var(--gray-200);
--brand-github: #f5f5f5;
--accent-color: var(--blue-200);
--accent-color-hover: var(--blue-100);
--gray-light: var(--gray-600);
--gray-lighter: var(--gray-700);
--gray-dark: var(--gray-300);
--brand-github: var(--brand-github-dark);
}
}

View file

@ -4,6 +4,7 @@
@import url('./reset.css') layer(reset);
/* core defaults */
@import url('./defaults/fonts.css') layer(defaults);
@import url('./defaults/vars.css') layer(defaults);
/* base styles */

View file

@ -1,6 +1,6 @@
code,
pre {
color: var(--blue-200);
color: var(--blue-100);
background: none;
border-radius: var(--border-radius-slight);
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
@ -28,8 +28,8 @@ pre {
pre,
:not(pre) > code {
background: var(--gray-1000);
border: 1px solid var(--gray-200);
background: var(--gray-900);
border: 1px solid var(--gray-300);
}
.namespace {
@ -46,11 +46,11 @@ pre,
&.prolog,
&.doctype,
&.cdata {
color: var(--gray-600);
color: var(--gray-500);
}
&.punctuation {
color: var(--gray-200);
color: var(--gray-300);
}
&.property,
@ -58,12 +58,12 @@ pre,
&.constant,
&.symbol,
&.deleted {
color: var(--blue-500);
color: var(--blue-300);
}
&.boolean,
&.number {
color: var(--blue-700);
color: var(--blue-500);
}
&.selector,

View file

@ -84,6 +84,8 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{ pageTitle }}</title>
<link rel="preload" href="/assets/fonts/ml.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="/assets/fonts/mlb.woff2" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="stylesheet" href="/assets/styles/index.css?v={% appVersion %}" type="text/css" />
<link rel="canonical" href="{{ fullUrl }}" />
<meta property="og:title" content="{{ pageTitle }}" />