Make HTML5 validation green for the doc site

master
Kaushal Modi 8 years ago
parent 7d6fbf5c39
commit 0bce445b73
  1. 24
      doc/themes/hugo-alabaster-theme/layouts/_default/baseof.html
  2. 12
      doc/themes/hugo-alabaster-theme/layouts/partials/footer.html
  3. 41
      doc/themes/hugo-alabaster-theme/layouts/partials/head.html
  4. 44
      doc/themes/hugo-alabaster-theme/layouts/partials/sidebar/buttons.html
  5. 10
      doc/themes/hugo-alabaster-theme/layouts/partials/sidebar/sidebar.html
  6. 33
      doc/themes/hugo-alabaster-theme/layouts/shortcodes/figure.html
  7. 6
      doc/themes/hugo-alabaster-theme/static/css/alabaster.css

@ -1,18 +1,16 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
{{ partial "head" . }}
<body role="document">
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="body">
{{ block "main" . }}{{ end }}
{{ if not .IsHome -}}
{{ template "_internal/disqus.html" . }}
{{- end }}
{{ end }}
</div>
</div>
</div>
@ -22,14 +20,14 @@
{{ range .Site.Params.custom_js -}}
<script src="{{ . | relURL }}"></script>
{{- end }}
{{ end }}
{{ with .Site.Params.highlightjs -}}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.3.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
{{ end }}
{{ with .Site.Params.highlightjs -}}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.3.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
{{ end }}
{{ template "_internal/google_analytics.html" . }}
{{ template "_internal/google_analytics.html" . }}
</div>
</body>
</html>

@ -1,5 +1,5 @@
<div class="footer">
{{ if .Site.Params.footer.show_powered_by -}}
{{ if .Site.Params.footer.show_powered_by }}
Exported from <a href="https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master/doc/ox-hugo-manual.org"><code>ox-hugo-manual.org</code></a>
using
{{ with .Params.creator }}
@ -12,8 +12,8 @@
{{ end }}
</div>
{{ if .Site.Params.github_banner -}}
<a href="https://github.com/{{ .Site.Params.github_user }}/{{ .Site.Params.github_repo }}" class="github">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" class="github"/>
</a>
{{- end }}
{{ if .Site.Params.github_banner }}
<a href="https://github.com/{{ .Site.Params.github_user }}/{{ .Site.Params.github_repo }}" class="github">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" class="github"/>
</a>
{{ end }}

@ -1,34 +1,41 @@
<head {{ with .Site.LanguageCode }}lang="{{ . }}"{{ end }}>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
{{- with .Site.Params.description -}}
<meta name="description" content="{{ . }}">
{{- end -}}
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta charset="utf-8">
<!-- Above is a short hand for the below line. -->
<!-- http://htmldog.com/guides/html/intermediate/metatags/ -->
<!-- <meta http-equiv="content-type" content="text/html; charset=utf-8"> -->
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5">
{{ with .Site.Params.description }}
<meta name="description" content="{{ . }}">
{{ end }}
{{ .Hugo.Generator }}
<title>{{ if not .IsHome }}{{ .Title }} &mdash;{{ end }} {{ .Site.Title }}</title>
<link rel="stylesheet" href="{{ "css/basic.css" | relURL }}" type="text/css" />
<link rel="stylesheet" href="{{ "css/alabaster.css" | relURL }}" type="text/css" />
{{ with .Site.Params.highlightjs -}}
{{ with .Site.Params.highlightjs }}
<link rel="stylesheet" href="{{ . | relURL }}" type="text/css" />
{{- end }}
{{ end }}
{{ range .Site.Params.custom_css -}}
{{ range .Site.Params.custom_css }}
<link rel="stylesheet" href="{{ . | relURL }}">
{{- end }}
{{ end }}
{{ range .Site.Params.custom_css_absolute -}}
{{ range .Site.Params.custom_css_absolute }}
<link rel="stylesheet" href="{{ . }}">
{{- end }}
{{ end }}
{{ with .Site.Params.favicon -}}
{{ with .Site.Params.favicon }}
<link rel="shortcut icon" href="{{ . | relURL }}" type="image/x-icon"/>
{{- else -}}
{{ else }}
<link rel="shortcut icon" href="{{ "favicon.ico" | relURL }}" type="image/x-icon"/>
{{- end }}
{{ end }}
{{ with .Params.mathjax -}}
{{ with .Params.mathjax }}
{{ partial "mathjax.html" }}
{{- end }}
{{ end }}
</head>

