From e673492f30ec2988a0e7512a733cf2eb261882fa Mon Sep 17 00:00:00 2001
From: Cory Dransfeldt <hi@coryd.dev>
Date: Thu, 24 Oct 2024 16:45:14 -0700
Subject: [PATCH] chore: styles + partial ordering

---
 config/filters/general.js                          | 1 -
 package-lock.json                                  | 4 ++--
 package.json                                       | 2 +-
 src/assets/styles/components/youtube-player.css    | 9 +++++++++
 src/assets/styles/index.css                        | 1 +
 src/includes/base.liquid                           | 4 ++--
 src/includes/partials/blocks/youtube-player.liquid | 1 -
 src/pages/dynamic/posts/post.html                  | 2 +-
 8 files changed, 16 insertions(+), 8 deletions(-)
 create mode 100644 src/assets/styles/components/youtube-player.css

diff --git a/config/filters/general.js b/config/filters/general.js
index 43f86aa9..47ae0bc5 100644
--- a/config/filters/general.js
+++ b/config/filters/general.js
@@ -9,7 +9,6 @@ export default {
     return string.replace(pattern, replacement);
   },
   replaceQuotes: (string) => string.replace(/"/g, "&quot;"),
-  formatNumber: (number) => number.toLocaleString("en-US"),
   htmlTruncate: (content, limit = 50) =>
     truncateHtml(content, limit, {
       byWords: true,
diff --git a/package-lock.json b/package-lock.json
index 09d9262e..53c012ba 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "coryd.dev",
-  "version": "1.7.3",
+  "version": "1.7.4",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "coryd.dev",
-      "version": "1.7.3",
+      "version": "1.7.4",
       "license": "MIT",
       "dependencies": {
         "@cdransf/api-text": "^1.5.0",
diff --git a/package.json b/package.json
index 7169b13b..c85bab0e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "coryd.dev",
-  "version": "1.7.3",
+  "version": "1.7.4",
   "description": "The source for my personal site. Built using 11ty (and other tools).",
   "type": "module",
   "engines": {
diff --git a/src/assets/styles/components/youtube-player.css b/src/assets/styles/components/youtube-player.css
new file mode 100644
index 00000000..d2ccb228
--- /dev/null
+++ b/src/assets/styles/components/youtube-player.css
@@ -0,0 +1,9 @@
+youtube-video {
+  aspect-ratio: 16/9;
+  width: 100%;
+  display: flex;
+
+  &:has(+ *) {
+    margin-bottom: var(--spacing-base);
+  }
+}
diff --git a/src/assets/styles/index.css b/src/assets/styles/index.css
index d021e587..d4ff6cf2 100644
--- a/src/assets/styles/index.css
+++ b/src/assets/styles/index.css
@@ -38,3 +38,4 @@
 @import url("./components/paginator.css") layer(components);
 @import url("./components/progress-bar.css") layer(components);
 @import url("./components/theme-toggle.css") layer(components);
+@import url("./components/youtube-player.css") layer(components);
diff --git a/src/includes/base.liquid b/src/includes/base.liquid
index a519796f..06df6dac 100644
--- a/src/includes/base.liquid
+++ b/src/includes/base.liquid
@@ -45,7 +45,7 @@
 {%- assign escapedPageDescription = pageDescription | escape -%}
 
 <!doctype html>
-<html lang="en">
+<html lang="{{ globals.lang }}">
   <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -93,4 +93,4 @@
     </script>
     {{ content }}
   </body>
-</html>
+</html>
\ No newline at end of file
diff --git a/src/includes/partials/blocks/youtube-player.liquid b/src/includes/partials/blocks/youtube-player.liquid
index 9eb1c574..c2b3dbc4 100644
--- a/src/includes/partials/blocks/youtube-player.liquid
+++ b/src/includes/partials/blocks/youtube-player.liquid
@@ -1,3 +1,2 @@
 <script type="module" src="/assets/scripts/components/youtube-video-element.js?v={% appVersion %}"></script>
-<style>youtube-video{aspect-ratio:16/9;width:100%;display:flex}</style>
 <youtube-video controls src="{{ url }}"></youtube-video>
\ No newline at end of file
diff --git a/src/pages/dynamic/posts/post.html b/src/pages/dynamic/posts/post.html
index 0b973be2..76c0eec0 100644
--- a/src/pages/dynamic/posts/post.html
+++ b/src/pages/dynamic/posts/post.html
@@ -41,8 +41,8 @@ schema: blog
     />
     {%- endif -%}
     {{ post.content | markdown }}
-    {% render "partials/blocks/mastodon-post.liquid", post:post.mastodon_url %}
     {% render "partials/blocks/index.liquid", blocks:post.blocks %}
+    {% render "partials/blocks/mastodon-post.liquid", post:post.mastodon_url %}
     {% render "partials/blocks/associated-media.liquid", artists:post.artists %}
     {% render "partials/blocks/associated-media.liquid", books:post.books %}
     {% render "partials/blocks/associated-media.liquid", genres:post.genres %}