From 4b035c0c0c5b70b031d6814d2a01a4f72dec55d7 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sat, 15 Jun 2024 17:29:43 -0500 Subject: [PATCH] feat(post): first draft of styling --- posts/from-github-pages-to-aws.html | 16 +++-- scripts/post.js | 8 +++ styles/post.css | 99 +++++++++++++++++++++-------- 3 files changed, 89 insertions(+), 34 deletions(-) create mode 100644 scripts/post.js diff --git a/posts/from-github-pages-to-aws.html b/posts/from-github-pages-to-aws.html index 990c5ac..5d31f53 100644 --- a/posts/from-github-pages-to-aws.html +++ b/posts/from-github-pages-to-aws.html @@ -24,13 +24,16 @@
-
-

From GitHub Pages to AWS

- -
+
+
+

From GitHub Pages to AWS

+ +
+
+

a subheading you will fix

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla felis quam, varius eu ullamcorper ac, tempus eget risus. Vestibulum ante @@ -60,5 +63,6 @@

+ diff --git a/scripts/post.js b/scripts/post.js new file mode 100644 index 0000000..ecc4a0d --- /dev/null +++ b/scripts/post.js @@ -0,0 +1,8 @@ +const h2s = document.querySelectorAll("article h2"); + +h2s.forEach((h2) => { + const mdHeading = document.createElement("span"); + mdHeading.textContent = "# "; + mdHeading.style.color = "#0073e6"; + h2.prepend(mdHeading); +}); diff --git a/styles/post.css b/styles/post.css index 880353b..cd8cb3b 100644 --- a/styles/post.css +++ b/styles/post.css @@ -1,31 +1,3 @@ -@font-face { - font-family: "Signifier"; - src: url("public/signifier/Signifier-Regular.ttf"); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: "Signifier"; - src: url("public/signifier/Signifier-Italic.ttf"); - font-weight: normal; - font-style: italic; -} - -@font-face { - font-family: "Signifier"; - src: url("public/signifier/Signifier-Bold.ttf"); - font-weight: bold; - font-style: normal; -} - -@font-face { - font-family: "Signifier"; - src: url("public/signifier/Signifier-BoldItalic.ttf"); - font-weight: bold; - font-style: italic; -} - html, body { font-family: "Signifier", serif; @@ -34,3 +6,74 @@ body { padding: 0; height: 100%; } + +header { + font-size: 1.5em; + display: flex; + padding: 20px; + align-items: center; + justify-content: space-between; +} + +.main { + display: flex; + justify-content: center; +} + +.post-header { + padding: 0; +} + +.post-container { + max-width: 80%; +} + +.post-title { + font-weight: normal; +} + +.post-meta { + font-style: italic; + /* space between date and title */ + margin-left: 100px; +} + +.post-title { + font-weight: normal; +} + +.post-title { + width: 100%; + position: relative; + display: inline-block; +} + +.post-title::before { + content: ""; + position: absolute; + background-color: #0073e6; + height: 30px; + width: 2px; + bottom: -10px; + left: -20px; +} + +.post-title::after { + content: ""; + position: absolute; + background-color: #0073e6; + width: 200px; + height: 2px; + bottom: -10px; + left: -20px; +} + +article { + font-size: 1.5em; + line-height: 1.2em; +} + +article h2 { + font-weight: normal; + font-style: italic; +}