From 17151212e3122662eadea628e93a6247384eeb30 Mon Sep 17 00:00:00 2001 From: Ryan Brewer Date: Mon, 21 Oct 2024 14:39:47 -0700 Subject: [PATCH] pretty homepage --- arctic_build/__pages/index.html | 4 ++-- arctic_build/index.html | 4 ++-- arctic_build/public/style.css | 17 ++++++++++++++++- dist/__pages/index.html | 4 ++-- dist/index.html | 4 ++-- .../arctic_framework_org.cache | Bin 588 -> 588 bytes .../_gleam_artefacts/demos.cache | Bin 481 -> 481 bytes .../_gleam_artefacts/parser.cache | Bin 666 -> 672 bytes .../_gleam_artefacts/parser.cache_meta | Bin 466 -> 474 bytes dist/priv/arctic_framework_org/parser.mjs | 15 ++++++++++----- dist/style.css | 17 ++++++++++++++++- public/style.css | 17 ++++++++++++++++- src/parser.gleam | 6 ++++-- 13 files changed, 70 insertions(+), 18 deletions(-) diff --git a/arctic_build/__pages/index.html b/arctic_build/__pages/index.html index 015c350..8888118 100644 --- a/arctic_build/__pages/index.html +++ b/arctic_build/__pages/index.html @@ -1,7 +1,7 @@

Arctic -

An icy horizon in the Arctic.
-

Performance on Ice +

An icy horizon in the Arctic.
+

Performance on Ice

Arctic is a friendly web framework for the Gleam programming language. Author content in the language you want, generate HTML at build time, and serve a high-performance experience on the rocks. diff --git a/arctic_build/index.html b/arctic_build/index.html index 40d9a78..42ff565 100644 --- a/arctic_build/index.html +++ b/arctic_build/index.html @@ -9,8 +9,8 @@ else document.body.style.paddingTop = '0px'; ">☰ArcticGuidesDemosDocs

Arctic -

An icy horizon in the Arctic.
-

Performance on Ice +

An icy horizon in the Arctic.
+

Performance on Ice

