Skip to content

Commit 7e88181

Browse files
committed
Prepare for the pages other than index.html
They have a slightly different style, in particular the banner. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 4910526 commit 7e88181

File tree

5 files changed

+41
-6
lines changed

5 files changed

+41
-6
lines changed

assets/sass/main.scss

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ body {
1616
.banner {
1717
text-align: center;
1818
font-weight: bold;
19+
td img {
20+
height: 150px;
21+
}
1922
}
2023
big {
2124
font-size: 400%;

layouts/index.html renamed to layouts/_default/baseof.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!DOCTYPE html>
12
<html>
23
<head>
34
<title>{{ .Title }}</title>
@@ -7,6 +8,8 @@
78
<body>
89
{{ partial "banner.html" . -}}
910

10-
{{ .Content | replaceRE "(<h2 id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1} <a href="#${2}">#</a> ${3}` | safeHTML }}
11+
{{ block "main" . }}
12+
{{ .Content }}
13+
{{ end }}
1114
</body>
1215
</html>

layouts/_default/index.html

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{ define "main" }}
2+
{{ .Content | replaceRE "(<h2 id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1} <a href="#${2}">#</a> ${3}` | safeHTML }}
3+
{{ end }}

layouts/_default/single.html

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{ define "main" }}
2+
<div class="block">
3+
{{ .Content }}
4+
</div>
5+
{{ end }}

layouts/partials/banner.html

+26-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
1+
{{- define "partials/logo.html" -}}
2+
<img src="images/gitgitgadget-explanation.png" alt="An arrow from git logo to an envelop with git logo. The arrow is labelled by famous Inspector Gadget hat."/>
3+
{{- end -}}
4+
{{- define "partials/subtitle.html" -}}
5+
<big>GitGitGadget</big><br />
6+
Contributing git.git patches via GitHub PRs<br />
7+
<small>... one iteration at a time... </small>
8+
{{- end -}}
19
<div class="banner">
2-
<img src="images/gitgitgadget-explanation.png" alt="An arrow from git logo to an envelop with git logo. The arrow is labelled by famous Inspector Gadget hat."/>
3-
<big>GitGitGadget</big><br />
4-
Contributing git.git patches via GitHub PRs<br />
5-
<small>... one iteration at a time... </small>
6-
</div><hr />
10+
{{- if eq .Kind "home" }}
11+
{{ partial "logo.html" . }}
12+
{{ partial "subtitle.html" . }}
13+
{{- else }}
14+
<table style="width: 100%">
15+
<tbody>
16+
<tr>
17+
<td>
18+
{{ partial "logo.html" . }}
19+
</td>
20+
<td>
21+
{{ partial "subtitle.html" . }}
22+
</td>
23+
</tr>
24+
</tbody>
25+
</table>
26+
{{- end }}
27+
</div>{{ if eq .Kind "home" }}<hr />{{ end }}

0 commit comments

Comments
 (0)