diff options
author | Darshan Baral <darshanbaral@gmail.com> | 2019-08-01 05:53:40 +0300 |
---|---|---|
committer | Darshan Baral <darshanbaral@gmail.com> | 2019-08-01 05:53:40 +0300 |
commit | c34e37279982281818fd493b7df58600c089848c (patch) | |
tree | 5eda89e6ed8300d95cdcc86b09b1dc8cee2fc0b4 | |
parent | 8ccf5347e7282f5049e4d4eea61aed8e5c08b6dd (diff) |
Reorganized accordion partials
-rw-r--r-- | layouts/index.html | 4 | ||||
-rw-r--r-- | layouts/partials/accordion/aboutme.html (renamed from layouts/partials/aboutme.html) | 0 | ||||
-rw-r--r-- | layouts/partials/accordion/education.html (renamed from layouts/partials/education.html) | 28 | ||||
-rw-r--r-- | layouts/partials/accordion/experience.html (renamed from layouts/partials/experience.html) | 34 | ||||
-rw-r--r-- | layouts/partials/accordion/hobby.html (renamed from layouts/partials/hobby.html) | 10 | ||||
-rw-r--r-- | layouts/partials/accordion/project.html (renamed from layouts/partials/project.html) | 24 | ||||
-rw-r--r-- | layouts/partials/accordion/publication.html (renamed from layouts/partials/publication.html) | 54 | ||||
-rw-r--r-- | layouts/partials/accordion/skill.html (renamed from layouts/partials/skill.html) | 32 | ||||
-rw-r--r-- | layouts/partials/accordion/supportingPartials/addTitle.html (renamed from layouts/partials/addTitle.html) | 0 |
9 files changed, 93 insertions, 93 deletions
diff --git a/layouts/index.html b/layouts/index.html index 4ac386a..04d3ac4 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -11,7 +11,7 @@ </div>
</div>
<div class="col-md-7 pt-2 mt-3">
- {{ range.Site.Params.showInAccordion }}
+ {{ range .Site.Params.showInAccordion }}
<h2 class="accordion {{ if .expand }} active {{ end }}">
{{ $current := index $.Site.Params .item }}
<span onclick="expandAccordion(this)" style="cursor: pointer;">
@@ -25,7 +25,7 @@ id="{{ $current.panelid }}"
{{ end }}
>
- {{ partial .item $ }}
+ {{ partial (print "accordion/" .item) $ }}
</div>
{{ end }}
<script src="{{ `js/accordion.js` | relURL }}"></script>
diff --git a/layouts/partials/aboutme.html b/layouts/partials/accordion/aboutme.html index c468851..c468851 100644 --- a/layouts/partials/aboutme.html +++ b/layouts/partials/accordion/aboutme.html diff --git a/layouts/partials/education.html b/layouts/partials/accordion/education.html index 1933d4d..ade47be 100644 --- a/layouts/partials/education.html +++ b/layouts/partials/accordion/education.html @@ -1,14 +1,14 @@ -{{ range .Site.Params.education.list }}
-<dl>
- <dt>{{ .degree }}</dt>
- <dd class="mb-0 ml-3">{{ .dates }} · {{ .college }}</dd>
- {{ if .thesis_link }}
- <dd class="mb-0 ml-4">
- Thesis:
- <a href="{{ .thesis_link }}"
- ><i>{{ .thesis_title }}</i></a
- >
- </dd>
- {{ end }}
-</dl>
-{{ end }}
+{{ range .Site.Params.education.list }} +<dl> + <dt>{{ .degree }}</dt> + <dd class="mb-0 ml-3">{{ .dates }} · {{ .college }}</dd> + {{ if .thesis_link }} + <dd class="mb-0 ml-4"> + Thesis: + <a href="{{ .thesis_link }}" + ><i>{{ .thesis_title }}</i></a + > + </dd> + {{ end }} +</dl> +{{ end }} diff --git a/layouts/partials/experience.html b/layouts/partials/accordion/experience.html index b799373..090e8e8 100644 --- a/layouts/partials/experience.html +++ b/layouts/partials/accordion/experience.html @@ -1,17 +1,17 @@ -{{ range.Site.Params.experience.list }}
-<dl>
- <dt class="mb-0">
- {{ .position }}
- </dt>
- <dd class="mb-0 ml-3">
- <span class="markdownify">{{ .dates | markdownify }}</span>
- ·
- {{ if .link }}
- <a href="{{ .link }}">{{ .company }}</a>
- {{ else }}
- {{ .company }}
- {{ end }}
- </dd>
- <dd class="mb-0 ml-4 markdownify">{{ .details | markdownify }}</dd>
-</dl>
-{{ end }}
+{{ range.Site.Params.experience.list }} +<dl> + <dt class="mb-0"> + {{ .position }} + </dt> + <dd class="mb-0 ml-3"> + <span class="markdownify">{{ .dates | markdownify }}</span> + · + {{ if .link }} + <a href="{{ .link }}">{{ .company }}</a> + {{ else }} + {{ .company }} + {{ end }} + </dd> + <dd class="mb-0 ml-4 markdownify">{{ .details | markdownify }}</dd> +</dl> +{{ end }} diff --git a/layouts/partials/hobby.html b/layouts/partials/accordion/hobby.html index b213a7c..2d713f7 100644 --- a/layouts/partials/hobby.html +++ b/layouts/partials/accordion/hobby.html @@ -1,5 +1,5 @@ -<ul class="pl-0">
- {{ range.Site.Params.hobby.list }}
- <li class="list-unstyled mb-2">{{ .hobby }}</li>
- {{ end }}
-</ul>
+<ul class="pl-0"> + {{ range.Site.Params.hobby.list }} + <li class="list-unstyled mb-2">{{ .hobby }}</li> + {{ end }} +</ul> diff --git a/layouts/partials/project.html b/layouts/partials/accordion/project.html index 613eb22..ebea417 100644 --- a/layouts/partials/project.html +++ b/layouts/partials/accordion/project.html @@ -1,12 +1,12 @@ -<dl>
- {{ range.Site.Params.project.list }}
- <dt>
- <a href="{{ .url }}" style="font-variant: small-caps; ">
- {{- .title -}}
- </a>
- </dt>
- <dd class="mb-0 ml-3 markdownify">
- {{- .description | markdownify -}}
- </dd>
- {{ end }}
-</dl>
+<dl> + {{ range.Site.Params.project.list }} + <dt> + <a href="{{ .url }}" style="font-variant: small-caps; "> + {{- .title -}} + </a> + </dt> + <dd class="mb-0 ml-3 markdownify"> + {{- .description | markdownify -}} + </dd> + {{ end }} +</dl> diff --git a/layouts/partials/publication.html b/layouts/partials/accordion/publication.html index 8f3dbd5..c422b4f 100644 --- a/layouts/partials/publication.html +++ b/layouts/partials/accordion/publication.html @@ -1,27 +1,27 @@ -{{ if .Site.Params.publication.types }}
-{{ range.Site.Params.publication.types }}
-{{ $type := . }}
-<h4 style="text-decoration: underline;">{{ $type }}</h4>
-{{- range $.Site.Params.publication.list -}}
-{{ if eq $type .type }}
-{{- $this_publication := . -}}
-<p>
- {{- range $.Site.Params.publication.format -}}
- {{- partial "addTitle" (dict "all" $this_publication "ind" .) -}}
- {{- end -}}
-</p>
-{{ end }}
-{{- end -}}
-{{ end }}
-
-{{ else }}
-
-{{- range $.Site.Params.publication.list -}}
-{{- $this_publication := . -}}
-<p>
- {{- range $.Site.Params.publication.format -}}
- {{- partial "addTitle" (dict "all" $this_publication "ind" .) -}}
- {{- end -}}
-</p>
-{{ end }}
-{{ end }}
+{{ if .Site.Params.publication.types }} +{{ range.Site.Params.publication.types }} +{{ $type := . }} +<h4 style="text-decoration: underline;">{{ $type }}</h4> +{{- range $.Site.Params.publication.list -}} +{{ if eq $type .type }} +{{- $this_publication := . -}} +<p> + {{- range $.Site.Params.publication.format -}} + {{- partial "accordion/supportingPartials/addTitle" (dict "all" $this_publication "ind" .) -}} + {{- end -}} +</p> +{{ end }} +{{- end -}} +{{ end }} + +{{ else }} + +{{- range $.Site.Params.publication.list -}} +{{- $this_publication := . -}} +<p> + {{- range $.Site.Params.publication.format -}} + {{- partial "addTitle" (dict "all" $this_publication "ind" .) -}} + {{- end -}} +</p> +{{ end }} +{{ end }} diff --git a/layouts/partials/skill.html b/layouts/partials/accordion/skill.html index 0864049..3733425 100644 --- a/layouts/partials/skill.html +++ b/layouts/partials/accordion/skill.html @@ -1,16 +1,16 @@ -<script>
- let skillPanel = document.querySelector("#skill-panel")
- .previousElementSibling;
- skillPanel.addEventListener("click", function() {
- let skillBars = document.querySelectorAll("#skill-percent");
- skillBars.forEach(elem => {
- elem.style.width = elem.classList[0];
- });
- });
-</script>
-{{ range.Site.Params.skill.list }}
-<code>{{ .skill }}</code>
-<div class="w-100 skillbar mt-1 mb-3">
- <div id="skill-percent" class="{{ .skillrating }}%" style="width: 0;"></div>
-</div>
-{{ end }}
+<script> + let skillPanel = document.querySelector("#skill-panel") + .previousElementSibling; + skillPanel.addEventListener("click", function() { + let skillBars = document.querySelectorAll("#skill-percent"); + skillBars.forEach(elem => { + elem.style.width = elem.classList[0]; + }); + }); +</script> +{{ range.Site.Params.skill.list }} +<code>{{ .skill }}</code> +<div class="w-100 skillbar mt-1 mb-3"> + <div id="skill-percent" class="{{ .skillrating }}%" style="width: 0;"></div> +</div> +{{ end }} diff --git a/layouts/partials/addTitle.html b/layouts/partials/accordion/supportingPartials/addTitle.html index 1c05bb4..1c05bb4 100644 --- a/layouts/partials/addTitle.html +++ b/layouts/partials/accordion/supportingPartials/addTitle.html |