From 271e29901757142f8bb6ce9605996e9f102e5c83 Mon Sep 17 00:00:00 2001 From: Sergio <77530549+sergi0g@users.noreply.github.com> Date: Thu, 11 Jul 2024 18:21:31 +0300 Subject: [PATCH] Moved all web assets to static folder, added xitca-web's logging feature and added favicons --- Cargo.lock | 83 ++++++++++++++++++++++++++++++- Cargo.toml | 4 +- src/server.rs | 36 ++++++++++---- src/static/apple-touch-icon.png | Bin 0 -> 5872 bytes src/static/favicon.ico | Bin 0 -> 1029 bytes src/static/favicon.svg | 29 +++++++++++ src/{ => static}/index.css | 2 +- src/{ => static}/template.liquid | 44 +++++++++++++++- 8 files changed, 182 insertions(+), 16 deletions(-) create mode 100644 src/static/apple-touch-icon.png create mode 100644 src/static/favicon.ico create mode 100644 src/static/favicon.svg rename src/{ => static}/index.css (55%) rename src/{ => static}/template.liquid (68%) diff --git a/Cargo.lock b/Cargo.lock index 2666b0a..8dc16a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -350,7 +350,7 @@ dependencies = [ [[package]] name = "cup" -version = "1.1.1" +version = "1.1.2" dependencies = [ "bollard", "clap", @@ -918,6 +918,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-conv" version = "0.1.0" @@ -964,6 +974,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "percent-encoding" version = "2.3.1" @@ -1303,6 +1319,15 @@ dependencies = [ "digest", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -1403,6 +1428,16 @@ dependencies = [ "syn", ] +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + [[package]] name = "time" version = "0.3.36" @@ -1525,9 +1560,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tracing-core" version = "0.1.32" @@ -1535,6 +1582,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "nu-ansi-term", + "sharded-slab", + "smallvec", + "thread_local", + "tracing-core", + "tracing-log", ] [[package]] @@ -1627,6 +1700,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "version_check" version = "0.9.4" @@ -1960,6 +2039,8 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tracing", + "tracing-subscriber", "xitca-http", "xitca-server", "xitca-service", diff --git a/Cargo.toml b/Cargo.toml index 0872544..5818cd3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cup" -version = "1.1.1" +version = "1.1.2" edition = "2021" [dependencies] @@ -10,7 +10,7 @@ tokio = {version = "1.38.0", features = ["rt", "rt-multi-thread", "macros"]} ureq = { version = "2.9.7", features = ["tls"] } json = "0.12.4" rayon = "1.10.0" -xitca-web = { version = "0.5.0", optional = true } +xitca-web = { version = "0.5.0", optional = true, features = ["logger"] } liquid = { version = "0.26.6", optional = true } bollard = "0.16.1" once_cell = "1.19.0" diff --git a/src/server.rs b/src/server.rs index bb465f2..7ccea88 100644 --- a/src/server.rs +++ b/src/server.rs @@ -4,14 +4,18 @@ use liquid::{object, Object}; use rayon::iter::{IntoParallelRefIterator, ParallelIterator}; use xitca_web::{ body::ResponseBody, - handler::{handler_service, path::PathOwn, state::StateOwn}, - http::{Method, WebResponse}, + handler::{handler_service, state::StateOwn}, + http::WebResponse, route::get, App, + middleware::Logger }; -const RAW_TEMPLATE: &str = include_str!("template.liquid"); -const STYLE: &str = include_str!("index.css"); +const RAW_TEMPLATE: &str = include_str!("static/template.liquid"); +const STYLE: &str = include_str!("static/index.css"); +const FAVICON_ICO: &[u8] = include_bytes!("static/favicon.ico"); +const FAVICON_SVG: &[u8] = include_bytes!("static/favicon.svg"); +const APPLE_TOUCH_ICON: &[u8] = include_bytes!("static/apple-touch-icon.png"); pub async fn serve(port: &u16, updates: &[(String, Option)]) -> std::io::Result<()> { println!("Serving on http://0.0.0.0:{}", port); @@ -19,6 +23,10 @@ pub async fn serve(port: &u16, updates: &[(String, Option)]) -> std::io::R .with_state(updates.to_owned()) .at("/", get(handler_service(home))) .at("/json", get(handler_service(json))) + .at("/favicon.ico", handler_service(favicon_ico)) // These aren't pretty but this is xitca-web... + .at("/favicon.svg", handler_service(favicon_svg)) + .at("/apple-touch-icon.png", handler_service(apple_touch_icon)) + .enclosed(Logger::new()) .serve() .bind(format!("0.0.0.0:{}", port))? .run() @@ -27,8 +35,6 @@ pub async fn serve(port: &u16, updates: &[(String, Option)]) -> std::io::R async fn home( updates: StateOwn)>>, - method: Method, - path: PathOwn, ) -> WebResponse { let template = liquid::ParserBuilder::with_stdlib() .build() @@ -70,14 +76,11 @@ async fn home( "style": STYLE }); let result = template.render(&globals).unwrap(); - println!("Received {} request on {}", method, path.0); WebResponse::new(ResponseBody::from(result)) } async fn json( - updates: StateOwn)>>, - method: Method, - path: PathOwn, + updates: StateOwn)>> ) -> WebResponse { let result_mutex: Mutex = Mutex::new(json::object::Object::new()); updates.par_iter().for_each(|image| match image.1 { @@ -85,6 +88,17 @@ async fn json( None => result_mutex.lock().unwrap().insert(&image.0, json::Null), }); let result = json::stringify(result_mutex.lock().unwrap().clone()); - println!("Received {} request on {}", method, path.0); WebResponse::new(ResponseBody::from(result)) } + +async fn favicon_ico() -> WebResponse { + WebResponse::new(ResponseBody::from(FAVICON_ICO)) +} + +async fn favicon_svg() -> WebResponse { + WebResponse::new(ResponseBody::from(FAVICON_SVG)) +} + +async fn apple_touch_icon() -> WebResponse { + WebResponse::new(ResponseBody::from(APPLE_TOUCH_ICON)) +} \ No newline at end of file diff --git a/src/static/apple-touch-icon.png b/src/static/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ac6ec921024a44485de346584bb68284766d5f4f GIT binary patch literal 5872 zcmV{T~WLwj!ms4MYdCpQ+DOU ziCjs3?EJ;4r0lAEB$W@xW!aJ>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5l8y3(ZRSO(=9opa^6wM@Z`u3LO$CLZL$fMJRMgp!k1XFy75HIv&RW0000pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11CmKZ zK~z|UwU^6pTSXLyznOb&lLV3qr<8=|-9iHC(?}H(uSJE#f-X=iC@qK;3&fHYJN^t% z5kjgcQpJJ_fmDGI>N=$nQ64mu@@V45dD&@f-`u%#SlDVDYR3~h{FbBRbH4eVbMDAW zMEJin(>C1g`|5Q>PG8-V8SMOfdEkslR2k#%cG217!FC;brv={eJzhXW19X^p@orD+ zK47jgUhSp>KPCGX)Wp8hH8~j<&*6-P9x%o)seI{Z)A6lDT*e>t30AF68PAM(tfmfo) z4j02vN0A|nEWW4lJ&%~@5s&$|y1u$H*YU}P=a+o*^U2KZmz{1!jTyN7%j{mG%!PYF z;Z$ZdOD>-$A8bGk*qHARzBV>K*dF;TeDvY|OJlzcpG`eE?E;{yoGGKj@Bc`rPfgsq zO?r8Sd@-n59KaTeblsRFOeDD0+dULYcRSNMBIC(zlUNNl3UNS zmM^eg3^0+wL>8?TG0!KN&GFC47rFP`vm6;6xeu&FZM%Lo0RREAz@x44ID^Sf)`|he zC}gcztePZy{BWsg#hFE%0IF>Pz!H=Ozq9RO29ile9(%lQJGLa&q?-ZA07Q1nyMa=* z!XK2uYsLY!2w?2iMbz%~F}C0|gw<1uECN`uMAmKwyE_oPd-Q0wVE|Qb0YDg;%5ygf z3*h!0t9~U_asVKRHs?UOA}E~fuL)q$n*e6h0dZdgrva=9Ad33{^SLbfjSwpqQ_+s? zrJNn8`W$=8W~6-Gz!)adcU<$8C7Jp$B~^96n9_%+VJUY9ssiX()Eoe|xfyut(4kep zwc%Bg>gE6_?eI#Y0FgB5002rFZi9`QoPkpPh6hpd + + + + + + + + + + + + + + + + + diff --git a/src/index.css b/src/static/index.css similarity index 55% rename from src/index.css rename to src/static/index.css index 79c7511..7c74bc4 100644 --- a/src/index.css +++ b/src/static/index.css @@ -1 +1 @@ -/*! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.absolute{position:absolute}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.my-8{margin-bottom:2rem;margin-top:2rem}.ml-auto{margin-left:auto}.flex{display:flex}.grid{display:grid}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-full{width:100%}.max-w-\[48rem\]{max-width:48rem}.max-w-\[80rem\]{max-width:80rem}.flex-none{flex:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-2{row-gap:.5rem}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.overflow-hidden{overflow:hidden}.rounded-md{border-radius:.375rem}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-4{padding-bottom:1rem;padding-top:1rem}.align-baseline{vertical-align:initial}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.font-bold{font-weight:700}.font-medium{font-weight:500}.leading-10{line-height:2.5rem}.leading-6{line-height:1.5rem}.tracking-tight{letter-spacing:-.025em}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\*\:relative>*{position:relative}.\*\:flex>*{display:flex}.\*\:items-center>*{align-items:center}.\*\:gap-3>*{gap:.75rem}.\*\:px-6>*{padding-left:1.5rem;padding-right:1.5rem}.\*\:py-4>*{padding-bottom:1rem;padding-top:1rem}@media (min-width:640px){.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width:1280px){.xl\:px-8{padding-left:2rem;padding-right:2rem}}@media (prefers-color-scheme:dark){.dark\:divide-gray-800>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(31 41 55/var(--tw-divide-opacity))}.dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:bg-gray-950{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity))}.dark\:text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}} \ No newline at end of file +/*! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.absolute{position:absolute}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.my-8{margin-bottom:2rem;margin-top:2rem}.ml-auto{margin-left:auto}.flex{display:flex}.grid{display:grid}.size-16{height:4rem;width:4rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-full{width:100%}.max-w-\[48rem\]{max-width:48rem}.max-w-\[80rem\]{max-width:80rem}.flex-none{flex:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-2{row-gap:.5rem}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.overflow-hidden{overflow:hidden}.rounded-md{border-radius:.375rem}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-4{padding-bottom:1rem;padding-top:1rem}.align-baseline{vertical-align:initial}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.font-bold{font-weight:700}.font-medium{font-weight:500}.leading-10{line-height:2.5rem}.leading-6{line-height:1.5rem}.tracking-tight{letter-spacing:-.025em}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\*\:relative>*{position:relative}.\*\:flex>*{display:flex}.\*\:items-center>*{align-items:center}.\*\:gap-3>*{gap:.75rem}.\*\:px-6>*{padding-left:1.5rem;padding-right:1.5rem}.\*\:py-4>*{padding-bottom:1rem;padding-top:1rem}@media (min-width:640px){.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width:1280px){.xl\:px-8{padding-left:2rem;padding-right:2rem}}@media (prefers-color-scheme:dark){.dark\:divide-gray-800>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(31 41 55/var(--tw-divide-opacity))}.dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:bg-gray-950{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity))}.dark\:text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}} \ No newline at end of file diff --git a/src/template.liquid b/src/static/template.liquid similarity index 68% rename from src/template.liquid rename to src/static/template.liquid index df75572..5de3116 100644 --- a/src/template.liquid +++ b/src/static/template.liquid @@ -2,6 +2,9 @@ + + + @@ -70,7 +73,46 @@
-

Cup🄤

+
+

Cup

+ + + + + + + + + + + + + + + + +
{% for metric in metrics %}