feat: split partials to have better generecity + added index.html sample page

This commit is contained in:
Mathieu Cornic 2016-03-17 21:40:58 +01:00
parent e1aae4a2cc
commit b644f0eb7e
9 changed files with 58 additions and 63 deletions

View file

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en" class="js csstransforms3d">
<head>
<meta charset="utf-8">
{{ partial "meta.html" . }}
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" />
{{ .Scratch.Add "title" "" }}{{ if isset .Site.Data.titles .Title }}{{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }}{{ else }}{{ .Scratch.Set "title" .Title}}{{end}}
<title>{{ .Scratch.Get "title" }}</title>
{{ partial "head_includes.html" . }}
<style type="text/css">
:root #header + #content > #left > #rlblock_left {display:none !important;}
</style>
</head>
<body>
<body class="" data-url="/">
<section id="body" style="margin-left:0px;">
<div id="overlay"></div>
<div class="padding highlightable">
<h1>Customize your own home page</h1>
<p style="text-align: center">
The site is working but you should overwrite this index.html with your own.
If you want to redirect You may want to redirect to the first document page.
</p>
</div>
</section>
</body>
</html>

View file

@ -14,16 +14,6 @@
<div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
<div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
</div>
<script src="/js/jquery-2.x.min.js"></script>
<script src="/js/clipboard.min.js"></script>
<script src="/js/jquery.scrollbar.min.js"></script>
<script src="/js/featherlight.min.js"></script>
<script src="/js/html5shiv-printshiv.min.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="/js/modernizr.custom.71422.js"></script>
<script src="/js/learn.js"></script>
<script src="/js/hugo-learn.js"></script>
{{ partial "script_includes.html" . }}
</body>
</html>

View file

@ -0,0 +1,8 @@
<link href="/css/nucleus.css" rel="stylesheet">
<link href="/css/font-awesome.min.css" rel="stylesheet">
<link href="/css/hybrid.css" rel="stylesheet">
<link href="/css/featherlight.min.css" rel="stylesheet">
<link href="/css/theme.css" rel="stylesheet">
<link href="/css/hugo-theme.css" rel="stylesheet">
<style type="text/css">:root #header + #content > #left > #rlblock_left
{display:none !important;}</style>

View file

@ -1,27 +1,14 @@
<!DOCTYPE html>
<html lang="en" class="js csstransforms3d">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ .Hugo.Generator }}
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
{{ .Scratch.Add "title" "" }}{{ if isset .Site.Data.titles .Title }}{{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }}{{ else }}{{ .Scratch.Set "title" .Title}}{{end}}
<title>Hugo - {{ .Scratch.Get "title" }}</title>
<link href="/css/nucleus.css" rel="stylesheet">
<link href="/css/font-awesome.min.css" rel="stylesheet">
<link href="/css/hybrid.css" rel="stylesheet">
<link href="/css/featherlight.min.css" rel="stylesheet">
<link href="/css/theme.css" rel="stylesheet">
<link href="/css/hugo-theme.css" rel="stylesheet">
<style type="text/css">:root #header + #content > #left > #rlblock_left
{display:none !important;}</style>
{{ partial "meta.html" . }}
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" />
{{ .Scratch.Add "title" "" }}{{ if isset .Site.Data.titles .Title }}{{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }}{{ else }}{{ .Scratch.Set "title" .Title}}{{end}}
<title>{{ .Scratch.Get "title" }}</title>
{{ partial "head_includes.html" . }}
</head>
<body class="" data-url="/">
{{ partial "menu.html" . }}
<section id="body">
<div id="overlay"></div>

View file

@ -0,0 +1,5 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ .Hugo.Generator }}

View file

@ -0,0 +1,10 @@
<script src="/js/jquery-2.x.min.js"></script>
<script src="/js/clipboard.min.js"></script>
<script src="/js/jquery.scrollbar.min.js"></script>
<script src="/js/featherlight.min.js"></script>
<script src="/js/html5shiv-printshiv.min.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="/js/modernizr.custom.71422.js"></script>
<script src="/js/learn.js"></script>
<script src="/js/hugo-learn.js"></script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -62,37 +62,3 @@ $('#toc-menu').hover(function() {
$('.progress').hover(function() {
$('.progress').stop(true, false, true).fadeToggle(300);
});
// Calculate each progress section
/*
$(window).scroll(function (){
$("#body-inner h2").each(function(i){
//console.log($(this));
var this_top = $(this).offset().top;
var height = $(this).height();
var this_bottom = this_top + height;
var percent = 0;
// Scrolled within current section
if (top >= this_top && top <= this_bottom) {
percent = ((top - this_top) / (height - wrapper_height)) * 100;
if (percent >= 100) {
percent = 100;
//$(".progress .wrapper .bar:eq("+i+") i").css("color", "#fff");
console.log("aaa");
}
else {
//$(".progress .wrapper .bar:eq("+i+") i").css("color", "#36a7f3");
console.log("bb");
}
}
else if (top > this_bottom) {
percent = 100;
//$(".progress .wrapper .bar:eq("+i+") i").css("color", "#fff");
console.log("ccc");
}
//console.log(i);
//$(".progress .wrapper .bar:eq("+i+") span").css("width", percent + "%");
//console.log("ddd");
});
});*/