Pages Roya
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<div class="max-w-250 flex-1 m-20">
|
||||
{{ if (isset .Params "featuredimage" )}}
|
||||
{{$img := resources.Get .Params.featuredimage}}
|
||||
<div style='background-image: url({{ $img.Permalink }}); background-size: cover; background-position: center center;' class="bg-bubble w-150 h-150 m-auto"></div>
|
||||
<div style='background-image: url({{$img.Permalink}}); background-size: cover; background-position: center center;' class="bg-bubble w-150 h-150 m-auto"></div>
|
||||
{{end}}
|
||||
<h3 class="primary ta-c">{{.Title}}</h3>
|
||||
<p class="ta-c" style="font-size: 0.8em; text-style: italic;">Le {{dateFormat "02/01/2006" .Date}}</p>
|
||||
@@ -23,4 +23,4 @@
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
28
themes/coopgo-theme/layouts/roya/list.html
Normal file
28
themes/coopgo-theme/layouts/roya/list.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<div class="bg-primary p-t-100 p-b-100 ta-c">
|
||||
{{if (isset .Params "titleimg")}}
|
||||
{{$titleimg := resources.Get .Params.titleimg}}
|
||||
<img class="max-w-300" src="{{$titleimg.Permalink}}" alt="{{.Title}}" />
|
||||
{{else}}
|
||||
<h1 class="white">{{.Title}}</h1>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="container p-30">
|
||||
{{.Content}}
|
||||
</div>
|
||||
<div class="container flex-row j-center wrap p-30">
|
||||
{{range .Pages}}
|
||||
<a href="{{.Permalink}}">
|
||||
<div class="max-w-250 flex-1 m-20">
|
||||
{{ if (isset .Params "featuredimage" )}}
|
||||
{{$img := resources.Get .Params.featuredimage}}
|
||||
<div style='background-image: url({{$img.Permalink}}); background-size: cover; background-position: center center;' class="bg-bubble w-150 h-150 m-auto"></div>
|
||||
{{end}}
|
||||
<h3 class="primary ta-c">{{.Title}}</h3>
|
||||
</div>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
BIN
themes/coopgo-theme/layouts/shortcodes/.calendar.html.swp
Normal file
BIN
themes/coopgo-theme/layouts/shortcodes/.calendar.html.swp
Normal file
Binary file not shown.
46
themes/coopgo-theme/layouts/shortcodes/calendar.html
Normal file
46
themes/coopgo-theme/layouts/shortcodes/calendar.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<div id='calendar'></div>
|
||||
|
||||
<!--<script type="text/plain" language="javascript" src="https://cdn.jsdelivr.net/npm/ical.js@2.1.0/dist/ical.es5.min.cjs"></script>
|
||||
<script src='https://cdn.jsdelivr.net/npm/fullcalendar@6.1.15/index.global.min.js'></script>
|
||||
<script src='https://cdn.jsdelivr.net/npm/@fullcalendar/icalendar@6.1.15/index.global.min.js'></script>-->
|
||||
|
||||
<script type='importmap'>
|
||||
{
|
||||
"imports": {
|
||||
"@fullcalendar/core": "https://cdn.skypack.dev/@fullcalendar/core@6.1.15",
|
||||
"@fullcalendar/daygrid": "https://cdn.skypack.dev/@fullcalendar/daygrid@6.1.15",
|
||||
"@fullcalendar/icalendar": "https://cdn.skypack.dev/@fullcalendar/icalendar@6.1.15",
|
||||
"@fullcalendar/core/locales": "https://cdn.skypack.dev/@fullcalendar/core/locales@6.1.15"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="module">
|
||||
|
||||
//import ICAL from "https://cdn.jsdelivr.net/npm/ical.js@2.1.0/dist/ical.min.js";
|
||||
import { Calendar } from '@fullcalendar/core';
|
||||
import dayGridPlugin from '@fullcalendar/daygrid';
|
||||
import iCalendarPlugin from '@fullcalendar/icalendar';
|
||||
//import frLocale from '@fullcalendar/core/locales/fr';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var calendarEl = document.getElementById('calendar');
|
||||
var calendar = new Calendar(calendarEl, {
|
||||
initialView: 'dayGridMonth',
|
||||
plugins: [dayGridPlugin, iCalendarPlugin],
|
||||
locale: "fr",
|
||||
firstDay: 1,
|
||||
eventClick: function(info) {
|
||||
alert("Date : "+info.event.start.toLocaleDateString()+ "\nHoraires : " +info.event.start.toLocaleTimeString()+"-"+info.event.end.toLocaleTimeString()+ "\n\n" + info.event.title);
|
||||
},
|
||||
events: {
|
||||
url: '{{.Get 0}}',
|
||||
dataType : 'jsonp',
|
||||
format: 'ics'
|
||||
}
|
||||
});
|
||||
calendar.render();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user