mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-12-22 22:52:54 +00:00
Remove updlicate ids
This commit is contained in:
parent
015b4bbd41
commit
0d6371f6eb
2 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,7 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="column is-one-third">
|
<div class="column is-one-third">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div id="project-{{ $index }}" class="card">
|
<div class="card" data-target="#project-{{ $index }}">
|
||||||
<div class="card-image">
|
<div class="card-image">
|
||||||
<figure class="image is-3by2">
|
<figure class="image is-3by2">
|
||||||
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
|
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<button class="modal-close is-large" aria-label="close"></button>
|
<button class="modal-close is-large" aria-label="close" data-target="#project-{{ $index }}"></button>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -10,10 +10,10 @@ $('a[href^="#"]').click(function(e) {
|
||||||
|
|
||||||
// Modal closer
|
// Modal closer
|
||||||
$('.card').click(function () {
|
$('.card').click(function () {
|
||||||
$('#'+this.id+'.modal').addClass('is-active');
|
$($(this).attr('data-target')).addClass('is-active');
|
||||||
});
|
});
|
||||||
$('.modal-close').click(function () {
|
$('.modal-close').click(function () {
|
||||||
$('#'+$(this).parent('.modal').get(0).id+'.modal').removeClass('is-active');
|
$($(this).attr('data-target')).removeClass('is-active');
|
||||||
});
|
});
|
||||||
$(document).keypress(function(e) {
|
$(document).keypress(function(e) {
|
||||||
if(e.which == 0) {
|
if(e.which == 0) {
|
||||||
|
|
Loading…
Reference in a new issue