diff options
author | 53hornet <atc@53hor.net> | 2022-01-22 08:45:24 -0500 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2022-01-22 15:18:04 -0500 |
commit | ba49aa806a48839b61fb261f7ccd007a507d8d50 (patch) | |
tree | 222855376c301972a10bb8656c94731fc40ded76 /src/templates | |
parent | d7472320a00fa0bfd6b9be904e0730461f093f61 (diff) | |
download | twinh-ba49aa806a48839b61fb261f7ccd007a507d8d50.tar.xz twinh-ba49aa806a48839b61fb261f7ccd007a507d8d50.zip |
feat: experimental cgi forkcgi
Diffstat (limited to 'src/templates')
-rw-r--r-- | src/templates/base.hbs | 10 | ||||
-rw-r--r-- | src/templates/favicon.svg | 5 | ||||
-rw-r--r-- | src/templates/index.hbs | 7 | ||||
-rw-r--r-- | src/templates/login.hbs | 5 | ||||
-rw-r--r-- | src/templates/mod.rs | 25 | ||||
-rw-r--r-- | src/templates/suggestions.hbs | 2 |
6 files changed, 18 insertions, 36 deletions
diff --git a/src/templates/base.hbs b/src/templates/base.hbs index 34f435b..410a5b2 100644 --- a/src/templates/base.hbs +++ b/src/templates/base.hbs @@ -42,12 +42,10 @@ flex-direction: column; background-color: var(--balboa); padding: 0.5em; - color: white; } aside button { font-size: 1em; - padding: 0.5em 0.5em; display: block; background: none; border: 0 none; @@ -63,11 +61,11 @@ padding: 0.5em; } - #hidemenu:target aside { + #hidden:target aside { display: none; } - #hidemenu:target a.openMenu { + #hidden:target a.openMenu { display: block; } @@ -75,7 +73,7 @@ display: none; } - #hidemenu:target a.closeMenu { + #hidden:target a.closeMenu { display: none; } @@ -150,7 +148,7 @@ </style> </head> -<body id="hidemenu"> +<body id="hidden"> <nav> <a href="/">Index</a> <a href="#">Parts</a> diff --git a/src/templates/favicon.svg b/src/templates/favicon.svg deleted file mode 100644 index 4ad400c..0000000 --- a/src/templates/favicon.svg +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"> - <path fill="#195970" d="M17.5 14.33C18.29 14.33 19.13 14.41 20 14.57V16.07C19.38 15.91 18.54 15.83 17.5 15.83C15.6 15.83 14.11 16.16 13 16.82V15.13C14.17 14.6 15.67 14.33 17.5 14.33M13 12.46C14.29 11.93 15.79 11.67 17.5 11.67C18.29 11.67 19.13 11.74 20 11.9V13.4C19.38 13.24 18.54 13.16 17.5 13.16C15.6 13.16 14.11 13.5 13 14.15M17.5 10.5C15.6 10.5 14.11 10.82 13 11.5V9.84C14.23 9.28 15.73 9 17.5 9C18.29 9 19.13 9.08 20 9.23V10.78C19.26 10.59 18.41 10.5 17.5 10.5M21 18.5V7C19.96 6.67 18.79 6.5 17.5 6.5C15.45 6.5 13.62 7 12 8V19.5C13.62 18.5 15.45 18 17.5 18C18.69 18 19.86 18.16 21 18.5M17.5 4.5C19.85 4.5 21.69 5 23 6V20.56C23 20.68 22.95 20.8 22.84 20.91C22.73 21 22.61 21.08 22.5 21.08C22.39 21.08 22.31 21.06 22.25 21.03C20.97 20.34 19.38 20 17.5 20C15.45 20 13.62 20.5 12 21.5C10.66 20.5 8.83 20 6.5 20C4.84 20 3.25 20.36 1.75 21.07C1.72 21.08 1.68 21.08 1.63 21.1C1.59 21.11 1.55 21.12 1.5 21.12C1.39 21.12 1.27 21.08 1.16 21C1.05 20.89 1 20.78 1 20.65V6C2.34 5 4.18 4.5 6.5 4.5C8.83 4.5 10.66 5 12 6C13.34 5 15.17 4.5 17.5 4.5Z" /> -</svg> diff --git a/src/templates/index.hbs b/src/templates/index.hbs index 4c07db4..aa708e1 100644 --- a/src/templates/index.hbs +++ b/src/templates/index.hbs @@ -1,13 +1,12 @@ {{#> base}} {{#*inline "main"}} <aside> - <a class="closeMenu" href="#hidemenu"> + <a class="closeMenu" href="#hidden"> <svg style="width: 24px; height: 24px" viewBox="0 0 24 24"> <path fill="#ffffff" d="M21,15.61L19.59,17L14.58,12L19.59,7L21,8.39L17.44,12L21,15.61M3,6H16V8H3V6M3,13V11H13V13H3M3,18V16H16V18H3Z" /> </svg> </a> - {{#each makes}} <form action="/"> {{#if (eq this ../selected_make)}} @@ -44,8 +43,6 @@ </svg> </a> - <h2>Catalog</h2> - <section> <form> {{#if selected_make}} @@ -73,3 +70,5 @@ {{/inline}} {{/base}} + + diff --git a/src/templates/login.hbs b/src/templates/login.hbs deleted file mode 100644 index afdc0da..0000000 --- a/src/templates/login.hbs +++ /dev/null @@ -1,5 +0,0 @@ -{{#> base}} -{{#*inline "main"}} -<a href="/login/google">Login with Google</a> -{{/inline}} -{{/base}} diff --git a/src/templates/mod.rs b/src/templates/mod.rs index 99e3bf3..e0e194a 100644 --- a/src/templates/mod.rs +++ b/src/templates/mod.rs @@ -1,19 +1,12 @@ use handlebars::Handlebars; -lazy_static! { - pub static ref REGISTRY: Handlebars<'static> = { - let mut handlebars = Handlebars::new(); - handlebars - .register_template_string("index", include_str!("index.hbs")) - .unwrap(); - handlebars - .register_template_string("login", include_str!("login.hbs")) - .unwrap(); - handlebars - .register_template_string("base", include_str!("base.hbs")) - .unwrap(); - handlebars - }; +pub fn init() -> Handlebars<'static> { + let mut handlebars = Handlebars::new(); + handlebars + .register_template_string("index", include_str!("index.hbs")) + .unwrap(); + handlebars + .register_template_string("base", include_str!("base.hbs")) + .unwrap(); + handlebars } - -pub static FAVICON: &str = include_str!("favicon.svg"); diff --git a/src/templates/suggestions.hbs b/src/templates/suggestions.hbs index f979be7..6fb76cc 100644 --- a/src/templates/suggestions.hbs +++ b/src/templates/suggestions.hbs @@ -7,3 +7,5 @@ </section> {{/inline}} {{/base}} + + |