🔖 Upgrade to 1.2
This commit is contained in:
parent
eb04ce0e1a
commit
cb2786f9b2
8 changed files with 100 additions and 105 deletions
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2018 nanxiaobei
|
||||
Copyright (c) 2018 21beats
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
Paper
|
||||
========
|
||||
|
||||
Current version: [1.0](https://github.com/nanxiaobei/hugo-paper/releases)
|
||||
Current version: [1.2](https://github.com/nanxiaobei/hugo-paper/releases)
|
||||
|
||||
|
||||
## Waht's Paper?
|
||||
|
||||
Paper is a responsive simple & clean Hugo theme.
|
||||
Paper is a responsive simple, clean, flex Hugo theme.
|
||||
|
||||
> Demo: https://nanxiaobei.github.io/hugo-paper/
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
+++
|
||||
|
||||
+++
|
||||
|
|
|
@ -41,4 +41,4 @@
|
|||
</nav>
|
||||
</footer>
|
||||
{{ end }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
|
|
|
@ -1,29 +1,26 @@
|
|||
</main>
|
||||
<footer class="footer">
|
||||
<span>© {{ if eq now.Year 2017 }}2017{{ else }}2017-{{ now.Year }}{{ end }} {{ .Site.Title }} 🎉</span>
|
||||
<span>© {{ now.Year }} {{ .Site.Title }} 🎉</span>
|
||||
<span>·</span>
|
||||
<span>Powered by <a href="https://gohugo.io/" target="_blank">Hugo❤️️</a></span>
|
||||
<span>Powered by <a href="https://gohugo.io/" target="_blank">Hugo️️</a> ❤️</span>
|
||||
<span>·</span>
|
||||
<span>Designed by <a href="http://21beats.com/" target="_blank">️21beats⚡️</a></span>
|
||||
<span>Designed by <a href="http://21beats.com/" target="_blank">️21beats️</a> ⚡️</span>
|
||||
</footer>
|
||||
<script src="https://cdn.bootcss.com/instantclick/3.0.1/instantclick.min.js" data-no-instant></script>
|
||||
<script data-no-instant>InstantClick.init();</script>
|
||||
<script src="https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js" data-no-instant></script>
|
||||
<script data-no-instant>
|
||||
hljs.initHighlightingOnLoad();
|
||||
menuToggle();
|
||||
addMenuListener();
|
||||
InstantClick.on('change', function() {
|
||||
var blocks = document.querySelectorAll('pre code');
|
||||
for (var i = 0; i < blocks.length; i++) {
|
||||
hljs.highlightBlock(blocks[i]);
|
||||
}
|
||||
menuToggle();
|
||||
addMenuListener();
|
||||
});
|
||||
function menuToggle() {
|
||||
function addMenuListener() {
|
||||
var $toggle = document.querySelector('.menu-toggle');
|
||||
if (!$toggle.offsetParent) {
|
||||
return;
|
||||
}
|
||||
var $body = document.querySelector('body');
|
||||
$toggle.addEventListener('click', function() {
|
||||
$body.classList.toggle('noscroll');
|
||||
|
|
|
@ -34,12 +34,12 @@
|
|||
<!-- RSS -->
|
||||
<link rel="alternate" type="application/atom+xml" href="/index.xml" title="{{ .Site.Title }}">
|
||||
</head>
|
||||
<body class="{{if eq .Kind `page` }}single{{else}}list{{end}}">
|
||||
<body class="{{if eq .Kind `page` }}single{{else}}list{{ if .IsHome }} home{{ end }}{{end}}">
|
||||
<header class="header">
|
||||
{{ if .IsHome }}
|
||||
<h1 class="title"><a href="{{ `/` }}"><span>🍱</span>{{ .Site.Title }}</a></h1>
|
||||
<h1 class="title"><a href="{{ `/` }}">{{ .Site.Title }}</a></h1>
|
||||
{{ else }}
|
||||
<p class="title"><a href="{{ `/` }}"><span>🍱</span>{{ .Site.Title }}</a></p>
|
||||
<p class="title"><a href="{{ `/` }}">{{ .Site.Title }}</a></p>
|
||||
{{ end }}
|
||||
<button class="menu-toggle" type="button"></button>
|
||||
<nav class="menu">
|
||||
|
|
|
@ -12,6 +12,17 @@
|
|||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgba(0, 0, 0, .2);
|
||||
border-radius: 3px;
|
||||
}
|
||||
html {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
@ -64,6 +75,11 @@ pre, code {
|
|||
font-family: Menlo, Consolas, monospace;
|
||||
font-size: inherit;
|
||||
}
|
||||
/* Body
|
||||
============================================================= */
|
||||
.list {
|
||||
background: #fafafa;
|
||||
}
|
||||
/* Header
|
||||
============================================================= */
|
||||
.header {
|
||||
|
@ -73,105 +89,79 @@ pre, code {
|
|||
padding-left: 30px;
|
||||
padding-right: 30px;
|
||||
line-height: 65px;
|
||||
}
|
||||
.home .header {
|
||||
background: #fff;
|
||||
}
|
||||
.title a {
|
||||
display: block;
|
||||
margin-top: 18px;
|
||||
font-size: 28px;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
line-height: 35px;
|
||||
}
|
||||
.title span {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
transform: translateY(1px);
|
||||
.noscroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
.menu-toggle {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 20;
|
||||
width: 80px;
|
||||
height: 65px;
|
||||
}
|
||||
.menu-toggle::before,
|
||||
.menu-toggle::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 20px;
|
||||
height: 2px;
|
||||
background: #000;
|
||||
}
|
||||
.menu-toggle::before {
|
||||
transform: translate3d(-50%, -5px, 0);
|
||||
}
|
||||
.menu-toggle::after {
|
||||
transform: translate3d(-50%, 4px, 0);
|
||||
}
|
||||
.noscroll .menu-toggle::before {
|
||||
transform: translate3d(-50%, -1px, 0) rotateZ(45deg);
|
||||
}
|
||||
.noscroll .menu-toggle::after {
|
||||
transform: translate3d(-50%, -1px, 0) rotateZ(-45deg);
|
||||
}
|
||||
.menu {
|
||||
display: none;
|
||||
}
|
||||
.menu li {
|
||||
display: inline-block;
|
||||
margin-left: 20px;
|
||||
.noscroll .menu {
|
||||
display: block;
|
||||
}
|
||||
.menu li.active a {
|
||||
color: rgba(0, 0, 0, .4);
|
||||
.menu ul {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
.menu li {
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
}
|
||||
.menu a {
|
||||
display: block;
|
||||
font-size: 15px;
|
||||
}
|
||||
@media (max-width: 1023px) {
|
||||
.noscroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
.menu-toggle {
|
||||
display: block;
|
||||
}
|
||||
.menu-toggle {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 20;
|
||||
width: 80px;
|
||||
height: 65px;
|
||||
}
|
||||
.menu-toggle::before,
|
||||
.menu-toggle::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 20px;
|
||||
height: 2px;
|
||||
background: #000;
|
||||
}
|
||||
.menu-toggle::before {
|
||||
transform: translate3d(-50%, -5px, 0);
|
||||
}
|
||||
.menu-toggle::after {
|
||||
transform: translate3d(-50%, 4px, 0);
|
||||
}
|
||||
.noscroll .menu-toggle::before {
|
||||
transform: translate3d(-50%, -1px, 0) rotateZ(45deg);
|
||||
}
|
||||
.noscroll .menu-toggle::after {
|
||||
transform: translate3d(-50%, -1px, 0) rotateZ(-45deg);
|
||||
}
|
||||
.menu {
|
||||
display: none;
|
||||
}
|
||||
.noscroll .menu {
|
||||
display: block;
|
||||
}
|
||||
.menu ul {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
.menu li {
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
}
|
||||
.menu a {
|
||||
font-size: 20px;
|
||||
}
|
||||
font-size: 20px;
|
||||
}
|
||||
/* Main
|
||||
======================================================================= */
|
||||
.list {
|
||||
background: #fafafa;
|
||||
}
|
||||
/* Main
|
||||
------------------------------ */
|
||||
.main {
|
||||
min-height: calc(100vh - 130px);
|
||||
overflow: hidden;
|
||||
|
@ -250,7 +240,7 @@ pre, code {
|
|||
background: #fff;
|
||||
}
|
||||
.welcome-emoji {
|
||||
font-size: 50px;
|
||||
font-size: 60px;
|
||||
line-height: 1;
|
||||
}
|
||||
.first-entry .post-title {
|
||||
|
@ -272,6 +262,10 @@ pre, code {
|
|||
background: #fff;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.post-entry:active {
|
||||
transform: scale(.98);
|
||||
transition: transform .1s;
|
||||
}
|
||||
.post-entry + .post-entry {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
@ -391,16 +385,18 @@ pre, code {
|
|||
}
|
||||
.post-content pre {
|
||||
padding: 20px;
|
||||
background: rgba(0, 0, 0, .05);
|
||||
background: #fafafa;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.post-content pre code {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
}
|
||||
.post-content code {
|
||||
padding: 3px 6px;
|
||||
font-size: 15px;
|
||||
background: rgba(0, 0, 0, .05);
|
||||
background: #fafafa;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.post-content blockquote {
|
||||
|
@ -427,16 +423,17 @@ pre, code {
|
|||
}
|
||||
.post-tags a {
|
||||
display: block;
|
||||
padding: 4px 15px;
|
||||
padding: 6px 16px;
|
||||
color: rgba(0, 0, 0, .6);
|
||||
background: rgba(0, 0, 0, .05);
|
||||
font-size: 16px;
|
||||
background: #f5f5f5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.post-tags li + li {
|
||||
margin-left: 3px;
|
||||
}
|
||||
.post-tags a:hover {
|
||||
background: rgba(0, 0, 0, .08);
|
||||
background: #eee;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.post-content blockquote {
|
||||
|
@ -469,7 +466,7 @@ pre, code {
|
|||
======================================================================= */
|
||||
.footer {
|
||||
padding: 20px;
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
line-height: 25px;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
name = "Paper"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/nanxiaobei/hugo-paper/blob/master/LICENSE"
|
||||
description = "A simple & clean hugo theme"
|
||||
description = "A simple, clean, flex hugo theme"
|
||||
homepage = "https://github.com/nanxiaobei/hugo-paper/"
|
||||
tags = ["Responsive", "Simple", "Clean", "Light", "White", "Blog"]
|
||||
features = ["Responsive", "One Column", "Blog"]
|
||||
|
|
Loading…
Reference in a new issue