mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-14 03:22:17 +00:00
Add Events and Favicons
This commit is contained in:
@@ -10,17 +10,10 @@
|
||||
{{ .Content }}
|
||||
|
||||
{{- range .Data.Pages.GroupByDate "2006" }}
|
||||
<div class="posts-group">
|
||||
<h3 id="{{ .Key }}">{{ .Key }}
|
||||
</div>
|
||||
<ul class="posts-list">
|
||||
<h3 id="{{ .Key }}">{{ .Key }}</h3>
|
||||
<ul>
|
||||
{{- range .Pages }}
|
||||
<li class="post-item">
|
||||
<a href="{{.Permalink}}">
|
||||
<span class="post-title">{{.Title}}</span>
|
||||
<span class="post-day">{{ .Date.Format "2006-01-01" }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="{{.Permalink}}">{{.Title}}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
21
themes/lhs/layouts/blog/list.html
Normal file
21
themes/lhs/layouts/blog/list.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{{ define "title" }}
|
||||
{{ .Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "subtitle" }}
|
||||
{{ .Params.subtitle }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ .Content }}
|
||||
|
||||
{{- range .Data.Pages.GroupByDate "2006" }}
|
||||
<h3 id="{{ .Key }}">{{ .Key }}</h3>
|
||||
<ul>
|
||||
{{- range .Pages }}
|
||||
<li><a href="{{.Permalink}}">{{.Title}}</a> - <i>{{ .Params.author }}</i></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
48
themes/lhs/layouts/page/calendar.html
Normal file
48
themes/lhs/layouts/page/calendar.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{{ define "title" }}
|
||||
{{ .Title }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "subtitle" }}
|
||||
{{ .Params.subtitle }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
<link rel="stylesheet" href="https://uicdn.toast.com/calendar/latest/toastui-calendar.min.css" />
|
||||
<script src="https://uicdn.toast.com/calendar/latest/toastui-calendar.min.js"></script>
|
||||
<div id="calendar" style="height: 800px"></div>
|
||||
<script>
|
||||
/* in the browser environment namespace */
|
||||
const Calendar = tui.Calendar;
|
||||
const calendar = new Calendar('#calendar', {
|
||||
defaultView: 'month',
|
||||
isReadOnly: true,
|
||||
useDetailPopup: true,
|
||||
usageStatistics: false,
|
||||
calendars: [
|
||||
{
|
||||
id: '1',
|
||||
name: 'Hackspace Events',
|
||||
backgroundColor: '#ff0000',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
console.log(calendar.getEvent());
|
||||
|
||||
$.getJSON('https://api.leighhack.org/events', function (data) {
|
||||
data.forEach(function (event) {
|
||||
calendar.createEvents([{
|
||||
id: event['uid'],
|
||||
calendarId: '1',
|
||||
title: event['summary'],
|
||||
body: event['description'],
|
||||
state: 'Free',
|
||||
dueDateClass: '',
|
||||
start: event['start']['dateTime'],
|
||||
end: event['end']['dateTime'],
|
||||
}])
|
||||
});
|
||||
});
|
||||
calendar.render();
|
||||
</script>
|
||||
{{ end }}
|
||||
@@ -2,6 +2,16 @@
|
||||
<title>{{ block "title" . }}{{ .Site.Title }} - {{ .Title }}{{ end }}</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- favicons -->
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<link rel="manifest" href="/site.webmanifest">
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#b91d47">
|
||||
<meta name="msapplication-TileColor" content="#b91d47">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script src="https://kit.fontawesome.com/589b48ea08.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user