Skip to content
Permalink
Browse files

Commit /resources/ directory generated by hugo pipes, fix theme demo (#…

  • Loading branch information...
laozhu committed Nov 8, 2018
1 parent 26d0efa commit 54b585b9794fa4738eb3c42adfb4e20e7aeb548b
@@ -31,10 +31,6 @@ const randomErrorEmoji = () => {
};
randomErrorEmoji();

// Object-fit polyfill for post cover
/* eslint-disable no-undef */
objectFitImages('img.post-cover');

// Show toTopBtn when scroll to 600px
/* eslint-disable no-undef */
let lastPosition = 0;

This file was deleted.

@@ -3,3 +3,5 @@ title: "Resume"
date: 2017-12-01
layout: "resume"
---

This is my resume.
@@ -1,31 +1,29 @@
{{ define "main" }}
{{ partial "header.html" . }}
<section class="main post-list">
<header class="list-header offscreen">
<h2 class="list-label">All Posts</h2>
</header>
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") (index .Site.Params "paginate" | default 10) }}
{{ if ne $paginator.TotalPages 0 }}
{{ range $paginator.Pages.ByDate.Reverse }}
{{ .Render "summary" }}
{{ define "main" }} {{ partial "header.html" . }}
<section class="main post-list">
<header class="list-header offscreen">
<h2 class="list-label">All Posts</h2>
</header>
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") (index .Site.Params "paginate" | default 10) }}
{{ if ne $paginator.TotalPages 0 }}
{{ range $paginator.Pages.ByDate.Reverse }} {{ .Render "summary" }} {{ end }}
{{ else }}
<p>There's nothing here.<br />Create an interesting post with the command:</p>
<p><code>$ hugo new post/hello-world.md</code></p>
{{ end }} {{ if gt $paginator.TotalPages 1 }}
<footer class="list-footer">
<nav class="pagination">
<h3 class="offscreen">Pagination</h3>
{{ if $paginator.HasPrev }}
<a class="pagination-previous" href="{{ $paginator.Prev.URL }}"
>← Newer Posts</a
>
{{ end }} {{ if $paginator.HasNext }}
<a class="pagination-next" href="{{ $paginator.Next.URL }}"
>Older Posts →</a
>
{{ end }}
{{ else }}
<p>There's nothing here.<br>Create an interesting post with the command:</p>
<p><code>$ hugo new post/hello-world.md</code></p>
{{ end }}
{{ if gt $paginator.TotalPages 1 }}
<footer class="list-footer">
<nav class="pagination">
<h3 class="offscreen">Pagination</h3>
{{ if $paginator.HasPrev }}
<a class="pagination-previous" href="{{ $paginator.Prev.URL }}">← Newer Posts</a>
{{ end }}
{{ if $paginator.HasNext }}
<a class="pagination-next" href="{{ $paginator.Next.URL }}">Older Posts →</a>
{{ end }}
</nav>
</footer>
{{ end }}
</section>
{{ partial "footer.html" . }}
{{ end }}
</nav>
</footer>
{{ end }}
</section>
{{ partial "footer.html" . }} {{ end }}
@@ -8,8 +8,8 @@

<!-- Scripts -->
{{ if ne .Kind "home" }}
<script async src="//cdn.bootcss.com/video.js/6.2.8/alt/video.novtt.min.js"></script>
<script async src="//cdn.bootcss.com/mathjax/2.7.2/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script async src="///cdn.jsdelivr.net/npm/video.js@7.3.0/dist/video.min.js"></script>
<script async src="//cdn.jsdelivr.net/npm/mathjax@2.7.5/unpacked/MathJax.min.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
@@ -20,7 +20,7 @@
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
TeX: { equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.js", "AMSsymbols.js"] }
}
},
});
</script>
<script type="text/x-mathjax-config">
@@ -1,5 +1,8 @@
<div id="gitment-container"></div>
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
<link
rel="stylesheet"
href="https://imsun.github.io/gitment/style/default.css"
/>
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
<script>
(function() {
@@ -2,6 +2,9 @@
{{ $gohugoio := "gohugoio" }}
{{ $avatar := "/images/avatar.jpg" }}

<!-- DNS Prefetch -->
<link href="//cdn.jsdelivr.net" rel="dns-prefetch">

{{ if eq .Type "post" }}

<!-- Page Author & Description -->
@@ -93,8 +96,9 @@

<!-- Styles -->
{{ if ne .Kind "home" }}
<link rel="stylesheet" href="//cdn.bootcss.com/video.js/6.2.8/alt/video-js-cdn.min.css" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/video.js@7.3.0/dist/video-js.min.css" />
{{ end }}

{{ $options := (dict "targetPath" "styles/style.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
@@ -1,5 +1,5 @@
<header class="site-header">
<img class="avatar" src="{{ .Site.Params.avatar }}" alt="Avatar">
<img class="avatar" src="{{ "/images/avatar.jpg" | relURL }}" alt="Avatar">
{{ if eq .Kind "home" }}
<h1 class="title">{{ .Site.Title }}</h1>
{{ else }}
@@ -1,15 +1,13 @@
{{ `<!--[if lt IE 9]>
<script src="//cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<script src="//cdn.bootcss.com/video.js/6.2.8/ie8/videojs-ie8.min.js"></script>
<![endif]-->` | safeHTML }}
<!-- Polyfill for old browsers -->
{{ `<!--[if lte IE 8]>
<script src="//cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/videojs-ie8@1.1.2/dist/videojs-ie8.min.js"></script>
<![endif]-->` | safeHTML }}

{{ `<!--[if lte IE 11]>
<script src="//cdn.bootcss.com/classlist/1.1.20170427/classList.min.js"></script>
<![endif]-->` | safeHTML }}

<!-- IEdge 9-14, Android < 5, Safari < 10 -->
<script src="//cdn.bootcss.com/object-fit-images/3.2.3/ofi.min.js"></script>
{{ `<!--[if lte IE 9]>
<script src="//cdn.jsdelivr.net/npm/eligrey-classlist-js-polyfill@1.2.20180112/classList.min.js"></script>
<![endif]-->` | safeHTML }}

<!-- Smooth Scroll with closest & requestAnimationFrame Polyfills -->
<script src="//cdn.bootcss.com/smooth-scroll/12.1.4/js/smooth-scroll.polyfills.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/smooth-scroll@14.2.1/dist/smooth-scroll.polyfills.min.js"></script>
@@ -0,0 +1,4 @@
const html=document.querySelector('html');const body=document.querySelector('body');const menuToggle=document.querySelector('.menu-toggle');const menuIcon=document.querySelector('.icon-menu');const siteMenu=document.querySelector('.site-menu');const socialMenu=document.querySelector('.social-menu');const toTopBtn=document.querySelector('.to-top');if(menuToggle){menuToggle.addEventListener('click',()=>{siteMenu.classList.toggle('collapsed');socialMenu.classList.toggle('collapsed');menuIcon.classList.toggle('icon-menu');menuIcon.classList.toggle('icon-close');});}
const randomErrorEmoji=()=>{const error=document.getElementsByClassName('error-emoji')[0];const emojiArray=['\\(o_o)/','(o^^)o','(˚Δ˚)b','(^-^*)','(≥o≤)','(^_^)b','(·_·)','(=\'X\'=)','(>_<)','(;-;)','\\(^Д^)/',];if(error){const errorEmoji=emojiArray[Math.floor(Math.random()*emojiArray.length)];error.appendChild(document.createTextNode(errorEmoji));}};randomErrorEmoji();let lastPosition=0;let ticking=false;window.addEventListener('scroll',()=>{lastPosition=body.scrollTop===0?html.scrollTop:body.scrollTop;if(!ticking){window.requestAnimationFrame(()=>{if(lastPosition>=600){toTopBtn.classList.remove('is-hide');}else{toTopBtn.classList.add('is-hide');}
ticking=false;});}
ticking=true;});const scroll=new SmoothScroll('a[href*="#"]');toTopBtn.addEventListener('click',()=>{scroll.animateScroll(0);});
@@ -0,0 +1 @@
{"Target":"scripts/index.min.js","MediaType":"application/javascript","Data":{}}

Large diffs are not rendered by default.

@@ -0,0 +1 @@
{"Target":"styles/style.css","MediaType":"text/css","Data":{}}
@@ -3,12 +3,12 @@

name = "Hugo Nuo"
license = "MIT"
licenselink = "https://github.com/laozhu/hugo-nuo/blob/master/LICENSE.md"
licenselink = "https://github.com/laozhu/hugo-nuo/blob/master/LICENSE"
description = "An responsive light & clean hugo theme for blogger."
homepage = "https://github.com/laozhu/hugo-nuo"
tags = ["Responsive", "blog", "Google analytics", "Disqus", "Light", "Clean", "Polyfill"]
features = ["Blog", "Works", "Links", "Portfolio"]
min_version = "0.24"
homepage = "http://github.com/laozhu/hugo-nuo"
tags = ["Responsive", "Lightweight", "Clean", "Customizable"]
features = ["Blog", "Works", "Gallery", "Tags", "Portfolio"]
min_version = "0.50"

[author]
name = "Ritchie Zhu"

0 comments on commit 54b585b

Please sign in to comment.
You can’t perform that action at this time.