Skip to content
Snippets Groups Projects
Commit 3cace6c3 authored by Naoya Ozawa's avatar Naoya Ozawa
Browse files

[add] css to tile-ize lab images #7

parent 43e6353f
Tags
No related merge requests found
......@@ -21,6 +21,7 @@
{{ if eq .Identifier "lab" }}
<div>
{{ range .Children }}
{{ $nm := .Name }}
{{ $w := sub .Weight 1 }}
{{ $pt := .URL | relLangURL }}
<!-- Fetch image path -->
......@@ -28,7 +29,7 @@
{{ if eq .Title "Lab" }}
{{ range $index, $element := (.Page.Param "image") }}
{{ if eq $w $index }}
<a href={{ $pt }}><img src="{{ . }}" ></a>
<a href={{ $pt }} class="tile"><img src="{{ . }}" alt={{ $nm }} title={{ $nm }}><div class="caption">{{ $nm }}</div></a>
{{ end }}
{{ end }}
{{ end }}
......
......@@ -57,4 +57,27 @@
}
.tile {
position: relative;
}
.tile img {
width: 100%;
height: auto;
margin: 2px;
max-width: 210px;
background: #f7f7f7;
box-shadow: 0px 2px 2px rgba(0,0,0,0.29);
}
.tile div.caption {
position: absolute;
width: 97%;
height: 240%;
bottom: 10px;
left: 3px;
color: #000;
background: #fff;
font-size: 130%;
text-align: center;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment