Skip to content

Commit

Permalink
Merge pull request barryclark#23 from pmarsceill/v0.2.0
Browse files Browse the repository at this point in the history
v0.2.0 release
  • Loading branch information
pmarsceill authored Nov 19, 2018
2 parents fa40528 + cd55ce0 commit 2199047
Show file tree
Hide file tree
Showing 31 changed files with 392 additions and 95 deletions.
1 change: 1 addition & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"ignoreFiles" : [
"assets/css/just-the-docs.scss",
"assets/css/dark-mode-preview.scss",
"_sass/vendor/**/*.scss"
],
"extends": [
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ env:

install:
- npm install
- gem install bundler --version '>=1.17.1'
- bundle install

script:
Expand Down
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ search_enabled: true
aux_links:
"Just the Docs on GitHub":
- "//github.com/pmarsceill/just-the-docs"

# Color scheme currently only supports "dark" or nil (default)
color_scheme: nil
58 changes: 39 additions & 19 deletions _includes/nav.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,44 @@
<nav>
<ul class="navigation-list">
{% assign pages_list = site.html_pages | sort:"nav_order" %}
{% for node in pages_list %}
<li class="navigation-list-item{% if page.url == node.url %} active{% endif %} js-side-nav-item">
{% if node.parent == nil or node.has_children == true %}
<a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url or (page.parent != nil and page.parent == node.parent) %} active{% endif %}">{{ node.title }}</a>
{% if (node.has_children == true and node.parent == page.parent) %}
{% assign children_list = site.html_pages | sort:"nav_order" %}
<ul class="navigation-list-child-list">
{% for child in children_list %}
{% if child.parent == node.parent and child.title != node.title %}
<li class="navigation-list-item {% if page.url == child.url %} active{% endif %}">
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% assign pages_list = site.html_pages | sort:"nav_order" %}
{% for node in pages_list %}
{% unless node.nav_exclude %}
{% if node.parent == nil %}
<li class="navigation-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
{% if page.parent == node.title or page.grand_parent == node.title %}
{% assign first_level_url = node.url | absolute_url %}
{% endif %}
<a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
{% if node.has_children %}
{% assign children_list = site.html_pages | sort:"nav_order" %}
<ul class="navigation-list-child-list ">
{% for child in children_list %}
{% if child.parent == node.title %}
<li class="navigation-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
{% if page.url == child.url or page.parent == child.title %}
{% assign second_level_url = child.url | absolute_url %}
{% endif %}
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
{% if child.has_children %}
{% assign grand_children_list = site.html_pages | sort:"nav_order" %}
<ul class="navigation-list-child-list">
{% for grand_child in grand_children_list %}
{% if grand_child.parent == child.title %}
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
<a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</li>
{% endif %}
</li>
{% endfor %}
{% endunless %}
{% endfor %}
</ul>
</nav>
11 changes: 8 additions & 3 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="page-wrap">
<div class="side-bar">
<a href="{{ site.url }}{{ site.baseurl }}" class="site-title fs-6 text-grey-dk-300 lh-tight">{{ site.title }}</a>
<a href="{{ site.url }}{{ site.baseurl }}" class="site-title fs-6 lh-tight">{{ site.title }}</a>
<span class="fs-3"><button class="js-main-nav-trigger navigation-list-toggle btn btn-outline" type="button" data-text-toggle="Hide">Menu</button></span>
<div class="navigation main-nav js-main-nav">
{% include nav.html %}
Expand Down Expand Up @@ -37,10 +37,15 @@
</div>
<div class="main-content">
{% unless page.url == "/" %}
{% if page.parent != nil and page.parent != page.title %}
{% if page.parent %}
<nav class="breadcrumb-nav">
<ol class="breadcrumb-nav-list">
<li class="breadcrumb-nav-list-item"><a href="{{ site.url }}{{ site.baseurl }}/{{ page.parent | slugify }}">{{ page.parent }}</a></li>
{% if page.grand_parent %}
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item"><a href="{{ second_level_url }}">{{ page.parent }}</a></li>
{% else %}
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.parent }}</a></li>
{% endif %}
<li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li>
</ol>
</nav>
Expand Down
10 changes: 8 additions & 2 deletions _sass/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
box-sizing: border-box;
}

::selection {
color: $white;
background: $link-color;
}

html {
@include fs-4;
}
Expand All @@ -16,6 +21,7 @@ body {
font-size: inherit;
line-height: $body-line-height;
color: $body-text-color;
background-color: $body-background-color;
}

