Improve website (#734)
parent
9c984f0c21
commit
3c4d01c22f
@ -1 +1,4 @@ |
|||||||
View on GitHub: <a href="{% if site.codeurl %}{{ site.codeurl }}{% else %}{{ site.baseurl }}{% endif %}">{{ site.title }}</a> or <a href="{{ site.baseurl }}{{ site.donateurl }}">donate</a> |
<footer class="text-center py-3 border-top has-divider"> |
||||||
|
<span>View on <a href="https://github.com/{{ site.author.github }}/{{ site.github_repo }}">GitHub</a> or become <a href="{{ site.baseurl }}{{ site.donateurl }}">a sponsor</a>!</span> |
||||||
|
<span class="d-block">Made by <a href="{{ site.author.website }}">{{ site.author.name }}</a></span> |
||||||
|
</footer> |
||||||
|
@ -1,8 +1,7 @@ |
|||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics_id }}"></script> |
||||||
<script> |
<script> |
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
window.dataLayer = window.dataLayer || []; |
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
function gtag(){dataLayer.push(arguments);} |
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
gtag('js', new Date()); |
||||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
gtag('config', '{{ site.google_analytics_id }}'); |
||||||
ga('create', '{{ site.google_analytics_id }}', 'auto'); |
|
||||||
ga('send', 'pageview'); |
|
||||||
</script> |
</script> |
||||||
|
@ -0,0 +1,21 @@ |
|||||||
|
<meta charset="utf-8"> |
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"> |
||||||
|
|
||||||
|
<meta name="theme-color" content="{{ site.color }}"> |
||||||
|
<meta name="msapplication-navbutton-color" content="{{ site.color }}"> |
||||||
|
<meta name="msapplication-TileColor" content="{{ site.color }}"> |
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes"> |
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> |
||||||
|
|
||||||
|
<meta name="description" content="{{ site.description }}"> |
||||||
|
<meta name="google-site-verification" content="{{ site.google_site_verification }}" /> |
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> |
||||||
|
|
||||||
|
{% seo %} |
||||||
|
|
||||||
|
{% if site.google_analytics_id != "" %} |
||||||
|
{% include google_analytics.html %} |
||||||
|
{% endif %} |
@ -1,3 +1,21 @@ |
|||||||
<h4><a class="brand" href="{{ site.baseurl }}/home">{{ site.title }}</a> |
<header class="text-center py-3 border-bottom has-divider"> |
||||||
{% if site.subtitle %}<small>{{ site.subtitle }}</small>{% endif %} |
<!-- center --> |
||||||
</h4> |
<img class="logo align-middle" alt="Logo" src="{{ site.baseurl }}/static/icon_foreground.png"/> |
||||||
|
<a class="h3 mx-2 align-middle text-decoration-none" href="{{ site.baseurl }}/home">{{ site.title }}</a> |
||||||
|
|
||||||
|
<!-- left --> |
||||||
|
<div class="left align-middle"> |
||||||
|
<img class="drawer-toggle p-2 mx-2 d-md-none" |
||||||
|
alt="Menu toggle" |
||||||
|
src="{{ site.baseurl }}/icons/menu.svg" |
||||||
|
onclick="document.getElementById('drawer').classList.toggle('drawer-closed');"/> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!-- right --> |
||||||
|
<div class="right align-middle"> |
||||||
|
<span class="version d-none d-sm-inline-block">latest: v{{ site.github_version }}</span> |
||||||
|
<a class="p-2 mx-2" href="https://github.com/{{ site.author.github }}/{{ site.github_repo }}"> |
||||||
|
<img alt="GitHub" src="{{ site.baseurl }}/icons/github.svg"> |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
</header> |
||||||
|
@ -1,16 +1,41 @@ |
|||||||
<ul class="nav nav-pills nav-stacked"> |
<ul id="navigation" class="py-4"> |
||||||
<li><a href="{{ site.baseurl }}/home">Home</a></li> |
<li><a href="{{ site.baseurl }}/home">Home</a></li> |
||||||
{% for section in site.sections %} |
{% for section in site.sections %} |
||||||
{% assign attr = section[0] %} |
{% assign attr = section[0] %} |
||||||
{% assign label = section[1] %} |
{% assign label = section[1] %} |
||||||
|
<li class="mt-3"><h5 class="mt-0 mb-1">{{ label }}</h5> |
||||||
{% for page in site.categories[attr] %} |
<ul> |
||||||
{% if forloop.first %} |
{% for page in site.categories[attr] %} |
||||||
<li class="nav-header">{{ label }}</li> |
<li class="pt-2 pb-2" data-order="{{ page.order }}"> |
||||||
{% endif %} |
<a href="{{ site.baseurl }}{{ page.url }}">{{ page.title }}</a> |
||||||
<li data-order="{{ page.order }}"><a href="{{ site.baseurl }}{{ page.url }}">{{ page.title }}</a></li> |
</li> |
||||||
{% endfor %} |
{% endfor %} |
||||||
|
</ul> |
||||||
|
</li> |
||||||
{% endfor %} |
{% endfor %} |
||||||
<!-- List additional links. It is recommended to add a divider |
|
||||||
e.g. <li class="divider"></li> first to break up the content. --> |
|
||||||
</ul> |
</ul> |
||||||
|
<script> |
||||||
|
/* find current item and make it active */ |
||||||
|
const current = document.location.href; |
||||||
|
const links = document.querySelectorAll('#navigation a'); |
||||||
|
links.forEach((link) => { |
||||||
|
if (current && link && current.endsWith(link.getAttribute('href'))) { |
||||||
|
link.parentElement.classList.add('active') |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
/* reorder elements */ |
||||||
|
const sections = document.querySelectorAll('#navigation ul'); |
||||||
|
sections.forEach((section) => { |
||||||
|
const entries = section.querySelectorAll('li'); |
||||||
|
const ordered = []; |
||||||
|
entries.forEach((entry) => { |
||||||
|
const order = entry.getAttribute('data-order'); |
||||||
|
ordered.push([entry, order]); |
||||||
|
}); |
||||||
|
ordered.sort((a, b) => a[1] - b[1]); |
||||||
|
ordered.forEach((entry) => { |
||||||
|
section.appendChild(entry[0]); |
||||||
|
}) |
||||||
|
}); |
||||||
|
</script> |
||||||
|
@ -1,117 +0,0 @@ |
|||||||
<!DOCTYPE html> |
|
||||||
<html> |
|
||||||
<head> |
|
||||||
<meta charset="utf-8"> |
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
|
||||||
<meta name="viewport" content="width=device-width"> |
|
||||||
|
|
||||||
<title>{{ site.title }}{% if page.title %} | {{ page.title }}{% endif %}</title> |
|
||||||
<meta name="description" content="{{ site.subtitle }}"> |
|
||||||
|
|
||||||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"> |
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/css/syntax.css"> |
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css"> |
|
||||||
|
|
||||||
{% seo %} |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
|
|
||||||
<div class="container"> |
|
||||||
<div class="row"> |
|
||||||
<div id="header" class="col-sm-12"> |
|
||||||
{% include header.html %} |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div class="row"> |
|
||||||
{% assign post_count = site.posts|size %} |
|
||||||
{% if site.navigation != 0 and site.navigation == 1 or post_count > 0 %} |
|
||||||
<div id="navigation" class="col-sm-2"> |
|
||||||
{% include navigation.html %} |
|
||||||
</div> |
|
||||||
|
|
||||||
<div id="content" class="col-sm-10"> |
|
||||||
{{ content }} |
|
||||||
</div> |
|
||||||
{% else %} |
|
||||||
<div id="content" class="col-sm-12"> |
|
||||||
{{ content }} |
|
||||||
</div> |
|
||||||
{% endif %} |
|
||||||
</div> |
|
||||||
|
|
||||||
{% if page.disqus == 1 %} |
|
||||||
<div class="row"> |
|
||||||
{% if site.navigation == 1 or post_count > 0 %} |
|
||||||
<div id="navigation" class="col-sm-2"></div> |
|
||||||
<div id="disqus" class="col-sm-10"> |
|
||||||
{% include disqus.html %} |
|
||||||
</div> |
|
||||||
{% else %} |
|
||||||
<div id="disqus" class="col-sm-12"> |
|
||||||
{% include disqus.html %} |
|
||||||
</div> |
|
||||||
{% endif %} |
|
||||||
</div> |
|
||||||
{% endif %} |
|
||||||
|
|
||||||
<div class="row"> |
|
||||||
<div id="footer" class="col-sm-12"> |
|
||||||
{% include footer.html %} |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
|
|
||||||
<script> |
|
||||||
function orderNav() { |
|
||||||
var list, |
|
||||||
section, |
|
||||||
header, |
|
||||||
sections = [], |
|
||||||
lists = {}, |
|
||||||
headers = {}; |
|
||||||
|
|
||||||
var locationObj = document.location.href; |
|
||||||
|
|
||||||
var navUl = document.querySelectorAll('#navigation ul')[0], |
|
||||||
navLis = document.querySelectorAll('#navigation ul li'); |
|
||||||
if (!navUl) return; |
|
||||||
for (var i = 0; i < navLis.length; i++) { |
|
||||||
var order, li = navLis[i]; |
|
||||||
if (li.classList.contains('nav-header')) { |
|
||||||
section = li.textContent || li.innerText; |
|
||||||
sections.push(section); |
|
||||||
headers[section] = li; |
|
||||||
continue; |
|
||||||
} |
|
||||||
var link = li.childNodes[0]; |
|
||||||
if (locationObj && link && locationObj.endsWith(link.getAttribute('href'))) { |
|
||||||
li.classList.add('active'); |
|
||||||
} |
|
||||||
|
|
||||||
if (!lists[section]) { |
|
||||||
lists[section] = []; |
|
||||||
} |
|
||||||
order = parseFloat(li.getAttribute('data-order')) |
|
||||||
lists[section].push([order, li]); |
|
||||||
} |
|
||||||
for (var i = 0; i < sections.length; i++) { |
|
||||||
section = sections[i]; |
|
||||||
list = lists[section].sort(function(a, b) { |
|
||||||
return a[0] - b[0]; |
|
||||||
}); |
|
||||||
if (header = headers[section]) { |
|
||||||
navUl.appendChild(header); |
|
||||||
} |
|
||||||
for (var j = 0; j < list.length; j++) { |
|
||||||
navUl.appendChild(list[j][1]); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
if (document.querySelectorAll) orderNav(); |
|
||||||
</script> |
|
||||||
{% if site.google_analytics_id != "" %} |
|
||||||
{% include google_analytics.html %} |
|
||||||
{% endif %} |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,43 +1,30 @@ |
|||||||
<!DOCTYPE html> |
<!DOCTYPE html> |
||||||
<html style="height:100%;width:100%;margin:0px;"> |
<html lang="en"> |
||||||
<head> |
<head> |
||||||
<meta charset="utf-8"> |
{% include head.html %} |
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
|
||||||
<meta name="viewport" content="width=device-width"> |
|
||||||
|
|
||||||
<title>{{ site.title }}</title> |
<title>{{ site.title }}</title> |
||||||
<meta name="description" content="{{ site.subtitle }}"> |
<link rel="stylesheet" href="{{ site.baseurl }}/css/landing.css"> |
||||||
<meta name="google-site-verification" content="4x49i17ABIrSvUl52SeL0-t0341aTnWWaC62-FYCRT4" /> |
<link rel="stylesheet" href="{{ site.baseurl }}/css/fonts_responsive.css"> |
||||||
|
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> <link rel="stylesheet" href="{{ site.baseurl }}/css/syntax.css"> |
|
||||||
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css"> |
|
||||||
|
|
||||||
{% seo %} |
|
||||||
</head> |
</head> |
||||||
<body id="landing"> |
<body> |
||||||
<div class="container" align="center"> |
<div class="container p-5"> |
||||||
<div> |
<img class="d-block mx-auto" id="logo" src="{{ site.baseurl }}/static/icon_foreground.png" alt="Logo"> |
||||||
<img src="static/icon_foreground.png" width="45%" style="max-width:400px"> |
<div class="text-center"> |
||||||
</div> |
<h1 id="title" class="display-2 font-weight-bold mt-2">{{ site.title }}</h1> |
||||||
<div id="content"> |
|
||||||
{{ content }} |
{{ content }} |
||||||
</div> |
</div> |
||||||
<div class="row justify-content-sm-center"> |
<div class="text-center"> |
||||||
<div class="col-xs-12 col-sm-auto"><a href="home">Documentation</a></div> |
<a class="btn rounded-pill px-3 py-2 mx-2 mt-2" href="{{ site.baseurl }}/home">Documentation</a> |
||||||
<div class="col-xs-12 col-sm-auto"><a href="about/changelog">Changelog</a></div> |
<a class="btn rounded-pill px-3 py-2 mx-2 mt-2" href="{{ site.baseurl }}/about/changelog">Changelog</a> |
||||||
<div class="col-xs-12 col-sm-auto"><a href="{{ site.codeurl }}">GitHub</a></div> |
<a class="btn rounded-pill px-3 py-2 mx-2 mt-2" href="https://github.com/{{ site.author.github }}/{{ site.github_repo }}">GitHub</a> |
||||||
<div class="col-xs-12 col-sm-auto"><a href="extra/donate">Support</a></div> |
<a class="btn rounded-pill px-3 py-2 mx-2 mt-2" href="{{ site.baseurl }}{{ site.donateurl }}">Support</a> |
||||||
</div> |
</div> |
||||||
<br/> |
<br/> |
||||||
<div class="row" id="screenshots"> |
<div class="row"> |
||||||
<div class="col-sm-4"><img src="static/screen1.png"></div> |
<div class="col-12 col-sm-4 mt-4"><img class="img-fluid" src="{{ site.baseurl }}/static/screen1.png" alt="Screenshot 1"></div> |
||||||
<div class="col-sm-4"><img src="static/screen2.png"></div> |
<div class="col-12 col-sm-4 mt-4"><img class="img-fluid" src="{{ site.baseurl }}/static/screen2.png" alt="Screenshot 2"></div> |
||||||
<div class="col-sm-4"><img src="static/screen3.png"></div> |
<div class="col-12 col-sm-4 mt-4"><img class="img-fluid" src="{{ site.baseurl }}/static/screen3.png" alt="Screenshot 3"></div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
{% if site.google_analytics_id != "" %} |
|
||||||
{% include google_analytics.html %} |
|
||||||
{% endif %} |
|
||||||
</body> |
</body> |
||||||
</html> |
</html> |
||||||
|
@ -0,0 +1,37 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="en"> |
||||||
|
<head> |
||||||
|
{% include head.html %} |
||||||
|
<title>{{ site.title }}{% if page.title %} | {{ page.title }}{% endif %}</title> |
||||||
|
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css"> |
||||||
|
<link rel="stylesheet" href="{{ site.baseurl }}/css/fonts_responsive.css"> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
{% include header.html %} |
||||||
|
<div class="container-fluid container-md"> |
||||||
|
<div class="row"> |
||||||
|
<div id="drawer" class="col-md-3 px-4 border-right has-divider drawer drawer-closed"> |
||||||
|
{% include navigation.html %} |
||||||
|
</div> |
||||||
|
<div class="col-12 col-md-9"> |
||||||
|
<div class="content py-3 px-2"> |
||||||
|
{{ content }} |
||||||
|
</div> |
||||||
|
{% if page.disqus == 1 %} |
||||||
|
<div class="mt-4"> |
||||||
|
{% include disqus.html %} |
||||||
|
</div> |
||||||
|
{% endif %} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="container-fluid"> |
||||||
|
<div class="row"> |
||||||
|
<div class="col-12 p-0"> |
||||||
|
{% include footer.html %} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</body> |
||||||
|
</html> |
@ -0,0 +1,65 @@ |
|||||||
|
:root { |
||||||
|
--color-primary: #f76c16; |
||||||
|
--color-primary-active: #e75c16; |
||||||
|
--color-primary-hover: #d74c16; |
||||||
|
--color-secondary: #f7a816; |
||||||
|
--color-accent: #0e95e3; |
||||||
|
--color-accent-light: #f5fcff; |
||||||
|
--color-accent-dark: #0e3375; |
||||||
|
--color-background: #FFFFFF; |
||||||
|
--color-code: var(--color-primary); |
||||||
|
--color-code-background: #f8f8f8; |
||||||
|
--color-text-muted: #6c757d; |
||||||
|
} |
||||||
|
|
||||||
|
body { |
||||||
|
background-color: var(--color-background); |
||||||
|
} |
||||||
|
|
||||||
|
a { |
||||||
|
color: var(--color-primary); |
||||||
|
} |
||||||
|
|
||||||
|
code, pre { |
||||||
|
background-color: var(--color-code-background); |
||||||
|
} |
||||||
|
|
||||||
|
:not(pre) > code { |
||||||
|
color: var(--color-code); |
||||||
|
} |
||||||
|
|
||||||
|
a:hover { |
||||||
|
color: var(--color-primary-hover) !important; |
||||||
|
} |
||||||
|
|
||||||
|
.btn-primary { |
||||||
|
background-color: var(--color-primary) !important; |
||||||
|
border-color: var(--color-primary) !important; |
||||||
|
color: white !important; |
||||||
|
} |
||||||
|
|
||||||
|
.btn-primary.active, .btn-primary:active { |
||||||
|
background-color: var(--color-primary-active) !important; |
||||||
|
border-color: var(--color-primary-active) !important; |
||||||
|
} |
||||||
|
|
||||||
|
.btn-primary:hover { |
||||||
|
background-color: var(--color-primary-hover) !important; |
||||||
|
border-color: var(--color-primary-hover) !important; |
||||||
|
color: white !important; |
||||||
|
} |
||||||
|
|
||||||
|
.btn-outline-primary { |
||||||
|
border-color: var(--color-primary) !important; |
||||||
|
} |
||||||
|
|
||||||
|
.btn-outline-primary.active, .btn-outline-primary:active { |
||||||
|
background-color: var(--color-primary-active) !important; |
||||||
|
border-color: var(--color-primary-active) !important; |
||||||
|
} |
||||||
|
|
||||||
|
.btn-outline-primary:hover { |
||||||
|
border-color: var(--color-primary-hover) !important; |
||||||
|
background-color: var(--color-primary-hover) !important; |
||||||
|
color: white !important; |
||||||
|
} |
@ -0,0 +1,33 @@ |
|||||||
|
@import url('https://fonts.googleapis.com/css?family=Lobster+Two:400i,700i|Roboto+Mono|Source+Sans+Pro:400,700&display=swap'); |
||||||
|
@import "fonts_responsive.css"; |
||||||
|
|
||||||
|
:root { |
||||||
|
--font-mono: 'Roboto Mono'; |
||||||
|
--font-sans: 'Source Sans Pro'; |
||||||
|
--font-display: 'Lobster Two'; |
||||||
|
} |
||||||
|
|
||||||
|
* { |
||||||
|
font-family: var(--font-sans), sans-serif; |
||||||
|
font-weight: 400; |
||||||
|
} |
||||||
|
|
||||||
|
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 { |
||||||
|
font-family: var(--font-display), cursive; |
||||||
|
font-style: italic; |
||||||
|
font-weight: 700 !important; |
||||||
|
} |
||||||
|
|
||||||
|
h4, .h4, h5, .h5, h6, .h6 { |
||||||
|
font-weight: 400; |
||||||
|
} |
||||||
|
|
||||||
|
button, .btn { |
||||||
|
font-family: var(--font-display), cursive !important; |
||||||
|
font-style: italic !important; |
||||||
|
font-weight: 700 !important; |
||||||
|
} |
||||||
|
|
||||||
|
code, code * { |
||||||
|
font-family: var(--font-mono) !important; |
||||||
|
} |
@ -0,0 +1,34 @@ |
|||||||
|
/* https://christianoliff.com/blog/bootstrap-with-rfs */ |
||||||
|
/* either apply after everything else or add !important here */ |
||||||
|
@media (max-width: 1200px) { |
||||||
|
legend { |
||||||
|
font-size: calc(1.275rem + 0.3vw); |
||||||
|
} |
||||||
|
h1, .h1 { |
||||||
|
font-size: calc(1.375rem + 1.5vw); |
||||||
|
} |
||||||
|
h2, .h2 { |
||||||
|
font-size: calc(1.325rem + 0.9vw); |
||||||
|
} |
||||||
|
h3, .h3 { |
||||||
|
font-size: calc(1.3rem + 0.6vw); |
||||||
|
} |
||||||
|
h4, .h4 { |
||||||
|
font-size: calc(1.275rem + 0.3vw); |
||||||
|
} |
||||||
|
.display-1 { |
||||||
|
font-size: calc(1.725rem + 5.7vw); |
||||||
|
} |
||||||
|
.display-2 { |
||||||
|
font-size: calc(1.675rem + 5.1vw); |
||||||
|
} |
||||||
|
.display-3 { |
||||||
|
font-size: calc(1.575rem + 3.9vw); |
||||||
|
} |
||||||
|
.display-4 { |
||||||
|
font-size: calc(1.475rem + 2.7vw); |
||||||
|
} |
||||||
|
.close { |
||||||
|
font-size: calc(1.275rem + 0.3vw); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
@import "fonts.css"; |
||||||
|
@import "colors.css"; |
||||||
|
|
||||||
|
html { |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
margin: 0; |
||||||
|
} |
||||||
|
|
||||||
|
body { |
||||||
|
background: radial-gradient(ellipse, var(--color-secondary), var(--color-primary)) fixed !important; |
||||||
|
} |
||||||
|
|
||||||
|
#logo { |
||||||
|
width: 45%; |
||||||
|
max-width: 340px; |
||||||
|
} |
||||||
|
|
||||||
|
h1 { |
||||||
|
color: white; |
||||||
|
} |
||||||
|
|
||||||
|
p { |
||||||
|
color: rgba(255, 255, 255, 0.7); |
||||||
|
font-size: 1.2em; |
||||||
|
line-height: 100%; |
||||||
|
} |
||||||
|
|
||||||
|
.btn { |
||||||
|
color: white !important; |
||||||
|
background-color: rgba(240, 240, 240, 0.25); |
||||||
|
font-size: 1.3em; |
||||||
|
} |
||||||
|
|
||||||
|
.btn:hover { |
||||||
|
color: white !important; |
||||||
|
background-color: rgba(240, 240, 240, 0.4); |
||||||
|
} |
@ -1,216 +1,274 @@ |
|||||||
@import url('https://fonts.googleapis.com/css?family=Calistoga|Roboto+Mono|Source+Sans+Pro:400,700&display=swap'); |
@import "fonts.css"; |
||||||
|
@import "colors.css"; |
||||||
|
@import "syntax.css"; |
||||||
|
|
||||||
body { |
:root { |
||||||
font-weight: 400; |
--color-footer: var(--color-code-background); |
||||||
font-family: 'Source Sans Pro', sans-serif; |
--color-table-head: var(--color-code-background); |
||||||
|
--color-divider: rgba(230, 230, 230, 0.7); |
||||||
|
--header-height: 65px; /* kind of */ |
||||||
|
--cards-radius: 4px; |
||||||
} |
} |
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6, th { |
html, body { |
||||||
font-family: 'Calistoga', sans-serif; |
height: 100%; |
||||||
} |
} |
||||||
|
|
||||||
small { |
/* dividers */ |
||||||
font-weight: 400; |
|
||||||
font-family: 'Source Sans Pro', sans-serif; |
|
||||||
} |
|
||||||
|
|
||||||
pre, code, pre code { |
.has-divider { |
||||||
border: none; |
border-color: var(--color-divider) !important; |
||||||
border-radius: 0; |
|
||||||
background-color: #fafafa; |
|
||||||
font-size: 0.8em; |
|
||||||
} |
} |
||||||
|
|
||||||
.highlight { |
/* header */ |
||||||
background-color: #fafafa; |
|
||||||
border-radius: 12px; |
|
||||||
} |
|
||||||
|
|
||||||
pre { |
header { |
||||||
font-size: 1em; |
background: radial-gradient(ellipse, var(--color-secondary), var(--color-primary)) fixed; |
||||||
|
position: fixed; |
||||||
|
top: 0; |
||||||
|
width: 100%; |
||||||
|
z-index: 10; |
||||||
} |
} |
||||||
|
|
||||||
code { |
header .left { |
||||||
color: inherit; |
position: absolute; |
||||||
font-family: 'Roboto Mono', monospace; |
left: 0; |
||||||
color: #dd2200; |
top: 50%; |
||||||
|
transform: translateY(-50%); |
||||||
} |
} |
||||||
|
|
||||||
a { |
header .right { |
||||||
color: #0e95e3; |
position: absolute; |
||||||
|
right: 0; |
||||||
|
top: 50%; |
||||||
|
transform: translateY(-50%); |
||||||
} |
} |
||||||
|
|
||||||
#header { |
header a { |
||||||
border-bottom: 1px solid #eee; |
color: white !important; |
||||||
margin-bottom: 20px; |
|
||||||
} |
} |
||||||
|
|
||||||
#header a:hover { |
header a:hover { |
||||||
text-decoration: none; |
color: white !important; |
||||||
} |
} |
||||||
|
|
||||||
#content { |
header .logo { |
||||||
/* bigger font */ |
height: 32px; |
||||||
font-size: 1.1em; |
width: auto; |
||||||
} |
} |
||||||
|
|
||||||
#content p { |
header .version { |
||||||
/* spacing for all paragraphs */ |
font-size: 0.9em; |
||||||
margin-top: 16px; |
color: rgba(255, 255, 255, 0.8); |
||||||
margin-bottom: 16px; |
|
||||||
} |
} |
||||||
|
|
||||||
#content ul li { |
body { |
||||||
/* spacing for lists */ |
/* to offset wrt sticky header */ |
||||||
margin-top: 8px; |
padding-top: var(--header-height); |
||||||
margin-bottom: 8px; |
|
||||||
} |
} |
||||||
|
|
||||||
#content h5 { |
/* footer */ |
||||||
font-size: 1.1em; |
|
||||||
|
footer { |
||||||
|
background-color: var(--color-footer); |
||||||
|
color: var(--color-text-muted); |
||||||
|
font-size: 0.9em; |
||||||
} |
} |
||||||
|
|
||||||
#footer { |
/* drawer */ |
||||||
margin: 20px 0; |
|
||||||
font-size: 0.85em; |
.drawer-toggle:hover { |
||||||
color: #999; |
background-color: rgba(240, 240, 240, 0.25); |
||||||
text-align: center; |
border-radius: 50%; |
||||||
} |
} |
||||||
|
|
||||||
#content > .page-header:first-child { |
@media (max-width: 768px) { |
||||||
margin-top: 0; |
.drawer { |
||||||
|
position: fixed; |
||||||
|
top: 0; |
||||||
|
left: 0; |
||||||
|
width: 300px; |
||||||
|
height: 100%; |
||||||
|
overflow-x: hidden; |
||||||
|
overflow-y: auto; |
||||||
|
background-color: var(--color-background); |
||||||
|
transition: transform 0.4s cubic-bezier(0.4, 0, 0, 1); |
||||||
|
z-index: 5; |
||||||
|
padding-top: var(--header-height); |
||||||
|
} |
||||||
|
|
||||||
|
.drawer-closed { |
||||||
|
transform: translateX(-100%); |
||||||
|
} |
||||||
} |
} |
||||||
|
|
||||||
#content > .page-header:first-child h2 { |
@media (max-width: 480px) { |
||||||
margin-top: 0; |
.drawer { |
||||||
|
width: 100%; |
||||||
|
} |
||||||
} |
} |
||||||
|
|
||||||
#content .page-subtitle { |
.drawer ul { |
||||||
font-size: 0.45em; |
list-style: none; |
||||||
|
margin: 0; |
||||||
|
padding: 0; |
||||||
|
line-height: 100%; |
||||||
} |
} |
||||||
|
|
||||||
#landing { |
.drawer a { |
||||||
background: radial-gradient(ellipse, #f7a816, #f76c16) !important; |
color: inherit; |
||||||
background-attachment: fixed !important; |
|
||||||
} |
} |
||||||
|
|
||||||
#landing h1 { |
.drawer a:hover { |
||||||
font-size: 10vw; |
color: var(--color-primary-hover) !important; |
||||||
color: white; |
|
||||||
margin-top: 16px; |
|
||||||
margin-bottom: 0px; |
|
||||||
letter-spacing: 0.04em; |
|
||||||
font-weight: bold; |
|
||||||
} |
} |
||||||
|
|
||||||
@media (min-width: 576px) { |
.drawer li.active a { |
||||||
#landing h1 { |
color: var(--color-primary); |
||||||
font-size: 4em; |
position: relative; |
||||||
} |
|
||||||
} |
} |
||||||
|
|
||||||
#landing p { |
/* .drawer li.active a:hover { |
||||||
font-size: 1.2em; |
color: var(--color-primary-active) !important; |
||||||
color: rgba(255, 255, 255, 0.7); |
text-decoration: none; |
||||||
margin: 8px; |
} */ |
||||||
max-width: 80%; |
|
||||||
line-height: 100%; |
.drawer li.active { |
||||||
|
position: relative; |
||||||
} |
} |
||||||
|
|
||||||
#landing a { |
.drawer li.active::after { |
||||||
background-color: rgba(240, 240, 240, 0.3); |
content: ''; |
||||||
color: white; |
|
||||||
border-radius: 24px; |
|
||||||
padding: 10px 20px 10px 20px; |
|
||||||
margin-top: 16px; |
|
||||||
display: inline-block; |
display: inline-block; |
||||||
font-family: 'Calistoga', sans-serif; |
position: absolute; |
||||||
font-size: 1.1em; |
right: 0; |
||||||
|
top: 50%; |
||||||
|
transform: translateY(-50%); |
||||||
|
width: 8px; |
||||||
|
height: 8px; |
||||||
|
background-color: var(--color-primary); |
||||||
|
border-radius: 50%; |
||||||
} |
} |
||||||
|
|
||||||
#landing #screenshots img { |
/* tables */ |
||||||
max-width: 100%; |
|
||||||
padding: 12px; |
table { |
||||||
|
/* same margins that reboot gives to pre */ |
||||||
|
margin-top: 0; |
||||||
|
margin-bottom: 1rem; |
||||||
|
border-collapse: collapse; |
||||||
|
/* make it scrollable if needed */ |
||||||
|
display: block; |
||||||
|
overflow-x: auto; |
||||||
} |
} |
||||||
|
|
||||||
#landing #screenshots { |
thead { |
||||||
margin-top: 24px; |
background-color: var(--color-table-head); |
||||||
margin-bottom: 24px; |
|
||||||
} |
} |
||||||
|
|
||||||
#navigation { |
th { |
||||||
font-size: 1.0em; |
padding: 8px; |
||||||
|
border: 1px solid var(--color-divider); |
||||||
|
font-family: var(--font-display), sans-serif; |
||||||
|
font-weight: 700; |
||||||
} |
} |
||||||
|
|
||||||
#navigation li a { |
td { |
||||||
padding-left: 16px; |
padding: 8px; |
||||||
padding-right: 16px; |
border: 1px solid var(--color-divider); |
||||||
border-radius: 32px; |
|
||||||
} |
} |
||||||
|
|
||||||
#navigation li a:hover { |
/* page and content */ |
||||||
background: #fafafa; |
|
||||||
|
.content a, footer a { |
||||||
|
color: var(--color-accent); |
||||||
} |
} |
||||||
|
|
||||||
#navigation li.active a { |
.content a:hover, footer a:hover { |
||||||
background: #f76c16; |
color: var(--color-accent) !important; |
||||||
color: #FFFFFF; |
|
||||||
} |
} |
||||||
|
|
||||||
#navigation .nav-header { |
.content ul { |
||||||
padding-top: 16px; |
padding-left: 24px; |
||||||
padding-bottom: 4px; |
|
||||||
padding-left: 0; |
|
||||||
padding-right: 0; |
|
||||||
} |
} |
||||||
|
|
||||||
.nav-header { |
.content blockquote { |
||||||
font-size: 1.1em; |
background-color: var(--color-code-background); |
||||||
cursor: default; |
border-radius: var(--cards-radius); |
||||||
/* text-transform: uppercase; */ |
border-left: 4px; |
||||||
font-weight: bold; |
border-left-style: solid; |
||||||
font-family: 'Calistoga', sans-serif; |
border-left-color: var(--color-accent); |
||||||
|
font-size: 0.9em; |
||||||
|
color: var(--color-text-muted); |
||||||
|
padding: 0.8rem; |
||||||
|
/* text-align: justify; |
||||||
|
position: relative; |
||||||
|
padding: 0.5rem 32px 0.5rem 0.5rem; |
||||||
|
text-justify: inter-word; */ |
||||||
} |
} |
||||||
|
|
||||||
body.rtl { |
/* .content blockquote::after { |
||||||
direction: rtl; |
content: '!'; |
||||||
|
position: absolute; |
||||||
|
top: 50%; |
||||||
|
transform: translateY(-50%); |
||||||
|
right: 16px; |
||||||
|
font-size: 1rem !important; |
||||||
|
font-weight: 700 !important; |
||||||
|
color: var(--color-accent); |
||||||
|
} */ |
||||||
|
|
||||||
|
.content blockquote p, .content blockquote ul { |
||||||
|
margin: 0; |
||||||
} |
} |
||||||
|
|
||||||
body.rtl #header .brand { |
.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 { |
||||||
float: right; |
margin-top: 1.4rem; |
||||||
margin-left: 5px; |
margin-bottom: 0.8rem; |
||||||
} |
} |
||||||
body.rtl .row-fluid [class*="span"] { |
|
||||||
float: right !important; |
.page-header span { |
||||||
margin-left: 0; |
font-size: 0.9em; |
||||||
margin-right: 2.564102564102564%; |
color: var(--color-text-muted); |
||||||
} |
} |
||||||
body.rtl .row-fluid [class*="span"]:first-child { |
|
||||||
margin-right: 0; |
/* code */ |
||||||
|
|
||||||
|
pre { |
||||||
|
border-radius: var(--cards-radius); |
||||||
|
padding: 0.8rem; |
||||||
|
font-size: 0.8rem !important; |
||||||
|
line-height: 1.6; |
||||||
} |
} |
||||||
|
|
||||||
body.rtl ul, body.rtl ol { |
:not(pre) > code { |
||||||
margin: 0 25px 10px 0; |
border-radius: var(--cards-radius); |
||||||
|
padding: 2px; |
||||||
|
font-weight: 700 !important; |
||||||
|
font-size: 0.8rem !important; |
||||||
} |
} |
||||||
|
|
||||||
table { |
.language-java, .language-xml, .language-groovy { |
||||||
margin-top: 25px; |
position: relative; |
||||||
margin-bottom: 25px; |
|
||||||
border: 1px solid #e5e5e5; |
|
||||||
border-collapse: collapse; |
|
||||||
} |
} |
||||||
|
|
||||||
thead { |
.language-java::after, .language-xml::after, .language-groovy::after { |
||||||
background-color: #f9f9f9; |
position: absolute; |
||||||
|
top: 0; |
||||||
|
right: 0; |
||||||
|
padding: 6px; |
||||||
|
font-size: 0.65rem; |
||||||
|
color: var(--color-text-muted); |
||||||
} |
} |
||||||
|
|
||||||
td { |
.language-java::after { |
||||||
padding: .25rem .5rem; |
content: 'java'; |
||||||
border: 1px solid #e5e5e5; |
|
||||||
} |
} |
||||||
|
|
||||||
th { |
.language-xml::after { |
||||||
padding: 8px 12px; |
content: 'xml'; |
||||||
border: 1px solid #e5e5e5; |
} |
||||||
font-weight: 400; |
|
||||||
|
.language-groovy::after { |
||||||
|
content: 'groovy'; |
||||||
} |
} |
||||||
|
@ -1,61 +1,86 @@ |
|||||||
|
/* https://github.com/richleland/pygments-css/ */ |
||||||
|
@import "colors.css"; |
||||||
|
:root { |
||||||
|
--syntax-muted: #999999; |
||||||
|
--syntax-annotations: #a49848; |
||||||
|
--syntax-keyword: #007020; |
||||||
|
--syntax-operators: #606060; |
||||||
|
--syntax-numbers: var(--syntax-keyword); |
||||||
|
--syntax-xml-tags: var(--syntax-keyword); |
||||||
|
} |
||||||
|
|
||||||
|
.highlight .c { color: var(--syntax-muted); font-style: italic } /* Comment */ |
||||||
|
.highlight .ch { color: var(--syntax-muted); font-style: italic } /* Comment.Hashbang */ |
||||||
|
.highlight .cm { color: var(--syntax-muted); font-style: italic } /* Comment.Multiline */ |
||||||
|
.highlight .cp { color: var(--syntax-muted); } /* Comment.Preproc */ |
||||||
|
.highlight .cpf { color: var(--syntax-muted); font-style: italic } /* Comment.PreprocFile */ |
||||||
|
.highlight .c1 { color: var(--syntax-muted); font-style: italic } /* Comment.Single */ |
||||||
|
.highlight .cs { color: var(--syntax-muted); background-color: #fff0f0 } /* Comment.Special */ |
||||||
|
|
||||||
|
.highlight .nt { color: var(--syntax-xml-tags); font-weight: bold } /* Name.Tag */ |
||||||
|
.highlight .na { color: inherit; /* var(--color-accent) */ } /* Name.Attribute */ |
||||||
|
.highlight .nf { color: inherit; /* var(--color-accent) */ } /* Name.Function */ |
||||||
|
|
||||||
|
.highlight .mb { color: var(--syntax-numbers) } /* Literal.Number.Bin */ |
||||||
|
.highlight .mf { color: var(--syntax-numbers) } /* Literal.Number.Float */ |
||||||
|
.highlight .mh { color: var(--syntax-numbers) } /* Literal.Number.Hex */ |
||||||
|
.highlight .mi { color: var(--syntax-numbers) } /* Literal.Number.Integer */ |
||||||
|
.highlight .mo { color: var(--syntax-numbers) } /* Literal.Number.Oct */ |
||||||
|
|
||||||
|
.highlight .nd { color: var(--syntax-annotations); } /* Name.Decorator */ |
||||||
|
|
||||||
|
.highlight .k { color: var(--syntax-keyword); font-weight: bold } /* Keyword */ |
||||||
|
.highlight .kd { color: var(--syntax-keyword); font-weight: bold } /* Keyword.Declaration */ |
||||||
|
.highlight .kt { color: var(--syntax-keyword); font-weight: bold } /* Keyword.Type */ |
||||||
|
.highlight .kc { color: var(--syntax-keyword); font-weight: bold } /* Keyword.Constant */ |
||||||
|
.highlight .kn { color: var(--syntax-keyword); font-weight: bold } /* Keyword.Namespace */ |
||||||
|
.highlight .kp { color: var(--syntax-keyword); font-weight: bold } /* Keyword.Pseudo */ |
||||||
|
.highlight .kr { color: var(--syntax-keyword); font-weight: bold } /* Keyword.Reserved */ |
||||||
|
|
||||||
|
.highlight .s { color: var(--color-accent-dark); background-color: var(--color-accent-light); } /* Literal.String */ |
||||||
|
.highlight .s1 { color: var(--color-accent-dark); background-color: var(--color-accent-light); } /* Literal.String.Single */ |
||||||
|
.highlight .sa { color: var(--color-accent-dark) } /* Literal.String.Affix */ |
||||||
|
.highlight .sb { color: var(--color-accent-dark) } /* Literal.String.Backtick */ |
||||||
|
.highlight .sc { color: var(--color-accent-dark) } /* Literal.String.Char */ |
||||||
|
.highlight .dl { color: var(--color-accent-dark) } /* Literal.String.Delimiter */ |
||||||
|
.highlight .sd { color: var(--color-accent-dark); font-style: italic } /* Literal.String.Doc */ |
||||||
|
.highlight .s2 { color: var(--color-accent-dark) } /* Literal.String.Double */ |
||||||
|
.highlight .se { color: var(--color-accent-dark); font-weight: bold } /* Literal.String.Escape */ |
||||||
|
.highlight .sh { color: var(--color-accent-dark) } /* Literal.String.Heredoc */ |
||||||
|
.highlight .si { color: var(--color-accent-dark); font-style: italic } /* Literal.String.Interpol */ |
||||||
|
.highlight .sx { color: var(--color-accent-dark) } /* Literal.String.Other */ |
||||||
|
.highlight .sr { color: var(--color-accent-dark) } /* Literal.String.Regex */ |
||||||
|
.highlight .ss { color: var(--color-accent-dark) } /* Literal.String.Symbol */ |
||||||
|
|
||||||
|
.highlight .o { color: var(--syntax-operators) } /* Operator */ |
||||||
|
|
||||||
.highlight .hll { background-color: #ffffcc } |
.highlight .hll { background-color: #ffffcc } |
||||||
.highlight { background: #ffffff; } |
.highlight .err { border: 1px solid #FF0000 } /* Error */ |
||||||
.highlight .c { color: #888888 } /* Comment */ |
.highlight .gd { color: #A00000 } /* Generic.Deleted */ |
||||||
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ |
|
||||||
.highlight .k { color: #008800; font-weight: bold } /* Keyword */ |
|
||||||
.highlight .cm { color: #888888 } /* Comment.Multiline */ |
|
||||||
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ |
|
||||||
.highlight .c1 { color: #888888 } /* Comment.Single */ |
|
||||||
.highlight .cs { color: #cc0000; font-weight: bold; /* background-color: #fff0f0 */ } /* Comment.Special */ |
|
||||||
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ |
|
||||||
.highlight .ge { font-style: italic } /* Generic.Emph */ |
.highlight .ge { font-style: italic } /* Generic.Emph */ |
||||||
.highlight .gr { color: #aa0000 } /* Generic.Error */ |
.highlight .gr { color: #FF0000 } /* Generic.Error */ |
||||||
.highlight .gh { color: #333333 } /* Generic.Heading */ |
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ |
||||||
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ |
.highlight .gi { color: #00A000 } /* Generic.Inserted */ |
||||||
.highlight .go { color: #888888 } /* Generic.Output */ |
.highlight .go { color: #888888 } /* Generic.Output */ |
||||||
.highlight .gp { color: #555555 } /* Generic.Prompt */ |
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ |
||||||
.highlight .gs { font-weight: bold } /* Generic.Strong */ |
.highlight .gs { font-weight: bold } /* Generic.Strong */ |
||||||
.highlight .gu { color: #666666 } /* Generic.Subheading */ |
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ |
||||||
.highlight .gt { color: #aa0000 } /* Generic.Traceback */ |
.highlight .gt { color: #0044DD } /* Generic.Traceback */ |
||||||
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ |
.highlight .m { color: #40a070 } /* Literal.Number */ |
||||||
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ |
.highlight .nb { color: #007020 } /* Name.Builtin */ |
||||||
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ |
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ |
||||||
.highlight .kp { color: #008800 } /* Keyword.Pseudo */ |
.highlight .no { color: #60add5 } /* Name.Constant */ |
||||||
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ |
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ |
||||||
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ |
.highlight .ne { color: #007020 } /* Name.Exception */ |
||||||
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ |
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ |
||||||
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ |
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ |
||||||
.highlight .na { color: #336699 } /* Name.Attribute */ |
.highlight .nv { color: #bb60d5 } /* Name.Variable */ |
||||||
.highlight .nb { color: #003388 } /* Name.Builtin */ |
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ |
||||||
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ |
|
||||||
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ |
|
||||||
.highlight .nd { color: #555555 } /* Name.Decorator */ |
|
||||||
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ |
|
||||||
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ |
|
||||||
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */ |
|
||||||
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ |
|
||||||
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */ |
|
||||||
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ |
|
||||||
.highlight .nv { color: #336699 } /* Name.Variable */ |
|
||||||
.highlight .ow { color: #008800 } /* Operator.Word */ |
|
||||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */ |
.highlight .w { color: #bbbbbb } /* Text.Whitespace */ |
||||||
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ |
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ |
||||||
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ |
.highlight .fm { color: #06287e } /* Name.Function.Magic */ |
||||||
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ |
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ |
||||||
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ |
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ |
||||||
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ |
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ |
||||||
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ |
.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ |
||||||
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ |
.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */ |
||||||
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ |
|
||||||
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ |
|
||||||
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ |
|
||||||
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ |
|
||||||
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ |
|
||||||
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ |
|
||||||
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ |
|
||||||
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ |
|
||||||
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ |
|
||||||
.highlight .vc { color: #336699 } /* Name.Variable.Class */ |
|
||||||
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */ |
|
||||||
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */ |
|
||||||
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ |
|
After Width: | Height: | Size: 993 B |
After Width: | Height: | Size: 395 B |
@ -1,107 +0,0 @@ |
|||||||
#!/usr/bin/env ruby |
|
||||||
|
|
||||||
require 'date' |
|
||||||
require 'optparse' |
|
||||||
|
|
||||||
options = { |
|
||||||
# Expects to be in the bin/ sub-directory by default |
|
||||||
:path => File.dirname(File.dirname(__FILE__)) |
|
||||||
} |
|
||||||
|
|
||||||
parser = OptionParser.new do |opt| |
|
||||||
opt.banner = 'usage: jekyll-page TITLE CATEGORY [FILENAME] [OPTIONS]' |
|
||||||
opt.separator '' |
|
||||||
opt.separator 'Options' |
|
||||||
opt.on('-e', '--edit', 'Edit the page') do |edit| |
|
||||||
options[:edit] = true |
|
||||||
end |
|
||||||
opt.on('-l', '--link', 'Relink pages') do |link| |
|
||||||
options[:link] = true |
|
||||||
end |
|
||||||
opt.on('-p PATH', '--path PATH', String, 'Path to project root') do |path| |
|
||||||
options[:path] = path |
|
||||||
end |
|
||||||
opt.separator '' |
|
||||||
end |
|
||||||
|
|
||||||
parser.parse! |
|
||||||
|
|
||||||
title = ARGV[0] |
|
||||||
category = ARGV[1] |
|
||||||
filename = ARGV[2] |
|
||||||
|
|
||||||
# Resolve any relative links |
|
||||||
BASE_DIR = File.expand_path(options[:path]) |
|
||||||
POSTS_DIR = "#{BASE_DIR}/_posts" |
|
||||||
PAGES_DIR = "#{BASE_DIR}/_pages" |
|
||||||
|
|
||||||
# Ensure the _posts directory exists (we are in the correct directory) |
|
||||||
if not Dir.exists?(POSTS_DIR) |
|
||||||
puts "#{POSTS_DIR} directory does not exists" |
|
||||||
exit |
|
||||||
end |
|
||||||
|
|
||||||
# Create _pages directory if it doesn't exist |
|
||||||
if not Dir.exists?(PAGES_DIR) |
|
||||||
Dir.mkdir(PAGES_DIR) |
|
||||||
end |
|
||||||
|
|
||||||
if options[:link] |
|
||||||
Dir.foreach(POSTS_DIR) do |name| |
|
||||||
next if name[0] == '.' |
|
||||||
nodate = name[/\d{4}-\d{2}-\d{2}-(?<rest>.*)/, 'rest'] |
|
||||||
if File.symlink?("#{PAGES_DIR}/#{nodate}") |
|
||||||
File.delete("#{PAGES_DIR}/#{nodate}") |
|
||||||
end |
|
||||||
abspath = File.absolute_path("#{POSTS_DIR}/#{name}") |
|
||||||
File.symlink(abspath, "#{PAGES_DIR}/#{nodate}") |
|
||||||
end |
|
||||||
end |
|
||||||
|
|
||||||
if not title or not category |
|
||||||
# This flag can be used by itself, exit silently if no arguments |
|
||||||
# are defined |
|
||||||
if not options[:link] |
|
||||||
puts parser |
|
||||||
end |
|
||||||
exit |
|
||||||
end |
|
||||||
|
|
||||||
if not filename |
|
||||||
filename = title.downcase.gsub(/[^a-z0-9\s]/, '').gsub(/\s+/, '-') |
|
||||||
end |
|
||||||
|
|
||||||
today=Date.today().strftime('%F') |
|
||||||
now=DateTime.now().strftime('%F %T') |
|
||||||
|
|
||||||
filepath = "#{POSTS_DIR}/#{today}-#{filename}.md" |
|
||||||
symlink = "#{PAGES_DIR}/#{filename}.md" |
|
||||||
|
|
||||||
if File.exists?(filepath) |
|
||||||
puts "File #{filepath} already exists" |
|
||||||
exit |
|
||||||
end |
|
||||||
|
|
||||||
content = <<END |
|
||||||
--- |
|
||||||
layout: page |
|
||||||
title: \"#{title}\" |
|
||||||
category: #{category} |
|
||||||
date: #{now} |
|
||||||
--- |
|
||||||
END |
|
||||||
|
|
||||||
File.open(filepath, 'w') do |file| |
|
||||||
file.puts content |
|
||||||
end |
|
||||||
|
|
||||||
File.symlink("../_posts/#{today}-#{filename}.md", symlink) |
|
||||||
|
|
||||||
if options[:edit] |
|
||||||
if not ENV['EDITOR'] |
|
||||||
puts 'No $EDITOR variable set' |
|
||||||
exit |
|
||||||
end |
|
||||||
puts ENV['EDITOR'] |
|
||||||
exec("#{ENV['EDITOR']} #{filename}") |
|
||||||
end |
|
Loading…
Reference in new issue