Skip to content

Commit

Permalink
Merge pull request samrobbins85#17 from settinger/master
Browse files Browse the repository at this point in the history
Ensure "title" attribute of Skill item is converted to a valid htmlID
  • Loading branch information
samrobbins85 authored Mar 27, 2022
2 parents 3b18fbe + 747311a commit 5f46da7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ <h2 class="uk-text-center uk-text-bold uk-margin-large-top"> {{.title}} </h2>
{{ 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">
Expand All @@ -180,7 +180,7 @@ <h1 class="uk-heading-line uk-text-center uk-heading-medium"><span>Skills</span>
{{ 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 }}
Expand Down

0 comments on commit 5f46da7

Please sign in to comment.