Arctic is a friendly web framework for the Gleam programming language. Author content in the language you want, generate HTML at build time, and serve a high-performance experience on the rocks. diff --git a/arctic_build/public/style.css b/arctic_build/public/style.css index bcb6858..c7144d8 100644 --- a/arctic_build/public/style.css +++ b/arctic_build/public/style.css @@ -12,7 +12,7 @@ html, margin: 0; background: var(--background); color: var(--color); - font-family: Arial, Helvetica, sans-serif; + font-family: sans-serif; } h3 { @@ -93,4 +93,19 @@ a { a:hover { opacity: 0.5; transition: 0.2s; +} + +.img-container { + height: 200pt; +} + +.img-container img { + position: absolute; + left: 0; + right: 0; + width: 100%; + height: 200pt; + object-fit: cover; + object-position: center; + filter: hue-rotate(70deg) grayscale(0.65); } \ No newline at end of file diff --git a/dist/__pages/index.html b/dist/__pages/index.html index 015c350..8888118 100644 --- a/dist/__pages/index.html +++ b/dist/__pages/index.html @@ -1,7 +1,7 @@

Arctic -

An icy horizon in the Arctic.
-

Performance on Ice +

An icy horizon in the Arctic.
+

Performance on Ice

Arctic is a friendly web framework for the Gleam programming language. Author content in the language you want, generate HTML at build time, and serve a high-performance experience on the rocks. diff --git a/dist/index.html b/dist/index.html index 40d9a78..42ff565 100644 --- a/dist/index.html +++ b/dist/index.html @@ -9,8 +9,8 @@ else document.body.style.paddingTop = '0px'; ">☰

ArcticGuidesDemosDocs

Arctic -

An icy horizon in the Arctic.
-

Performance on Ice +

An icy horizon in the Arctic.
+

Performance on Ice

Arctic is a friendly web framework for the Gleam programming language. Author content in the language you want, generate HTML at build time, and serve a high-performance experience on the rocks. diff --git a/dist/priv/arctic_framework_org/_gleam_artefacts/arctic_framework_org.cache b/dist/priv/arctic_framework_org/_gleam_artefacts/arctic_framework_org.cache index 713958e22587fad011e0d9de3d0e35d3c6516832..74191efaadc35532cad0c1f2a3c3864b8e40032d 100644 GIT binary patch delta 33 pcmX@Za)xC?DI=$qqYjhcL@mb&lj|6zCLd(9ojik4bMik%KLEBa3kd)K delta 33 pcmX@Za)xC?DI=$rqYjf`sFh>Lf{e_LEKGu|N`kEHAfd_ajP{cg7&WB@ c7@1`m1sP)mR0Z8a1k=(5J5Cz2F-n6(0g9v#8vp4F_6joBEbL81VOQ4ab5 diff --git a/dist/priv/arctic_framework_org/_gleam_artefacts/parser.cache b/dist/priv/arctic_framework_org/_gleam_artefacts/parser.cache index 678eec3d3c9522b53b35443151e5ac8fea26cba2..3bb744083dc116a703b916ff98e8d26bdf3deddb 100644 GIT binary patch delta 186 zcmV;r07d_r1)v225WTSiegPbH0lEPJ7C-_)3<41qB0&@a5iL4FECLacDnXEwoB z-vK?7wgD-B5CH?$1~CDw0T3DyFn1A#h!L8$lCIVjq zGkpTK0yF*s0|PTX184&?cms$7GuZu1TzW+83i*W o1z80%Uj<|ZGnfU)1vB~uF9tI|25$y4r3R}8Gq45))CL3A2CdmGdjJ3c delta 179 zcmV;k08Ia&1)2o{5WKMhegPbC0kr`E7C-_)3<41qB0&@a5iKe~ECLZ#Izd#EoB z^8qQ7wgEkU5CH?11~CDg0T3DyFn1A#h!L8N17ia-a|43|Gt>hP1Tz!_83Z#@1Y!g;aRh$^Gs^_p1T*CX8U-^T h1tkSDSp|s&GrI-w1u_OO1~X;`Yz8xN29*W_mj+8DDt&Eh{s#-9E~QQehU2oxVz3x)Gg?eaCY#A3!wr&R zw)qSE2yf+6uX>(OPdx{9QF?N3*h0#!ZO+sEL^U81`W3`!*X>pjik zuk50S4Sd{@4vJV9V2wAF63L^9KE^mB%9j}8D8Yt{5teu%qH%*1DzMPdBqLLX9Ud^l PA_a6X#{w%Har*lLzhEaa delta 227 zcmXZVF$)0!7{>9JbEeBA#pDKqiIQTp_y7jNbd+0kT(>Cd29rrQNU{0?Hf6I(8Du)M z{RWGa{I5LqtM_@9*H>}glM84-zv192?FY|$-j>f4|@-7QPrr{IR; z2xA;@#tV8>q=O0ec;kzTBGQM0IqpdCC5bc|=)s1I3w%70QAM)Ip^b$qc{y?fkhn+@ L0}Nqfh4tSLt&Sx( diff --git a/dist/priv/arctic_framework_org/parser.mjs b/dist/priv/arctic_framework_org/parser.mjs index 2fdf1a3..17fa4af 100644 --- a/dist/priv/arctic_framework_org/parser.mjs +++ b/dist/priv/arctic_framework_org/parser.mjs @@ -15,7 +15,7 @@ import { alt, class$, href, src } from "../lustre/lustre/attribute.mjs"; import * as $element from "../lustre/lustre/element.mjs"; import { text } from "../lustre/lustre/element.mjs"; import * as $html from "../lustre/lustre/element/html.mjs"; -import { a, code, em, h1, h3, img, li, pre, strong, ul } from "../lustre/lustre/element/html.mjs"; +import { a, code, div, em, h1, h3, img, li, pre, strong, ul } from "../lustre/lustre/element/html.mjs"; import * as $snag from "../snag/snag.mjs"; import { Ok, toList, makeError } from "./gleam.mjs"; @@ -92,11 +92,16 @@ export function parse(src_name, content) { let url = args.head; return new Ok( [ - img( + div( + toList([class$("img-container")]), toList([ - src(url), - alt(body), - $attribute.attribute("async", "true"), + img( + toList([ + src(url), + alt(body), + $attribute.attribute("async", "true"), + ]), + ), ]), ), undefined, diff --git a/dist/style.css b/dist/style.css index bcb6858..c7144d8 100644 --- a/dist/style.css +++ b/dist/style.css @@ -12,7 +12,7 @@ html, margin: 0; background: var(--background); color: var(--color); - font-family: Arial, Helvetica, sans-serif; + font-family: sans-serif; } h3 { @@ -93,4 +93,19 @@ a { a:hover { opacity: 0.5; transition: 0.2s; +} + +.img-container { + height: 200pt; +} + +.img-container img { + position: absolute; + left: 0; + right: 0; + width: 100%; + height: 200pt; + object-fit: cover; + object-position: center; + filter: hue-rotate(70deg) grayscale(0.65); } \ No newline at end of file diff --git a/public/style.css b/public/style.css index bcb6858..c7144d8 100644 --- a/public/style.css +++ b/public/style.css @@ -12,7 +12,7 @@ html, margin: 0; background: var(--background); color: var(--color); - font-family: Arial, Helvetica, sans-serif; + font-family: sans-serif; } h3 { @@ -93,4 +93,19 @@ a { a:hover { opacity: 0.5; transition: 0.2s; +} + +.img-container { + height: 200pt; +} + +.img-container img { + position: absolute; + left: 0; + right: 0; + width: 100%; + height: 200pt; + object-fit: cover; + object-position: center; + filter: hue-rotate(70deg) grayscale(0.65); } \ No newline at end of file diff --git a/src/parser.gleam b/src/parser.gleam index 2d52a4c..9991cb5 100644 --- a/src/parser.gleam +++ b/src/parser.gleam @@ -7,7 +7,7 @@ import gleam/list import gleam/string.{replace, split} import lustre/attribute.{alt, class, href, src} import lustre/element.{text} -import lustre/element/html.{a, code, em, h1, h3, img, li, pre, strong, ul} +import lustre/element/html.{a, code, div, em, h1, h3, img, li, pre, strong, ul} import snag.{type Snag} pub fn parse(src_name: String, content: String) -> Result(Page, Snag) { @@ -31,7 +31,9 @@ pub fn parse(src_name: String, content: String) -> Result(Page, Snag) { case args { [url] -> Ok(#( - img([src(url), alt(body), attribute.attribute("async", "true")]), + div([class("img-container")], [ + img([src(url), alt(body), attribute.attribute("async", "true")]), + ]), Nil, )) _ -> snag.error("img expected a URL argument")