Add announcements to left side bar
This commit is contained in:
parent
04c9f04146
commit
1a5a525077
@ -144,12 +144,41 @@ h1 {
|
|||||||
display: flex;
|
display: flex;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
||||||
> .left-menu {
|
> .left-side {
|
||||||
width: 180px;
|
|
||||||
margin-right: 40px;
|
|
||||||
flex: auto 0 0;
|
flex: auto 0 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
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 {
|
> a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -410,6 +439,16 @@ h1 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.announcement-list {
|
||||||
|
.entry {
|
||||||
|
margin: 0 30px;
|
||||||
|
.time {
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.tsc-image {
|
.tsc-image {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
{{ $announcements := partial "get-announcement-list" . }}
|
{{ $announcements := partial "get-announcement-list" . }}
|
||||||
{{ range $announcements }}
|
{{ range $announcements }}
|
||||||
{{ $urlBlogEntry := .RelPermalink}}
|
{{ $urlBlogEntry := .RelPermalink}}
|
||||||
<div class="blog-entry">
|
<div class="entry">
|
||||||
<div class="header">
|
<span class="time">
|
||||||
{{ (time.AsTime .Params.announcement.date).Format "02.01.2006" }}
|
{{ (time.AsTime .Params.announcement.date).Format "02.01.2006" }}
|
||||||
<a href="{{ $urlBlogEntry }}">{{ with .Params.announcement.name }}{{.}}{{else}}{{.Title}}{{end}}</a>
|
</span>
|
||||||
</div>
|
<a href="{{ $urlBlogEntry }}">{{ with .Params.announcement.name }}{{.}}{{else}}{{.Title}}{{end}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
Aktuell gibt es keine angekündigten Termine.
|
Aktuell gibt es keine angekündigten Termine.
|
||||||
|
@ -6,8 +6,11 @@
|
|||||||
{{- partial "page/header.html" . -}}
|
{{- partial "page/header.html" . -}}
|
||||||
<div class="main">
|
<div class="main">
|
||||||
{{ block "left" . }}
|
{{ block "left" . }}
|
||||||
<div class="left-menu">
|
<div class="left-side">
|
||||||
{{- partial "page/left_menu" . -}}
|
<div class="left-menu">
|
||||||
|
{{- partial "page/left_menu" . -}}
|
||||||
|
</div>
|
||||||
|
{{- partial "page/left-announcements" . -}}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
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