@ -1,32 +1,26 @@
{{ if .Site.Params.github_user | and .Site.Params.github_repo -}}
{{ $path := printf "%s/%s" .Site.Params.github_user .Site.Params.github_repo }}
{{ if .Site.Params.github_user | and .Site.Params.github_repo }}
{{ $path := printf "%s/%s" .Site.Params.github_user .Site.Params.github_repo }}
{{ if .Site.Params.sidebar.github_button -}}
<p>
<iframe src="https://ghbtns.com/github-btn.html?user={{ .Site.Params.github_user }}&repo={{ .Site.Params.github_repo }}&type=watch&count=true&size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
</p>
{{- end }}
{{ if .Site.Params.sidebar.github_button }}
<iframe src="https://ghbtns.com/github-btn.html?user={{ .Site.Params.github_user }}&repo={{ .Site.Params.github_repo }}&type=watch&count=true&size=large"
style="border: 0; overflow: hidden;" width="200" height="35"></iframe>
{{ end }}
{{ if .Site.Params.sidebar.travis_button -}}
{{ if .Site.Params.sidebar.travis_button }}
<p>
<a href="https://travis-ci.org/{{ $path }}">
<img
alt="https://secure.travis-ci.org/{{ $path }}.svg?branch=master"
src="https://secure.travis-ci.org/{{ $path }}.svg?branch=master"
/>
</a>
<a href="https://travis-ci.org/{{ $path }}">
<img alt="https://secure.travis-ci.org/{{ $path }}.svg?branch=master"
src="https://secure.travis-ci.org/{{ $path }}.svg?branch=master" />
</a>
</p>
{{- end }}
{{ end }}
{{ if .Site.Params.sidebar.codecov_button -}}
{{ if .Site.Params.sidebar.codecov_button }}
<p>
<a href="https://codecov.io/github/{{ $path }}">
<img
alt="https://codecov.io/github/{{ $path }}/coverage.svg?branch=master"
src="https://codecov.io/github/{{ $path }}/coverage.svg?branch=master"
/>
</a>
<a href="https://codecov.io/github/{{ $path }}">
<img alt="https://codecov.io/github/{{ $path }}/coverage.svg?branch=master"
src="https://codecov.io/github/{{ $path }}/coverage.svg?branch=master" />
</a>
</p>
{{- end }}
{{- end }}
{{ end }}
{{ end }}

@ -1,17 +1,18 @@
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo">
<a href="/">
<a href="{{ .Site.BaseURL }}">
{{ with .Site.Params.sidebar.logo -}}
<img class="logo" src="{{ . | relURL }}" alt="Logo"/>
{{- end }}
<h1 class="logo logo-name">{{ .Site.Params.name }}</h1>
{{ end }}
<br />
<span class="logo logo-name">{{ .Site.Params.name }}</span>
</a>
</p>
{{ with .Site.Params.description -}}
<p class="blurb">{{ . | markdownify }}</p>
{{- end }}
{{ end }}
{{ partial "sidebar/buttons" . }}
{{ partial "sidebar/donate" . }}
@ -20,4 +21,3 @@
</div>
</div>
<div class="clearer"></div>
</div>

@ -0,0 +1,33 @@
<!-- image -->
<!-- https://github.com/gohugoio/hugo/issues/4406 -->
<!-- https://github.com/gohugoio/hugo/issues/4441 -->
<figure{{ with .Get "class" }} class="{{ . }}"{{ end }}>
{{ if .Get "link"}}<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>{{ end }}
<img src="{{ .Get "src" }}"
alt="{{ if (or (.Get "alt") (.Get "caption")) }}
{{ with .Get "alt"}}
{{- . -}}
{{else}}
{{- .Get "caption" | markdownify | plainify -}}
{{ end }}
{{ else }}
{{- .Get "src" -}}
{{ end }}"
{{- with .Get "width" }}width="{{ . }}" {{ end -}}
{{- with .Get "height" }}height="{{ . }}" {{ end -}}/>
{{ if .Get "link"}}</a>{{ end }}
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
<figcaption>
{{ if isset .Params "title" }}
<h4>{{ .Get "title" }}</h4>
{{ end }}
{{ if (or (.Get "caption") (.Get "attr")) }}<p>
{{ .Get "caption" | markdownify }}
{{ with .Get "attrlink"}}<a href="{{ . }}"> {{ end }}
{{ .Get "attr" | markdownify }}
{{ if .Get "attrlink"}}</a> {{ end }}</p>
{{ end }}
</figcaption>
{{ end }}
</figure>
<!-- image -->

@ -84,15 +84,17 @@ div.sphinxsidebarwrapper p.logo {
text-align: center;
}
div.sphinxsidebarwrapper h1.logo {
div.sphinxsidebarwrapper span.logo {
margin-top: -10px;
text-align: center;
margin-bottom: 5px;
text-align: center;
}
div.sphinxsidebarwrapper h1.logo-name {
div.sphinxsidebarwrapper span.logo-name {
margin-top: 0px;
font-size: 2em;
font-weight: bold;
}
div.sphinxsidebarwrapper p.blurb {

Loading…
Cancel
Save