Skip to content

Commit

Permalink
Doc : new layout
Browse files Browse the repository at this point in the history
  • Loading branch information
xurei committed Jan 14, 2019
1 parent d8e8fb1 commit b0011fd
Show file tree
Hide file tree
Showing 17 changed files with 506 additions and 48 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -3,6 +3,8 @@
# compiled output
/examples-build
.nyc_output
.jekyll-metadata
_site
coverage

# dependencies
Expand Down
3 changes: 2 additions & 1 deletion docs/API.md
@@ -1,4 +1,5 @@
[Index](./)
---
---

# API reference

Expand Down
6 changes: 6 additions & 0 deletions docs/Dockerfile
@@ -0,0 +1,6 @@
FROM jekyll/jekyll:3.8

WORKDIR /dependencies
COPY ./Gemfile /dependencies
RUN chmod a+rwx /dependencies && bundle install
WORKDIR /srv/jekyll
2 changes: 2 additions & 0 deletions docs/Gemfile
@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
5 changes: 4 additions & 1 deletion docs/_config.yml
@@ -1 +1,4 @@
theme: jekyll-theme-midnight
theme: jekyll-theme-leap-day
show_downloads: false
title: Restgoose
npm_package: "@xureilab/restgoose"
74 changes: 74 additions & 0 deletions docs/_layouts/default.html
@@ -0,0 +1,74 @@
<!doctype html>
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

{% seo %}
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<script src="{{ '/assets/js/jquery-3.3.0.min.js' | relative_url }}" integrity="sha256-RTQy8VOmNlT6b2PIRur37p6JEBZUE7o8wPgMvu18MC4=" crossorigin="anonymous"></script>
<script src="{{ '/assets/js/main.js' | relative_url }}"></script>
<!--[if lt IE 9]>
<script src="{{ '/assets/js/html5shiv.min.js' | relative_url }}" integrity="sha256-3Jy/GbSLrg0o9y5Z5n1uw0qxZECH7C6OQpVBgNFYa0g=" crossorigin="anonymous"></script>
<![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
</head>

<body>
<header>
<h1>
<a href="{{ '/' | relative_url }}">{{ site.title | default: site.github.repository_name }}</a>
</h1>
<p>{{ site.description | default: site.github.project_tagline }}</p>
</header>

<div id="banner">
<a href="{{ site.github.repository_url }}" class="button fork">
<span id="logo"></span>
<strong>View On GitHub</strong>
</a>

{% if site.show_downloads %}
<div class="downloads">
<span>Downloads:</span>
<ul>
<li><a href="{{ site.github.zip_url }}" class="button">ZIP</a></li>
<li><a href="{{ site.github.tar_url }}" class="button">TAR</a></li>
</ul>
</div>
{% endif %}
</div><!-- end banner -->

<div class="wrapper">
<nav>
<ul>
<li>
<a href="{{ '/' | relative_url }}">↵ Index</a>
</li>
<li></li>
</ul>
</nav>
<section>
{{ content }}

<footer>
{% if site.github.is_project_page %}
<p>Project maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p>
{% endif %}
<!--<p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://twitter.com/mattgraham">mattgraham</a></small></p>-->
</footer>
</section>
</div>

{% if site.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</body>
</html>
215 changes: 215 additions & 0 deletions docs/assets/css/style.scss
@@ -0,0 +1,215 @@
---
---

@import "{{ site.theme }}";

$green: #118D4C;

body {
background-color: #444;
font-size: 16px;
line-height: 25px;
padding-bottom: 0;
}

a {
color: $green;

&:hover {
text-decoration: underline;
}
}

header {
background: $green;
padding-bottom: 20px;

a {
color: inherit;
text-shadow: 0 2px 0 #225038;
}
}

div.wrapper {
@media screen and (min-width: 1060px) {
width: 800px;
margin: 0 auto;
}
@media screen and (min-width: 1200px) {
width: 900px;
left: 100px;
}
}

section {
max-width: none;
box-sizing: border-box;
width: 100%;
@media screen and (min-width: 760px) {
width: 90%;
}
@media screen and (min-width: 1060px) {
width: 100%;
margin-top: 120px;
margin-bottom: 0;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}

@media screen and (max-width: 480px) {
margin-top: 0;
}
}

#banner {
background: #118D4C;
border: none;
box-shadow: none;
padding-right: 10px;
box-sizing: border-box;
text-align: right;

@media screen and (min-width: 1024px) {
right: 0;
top: 0;
left: initial;
margin: 0;
width: 390px;
}

a {
color: #333;
}

.fork {
$w: 21px;
float: right;
position: relative;
top: initial;
left: initial;
right: initial;
padding-left: 12px + $w + 5px;
margin-left: 0;

#logo {
position: absolute;
width: $w;
height: $w;
left: 10px;
margin-top: -1px;
right: initial;
display: inline-block;
vertical-align: middle;
background-size: contain;
opacity: 0.8;
}

&:hover {
text-decoration: none;

.logo {
opacity: 0.9;
}
}
}
}

nav {
//top: 120px;
//bottom: 0px;
//margin-left: -590px;
//padding-top: 25px;
//padding-right: 10px;
//overflow-y: auto;
//text-align: left;

top: 120px;
bottom: 0px;
margin-left: -590px;
padding-top: 25px;
padding-right: 10px;
overflow-y: auto;
text-align: left;

background: #ddd;

@media screen and (max-width: 1199px) {
display: none;
}

ul {
list-style: none;
padding-left: 15px;
a {
//color: #eee;

&:hover {
color: $green;
}
}

li:before {
content: none;
}

li.tag-h1 a {
//color: #fff;
}

.tag-h1 {
padding-left: 0;

a:hover {
color: $green;
}
}
.tag-h2 {
padding-left: 20px;
}
.tag-h3 {
padding-left: 40px;
}
}
}

footer {
position: static;
display: block;
width: auto;
color: #bbb;
margin-left: 0;
text-align: center;
> p {
margin: 0;
}
}

pre, code {
font-family: monospace;
}

ul {
list-style: none;
padding: 0;

li {
padding-left: 20px;
}

li:before {
content: ">";
margin-left: -18px;
margin-right : 0;
display: inline-block;
width: 18px;
position: absolute;
//color: $green;
}
}
//----------------------------------------------------------------------------------------------------------------------

// Helpers

.text-right {
text-align: right;
}
Binary file added docs/assets/images/body-background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b0011fd

Please sign in to comment.