Skip to content

Commit

Permalink
New content structure outline
Browse files Browse the repository at this point in the history
Updates #1
  • Loading branch information
bep committed Mar 5, 2022
1 parent f0fb3ad commit 5bfdf4e
Show file tree
Hide file tree
Showing 48 changed files with 6,544 additions and 596 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions assets/css/components/all.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "variables.css";
@import "fonts.css";
@import "chroma.css";
@import "chroma_dark.css";
@import "code.css";
Expand Down
45 changes: 45 additions & 0 deletions assets/css/components/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* mulish-200 - latin */
@font-face {
font-family: 'Mulish';
font-style: normal;
font-weight: 200;
src: local(''),
url('../fonts/mulish-v10-latin-200.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/mulish-v10-latin-200.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* mulish-regular - latin */
@font-face {
font-family: 'Mulish';
font-style: normal;
font-weight: 400;
src: local(''),
url('../fonts/mulish-v10-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/mulish-v10-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* mulish-800 - latin */
@font-face {
font-family: 'Mulish';
font-style: normal;
font-weight: 800;
src: local(''),
url('../fonts/mulish-v10-latin-800.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/mulish-v10-latin-800.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* mulish-italic - latin */
@font-face {
font-family: 'Mulish';
font-style: italic;
font-weight: 400;
src: local(''),
url('../fonts/mulish-v10-latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/mulish-v10-latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* mulish-800italic - latin */
@font-face {
font-family: 'Mulish';
font-style: italic;
font-weight: 800;
src: local(''),
url('../fonts/mulish-v10-latin-800italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/mulish-v10-latin-800italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
2 changes: 1 addition & 1 deletion assets/css/components/prose.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

.prose table th {
@apply font-semibold;
@apply font-extrabold;
}

.prose table td,
Expand Down
70 changes: 35 additions & 35 deletions assets/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,43 @@
@import "components/all.css";

html {
font-size: 14px;
font-size: 14px;
}

@screen md {
html {
font-size: 16px;
}
html {
font-size: 16px;
}
}

body {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
fill: currentColor; /* Applies to SVG only */
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
fill: currentColor; /* Applies to SVG only */
}

.nested-blockquote blockquote {
border-left: 4px solid var(--primary-color);
padding-left: 1em;
/*margin: 0;*/
border-left: 4px solid var(--primary-color);
padding-left: 1em;
/*margin: 0;*/
}

.mw-90 {
max-width: 90%;
max-width: 90%;
}

/* Hide pre-initialized DOM elements. */
[x-cloak] {
visibility: hidden;
visibility: hidden;
}

/* Combine with classes in skins and skins-pseudo for
* many different transition possibilities. */
.bg-animate,
.bg-animate:hover,
.bg-animate:focus {
-webkit-transition: background-color 0.15s ease-in-out;
transition: background-color 0.15s ease-in-out;
-webkit-transition: background-color 0.15s ease-in-out;
transition: background-color 0.15s ease-in-out;
}

/*
Expand All @@ -50,36 +50,36 @@ body {
*/
.dim {
opacity: 1;
-webkit-transition: opacity 0.15s ease-in;
transition: opacity 0.15s ease-in;
opacity: 1;
-webkit-transition: opacity 0.15s ease-in;
transition: opacity 0.15s ease-in;
}
.dim:hover,
.dim:focus {
opacity: 0.5;
-webkit-transition: opacity 0.15s ease-in;
transition: opacity 0.15s ease-in;
opacity: 0.5;
-webkit-transition: opacity 0.15s ease-in;
transition: opacity 0.15s ease-in;
}
.dim:active {
opacity: 0.8;
-webkit-transition: opacity 0.15s ease-out;
transition: opacity 0.15s ease-out;
opacity: 0.8;
-webkit-transition: opacity 0.15s ease-out;
transition: opacity 0.15s ease-out;
}

@layer components {
.btn-primary {
@apply py-2 px-4 font-semibold rounded-md shadow-md bg-steel-600 hover:bg-steel-700 text-white hover:text-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-steel-500;
}
.btn-primary {
@apply py-2 px-4 font-extrabold rounded-md shadow-md bg-steel-600 hover:bg-steel-700 text-white hover:text-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-steel-500;
}

.btn-secondary {
@apply py-2 px-4 font-semibold rounded-md shadow-md bg-green-600 hover:bg-green-700 text-white hover:text-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-steel-500;
}
.btn-secondary {
@apply py-2 px-4 font-extrabold rounded-md shadow-md bg-green-600 hover:bg-green-700 text-white hover:text-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-steel-500;
}

a {
@apply text-blue-700 hover:text-steel-500 no-underline;
}
a {
@apply text-blue-700 hover:text-steel-500 no-underline;
}

.dark a {
@apply text-steel-600 hover:text-steel-400 no-underline;
}
.dark a {
@apply text-steel-600 hover:text-steel-400 no-underline;
}
}
44 changes: 22 additions & 22 deletions assets/js/main/nav/alpine-turbo-bridge.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
export function bridgeTurboAndAlpine(Alpine) {
document.addEventListener('turbo:render', () => {
if (document.documentElement.hasAttribute('data-turbo-preview')) {
return;
}
document.addEventListener("turbo:render", () => {
if (document.documentElement.hasAttribute("data-turbo-preview")) {
return;
}

// Restart Alpine.
Alpine.start();
});
// Restart Alpine.
Alpine.start();
});

// Cleanup Alpine state on navigation.
document.addEventListener('turbo:before-cache', () => {
Alpine.stopObservingMutations();
// Cleanup Alpine state on navigation.
document.addEventListener("turbo:before-cache", () => {
Alpine.stopObservingMutations();

document.body.querySelectorAll('[x-data]').forEach((el) => {
if (el.hasAttribute('data-turbo-permanent')) {
el._x_ignore = true;
} else {
Alpine.destroyTree(el);
document.body.querySelectorAll("[x-data]").forEach((el) => {
if (el.hasAttribute("data-turbo-permanent")) {
el._x_ignore = true;
} else {
Alpine.destroyTree(el);

// Turbo leaks DOM elements via their data-turbo-permanent handling.
// That needs to be fixed upstream, but until then.
let clone = el.cloneNode(true);
el.replaceWith(clone);
}
});
});
// Turbo leaks DOM elements via their data-turbo-permanent handling.
// That needs to be fixed upstream, but until then.
let clone = el.cloneNode(true);
el.replaceWith(clone);
}
});
});
}
Loading

0 comments on commit 5bfdf4e

Please sign in to comment.