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

github.com/samrobbins85/hugo-developer-portfolio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Robbins <samrobbinsgb@gmail.com>2022-03-27 18:03:20 +0300
committerGitHub <noreply@github.com>2022-03-27 18:03:20 +0300
commit5f46da78b531c301e7998e0378281e6d7c4a33da (patch)
tree81e608b7e05569429d1cdcda0d003a3b9435574f
parent3b18fbe4ea3fb76474e5a9af1f78b02d1f16fc7d (diff)
parent747311a1ca2deb36448c176d8685917cc3756ba5 (diff)
Merge pull request #17 from settinger/masterHEADmaster
Ensure "title" attribute of Skill item is converted to a valid htmlID
-rw-r--r--layouts/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 3f87585..91d79b1 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -159,7 +159,7 @@
{{ if .Site.Data.homepage.skill.enable }}
{{ range .Site.Data.homepage.skill.item }}
-<div id="{{cond (isset . "titlealt") .titlealt (replace (replace .title ' ' '_') '.' '_') }}" uk-modal>
+<div id="modal_{{cond (isset . "titlealt") .titlealt (replaceRE "\\W" "_" .title) }}" uk-modal>
<div class="uk-modal-dialog uk-modal-body">
<button class="uk-modal-close-default" type="button" uk-close></button>
<div class="uk-modal-header">
@@ -180,7 +180,7 @@
{{ range .Site.Data.homepage.skill.item }}
<div class="imagemargin">
<img class="contain skills" src="{{.logo}}" alt="{{.company}}" loading="lazy" style="cursor: pointer"
- uk-toggle="target: #{{ cond (isset . "titlealt") .titlealt (replace (replace .title ' ' '_') '.' '_')}}">
+ uk-toggle="target: #modal_{{cond (isset . "titlealt") .titlealt (replaceRE "\\W" "_" .title) }}">
<h4>{{.title }}</h4>
</div>
{{ end }}