p,
Expand Down Expand Up @@ -64,7 +70,7 @@ a {

a:not([class]) {
text-decoration: none;
background-image: linear-gradient($grey-lt-100 0%, $grey-lt-100 100%);
background-image: linear-gradient($border-color 0%, $border-color 100%);
background-repeat: repeat-x;
background-position: 0 100%;
background-size: 1px 1px;
Expand Down Expand Up @@ -99,6 +105,6 @@ hr {
height: 1px;
padding: 0;
margin: $sp-6 0;
background-color: $grey-lt-100;
background-color: $border-color;
border: 0;
}
18 changes: 11 additions & 7 deletions _sass/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
font-size: inherit;
font-weight: 500;
line-height: 1.5;
color: $purple-200;
color: $link-color;
text-decoration: none;
vertical-align: baseline;
cursor: pointer;
background-color: #f7f7f7;
background-color: $base-button-color;
border-width: 0;
border-radius: 3px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
Expand All @@ -38,21 +38,21 @@

&:hover,
&.zeroclipboard-is-hover {
color: $purple-300;
color: darken($link-color, 2%);
}

&:hover,
&:active,
&.zeroclipboard-is-hover,
&.zeroclipboard-is-active {
text-decoration: none;
background-color: #f4f4f4;
background-color: darken($base-button-color, 1%);
}

&:active,
&.selected,
&.zeroclipboard-is-active {
background-color: #ededed;
background-color: darken($base-button-color, 3%);
background-image: none;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}
Expand All @@ -75,15 +75,15 @@
}

.btn-outline {
color: $blue-100;
color: $link-color;
background: transparent;
box-shadow: inset 0 0 0 2px $grey-lt-300;

&:hover,
&:active,
&.zeroclipboard-is-hover,
&.zeroclipboard-is-active {
color: $grey-dk-100;
color: darken($link-color, 4%);
text-decoration: none;
background-color: transparent;
box-shadow: inset 0 0 0 3px $grey-lt-300;
Expand All @@ -101,6 +101,10 @@
}
}

.btn-primary {
@include btn-color($white, $btn-primary-color);
}

.btn-purple {
@include btn-color($white, $purple-100);
}
Expand Down
6 changes: 3 additions & 3 deletions _sass/code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
code {
padding: 0.2em 0.15em;
font-weight: 400;
background-color: $grey-lt-000;
background-color: $code-background-color;
border: $border $border-color;
border-radius: $border-radius;
}

.highlight {
pre.highlight {
padding: $sp-3;
margin-bottom: 0;
background-color: $grey-lt-000;
background-color: $code-background-color;

code {
padding: 0;
Expand Down
14 changes: 14 additions & 0 deletions _sass/color_schemes/dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

$body-background-color: $grey-dk-300;
$sidebar-color: $grey-dk-300;
$border-color: $grey-dk-200;

$body-text-color: $grey-lt-300;
$body-heading-color: $grey-lt-000;
$nav-child-link-color: $grey-dk-000;

$link-color: $blue-000;
$btn-primary-color: $blue-200;
$base-button-color: $grey-dk-250;

$code-background-color: $grey-dk-250;
6 changes: 6 additions & 0 deletions _sass/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
// stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type

.page-content {
a {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

ul,
ol {
padding-left: 1.5em;
Expand Down
14 changes: 11 additions & 3 deletions _sass/custom/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// $grey-dk-000: #959396;
// $grey-dk-100: #5c5962;
// $grey-dk-200: #44434d;
// $grey-dk-250: #302d36 !default;
// $grey-dk-300: #27262b;
//
// $grey-lt-000: #f5f6fa;
Expand All @@ -39,9 +40,16 @@
// $green-200: #009c7b;
// $green-300: #026e57;
//
// $body-text-color: $grey-dk-100;
// $body-heading-color: $grey-dk-300;
// $link-color: $purple-000;
// $body-background-color: $white !default;
// $sidebar-color: $grey-lt-000 !default;
// $code-background-color: $grey-lt-000 !default;

// $body-text-color: $grey-dk-100 !default;
// $body-heading-color: $grey-dk-300 !default;
// $nav-child-link-color: $grey-dk-100 !default;
// $link-color: $purple-000 !default;
// $btn-primary-color: $purple-100 !default;
// $base-button-color: #f7f7f7 !default;
//
// //
// // Media queries in pixels
Expand Down
8 changes: 4 additions & 4 deletions _sass/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
flex-wrap: wrap;
padding-top: $gutter-spacing-sm;
padding-bottom: $gutter-spacing-sm;
background-color: $grey-lt-000;
background-color: $sidebar-color;

@include mq(md) {
flex-wrap: nowrap;
Expand Down Expand Up @@ -75,10 +75,10 @@
}

.page-header {
background-color: $grey-lt-000;
background-color: $sidebar-color;

@include mq(md) {
background-color: $white;
background-color: $body-background-color;
}

.main-content {
Expand Down Expand Up @@ -138,6 +138,6 @@ body {
position: static;
align-self: flex-end;
justify-self: end;
background-color: $grey-lt-000;
background-color: $sidebar-color;
}
}
26 changes: 21 additions & 5 deletions _sass/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
.site-title {
display: block;
flex: 1 1 auto;
background-color: $grey-lt-000;
color: $body-heading-color;
background-color: $sidebar-color;

@include mq(md) {
position: absolute;
Expand Down Expand Up @@ -34,7 +35,7 @@
list-style: none;

.navigation-list-link {
color: $grey-dk-100;
color: $nav-child-link-color;
}

.navigation-list-item {
Expand All @@ -44,13 +45,13 @@
position: absolute;
margin-top: 0.3em;
margin-left: -0.8em;
color: $grey-dk-000;
color: rgba($body-text-color, 0.3);
content: "- ";
}

&.active {
&::before {
color: $grey-dk-100;
color: $body-text-color;
}
}
}
Expand All @@ -63,6 +64,16 @@
@include mq(md) {
@include fs-3;
}

.navigation-list-child-list {
display: none;
}

&.active {
.navigation-list-child-list {
display: block;
}
}
}

.navigation-list-link {
Expand All @@ -72,7 +83,7 @@

&.active {
font-weight: 600;
color: $grey-dk-200;
color: $body-heading-color;
text-decoration: none;
}
}
Expand Down Expand Up @@ -101,6 +112,11 @@
}

// Breadcrumb nav
.breadcrumb-nav {
@include mq(md) {
margin-top: -$sp-4;
}
}

.breadcrumb-nav-list {
padding-left: 0;
Expand Down
Loading

0 comments on commit 2199047

Please sign in to comment.