diff options
author | Darshan Baral <darshanbaral@gmail.com> | 2021-03-12 09:48:25 +0300 |
---|---|---|
committer | Darshan Baral <darshanbaral@gmail.com> | 2021-03-12 09:48:25 +0300 |
commit | 9e832459980f519397d5bd498042c54b38fedc96 (patch) | |
tree | 57827917d61ce9cb0a523a050a3687b81ca08138 /static | |
parent | e55b72abd1ce6a4588b154c0664009d0c3d1aa82 (diff) |
Diffstat (limited to 'static')
-rw-r--r-- | static/css/aafu_pinkish.css | 24 | ||||
-rw-r--r-- | static/js/accordion.js | 56 |
2 files changed, 40 insertions, 40 deletions
diff --git a/static/css/aafu_pinkish.css b/static/css/aafu_pinkish.css index 2b4c630..e89d790 100644 --- a/static/css/aafu_pinkish.css +++ b/static/css/aafu_pinkish.css @@ -1,12 +1,12 @@ -:root {
- --primaryBg: #f8f9fa;
- --primaryText: black;
- --primaryLinks: #81415f;
- --secondaryBg: #f2e5eb;
- --secondaryText: #582d41;
- --secondaryLinks: #ffc107;
- --shadow: #595659;
- --cardBg: #81415f;
- --cardText: white;
- --cardLink: #ffc107;
-}
+:root { + --primaryBg: #f8f9fa; + --primaryText: black; + --primaryLinks: #81415f; + --secondaryBg: #f2e5eb; + --secondaryText: #582d41; + --secondaryLinks: #ffc107; + --shadow: #595659; + --cardBg: #81415f; + --cardText: white; + --cardLink: #ffc107; +} diff --git a/static/js/accordion.js b/static/js/accordion.js index c27256f..c5160ed 100644 --- a/static/js/accordion.js +++ b/static/js/accordion.js @@ -1,28 +1,28 @@ -const allPanels = Array.from(document.querySelectorAll(".panel"));
-const allAccordion = Array.from(document.querySelectorAll(".accordion"));
-const expandAccordion = elem => {
- if (!elem.parentElement.classList.contains("active")) {
- allAccordion.forEach(acc => {
- acc.classList.remove("active");
- });
- elem.parentElement.classList.add("active");
- allPanels.forEach(function(elem) {
- elem.style.maxHeight = null;
- });
- let activePanel = elem.parentElement.nextElementSibling;
- if (
- activePanel.id != "skill-panel" &&
- document.querySelector("#skill-panel")
- ) {
- let skillBars = Array.from(document.querySelectorAll("#skill-percent"));
- skillBars.forEach(elem => {
- elem.style.width = "0";
- });
- } //else {
- //console.log("Skill Section Disabled");
- //}
- activePanel.style.maxHeight = activePanel.scrollHeight + "px";
- } // else {
- // console.log("Already Expanded");
- //}
-};
+const allPanels = Array.from(document.querySelectorAll(".panel")); +const allAccordion = Array.from(document.querySelectorAll(".accordion")); +const expandAccordion = elem => { + if (!elem.parentElement.classList.contains("active")) { + allAccordion.forEach(acc => { + acc.classList.remove("active"); + }); + elem.parentElement.classList.add("active"); + allPanels.forEach(function(elem) { + elem.style.maxHeight = null; + }); + let activePanel = elem.parentElement.nextElementSibling; + if ( + activePanel.id != "skill-panel" && + document.querySelector("#skill-panel") + ) { + let skillBars = Array.from(document.querySelectorAll("#skill-percent")); + skillBars.forEach(elem => { + elem.style.width = "0"; + }); + } //else { + //console.log("Skill Section Disabled"); + //} + activePanel.style.maxHeight = activePanel.scrollHeight + "px"; + } // else { + // console.log("Already Expanded"); + //} +}; |