Add a basic page header.

This commit is contained in:
Rasmus Kaj 2015-11-30 21:00:07 +01:00
parent 5adeec2f91
commit 36a047ddfd
10 changed files with 18 additions and 4 deletions

View File

@ -1,6 +1,9 @@
body { body {
background: #eee; background: #eee;
} }
header {
border-bottom: 1px solid #aaa;
}
div.photos { div.photos {
display: flex; display: flex;

View File

@ -6,7 +6,9 @@
<link rel="stylesheet" href="/static/photos.css" type="text/css"/> <link rel="stylesheet" href="/static/photos.css" type="text/css"/>
</head> </head>
<body> <body>
{{> head}}
<h1>Photo details</h1> <h1>Photo details</h1>
<p>{{photo.path}}</p> <p>{{photo.path}}</p>
<p><img src="/view/{{photo.id}}"></p> <p><img src="/view/{{photo.id}}"></p>
{{#photo.grade}}<p>Betyg: {{.}}</p>{{/photo.grade}} {{#photo.grade}}<p>Betyg: {{.}}</p>{{/photo.grade}}

6
templates/head.tpl Normal file
View File

@ -0,0 +1,6 @@
<header>
<a href="/">/</a>
· <a href="/tag/">Taggar</a>
· <a href="/person/">Personer</a>
· <a href="/place/">Platser</a>
</header>

View File

@ -6,12 +6,9 @@
<link rel="stylesheet" href="/static/photos.css" type="text/css"/> <link rel="stylesheet" href="/static/photos.css" type="text/css"/>
</head> </head>
<body> <body>
{{> head}}
<h1>Photo index</h1> <h1>Photo index</h1>
<p><a href="/tag/">Taggar</a>
· <a href="/person/">Personer</a>
· <a href="/place/">Platser</a></p>
<div class="photos"> <div class="photos">
{{#photos}} {{#photos}}
<p><a href="/details/{{id}}"><img src="/icon/{{id}}"></a></p> <p><a href="/details/{{id}}"><img src="/icon/{{id}}"></a></p>

View File

@ -6,6 +6,7 @@
<link rel="stylesheet" href="/static/photos.css" type="text/css"/> <link rel="stylesheet" href="/static/photos.css" type="text/css"/>
</head> </head>
<body> <body>
{{> head}}
<h1>Photo people</h1> <h1>Photo people</h1>
<ul class="allpeople">{{#people}} <ul class="allpeople">{{#people}}

View File

@ -6,6 +6,7 @@
<link rel="stylesheet" href="/static/photos.css" type="text/css"/> <link rel="stylesheet" href="/static/photos.css" type="text/css"/>
</head> </head>
<body> <body>
{{> head}}
<h1>{{person.name}}</h1> <h1>{{person.name}}</h1>
<div class="photos"> <div class="photos">

View File

@ -6,6 +6,7 @@
<link rel="stylesheet" href="/static/photos.css" type="text/css"/> <link rel="stylesheet" href="/static/photos.css" type="text/css"/>
</head> </head>
<body> <body>
{{> head}}
<h1>{{place.place}}</h1> <h1>{{place.place}}</h1>
<div class="photos"> <div class="photos">

View File

@ -6,6 +6,7 @@
<link rel="stylesheet" href="/static/photos.css" type="text/css"/> <link rel="stylesheet" href="/static/photos.css" type="text/css"/>
</head> </head>
<body> <body>
{{> head}}
<h1>Photo places</h1> <h1>Photo places</h1>
<ul class="allplaces">{{#places}} <ul class="allplaces">{{#places}}

View File

@ -6,6 +6,7 @@
<link rel="stylesheet" href="/static/photos.css" type="text/css"/> <link rel="stylesheet" href="/static/photos.css" type="text/css"/>
</head> </head>
<body> <body>
{{> head}}
<h1>{{tag.tag}}</h1> <h1>{{tag.tag}}</h1>
<div class="photos"> <div class="photos">

View File

@ -6,6 +6,7 @@
<link rel="stylesheet" href="/static/photos.css" type="text/css"/> <link rel="stylesheet" href="/static/photos.css" type="text/css"/>
</head> </head>
<body> <body>
{{> head}}
<h1>Photo tags</h1> <h1>Photo tags</h1>
<ul class="alltags">{{#tags}} <ul class="alltags">{{#tags}}