diff --git a/templates/pages/base_footer.tmpl b/templates/pages/base_footer.tmpl new file mode 100644 index 0000000000..308b1d01b6 --- /dev/null +++ b/templates/pages/base_footer.tmpl @@ -0,0 +1,2 @@ + + diff --git a/templates/pages/base_head.tmpl b/templates/pages/base_head.tmpl new file mode 100644 index 0000000000..f83c348d14 --- /dev/null +++ b/templates/pages/base_head.tmpl @@ -0,0 +1,170 @@ + + + + + + {{if .Config.Hero.Title}}{{.Config.Hero.Title}}{{else}}{{.Repository.Name}}{{end}} - {{.Repository.Owner.Name}} + + + {{template "base/head_style" .}} + + + diff --git a/templates/pages/documentation.tmpl b/templates/pages/documentation.tmpl index c60fbf76cf..55d9aecd74 100644 --- a/templates/pages/documentation.tmpl +++ b/templates/pages/documentation.tmpl @@ -1,5 +1,118 @@ -{{template "base/head" .}} -
+{{template "pages/base_head" .}} + +
{{template "pages/header" .}}
@@ -21,6 +134,15 @@
{{end}} + {{else}} +
+

Documentation

+ +
{{end}} @@ -32,12 +154,11 @@ {{.ReadmeContent}}
{{else}} -

{{ctx.Locale.Tr "repo.no_desc"}}

+

{{.Repository.Name}}

+

{{if .Repository.Description}}{{.Repository.Description}}{{else}}Welcome to the documentation.{{end}}

{{end}}
- - {{template "pages/footer" .}} -{{template "base/footer" .}} +{{template "pages/base_footer" .}} diff --git a/templates/pages/portfolio.tmpl b/templates/pages/portfolio.tmpl index 87d1fb580d..49c44a3421 100644 --- a/templates/pages/portfolio.tmpl +++ b/templates/pages/portfolio.tmpl @@ -1,5 +1,131 @@ -{{template "base/head" .}} -
+{{template "pages/base_head" .}} + +
{{template "pages/header" .}}
@@ -20,7 +146,7 @@ {{end}} {{if .Config.Hero.CTASecondary.Text}} - + {{.Config.Hero.CTASecondary.Text}} {{end}} @@ -29,28 +155,31 @@ - {{if .Config.Gallery.Items}} - {{end}} {{if .ReadmeContent}} @@ -66,4 +195,4 @@ {{template "pages/footer" .}}
-{{template "base/footer" .}} +{{template "pages/base_footer" .}} diff --git a/templates/pages/product.tmpl b/templates/pages/product.tmpl index 66bb71aed8..49df0ce242 100644 --- a/templates/pages/product.tmpl +++ b/templates/pages/product.tmpl @@ -1,11 +1,121 @@ -{{template "base/head" .}} -
+{{template "pages/base_head" .}} + +
{{template "pages/header" .}}
-
{{if .Config.Branding.Logo}} @@ -16,12 +126,12 @@ {{end}}
{{if .Config.Hero.CTAPrimary.Text}} - + {{.Config.Hero.CTAPrimary.Text}} {{end}} {{if .Config.Hero.CTASecondary.Text}} - + {{.Config.Hero.CTASecondary.Text}} {{end}} @@ -38,11 +148,7 @@
{{if .Icon}}
- {{if StringUtils.HasPrefix .Icon "./"}} - {{.Title}} - {{else}} {{svg (printf "octicon-%s" .Icon) 32}} - {{end}}
{{end}}

{{.Title}}

@@ -89,4 +195,4 @@ {{template "pages/footer" .}}
-{{template "base/footer" .}} +{{template "pages/base_footer" .}} diff --git a/templates/pages/simple.tmpl b/templates/pages/simple.tmpl index c73c42d070..586fc21486 100644 --- a/templates/pages/simple.tmpl +++ b/templates/pages/simple.tmpl @@ -1,5 +1,5 @@ -{{template "base/head" .}} -
+{{template "pages/base_head" .}} +
{{template "pages/header" .}}
@@ -43,18 +43,15 @@
- {{svg "octicon-star"}} {{.NumStars}} {{ctx.Locale.Tr "repo.stars"}}
- {{svg "octicon-repo-forked"}} {{.NumForks}} {{ctx.Locale.Tr "repo.forks"}}
{{if .Repository.PrimaryLanguage}}
- {{.Repository.PrimaryLanguage.Language}} {{ctx.Locale.Tr "repo.language"}}
@@ -66,4 +63,4 @@ {{template "pages/footer" .}}
-{{template "base/footer" .}} +{{template "pages/base_footer" .}}