From 06127a9f4887bd450c5af676061b649b9350c852 Mon Sep 17 00:00:00 2001 From: Madeorsk Date: Sat, 1 Sep 2018 19:14:15 +0200 Subject: [PATCH] Removed JS. --- static/js/menu.js | 10 ---------- static/main.css | 12 ++++++------ templates/base.html.tera | 1 - 3 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 static/js/menu.js diff --git a/static/js/menu.js b/static/js/menu.js deleted file mode 100644 index b40b5650..00000000 --- a/static/js/menu.js +++ /dev/null @@ -1,10 +0,0 @@ -document.addEventListener("DOMContentLoaded", () => { - let content = document.getElementById("content"); - document.getElementById("menu").querySelector("a").addEventListener("click", () => { - content.classList.add("opened"); - }); - content.addEventListener("click", (e) => { - if (e.target === content) - content.classList.remove("opened"); - }); -}); \ No newline at end of file diff --git a/static/main.css b/static/main.css index 6b530eb4..f488461a 100644 --- a/static/main.css +++ b/static/main.css @@ -593,7 +593,7 @@ form.new-post input[type="submit"]:hover { background: #DADADA; } } } - header #content.opened, header:focus-within #content { + header:focus-within #content { position: fixed; display: flex; flex-direction: column; @@ -607,7 +607,7 @@ form.new-post input[type="submit"]:hover { background: #DADADA; } animation: 0.2s menuOpening; } - header #content.opened::before, header:focus-within #content::before { + header:focus-within #content::before { content: ""; position: absolute; transform: skewX(-10deg); @@ -620,21 +620,21 @@ form.new-post input[type="submit"]:hover { background: #DADADA; } background: #7765E3; } - header #content.opened > nav, header:focus-within #content > nav { + header:focus-within #content > nav { flex-direction: column; align-items: flex-start; } - header #content.opened > nav a, header:focus-within #content > nav a { + header:focus-within #content > nav a { margin: 0; padding: 1rem 1.5rem; color: #F4F4F4; font-size: 1.4em; font-weight: 300; } - header #content.opened > nav a.title, header:focus-within #content > nav a.title { + header:focus-within #content > nav a.title { font-size: 1.8em; } - header #content.opened > nav hr, header:focus-within #content > nav hr { + header:focus-within #content > nav hr { display: block; margin: 0; width: 100%; diff --git a/templates/base.html.tera b/templates/base.html.tera index 1bbdd417..d54b8856 100644 --- a/templates/base.html.tera +++ b/templates/base.html.tera @@ -6,7 +6,6 @@ -