Logo for dark theme
This commit is contained in:
parent
2a1f246925
commit
be6905cc3b
6 changed files with 82 additions and 19 deletions
|
|
@ -21,7 +21,7 @@
|
|||
background-color: consts.$color-2;
|
||||
|
||||
text-align: center;
|
||||
padding: calc(2 * consts.$margin) calc(4 * consts.$margin);
|
||||
padding: calc(2 * consts.$margin) calc(2 * consts.$margin);
|
||||
box-shadow: -1px 1px 10px rgba(0, 0, 0, 0.3);
|
||||
|
||||
margin: consts.$margin;
|
||||
|
|
|
|||
60
backend/static/logo_dark.svg
Normal file
60
backend/static/logo_dark.svg
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="375.30701"
|
||||
height="375.30701"
|
||||
viewBox="0 0 99.299979 99.299979"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
sodipodi:docname="logo_dark.svg"
|
||||
inkscape:version="1.4 (86a8ad7, 2024-10-11)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="1.4702524"
|
||||
inkscape:cx="-27.206213"
|
||||
inkscape:cy="203.02636"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1369"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="828"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false" />
|
||||
<defs
|
||||
id="defs1" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-51.871853,-88.876652)">
|
||||
<circle
|
||||
style="fill:#1e2e25;fill-opacity:1;stroke:#9b89b2;stroke-width:14;stroke-linecap:square;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
id="path2"
|
||||
cx="101.52184"
|
||||
cy="138.52664"
|
||||
r="42.64999" />
|
||||
<path
|
||||
id="rect1"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-dasharray:none;paint-order:stroke fill markers"
|
||||
d="m 119.22975,109.85084 c -3.51124,-0.73351 -5.56076,0.39364 -14.01995,8.04846 l -5.16541,5.16541 c -1.93864,1.93864 -1.93828,5.06001 3.7e-4,6.99865 l 2.8922,2.89221 -30.280963,28.22001 c 0.664338,4.5046 3.324184,5.56171 6.21705,6.21704 l 28.220063,-30.28091 2.89219,2.89218 c 1.93864,1.93864 5.06001,1.939 6.99865,3.8e-4 l 5.16539,-5.16541 0.003,-0.003 c 7.65187,-8.45615 8.77858,-10.50592 8.04518,-14.01665 l -11.03092,11.03092 -3.99975,-3.99975 c 0.78874,-0.87769 10.27976,-11.47732 9.39426,-12.36283 -0.88553,-0.8855 -11.48511,8.60553 -12.36283,9.39426 l -3.99977,-3.99975 z"
|
||||
sodipodi:nodetypes="ccscccccccccccccccc" />
|
||||
<path
|
||||
id="rect1-14"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;paint-order:stroke fill markers"
|
||||
d="m 75.027245,108.31931 c -0.901448,12.2468 8.563163,26.6897 19.113376,38.13504 l 2.77564,-2.77564 0.89013,-0.89013 24.052589,25.9454 c 4.50458,-0.66434 5.56171,-3.32419 6.21704,-6.21704 l -25.9454,-24.0526 1.01291,-1.0129 0.50792,-0.50793 z"
|
||||
sodipodi:nodetypes="cccccccccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
|
@ -2,9 +2,9 @@
|
|||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="91.29998mm"
|
||||
height="91.29998mm"
|
||||
viewBox="0 0 91.29998 91.29998"
|
||||
width="99.29998mm"
|
||||
height="99.29998mm"
|
||||
viewBox="0 0 99.29998 99.29998"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
sodipodi:docname="logo.svg"
|
||||
|
|
@ -24,23 +24,24 @@
|
|||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="1.4702524"
|
||||
inkscape:cx="-36.728388"
|
||||
inkscape:cy="196.22482"
|
||||
inkscape:cx="-27.886368"
|
||||
inkscape:cy="203.02636"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1369"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="611"
|
||||
inkscape:window-y="828"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" />
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false" />
|
||||
<defs
|
||||
id="defs1" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-55.871853,-92.876652)">
|
||||
transform="translate(-51.871853,-88.876652)">
|
||||
<circle
|
||||
style="fill:#89b29b;fill-opacity:1;stroke:#9b89b2;stroke-width:6;stroke-linecap:square;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
style="fill:#89b29b;fill-opacity:1;stroke:#9b89b2;stroke-width:14;stroke-linecap:square;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
id="path2"
|
||||
cx="101.52184"
|
||||
cy="138.52664"
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
|
@ -1 +1,6 @@
|
|||
<a class="title" href="/{{ context.tr.current_lang_code() }}/"><img class="logo" src="/static/logo.svg" alt="logo">{{ context.tr.t(Sentence::MainTitle) }}</a>
|
||||
<a class="title" href="/{{ context.tr.current_lang_code() }}/"><img class="logo" src="
|
||||
{% if context.dark_theme %}
|
||||
/static/logo_dark.svg
|
||||
{% else %}
|
||||
/static/logo_light.svg
|
||||
{% endif %}" alt="logo">{{ context.tr.t(Sentence::MainTitle) }}</a>
|
||||
|
|
@ -1,14 +1,10 @@
|
|||
use gloo::{console::log, events::EventListener, utils::document};
|
||||
use wasm_bindgen::prelude::*;
|
||||
use gloo::{events::EventListener, utils::document};
|
||||
use wasm_bindgen_futures::spawn_local;
|
||||
use web_sys::{Element, HtmlElement, HtmlInputElement};
|
||||
|
||||
use crate::{
|
||||
calendar, modal_dialog,
|
||||
recipe_scheduler::RecipeScheduler,
|
||||
shopping_list::ShoppingList,
|
||||
modal_dialog,
|
||||
toast::{self, Level},
|
||||
utils::{SelectorExt, by_id, get_current_lang, get_locale, selector},
|
||||
utils::by_id,
|
||||
};
|
||||
|
||||
pub fn setup_page() {
|
||||
|
|
@ -65,7 +61,7 @@ pub fn setup_page() {
|
|||
|
||||
EventListener::new(&by_id("test-modal-dialog"), "click", move |_event| {
|
||||
spawn_local(async move {
|
||||
modal_dialog::show("#hidden-templates").await;
|
||||
modal_dialog::show("#hidden-templates .modal-test-message").await;
|
||||
});
|
||||
})
|
||||
.forget();
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ fn show_message_content(level: Level, content: Content) {
|
|||
|
||||
// FIXME: Here the two events will leak memory. How to fix that?
|
||||
// Save them in a global vec variable and remove them manually?
|
||||
// Some insights: https://github.com/rustwasm/wasm-bindgen/issues/993#issuecomment-2244046849
|
||||
let close_button: HtmlElement = toast_element.selector(".close");
|
||||
let toast_element_cloned = toast_element.clone();
|
||||
EventListener::once(&close_button, "click", move |_event| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue