Add announcements to left side bar
This commit is contained in:
parent
04c9f04146
commit
1a5a525077
@ -144,12 +144,41 @@ h1 {
|
||||
display: flex;
|
||||
margin: auto;
|
||||
|
||||
> .left-menu {
|
||||
width: 180px;
|
||||
margin-right: 40px;
|
||||
> .left-side {
|
||||
flex: auto 0 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-right: 40px;
|
||||
|
||||
.announcements {
|
||||
margin-top: 20px;
|
||||
background-color: #ececec;
|
||||
|
||||
.entry {
|
||||
margin: 25px 0;
|
||||
padding: 0 15px;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 15px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-weight: bold;
|
||||
}
|
||||
a {
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.left-menu {
|
||||
width: 180px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
> a {
|
||||
text-decoration: none;
|
||||
@ -410,6 +439,16 @@ h1 {
|
||||
}
|
||||
}
|
||||
|
||||
.announcement-list {
|
||||
.entry {
|
||||
margin: 0 30px;
|
||||
.time {
|
||||
font-weight: bold;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tsc-image {
|
||||
margin: 0 auto;
|
||||
width: fit-content;
|
||||
|
@ -7,12 +7,12 @@
|
||||
{{ $announcements := partial "get-announcement-list" . }}
|
||||
{{ range $announcements }}
|
||||
{{ $urlBlogEntry := .RelPermalink}}
|
||||
<div class="blog-entry">
|
||||
<div class="header">
|
||||
<div class="entry">
|
||||
<span class="time">
|
||||
{{ (time.AsTime .Params.announcement.date).Format "02.01.2006" }}
|
||||
</span>
|
||||
<a href="{{ $urlBlogEntry }}">{{ with .Params.announcement.name }}{{.}}{{else}}{{.Title}}{{end}}</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
Aktuell gibt es keine angekündigten Termine.
|
||||
{{ end }}
|
||||
|
@ -6,9 +6,12 @@
|
||||
{{- partial "page/header.html" . -}}
|
||||
<div class="main">
|
||||
{{ block "left" . }}
|
||||
<div class="left-side">
|
||||
<div class="left-menu">
|
||||
{{- partial "page/left_menu" . -}}
|
||||
</div>
|
||||
{{- partial "page/left-announcements" . -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div id="content">
|
||||
{{- block "main" . -}}{{- end -}}
|
||||
|
12
themes/tsc_vfl/layouts/partials/page/left-announcements.html
Normal file
12
themes/tsc_vfl/layouts/partials/page/left-announcements.html
Normal file
@ -0,0 +1,12 @@
|
||||
{{ $announcements := partial "get-announcement-list" . }}
|
||||
<div class="announcements">
|
||||
{{ range $announcements }}
|
||||
{{ $urlBlogEntry := .RelPermalink}}
|
||||
<div class="entry">
|
||||
<div class="time">
|
||||
{{ (time.AsTime .Params.announcement.date).Format "02.01.2006" }}
|
||||
</div>
|
||||
<a href="{{ $urlBlogEntry }}">{{ with .Params.announcement.name }}{{.}}{{else}}{{.Title}}{{end}}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user