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 }}
|
||||
<div class="column is-one-third">
|
||||
{{ end }}
|
||||
<div id="project-{{ $index }}" class="card">
|
||||
<div class="card" data-target="#project-{{ $index }}">
|
||||
<div class="card-image">
|
||||
<figure class="image is-3by2">
|
||||
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
|
||||
|
@ -60,7 +60,7 @@
|
|||
</section>
|
||||
{{ end }}
|
||||
</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>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -10,10 +10,10 @@ $('a[href^="#"]').click(function(e) {
|
|||
|
||||
// Modal closer
|
||||
$('.card').click(function () {
|
||||
$('#'+this.id+'.modal').addClass('is-active');
|
||||
$($(this).attr('data-target')).addClass('is-active');
|
||||
});
|
||||
$('.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) {
|
||||
if(e.which == 0) {
|
||||
|
|
Loading…
Reference in a new issue