aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets_src/css/materialize_extend.css21
-rw-r--r--frontend/renderer.go1
-rw-r--r--views/includes/card.html4
-rw-r--r--views/pages/dashboard.html2
4 files changed, 25 insertions, 3 deletions
diff --git a/assets_src/css/materialize_extend.css b/assets_src/css/materialize_extend.css
index f06d042..64b58e2 100644
--- a/assets_src/css/materialize_extend.css
+++ b/assets_src/css/materialize_extend.css
@@ -1,3 +1,24 @@
1span.badge.new.no-caption::after { 1span.badge.new.no-caption::after {
2 content: ""; 2 content: "";
3} 3}
4
5/* some flexy flexbox stuff */
6.flex {
7 display: flex;
8 flex-direction: row;
9 flex-wrap: wrap;
10 align-items: stretch;
11}
12
13.flex .flex-card {
14 display: flex;
15 margin-right: 16px;
16 max-width: 400px;
17}
18
19.flex .flex-card .pull-down {
20 position: absolute;
21 bottom: 0;
22 left: 0;
23 width: 100%;
24}
diff --git a/frontend/renderer.go b/frontend/renderer.go
index 7d3a161..6fada60 100644
--- a/frontend/renderer.go
+++ b/frontend/renderer.go
@@ -19,6 +19,7 @@ type Action struct {
19// Card ist eine Karte im Materialize-Design. 19// Card ist eine Karte im Materialize-Design.
20type Card struct { 20type Card struct {
21 Title string 21 Title string
22 SubTitle *string
22 Image string 23 Image string
23 Description string 24 Description string
24 Size string 25 Size string
diff --git a/views/includes/card.html b/views/includes/card.html
index a96cb49..457eef9 100644
--- a/views/includes/card.html
+++ b/views/includes/card.html
@@ -1,6 +1,6 @@
1{{ define "card" }} 1{{ define "card" }}
2{{ $card := . }} 2{{ $card := . }}
3<div class="col s12 m6 l4"> 3<div class="flex-card">
4 <div class="card white"> 4 <div class="card white">
5 <div class="card-content black-text"> 5 <div class="card-content black-text">
6 {{ if $card.Image }} 6 {{ if $card.Image }}
@@ -8,7 +8,7 @@
8 <img class="circle responsive-img card-image" src="{{ $card.Image }}" /> 8 <img class="circle responsive-img card-image" src="{{ $card.Image }}" />
9 </div> 9 </div>
10 {{ end }} 10 {{ end }}
11 <span class="card-title">{{ $card.Title | html }}</span> 11 <span class="card-title valign-wrapper">{{ $card.Title | html }}{{ if $card.SubTitle }}{{ $card.SubTitle | html }}{{ end }}</span>
12 <p>{{ $card.Description | html }}</p> 12 <p>{{ $card.Description | html }}</p>
13 </div> 13 </div>
14 <div class="card-action"> 14 <div class="card-action">
diff --git a/views/pages/dashboard.html b/views/pages/dashboard.html
index 589b0fd..2eacaba 100644
--- a/views/pages/dashboard.html
+++ b/views/pages/dashboard.html
@@ -11,7 +11,7 @@
11 <div class="row"> 11 <div class="row">
12 {{ range $category := .categories }} 12 {{ range $category := .categories }}
13 <h2>{{ $category.Title }}</h2> 13 <h2>{{ $category.Title }}</h2>
14 <div class="row"> 14 <div class="flex">
15 {{ range $category.Cards }} 15 {{ range $category.Cards }}
16 {{ template "card" . }} 16 {{ template "card" . }}
17 {{ end }} 17 {{ end }}