Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/darshanbaral/aafu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshan Baral <darshanbaral@gmail.com>2021-03-12 09:48:25 +0300
committerDarshan Baral <darshanbaral@gmail.com>2021-03-12 09:48:25 +0300
commit9e832459980f519397d5bd498042c54b38fedc96 (patch)
tree57827917d61ce9cb0a523a050a3687b81ca08138
parente55b72abd1ce6a4588b154c0664009d0c3d1aa82 (diff)
changed CRLF to LFHEADmaster
-rw-r--r--exampleSite/config.toml418
-rw-r--r--layouts/index.html64
-rw-r--r--layouts/partials/footer.html30
-rw-r--r--layouts/partials/head.html86
-rw-r--r--layouts/partials/social.html24
-rw-r--r--static/css/aafu_pinkish.css24
-rw-r--r--static/js/accordion.js56
7 files changed, 351 insertions, 351 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 772d7cc..9327de9 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -1,210 +1,210 @@
-baseURL = "https://www.example.org/"
-languageCode = "en-us"
-theme = "aafu"
-
-[params]
- title = "Aafu theme"
- author = "Darshan Baral"
- description = "Website title"
- copyright = "short copyright message"
-
- [params.theme]
- # Available themes are 'light', 'dark', 'ocean', and 'pinkish'
- mainTheme = "ocean"
- # setting false below will hide 'aafu by darshan' displayed under the profile pic
- showAttribute = true
- singlePage = false
-
- [params.favicons]
- use = true
- metas = '''
- <link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
- <link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
- <link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
- <link rel="manifest" href="site.webmanifest">
- <link rel="mask-icon" href="safari-pinned-tab.svg" color="#252627">
- <link rel="shortcut icon" href="favicon.ico">
- '''
-
- # Profile section
- [params.profile]
- name = "First Last, Abbr."
- tagline = "Title"
- location = "City Name, ST"
- photo = "profile.jpg"
-
- # Section for links to social websites
- [params.social]
- title = "Links"
-
- [[params.social.list]]
- icon = "fab fa-linkedin-in"
- url = "#"
- title = "LinkedIn"
- [[params.social.list]]
- icon = "fab fa-stack-overflow"
- url = "#"
- title = "StackOverflow"
- [[params.social.list]]
- icon = "fab fa-github"
- url = "#"
- title = "GitHub"
- [[params.social.list]]
- icon = "fab fa-twitter"
- url = "#"
- title = "Twitter"
- [[params.social.list]]
- icon = "fab fa-orcid"
- url = "#"
- title = "Orcid"
- [[params.social.list]]
- icon = "ai ai-google-scholar"
- url = "#"
- title = "Google Scholar"
- [[params.social.list]]
- icon = "fab fa-researchgate"
- url = "#"
- title = "ResearchGate"
-
- #Specify what is showin in the Accordion
- [[params.showInAccordion]]
- item = "aboutme"
- expand = true # true for the section that is initially expanded
- [[params.showInAccordion]]
- item = "experience"
- [[params.showInAccordion]]
- item = "education"
- [[params.showInAccordion]]
- item = "publication"
- [[params.showInAccordion]]
- item = "project"
- [[params.showInAccordion]]
- item = "skill"
- [[params.showInAccordion]]
- item = "hobby"
-
- [params.aboutme]
- title = "About Me"
- icon = "fas fa-user"
- description = "This is a demo of the `aafu` theme. It has `light`, `dark`, `ocean`, and `pinkish` themes."
-
- # Experience section
- [params.experience]
- title = "Experiences"
- icon = "fas fa-briefcase"
-
- [[params.experience.list]]
- position = "Job Title"
- dates = "2019 - *Present*"
- company = "Company Name"
- details = "Printed from desktop. Sent [emails](#). Called people using telephone. Drank water from office cooler. Ate donuts on people's birthdays."
- [[params.experience.list]]
- position = "Job Title"
- dates = "2018 - 2019"
- url = "#"
- company = "Company Name"
-
- # Education section
- [params.education]
- title = "Education"
- icon = "fas fa-graduation-cap"
-
- [[params.education.list]]
- degree = "Ph.D. in Subject"
- college = "University of State-City"
- dates = "2013 - 2018"
- thesis_title = "Effect of humans on other humans: a study of human behavior."
- thesis_url = "#"
- [[params.education.list]]
- degree = "M.S. in Subject"
- college = "University of State-City"
- dates = "2013 - 2018"
- thesis_title = "Effect of humans on other humans: a study of human behavior."
- thesis_url = "#"
- [[params.education.list]]
- degree = "B.S. in Subject"
- college = "University of State-City"
- dates = "2004 - 2009"
-
- # Publication section
- [params.publication]
- title = "Publications"
- icon = "fas fa-book"
- #The order below determines the order in which the items appear in "Publications" section
- format = ["date", "authors", "title", "journal"]
- #If you don't want to group publications, comment the line below by adding # at the beginning
- types = ["Journal Articles", "Proceedings"]
-
- [[params.publication.list]]
- title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
- authors = "F Last, F Second, P secondary"
- date = "2018"
- journal = "Journal of Field 52 (16), 9033-9044"
- url = "#"
- type = "Journal Articles"
-
- [[params.publication.list]]
- title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
- authors = "F Last, F Second, P secondary"
- date = "2018"
- journal = "Journal of Field 52 (16), 9033-9044"
- url = "#"
- type = "Journal Articles"
-
- [[params.publication.list]]
- title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
- authors = "F Last, F Second, P secondary"
- date = "2018"
- journal = "Journal of Field 52 (16), 9033-9044"
- url = "#"
- type = "Proceedings"
-
- # Project section
- [params.project]
- title = "Projects"
- icon = "fas fa-project-diagram"
-
- [[params.project.list]]
- title = "Project 1"
- url = "#"
- description = "Description of the project"
- [[params.project.list]]
- title = "Project 2"
- url = "#"
- description = "Description of the project"
- [[params.project.list]]
- title = "Project 3"
- url = "#"
- description = "Description of the project"
- [[params.project.list]]
- title = "Project 4"
- url = "#"
- description = "Description of the project"
-
- # Skill section
- [params.skill]
- title = "Skills"
- panelId = "skill-panel"
- icon = "fas fa-cogs"
-
- [[params.skill.list]]
- skill = "Skill 1, Skill 2"
- skillrating = 90
- [[params.skill.list]]
- skill = "Skill 3"
- skillrating = 80
- [[params.skill.list]]
- skill = "Skill 4"
- skillrating = 50
-
- # Hobby section
- [params.hobby]
- title = "Hobbies"
- icon = "fas fa-gamepad"
-
- [[params.hobby.list]]
- hobby = "Cooking"
- [[params.hobby.list]]
- hobby = "Hiking"
- [[params.hobby.list]]
+baseURL = "https://www.example.org/"
+languageCode = "en-us"
+theme = "aafu"
+
+[params]
+ title = "Aafu theme"
+ author = "Darshan Baral"
+ description = "Website title"
+ copyright = "short copyright message"
+
+ [params.theme]
+ # Available themes are 'light', 'dark', 'ocean', and 'pinkish'
+ mainTheme = "ocean"
+ # setting false below will hide 'aafu by darshan' displayed under the profile pic
+ showAttribute = true
+ singlePage = false
+
+ [params.favicons]
+ use = true
+ metas = '''
+ <link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
+ <link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
+ <link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
+ <link rel="manifest" href="site.webmanifest">
+ <link rel="mask-icon" href="safari-pinned-tab.svg" color="#252627">
+ <link rel="shortcut icon" href="favicon.ico">
+ '''
+
+ # Profile section
+ [params.profile]
+ name = "First Last, Abbr."
+ tagline = "Title"
+ location = "City Name, ST"
+ photo = "profile.jpg"
+
+ # Section for links to social websites
+ [params.social]
+ title = "Links"
+
+ [[params.social.list]]
+ icon = "fab fa-linkedin-in"
+ url = "#"
+ title = "LinkedIn"
+ [[params.social.list]]
+ icon = "fab fa-stack-overflow"
+ url = "#"
+ title = "StackOverflow"
+ [[params.social.list]]
+ icon = "fab fa-github"
+ url = "#"
+ title = "GitHub"
+ [[params.social.list]]
+ icon = "fab fa-twitter"
+ url = "#"
+ title = "Twitter"
+ [[params.social.list]]
+ icon = "fab fa-orcid"
+ url = "#"
+ title = "Orcid"
+ [[params.social.list]]
+ icon = "ai ai-google-scholar"
+ url = "#"
+ title = "Google Scholar"
+ [[params.social.list]]
+ icon = "fab fa-researchgate"
+ url = "#"
+ title = "ResearchGate"
+
+ #Specify what is showin in the Accordion
+ [[params.showInAccordion]]
+ item = "aboutme"
+ expand = true # true for the section that is initially expanded
+ [[params.showInAccordion]]
+ item = "experience"
+ [[params.showInAccordion]]
+ item = "education"
+ [[params.showInAccordion]]
+ item = "publication"
+ [[params.showInAccordion]]
+ item = "project"
+ [[params.showInAccordion]]
+ item = "skill"
+ [[params.showInAccordion]]
+ item = "hobby"
+
+ [params.aboutme]
+ title = "About Me"
+ icon = "fas fa-user"
+ description = "This is a demo of the `aafu` theme. It has `light`, `dark`, `ocean`, and `pinkish` themes."
+
+ # Experience section
+ [params.experience]
+ title = "Experiences"
+ icon = "fas fa-briefcase"
+
+ [[params.experience.list]]
+ position = "Job Title"
+ dates = "2019 - *Present*"
+ company = "Company Name"
+ details = "Printed from desktop. Sent [emails](#). Called people using telephone. Drank water from office cooler. Ate donuts on people's birthdays."
+ [[params.experience.list]]
+ position = "Job Title"
+ dates = "2018 - 2019"
+ url = "#"
+ company = "Company Name"
+
+ # Education section
+ [params.education]
+ title = "Education"
+ icon = "fas fa-graduation-cap"
+
+ [[params.education.list]]
+ degree = "Ph.D. in Subject"
+ college = "University of State-City"
+ dates = "2013 - 2018"
+ thesis_title = "Effect of humans on other humans: a study of human behavior."
+ thesis_url = "#"
+ [[params.education.list]]
+ degree = "M.S. in Subject"
+ college = "University of State-City"
+ dates = "2013 - 2018"
+ thesis_title = "Effect of humans on other humans: a study of human behavior."
+ thesis_url = "#"
+ [[params.education.list]]
+ degree = "B.S. in Subject"
+ college = "University of State-City"
+ dates = "2004 - 2009"
+
+ # Publication section
+ [params.publication]
+ title = "Publications"
+ icon = "fas fa-book"
+ #The order below determines the order in which the items appear in "Publications" section
+ format = ["date", "authors", "title", "journal"]
+ #If you don't want to group publications, comment the line below by adding # at the beginning
+ types = ["Journal Articles", "Proceedings"]
+
+ [[params.publication.list]]
+ title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
+ authors = "F Last, F Second, P secondary"
+ date = "2018"
+ journal = "Journal of Field 52 (16), 9033-9044"
+ url = "#"
+ type = "Journal Articles"
+
+ [[params.publication.list]]
+ title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
+ authors = "F Last, F Second, P secondary"
+ date = "2018"
+ journal = "Journal of Field 52 (16), 9033-9044"
+ url = "#"
+ type = "Journal Articles"
+
+ [[params.publication.list]]
+ title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
+ authors = "F Last, F Second, P secondary"
+ date = "2018"
+ journal = "Journal of Field 52 (16), 9033-9044"
+ url = "#"
+ type = "Proceedings"
+
+ # Project section
+ [params.project]
+ title = "Projects"
+ icon = "fas fa-project-diagram"
+
+ [[params.project.list]]
+ title = "Project 1"
+ url = "#"
+ description = "Description of the project"
+ [[params.project.list]]
+ title = "Project 2"
+ url = "#"
+ description = "Description of the project"
+ [[params.project.list]]
+ title = "Project 3"
+ url = "#"
+ description = "Description of the project"
+ [[params.project.list]]
+ title = "Project 4"
+ url = "#"
+ description = "Description of the project"
+
+ # Skill section
+ [params.skill]
+ title = "Skills"
+ panelId = "skill-panel"
+ icon = "fas fa-cogs"
+
+ [[params.skill.list]]
+ skill = "Skill 1, Skill 2"
+ skillrating = 90
+ [[params.skill.list]]
+ skill = "Skill 3"
+ skillrating = 80
+ [[params.skill.list]]
+ skill = "Skill 4"
+ skillrating = 50
+
+ # Hobby section
+ [params.hobby]
+ title = "Hobbies"
+ icon = "fas fa-gamepad"
+
+ [[params.hobby.list]]
+ hobby = "Cooking"
+ [[params.hobby.list]]
+ hobby = "Hiking"
+ [[params.hobby.list]]
hobby = "Baking" \ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
index c01e25b..08470e1 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,32 +1,32 @@
-{{ define "main" }}
-<div class="ml-auto mr-auto row row-eq-height rounded">
- <div class="col-md-5 text-center p-2 mt-1">
- <div class="profile-area rounded text-center position-relative shadow">
- {{ partial "profilePhoto" . }}
- <div class="p-2">
- {{ partial "social" . }} {{ partial "footer" . }}
- </div>
- </div>
- </div>
- <div class="col-md-7 pt-2 mt-3">
- {{ range .Site.Params.showInAccordion }}
- <h2 class="accordion {{ if .expand }} active {{ end }}">
- {{ $current := index $.Site.Params .item }}
- <span onclick="expandAccordion(this)" style="cursor: pointer;">
- <i class="{{ $current.icon }}"></i>
- {{ $current.title -}}
- </span>
- </h2>
- <div
- class="panel overflow-hidden"
- {{ if $current.panelid }}
- id="{{ $current.panelid }}"
- {{ end }}
- >
- {{ partial (print "accordion/" .item) $ }}
- </div>
- {{ end }}
- <script src="{{ `js/accordion.js` | relURL }}"></script>
- </div>
-</div>
-{{ end }}
+{{ define "main" }}
+<div class="ml-auto mr-auto row row-eq-height rounded">
+ <div class="col-md-5 text-center p-2 mt-1">
+ <div class="profile-area rounded text-center position-relative shadow">
+ {{ partial "profilePhoto" . }}
+ <div class="p-2">
+ {{ partial "social" . }} {{ partial "footer" . }}
+ </div>
+ </div>
+ </div>
+ <div class="col-md-7 pt-2 mt-3">
+ {{ range .Site.Params.showInAccordion }}
+ <h2 class="accordion {{ if .expand }} active {{ end }}">
+ {{ $current := index $.Site.Params .item }}
+ <span onclick="expandAccordion(this)" style="cursor: pointer;">
+ <i class="{{ $current.icon }}"></i>
+ {{ $current.title -}}
+ </span>
+ </h2>
+ <div
+ class="panel overflow-hidden"
+ {{ if $current.panelid }}
+ id="{{ $current.panelid }}"
+ {{ end }}
+ >
+ {{ partial (print "accordion/" .item) $ }}
+ </div>
+ {{ end }}
+ <script src="{{ `js/accordion.js` | relURL }}"></script>
+ </div>
+</div>
+{{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index e905eb6..66b6b21 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,15 +1,15 @@
-<footer class="{{ if .IsHome }} mt-2 mb-2 {{ else }} mt-2 mb-4 text-center {{ end }}">
- <span class="markdownify">{{ .Site.Params.copyright | markdownify }}</span>
- <span {{ if not .Site.Params.theme.showAttribute }}style="font-size:0px;"{{ end }}>
- &middot;
- <i>
- <a href="https://github.com/darshanbaral/aafu">
- aafu
- </a>
- </i>
- by
- <a href="https://www.darshanbaral.com/">
- darshan
- </a>
- </span>
-</footer>
+<footer class="{{ if .IsHome }} mt-2 mb-2 {{ else }} mt-2 mb-4 text-center {{ end }}">
+ <span class="markdownify">{{ .Site.Params.copyright | markdownify }}</span>
+ <span {{ if not .Site.Params.theme.showAttribute }}style="font-size:0px;"{{ end }}>
+ &middot;
+ <i>
+ <a href="https://github.com/darshanbaral/aafu">
+ aafu
+ </a>
+ </i>
+ by
+ <a href="https://www.darshanbaral.com/">
+ darshan
+ </a>
+ </span>
+</footer>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 0037ec9..2a8ae95 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,43 +1,43 @@
-<head>
- {{ partial "meta" . }}
-
- <link
- rel="stylesheet"
- href="{{ `/css/bootstrap/bootstrap.min.css` | relURL }}"
- />
- <link
- rel="stylesheet"
- href="https://use.fontawesome.com/releases/v5.15.2/css/all.css"
- integrity="sha384-vSIIfh2YWi9wW0r9iZe7RJPrKwp6bG+s9QZMoITbCckVJqGCCRhc+ccxNcdpHuYu"
- crossorigin="anonymous"
- />
- <link
- rel="stylesheet"
- href="https://cdn.rawgit.com/jpswalsh/academicons/master/css/academicons.min.css"
- />
- <link
- rel="stylesheet"
- href="//fonts.googleapis.com/css?family=Didact+Gothic%7CRoboto:400%7CRoboto+Mono"
- />
- <link rel="stylesheet" href="{{ print "/css/aafu_" .Site.Params.theme.mainTheme ".css" | relURL }}" />
- <link rel="stylesheet" href="{{ `/css/aafu.css` | relURL }}" />
-
- <script>
- var themeColor = document.querySelector("meta[name=theme-color]");
- window.onload = () => {
- themeColor.content = getComputedStyle(document.body)["background-color"];
- let defaultActivePanel = document.querySelector(".accordion.active");
- if (defaultActivePanel) {
- defaultActivePanel.nextElementSibling.style.maxHeight =
- defaultActivePanel.nextElementSibling.scrollHeight + "px";
- }
- };
- window.onresize = () => {
- let defaultActivePanel = document.querySelector(".accordion.active");
- if (defaultActivePanel) {
- defaultActivePanel.nextElementSibling.style.maxHeight =
- defaultActivePanel.nextElementSibling.scrollHeight + "px";
- }
- };
- </script>
-</head>
+<head>
+ {{ partial "meta" . }}
+
+ <link
+ rel="stylesheet"
+ href="{{ `/css/bootstrap/bootstrap.min.css` | relURL }}"
+ />
+ <link
+ rel="stylesheet"
+ href="https://use.fontawesome.com/releases/v5.15.2/css/all.css"
+ integrity="sha384-vSIIfh2YWi9wW0r9iZe7RJPrKwp6bG+s9QZMoITbCckVJqGCCRhc+ccxNcdpHuYu"
+ crossorigin="anonymous"
+ />
+ <link
+ rel="stylesheet"
+ href="https://cdn.rawgit.com/jpswalsh/academicons/master/css/academicons.min.css"
+ />
+ <link
+ rel="stylesheet"
+ href="//fonts.googleapis.com/css?family=Didact+Gothic%7CRoboto:400%7CRoboto+Mono"
+ />
+ <link rel="stylesheet" href="{{ print "/css/aafu_" .Site.Params.theme.mainTheme ".css" | relURL }}" />
+ <link rel="stylesheet" href="{{ `/css/aafu.css` | relURL }}" />
+
+ <script>
+ var themeColor = document.querySelector("meta[name=theme-color]");
+ window.onload = () => {
+ themeColor.content = getComputedStyle(document.body)["background-color"];
+ let defaultActivePanel = document.querySelector(".accordion.active");
+ if (defaultActivePanel) {
+ defaultActivePanel.nextElementSibling.style.maxHeight =
+ defaultActivePanel.nextElementSibling.scrollHeight + "px";
+ }
+ };
+ window.onresize = () => {
+ let defaultActivePanel = document.querySelector(".accordion.active");
+ if (defaultActivePanel) {
+ defaultActivePanel.nextElementSibling.style.maxHeight =
+ defaultActivePanel.nextElementSibling.scrollHeight + "px";
+ }
+ };
+ </script>
+</head>
diff --git a/layouts/partials/social.html b/layouts/partials/social.html
index b714416..2c5188c 100644
--- a/layouts/partials/social.html
+++ b/layouts/partials/social.html
@@ -1,12 +1,12 @@
-<h1 class="mb-0">{{ .Site.Params.profile.name }}</h1>
-<h2 class="mb-0">{{ .Site.Params.profile.tagline }}</h2>
-<h3 class="mb-0">{{ .Site.Params.profile.location }}</h3>
-<div class="mt-2 d-flex flex-wrap justify-content-center">
- {{ range.Site.Params.social.list }}
- <div style="height:45px; width:45px;">
- <a href="{{ .url }}">
- <i class="zoomlink mt-1 {{ .icon }}"></i>
- </a>
- </div>
- {{ end }}
-</div>
+<h1 class="mb-0">{{ .Site.Params.profile.name }}</h1>
+<h2 class="mb-0">{{ .Site.Params.profile.tagline }}</h2>
+<h3 class="mb-0">{{ .Site.Params.profile.location }}</h3>
+<div class="mt-2 d-flex flex-wrap justify-content-center">
+ {{ range.Site.Params.social.list }}
+ <div style="height:45px; width:45px;">
+ <a href="{{ .url }}">
+ <i class="zoomlink mt-1 {{ .icon }}"></i>
+ </a>
+ </div>
+ {{ end }}
+</div>
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");
+ //}
+};