mirror of https://gitea.com/gitea/theme.git
Added basic templates
This commit is contained in:
parent
48fcd34fa0
commit
1e8922c0ef
|
@ -1,7 +0,0 @@
|
|||
{{ partial "header" . }}
|
||||
|
||||
<h1>
|
||||
Page not found
|
||||
</h1>
|
||||
|
||||
{{ partial "footer" . }}
|
|
@ -1,3 +1,12 @@
|
|||
{{ partial "header" . }}
|
||||
{{ .Content }}
|
||||
{{ partial "footer" . }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ partial "navbar.html" . }}
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
{{ partial "header.html" . }}
|
||||
{{ partial "navbar.html" . }}
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3 col-sm-4 sidebar-offcanvas" id="sidebar">
|
||||
{{ partial "menu" . }}
|
||||
</div>
|
||||
<div class="col-lg-9 col-md-9 col-sm-8">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
|
@ -1,7 +1,17 @@
|
|||
{{ partial "header" . }}
|
||||
{{ partial "navbar" . }}
|
||||
|
||||
{{ range where .Site.Pages "Type" "index" }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3 col-sm-4 sidebar-offcanvas" id="sidebar">
|
||||
{{ partial "menu" . }}
|
||||
</div>
|
||||
<div class="col-lg-9 col-md-9 col-sm-8">
|
||||
{{ range where .Site.Pages "Type" "index" }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ partial "footer" . }}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
{{ partial "header.html" . }}
|
||||
{{ partial "navbar.html" . }}
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3 col-sm-4 sidebar-offcanvas" id="sidebar">
|
||||
{{ partial "menu" . }}
|
||||
</div>
|
||||
<div class="col-lg-9 col-md-9 col-sm-8">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
|
@ -1,2 +1,22 @@
|
|||
</body>
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 copy">
|
||||
<p>
|
||||
Copyright © 2016 <a href="{{ .Site.Params.Website }}">{{ .Site.Params.Author }}</a>. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6 love">
|
||||
<p>
|
||||
Made with <i class="fa fa-heart" aria-hidden="true"></i> and Hugo
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="scripts/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,23 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
|
||||
{{ .Hugo.Generator }}
|
||||
<head>
|
||||
<title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
|
||||
{{ .Hugo.Generator }}
|
||||
|
||||
{{ with .Params.goimport }}
|
||||
<meta name="go-import" content="{{ . }}">
|
||||
{{ end }}
|
||||
{{ with .Params.goimport }}
|
||||
<meta name="go-import" content="{{ . }}">
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.gosource }}
|
||||
<meta name="go-source" content="{{ . }}">
|
||||
{{ end }}
|
||||
{{ with .Params.gosource }}
|
||||
<meta name="go-source" content="{{ . }}">
|
||||
{{ end }}
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png">
|
||||
<link rel="icon" type="image/x-icon" href="images/favicon.png">
|
||||
<base href="{{ .Site.BaseURL }}">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
<link rel="stylesheet" href="styles/main.css">
|
||||
<script type="text/javascript" src="scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "navbar" . }}
|
||||
{{ with .RSSLink }}
|
||||
<link href="{{ . }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
<link href="{{ . }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png">
|
||||
<link rel="icon" type="image/x-icon" href="images/favicon.png">
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap-theme.min.css" />
|
||||
<link rel="stylesheet" href="styles/main.css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
{{ partial "pages.html" . }}
|
||||
{{ partial "toc.html" . }}
|
|
@ -1 +1,20 @@
|
|||
{{ partial "menu" . }}
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">{{ i18n "navbar_menu" }}</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
|
||||
<a class="navbar-brand" href="{{ .Site.BaseURL }}">
|
||||
{{ partial "title.html" . }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
{{ partial "toplinks.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<section>
|
||||
<ul>
|
||||
{{ $currentNode := . }}{{ range .Site.Menus.sidebar.ByWeight }}
|
||||
<li class="{{ if $currentNode.IsMenuCurrent "sidebar" . }}active{{ end }}">
|
||||
<a href="{{ .URL }}">
|
||||
{{ .Pre }}
|
||||
{{ .Name }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
|
@ -0,0 +1 @@
|
|||
<img src="images/gitea.png" alt="{{ .Site.Title }}">
|
|
@ -0,0 +1,5 @@
|
|||
{{ if .Params.toc }}
|
||||
<section>
|
||||
{{ .TableOfContents }}
|
||||
</section>
|
||||
{{ end }}
|
|
@ -0,0 +1,38 @@
|
|||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="{{ if eq .Site.Params.Toplink "website" }}active{{ end }}">
|
||||
<a href="https://gitea.io">
|
||||
<i class="fa fa-home"></i>
|
||||
{{ i18n "toplink_website" }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ if eq .Site.Params.Toplink "blog" }}active{{ end }}">
|
||||
<a href="https://blog.gitea.io">
|
||||
<i class="fa fa-rss"></i>
|
||||
{{ i18n "toplink_blog" }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ if eq .Site.Params.Toplink "docs" }}active{{ end }}">
|
||||
<a href="https://docs.gitea.io">
|
||||
<i class="fa fa-question"></i>
|
||||
{{ i18n "toplink_docs" }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{ if eq .Site.Params.Toplink "redirects" }}active{{ end }}">
|
||||
<a href="https://code.gitea.io">
|
||||
<i class="fa fa-code"></i>
|
||||
{{ i18n "toplink_code" }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://dl.gitea.io">
|
||||
<i class="fa fa-download"></i>
|
||||
{{ i18n "toplink_downloads" }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/go-gitea" target="_blank">
|
||||
<i class="fa fa-github"></i>
|
||||
{{ i18n "toplink_github" }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
|
@ -0,0 +1,50 @@
|
|||
{{ partial "header.html" . }}
|
||||
{{ partial "navbar.html" . }}
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}{{ range $paginator.Pages }}
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</h2>
|
||||
<p>
|
||||
<i>{{ .Date.Format "Mon Jan 2, 2006" }}</i>
|
||||
{{ i18n "authored_by" }}
|
||||
<b>{{ .Params.author | default .Site.Params.author }}</b>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
{{ .Summary }}
|
||||
|
||||
<a href="{{ .Permalink }}">
|
||||
{{ i18n "read_more" }}
|
||||
</a>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
<div>
|
||||
{{ if and (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
<a class="btn" href="{{ .Paginator.Prev.URL }}" role="button">{{ i18n "page_prev" }}</a>
|
||||
<a class="btn" href="{{ .Paginator.Next.URL }}" role="button">{{ i18n "page_next" }}</a>
|
||||
{{ end }}
|
||||
{{ if and (.Paginator.HasPrev) (not .Paginator.HasNext) }}
|
||||
<a class="btn" href="{{ .Paginator.Prev.URL }}" role="button">{{ i18n "page_prev" }}</a>
|
||||
<a class="btn disabled" href="#" role="button" aria-disabled="true">{{ i18n "page_next" }}</a>
|
||||
{{ end }}
|
||||
{{ if and (not .Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||
<a class="btn disabled" href="#" role="button" aria-disabled="true">{{ i18n "page_prev" }}</a>
|
||||
<a class="btn" href="{{ .Paginator.Next.URL }}" role="button">{{ i18n "page_next" }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
|
@ -0,0 +1,27 @@
|
|||
{{ partial "header.html" . }}
|
||||
{{ partial "navbar.html" . }}
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</h2>
|
||||
<p>
|
||||
<i>{{ .Date.Format "Mon Jan 2, 2006" }}</i>
|
||||
{{ i18n "authored_by" }}
|
||||
<b>{{ .Params.author | default .Site.Params.author }}</b>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
Loading…
Reference in New Issue