From 7eb84cd937ad65b0941164c5efe6b35a1210f8c3 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch
Date: Sun, 14 Apr 2019 01:05:05 +0200 Subject: sklad: styling, add a basic view for containers --- sklad/base.tmpl | 25 +++++++++++++++++++----- sklad/container.tmpl | 23 +++++++++++++++++++++- sklad/login.tmpl | 2 ++ sklad/main.go | 54 ++++++++++++++++++++++++++++++++++++++-------------- 4 files changed, 84 insertions(+), 20 deletions(-) diff --git a/sklad/base.tmpl b/sklad/base.tmpl index 2070d6e..b8487ee 100644 --- a/sklad/base.tmpl +++ b/sklad/base.tmpl @@ -7,18 +7,33 @@ html, body { min-height: 100vh; } body { padding: 1em; box-sizing: border-box; margin: 0 auto; max-width: 50em; - border-left: 1px solid gray; border-right: 1px solid gray; + border-left: 1px solid #ccc; border-right: 1px solid #ccc; font-family: sans-serif; } + header { display: flex; justify-content: space-between; align-items: center; + flex-wrap: wrap; margin: -1em -1em 0 -1em; padding: 0 1em; + background: linear-gradient(0deg, #fff, #eee); } + header * { display: inline-block; } + a { color: inherit; }
-TODO +{{ if .Id }} +
{{ .Description }} +{{ end }} + +{{ if .Children }} +{{ range .Children }} +
+{{ end }} +{{ else }} +Obal je prázdný. +{{ end }} {{ end }} diff --git a/sklad/login.tmpl b/sklad/login.tmpl index 4df6c3a..8dbca84 100644 --- a/sklad/login.tmpl +++ b/sklad/login.tmpl @@ -1,6 +1,8 @@ {{ define "Title" }}Přihlášení{{ end }} {{ define "Content" }} +