-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new layout for section page and documentation
- Loading branch information
Showing
7 changed files
with
247 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<!doctype html> | ||
<html lang="{{ site.lang | default: "en-US" }}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="chrome=1"> | ||
|
||
{% seo %} | ||
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}"> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | ||
<script src="{{ '/assets/js/respond.js' | relative_url }}"></script> | ||
<!--[if lt IE 9]> | ||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | ||
<![endif]--> | ||
<!--[if lt IE 8]> | ||
<link rel="stylesheet" href="{{ '/assets/css/ie.css' | relative_url }}"> | ||
<![endif]--> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> | ||
|
||
</head> | ||
<body class="{{ page.colorspace }}"> | ||
{% if site.show_header %} | ||
<div id="header"> | ||
<nav> | ||
<li class="fork"><a href="{{ site.github.repository_url }}">View On GitHub</a></li> | ||
{% if site.show_downloads %} | ||
<li class="downloads"><a href="{{ site.github.zip_url }}">ZIP</a></li> | ||
<li class="downloads"><a href="{{ site.github.tar_url }}">TAR</a></li> | ||
<li class="title">DOWNLOADS</li> | ||
{% endif %} | ||
</nav> | ||
</div><!-- end header --> | ||
{% endif %} | ||
|
||
<div class="wrapper"> | ||
{% if site.show_header %}<section> | ||
{% else %}<section class="no-header">{% endif %} | ||
<div id="title"> | ||
{% if page.icon %} | ||
<img src="{{ site.url }}/assets/images/{{ page.icon }}" /> | ||
{% endif %} | ||
<h1>{{ site.title | default: site.github.repository_name }}</h1> | ||
<p>{{ site.description | default: site.github.project_tagline }}</p> | ||
<hr> | ||
</div> | ||
|
||
{{ content }} | ||
|
||
<div class="listings"> | ||
{% for category in page.listings %} | ||
<div class="listings-category"> | ||
<h2 class="title">{{ category[0] }}</h2> | ||
{% for listing in category[1] %} | ||
<div class="listing"> | ||
{% if listing[1].link contains 'http' %} | ||
<a href="{{ listing[1].link }}"> | ||
{% else %} | ||
<a href="{{ listing[1].link | baseurl }}"> | ||
{% endif %} | ||
<img src="{{ listing[1].icon | baseurl }}" /> | ||
<h3>{{ listing[0] }}</h3> | ||
</a> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
{% endfor %} | ||
</div> | ||
|
||
<a href="../" class="button">Back</a> | ||
|
||
<div id="footer"> | ||
<hr /> | ||
<span class="credits left">Project maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></span> | ||
<span class="credits right">Hosted on GitHub Pages — Theme by <a href="https://draculatheme.com/">Dracula</a></span> | ||
</div> | ||
</section> | ||
|
||
</div> | ||
|
||
{% if site.google_analytics %} | ||
<script type="text/javascript"> | ||
(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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@mixin clearfix() { | ||
&:before, | ||
&:after { | ||
content: ""; | ||
display: table; | ||
} | ||
&:after { | ||
clear: both; | ||
} | ||
zoom: 1; | ||
} | ||
@mixin clear() { | ||
clear: both; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
layout: default | ||
colorspace: red | ||
--- | ||
|
||
## Using Listing Pages | ||
|
||
> Listing pages can be used as a central hub of a larger set of content that can then be navigated to through the listed links. These pages are benificial for simplifying navigation through your documentation. | ||
[Preview](../samples/listings-page){: .button} | ||
|
||
### Listing Hash Structure | ||
|
||
```yaml | ||
listings: | ||
"Featured": | ||
'React Dev Tools': | ||
link: '#example' | ||
icon: '/assets/images/candies.png' | ||
'Slack': | ||
link: '#example' | ||
icon: '/assets/images/candies.png' | ||
'Visual Studio Code': | ||
link: '#example' | ||
icon: '/assets/images/candies.png' | ||
"Code Editors": | ||
'Vim': | ||
link: '#example' | ||
icon: '/assets/images/candies.png' | ||
``` | ||
As you can see, each Listings page has a page variable defined of `listings` with aa nested category hash with it's frontend name. These categories then have a final nested hash with the Listing items name and a link/icon pair inside. | ||
|
||
This structure must be followed exactly for the layout to output the predefined structured listings page. | ||
|
||
[Home](../){: .button} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
layout: listings | ||
colorspace: purple | ||
listings: | ||
'Featured': | ||
'React Dev Tools': | ||
link: '#example' | ||
icon: '/assets/images/candies.png' | ||
'Slack': | ||
link: '#example' | ||
icon: '/assets/images/candies.png' | ||
'Code Editors': | ||
'Vim': | ||
link: '#example' | ||
icon: '/assets/images/candies.png' | ||
'Sublime': | ||
link: '#example' | ||
icon: '/assets/images/candies.png' | ||
'Xcode': | ||
link: '#example' | ||
icon: '/assets/images/candies.png' | ||
--- | ||
|
||
Below you will find an example of the structure of a listings page with some filler content that goes nowhere. | ||
|
||
[Documentation](../docs/listings-pages){: .button} |