Add links to languages and collapsible navigation

This commit is contained in:
Eugen Rochko 2018-10-06 02:23:56 +02:00
parent b8e793f6b7
commit 50f87589cb
10 changed files with 58 additions and 23 deletions

View file

@ -1,13 +1,17 @@
{{ define "title"}} Mastodon documentation {{end}}
{{ define "main" }}
<h1>Mastodon documentation</h1>
<h1>{{ .Title }}</h1>
<div class="e-content">
<p>Welcome to the Mastodon documentation!</p>
{{.Content}}
<p>Mastodon is a <strong>free, open-source social network server</strong> based on <strong>open web protocols</strong> like ActivityPub and OStatus. The social focus of the project is a viable decentralized alternative to commercial social media silos that returns the control of the content distribution channels to the people. The technical focus of the project is a good user interface, a clean REST API for 3rd party apps and robust anti-abuse tools.</p>
<p><i class="fas fa-language"></i> <strong>Available languages:</strong></p>
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/IPSbNdBmWKE" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<ul>
{{ range $.Site.Home.AllTranslations }}
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}

View file

@ -12,3 +12,5 @@
<p class="legal"><a href='https://source.joinmastodon.org/mastodon/docs/tree/master/content/{{.Lang}}/{{.File.Path}}'>View source</a> · <a href='https://creativecommons.org/licenses/by-sa/4.0/'>CC BY-SA 4.0</a> · <a href='https://joinmastodon.org/imprint'>Imprint</a></p>
</footer>
<script async src="/site.js"></script>

View file

@ -8,15 +8,15 @@
<ul>
{{ $currentPage := . }}
{{ range .Site.Menus.docs }}
{{ range .Site.Menus.docs.ByWeight }}
{{ if .HasChildren }}
<li>
<a href="#" class="{{ if $currentPage.HasMenuCurrent "docs" . }}active{{ end }}">
<a href="javascript:void(0)" class="menu-item{{ if $currentPage.HasMenuCurrent "docs" . }} active{{ end }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
<ul class="sub-menu">
<ul class="sub-menu{{ if $currentPage.HasMenuCurrent "docs" . }}{{else}} collapsed{{ end }}">
{{ range .Children }}
<li>
<a href="{{ .URL }}" class="{{ if $currentPage.IsMenuCurrent "docs" . }}active{{ end }}">{{ .Name }}</a>