mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
More doc site improvements. Added documentation's new layout
This commit is contained in:
0
docs/layouts/_default/list.html
Normal file
0
docs/layouts/_default/list.html
Normal file
@@ -1,9 +1,3 @@
|
||||
{{ template "chrome/header.html" . }}
|
||||
{{ if not .Params.notoc }}
|
||||
<div id="toc" class="well col-md-4 col-sm-6">
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ template "chrome/footer.html" . }}
|
||||
{{ template "partials/header.html" . }}
|
||||
{{ .Content }}
|
||||
{{ template "partials/footer.html" . }}
|
||||
|
@@ -1,32 +0,0 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<hr>
|
||||
<footer id="footer">
|
||||
<p class="pull-right"><a href="#top">Back to top</a></p>
|
||||
Made by <a href="http://spf13.com">Steve Francia</a>.<br>
|
||||
Code licensed under the <a href="https://github.com/spf13/hugo/blob/master/LICENSE.md">Simple Public License 2.0</a>.<br>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/static/js/jquery.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("nav#TableOfContents a").click(function() {
|
||||
$("html, body").animate({
|
||||
scrollTop: $($(this).attr("href")).offset().top-25 + "px"
|
||||
}, {
|
||||
duration: 450,
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{ template "chrome/analytics.html" . }}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
@@ -1,17 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ .Title }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
||||
{{ template "chrome/includes.html" . }}
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{{ template "chrome/menu.html" . }}
|
||||
|
||||
<div class="container" id="main">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
@@ -1,8 +0,0 @@
|
||||
<link href="/static/css/bootstrap.min.css" rel="stylesheet"/>
|
||||
<link href="/static/css/styles.css" rel="stylesheet"/>
|
||||
<link href="/static/css/hugofont.css" rel="stylesheet"/>
|
||||
<link href='http://fonts.googleapis.com/css?family=Arbutus+Slab&family=Cabin:600&family=Source+Code+Pro' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="/static/css/monokai_sublime.css">
|
||||
<script src="/static/js/instantclick.min.js"></script>
|
||||
<script src="/static/js/highlight.pack.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
@@ -1,55 +0,0 @@
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/"><i class="icon-hugo_serif" alt="hugo"></i></a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse navbar-ex1-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
{{ $currentNode := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if .HasChildren }}
|
||||
<li class="dropdown{{if $currentNode.HasMenuCurrent "main" . }} active{{end}}">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{.Name}} <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
{{ range .Children }}
|
||||
<li{{if $currentNode.IsMenuCurrent "main" . }} class="active"{{end}}><a href="{{.Url}}"> {{ .Name }} </a> </li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{else}}
|
||||
<li>
|
||||
<a href="{{.Url}}"> {{ .Name }} </a>
|
||||
{{end}}
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ $currentNode := . }}
|
||||
{{ $menu := "right"}}
|
||||
{{ range .Site.Menus.right }}
|
||||
{{ if .HasChildren }}
|
||||
<li class="dropdown{{if $currentNode.HasMenuCurrent $menu . }} active-child{{end}}">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{.Name}} <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
{{ range .Children }}
|
||||
<li{{if $currentNode.IsMenuCurrent $menu . }} class="active"{{end}}><a href="{{.Url}}"> {{ .Name }} </a> </li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{else}}
|
||||
<li>
|
||||
<a href="{{.Url}}"> {{ .Name }} </a>
|
||||
{{end}}
|
||||
</li>
|
||||
{{end}}
|
||||
<li><a href="http://github.com/spf13/hugo/releases"><i class="icon-arrow-down "> </i></a></li>
|
||||
<li><a href="http://github.com/spf13/hugo"><i class="icon-octocat icon-2x"> </i></a></li>
|
||||
</ul>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</nav>
|
@@ -190,10 +190,10 @@
|
||||
<i class="point-icon icon-spf13"></i>
|
||||
<h2>Built with <i class="icon-heart" style="color:#FF4088;"></i></h2>
|
||||
<p class="lead">
|
||||
Hugo is developed with love by <a href="http://spf13.com">spf13</a>, <a href="http://github.com/noahcampbell">Noah</a> and friends.
|
||||
Hugo is developed with love by <a href="http://spf13.com">spf13</a> and friends.
|
||||
We welcome all contributions.
|
||||
New to go? Not a problem, we will help you.
|
||||
Not a developer? Help with <a href="/overview/introduction">docs</a>, templates and themes.
|
||||
Not a developer? Help with <a href="/overview/introduction">docs</a>, testing and <a href="http://github.com/spf13/hugoThemes/">themes</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -258,7 +258,7 @@
|
||||
$('.carousel').carousel({ interval: 4500 })
|
||||
</script>
|
||||
|
||||
{{ template "chrome/analytics.html" . }}
|
||||
{{ template "partials/analytics.html" . }}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@@ -1,14 +0,0 @@
|
||||
{{ template "chrome/header.html" . }}
|
||||
<section id="main">
|
||||
<div>
|
||||
<h1 id="title">Showcase</h1>
|
||||
<div class="row">
|
||||
{{ range .Data.Pages.ByDate }}
|
||||
{{ .Render "thumbnail"}}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
If you want to be added to this page please send a <a href="https://github.com/spf13/hugo/pulls">pull request</a>.
|
||||
</section>
|
||||
{{ template "chrome/footer.html" . }}
|
31
docs/layouts/partials/footer.html
Normal file
31
docs/layouts/partials/footer.html
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
{{ with .GetParam "next" }}
|
||||
<a class="navigation next" href="{{.}}">
|
||||
<i class="fa fa-angle-right"> </i>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- page start-->
|
||||
</section>
|
||||
</section>
|
||||
<!--main content end-->
|
||||
</section>
|
||||
<!-- container section end -->
|
||||
<!-- javascripts -->
|
||||
<script src="/js/jquery.js"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
<script src="/js/jquery.scrollTo.min.js"></script>
|
||||
<script src="/js/jquery.nicescroll.js" type="text/javascript"></script>
|
||||
<!--custom script for all page-->
|
||||
<script src="/static/js/highlight.pack.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
<script src="/js/scripts.js"></script>
|
||||
<script async defer id="github-bjs" src="/js/buttons.js"></script>
|
||||
{{ template "partials/analytics.html" . }}
|
||||
</body>
|
||||
</html>
|
88
docs/layouts/partials/header.html
Normal file
88
docs/layouts/partials/header.html
Normal file
@@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<meta name="keyword" content="">
|
||||
<link rel="shortcut icon" href="img/favicon.png">
|
||||
|
||||
<title>{{.Title}}</title>
|
||||
|
||||
<link href="/css/bootstrap-theme.css" rel="stylesheet">
|
||||
<link href="/css/elegant-icons-style.css" rel="stylesheet" />
|
||||
<link href="/assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
|
||||
<link href="/css/style.css" rel="stylesheet">
|
||||
<link href="/css/style-responsive.css" rel="stylesheet" />
|
||||
<link href="/css/monokai_sublime.css" rel="stylesheet" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- container section start -->
|
||||
<section id="container" class="">
|
||||
|
||||
<!--header start-->
|
||||
<header class="header black-bg">
|
||||
<div class="toggle-nav">
|
||||
<i class="fa fa-bars"></i>
|
||||
<div class="icon-reorder tooltips" data-original-title="Toggle Navigation" data-placement="bottom"></div>
|
||||
</div>
|
||||
|
||||
<!--logo start-->
|
||||
<a href="/" class="logo"><img src="/img/hugo-logo.png" style="height:40px;"></a>
|
||||
<!--logo end-->
|
||||
<div class="top-nav notification-row">
|
||||
<!-- notification dropdown end-->
|
||||
<div class="hidden-xs nav-github pull-right">
|
||||
|
||||
<span rel="show-github" data-user="spf13" data-repo="hugo" data-type="follow"></span>
|
||||
<span rel="show-github" data-user="spf13" data-repo="hugo"></span>
|
||||
<span rel="show-github" data-user="spf13" data-repo="hugo" data-type="fork"></span>
|
||||
<!--<span rel="show-github" data-user="spf13" data-repo="hugo"><span class="github-btn github-watchers"><a class="btn btn-xs btn-default" href="https://github.com/spf13/hugo/" target="_blank"><i class="fa fa-github"></i> <span class="gh-text">Star</span></a><a class="gh-count" href="https://github.com/spf13/hugo/stargazers" target="_blank" style="display: inline-block;">2,144</a></span></span>-->
|
||||
<!--<span rel="show-github" data-user="spf13" data-repo="hugo" data-type="fork"><span class="github-btn github-forks"><a class="btn btn-xs btn-default" href="https://github.com/spf13/hugo/" target="_blank"><i class="fa fa-github"></i> <span class="gh-text">Fork</span></a><a class="gh-count" href="https://github.com/spf13/hugo/network" target="_blank" style="display: inline-block;">582</a></span></span>-->
|
||||
<!--<a href="https://github.com/spf13" class="github-button" data-count-href="/spf13/followers" data-count-api="/users/spf13#followers">@spf13</a> -->
|
||||
<!--<a href="https://github.com/spf13/hugo" class="github-button" data-icon="octicon-star" data-count-href="/spf13/hugo/stargazers" data-count-api="/repos/spf13/hugo#stargazers_count">Star</a> -->
|
||||
<!--<a href="https://github.com/spf13/hugo" class="github-button" data-icon="octicon-git-branch-create" data-count-href="/spf13/hugo/network" data-count-api="/repos/spf13/hugo#forks_count">Fork</a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="nav title-row" id="top_menu">
|
||||
<h1 class="nav top-menu"> {{.Title}} </h1>
|
||||
</div>
|
||||
</header>
|
||||
<!--header end-->
|
||||
|
||||
{{ template "partials/menu.html" . }}
|
||||
|
||||
<!--main content start-->
|
||||
<section id="main-content">
|
||||
<section class="wrapper">
|
||||
|
||||
<!--<div class="row">-->
|
||||
<!--<div class="col-lg-12">-->
|
||||
<!--breadcrumbs start -->
|
||||
<!--<ul class="breadcrumb">-->
|
||||
<!--<li><a href="#"><i class="icon_house_alt"></i> Home</a></li>-->
|
||||
<!--<li><a href="#"> UI Kit</a></li>-->
|
||||
<!--<li class="active"> General</li>-->
|
||||
<!--</ul>-->
|
||||
<!--breadcrumbs end -->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
{{ with .GetParam "prev" }}
|
||||
<a class="navigation prev" href="{{.}}">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<section class="panel">
|
||||
<!--<header class="panel-heading">-->
|
||||
<!--<h3>{{.Title}}</h3>-->
|
||||
<!--</header>-->
|
||||
<div class="panel-body">
|
38
docs/layouts/partials/menu.html
Normal file
38
docs/layouts/partials/menu.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!--sidebar start-->
|
||||
<aside>
|
||||
<div id="sidebar" class="nav-collapse ">
|
||||
<!-- sidebar menu start-->
|
||||
<ul class="sidebar-menu">
|
||||
{{ $currentNode := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if .HasChildren }}
|
||||
|
||||
<li class="sub-menu{{if $currentNode.HasMenuCurrent "main" . }} active{{end}}">
|
||||
<a href="javascript:;" class="">
|
||||
{{ .Pre }}
|
||||
<!--<i class="icon_desktop"></i>-->
|
||||
<span>{{ .Name }}</span>
|
||||
<span class="menu-arrow arrow_carrot-right"></span>
|
||||
</a>
|
||||
<ul class="sub">
|
||||
{{ range .Children }}
|
||||
<li{{if $currentNode.IsMenuCurrent "main" . }} class="active"{{end}}><a href="{{.Url}}"> {{ .Name }} </a> </li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{else}}
|
||||
<li>
|
||||
<a class="" href="{{.Url}}">
|
||||
{{ .Pre }}
|
||||
<!--<i class="icon_house_alt"></i>-->
|
||||
<span>{{ .Name }}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
</li>
|
||||
{{end}}
|
||||
<li> <a href="https://github.com/spf13/hugo/issues" target="blank"><i class='fa fa-life-ring'></i>Issues & Help</a> </li>
|
||||
{{ $File := .File }} {{with .File.FileName }}<li><a href="https://github.com/spf13/hugo/edit/master/docs/content/{{ $File.Dir }}{{ $File.FileName }}" target="blank"><i class='fa fa-edit'></i> Refine this Page</a> </li>{{end}}
|
||||
</ul>
|
||||
<!-- sidebar menu end-->
|
||||
</div>
|
||||
</aside>
|
||||
<!--sidebar end-->
|
Reference in New Issue
Block a user