}); | }); | ||||
function downloadEvent(){ | function downloadEvent(){ | ||||
var subject = $('#subject').val(); | var subject = $('#subject').val(); | ||||
var description = $('#cl-description').val(); | |||||
var description = $('#description').val(); | |||||
var location = $('#location').val(); | var location = $('#location').val(); | ||||
var begin = $('#start-date').val(); | var begin = $('#start-date').val(); | ||||
var end = $('#end-date').val(); | var end = $('#end-date').val(); | ||||
var filename = $('#filename').val(); | var filename = $('#filename').val(); | ||||
if(filename==='') | if(filename==='') | ||||
filename= subject; | filename= subject; | ||||
if(description==='') | |||||
description = $('#description').val(); | |||||
var cal = ics(); | var cal = ics(); | ||||
cal.addEvent(subject, description, location, begin, end); | cal.addEvent(subject, description, location, begin, end); | ||||
//cal.addEvent(subject, description, location, begin, end); // yes, you can have multiple events :-) | //cal.addEvent(subject, description, location, begin, end); // yes, you can have multiple events :-) |
{{if not .Params.disable_download}} | {{if not .Params.disable_download}} | ||||
<div class="col-lg-8 offset-lg-2"> | <div class="col-lg-8 offset-lg-2"> | ||||
<input type="hidden" id="subject" value="{{.Title }}"/> | <input type="hidden" id="subject" value="{{.Title }}"/> | ||||
<input type="hidden" id="cl-description" value="{{ .Params.calendar_description }}"/> | |||||
<input type="hidden" id="description" value="{{ .Content }}"/> | <input type="hidden" id="description" value="{{ .Content }}"/> | ||||
<input type="hidden" id="location" value="{{.Params.location }}"/> | <input type="hidden" id="location" value="{{.Params.location }}"/> | ||||
<input type="hidden" id="start-date" value="{{.Params.event_start_date }}"/> | <input type="hidden" id="start-date" value="{{.Params.event_start_date }}"/> |
<article class="col-lg-4 col-md-6 col-12 clearfix wow fadeInUp mb-4" data-wow-duration="500ms"> | <article class="col-lg-4 col-md-6 col-12 clearfix wow fadeInUp mb-4" data-wow-duration="500ms"> | ||||
<div class="post-block"> | <div class="post-block"> | ||||
<div class="media-wrapper"> | <div class="media-wrapper"> | ||||
{{ with .Params.Image_webp }} | |||||
<img class="img-fluid lozad" data-src="{{ .Params.Image_webp | absURL }}" | |||||
{{ with .Params.image_webp }} | |||||
<img class="img-fluid lozad" data-src="{{ .Params.image_webp | absURL }}" | |||||
onerror="this.onerror=null; | onerror="this.onerror=null; | ||||
this.src='{{ .Params.Image | absURL }}'" | |||||
this.src='{{ .Params.image | absURL }}'" | |||||
> | > | ||||
{{ end }} | {{ end }} | ||||
</div> | </div> |