From 2dc60b6acf80d5b09be702098cfa4c83a9c29fbb Mon Sep 17 00:00:00 2001 From: LimePot Date: Mon, 19 Dec 2022 14:18:58 -0700 Subject: [PATCH] UI elements --- assets/planet-outline.svg | 1 - index.html | 54 ++++++++++++++++++++++----------------- style.css | 48 +++++++++++++++++++++++++++++++--- 3 files changed, 76 insertions(+), 27 deletions(-) delete mode 100644 assets/planet-outline.svg diff --git a/assets/planet-outline.svg b/assets/planet-outline.svg deleted file mode 100644 index 550d5a4..0000000 --- a/assets/planet-outline.svg +++ /dev/null @@ -1 +0,0 @@ -Planet \ No newline at end of file diff --git a/index.html b/index.html index 6d502e5..3a0d125 100644 --- a/index.html +++ b/index.html @@ -14,37 +14,36 @@ @@ -57,6 +56,15 @@ menuToggle.onclick = function(){ navigation.classList.toggle('open') } + + const list = document.querySelectorALl('.list'); + function activeLink(){ + list.forEach((item) => + item.classList.remove('active')); + this.classList.add('active'); + } + list.forEach((item) => + item.addEventListener('click',activeLink)) diff --git a/style.css b/style.css index d289f8b..18c8455 100644 --- a/style.css +++ b/style.css @@ -8,14 +8,14 @@ } body { - background:#2b272b; + background:#332e33; } .navigation { position: fixed; inset: 20px 0 20px 20px; - width: 105px; - background: #332e33; + width: 140px; + background: #2b272b; transition: 0.5s; display: flex; justify-content: center; @@ -68,4 +68,46 @@ body { transform: translateY(0px) rotate(-45deg); box-shadow: 0 0 0 #413b41; +} +.navigation ul +{ + display: flex; + flex-direction: column; + gap: 10px; + width: 100% +} +.navigation ul li +{ + list-style: none; + position: relative; + width: 100%; + height: 60px; + padding: 0 10px; + transition: 0.5; +} +.navigation ul li a +{ + position: relative; + display: flex; + align-items: center; + justify-content: flex-start; + text-align: center; + text-decoration: none; +} +.navigation ul li a .icon +{ + position: relative; + display: block; + min-width: 55px; + height: 55px; + line-height: 60px; + transition: 05.s; + border-radius: 10px; + font-size: 1.75em; + color: #222; +} +.navigation ul li.active a .icon +{ + color: #fff; + background: var(--clr); } \ No newline at end of file