Browse Source

some major updates

pull/141/head
abhidj0090 4 years ago
parent
commit
b5b0c8325a
2 changed files with 8 additions and 3 deletions
  1. 5
    1
      assets/js/script.js
  2. 3
    2
      layouts/events/single.html

+ 5
- 1
assets/js/script.js View File

}); });
function downloadEvent(){ function downloadEvent(){
var subject = $('#subject').val(); var subject = $('#subject').val();
var description = $('#description').val();
var description = $('#cl-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==='')
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 :-)

+ 3
- 2
layouts/events/single.html View File

{{ .Content }} {{ .Content }}
</div> </div>
<input type="hidden" id="subject" value="{{.Title }}"/> <input type="hidden" id="subject" value="{{.Title }}"/>
<input type="hidden" id="description" value="{{ .Params.calendar_description | .Content }}"/>
<input type="hidden" id="cl-description" value="{{ .Params.calendar_description }}"/>
<input type="hidden" id="description" value="{{ .Content }}"/>
<input type="hidden" id="location" value="Kolkata, IN"/> <input type="hidden" id="location" value="Kolkata, IN"/>
<input type="hidden" id="start-date" value="{{.Params.event_start_date }}"/> <input type="hidden" id="start-date" value="{{.Params.event_start_date }}"/>
<input type="hidden" id="end-date" value="{{.Params.event_end_date }}"/> <input type="hidden" id="end-date" value="{{.Params.event_end_date }}"/>
<input type="hidden" id="filename" value="{{ .Params.calendar_filename | .Title }}"/>
<input type="hidden" id="filename" value="{{ .Params.calendar_filename }}"/>
<button class="clndr btn btn-main" onclick="downloadEvent()"> <button class="clndr btn btn-main" onclick="downloadEvent()">
<i class="ti-calendar"></i>Block Calender</button> <i class="ti-calendar"></i>Block Calender</button>
{{ if site.Params.post_share }} {{ if site.Params.post_share }}

Loading…
Cancel
Save