Skip to content

Commit

Permalink
Docs: Update jekyll-theme-amethyst
Browse files Browse the repository at this point in the history
https://github.com/qunitjs/jekyll-theme-amethyst/commits/5479c6b

Highlights:

* New "Edit this page" link in the footer.
* Minor bug fixes and performance improvements.
* Sync sitenav with qunitjs.com.
  • Loading branch information
Krinkle committed Jan 1, 2021
1 parent 4846d3b commit 0e1430c
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 73 deletions.
8 changes: 4 additions & 4 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ title: QUnit API Docs
excerpt: "API reference documentation for QUnit."
url: "https://api.qunitjs.com"
baseurl: ""
permalink: :title/
# This a custom theme so the native Jekyll theme system is ignored.
# But, we use github-pages which has a default theme of 'primer'.
# This is a problem because, even if we ignore its output file,
Expand All @@ -30,12 +31,14 @@ plugins:
- jekyll-redirect-from

# Theme
remote_theme: https://github.com/qunitjs/jekyll-theme-amethyst@c28b0fe
remote_theme: https://github.com/qunitjs/jekyll-theme-amethyst@5479c6b
amethyst:
edituri_base: https://github.com/qunitjs/qunit/blob/master/docs/
header_logo:
src: /img/logo-with-colored-text.svg
width: 250
height: 72
mastodon: https://mastodon.technology/@qunitjs
twitter: qunitjs
github: qunitjs
gitter: qunitjs/qunit
Expand Down Expand Up @@ -78,6 +81,3 @@ exclude:
- README.md
- CONTRIBUTING.md
- CNAME

# Output
permalink: :title/
9 changes: 8 additions & 1 deletion docs/_data/sitenav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
sub:
- name: Getting Started
href: https://qunitjs.com/intro/
- name: Command-line interface
href: https://qunitjs.com/cli/
- name: Plugins
href: https://qunitjs.com/plugins/
- name: 2.x Upgrade Guide
Expand All @@ -21,4 +23,9 @@
- name: Async control
href: /async/
- name: About
href: https://qunitjs.com/about/
href: /about/
sub:
- name: Who's using QUnit?
href: /projects/
- name: About QUnit
href: /about/
2 changes: 1 addition & 1 deletion docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h2>{{ page.title }}</h2>
{%- assign warning = true -%}
{%- endif -%}

<p class="version-details{% if warning %} version-details--warning{% endif %}">
<p class="version-details{% if warning %} note--warning{% endif %}">
{%- capture lines -%}
{%- if page.version_added %}
{% include version.html version=page.version_added label="version added" %}
Expand Down
24 changes: 15 additions & 9 deletions docs/_sass/amethyst-variables.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
// Amethyst theme variables for QUnit
// https://brand.jquery.org/colors/#qunit-purple

// Primary purple
$color-vibrant: #9c3493;
// Primary color
//
// Usage: link text color, primary button background.
$color-vibrant: #9c3493; // QUnit Primary Purple (Hue 300)

// Secondary purple
$color-accent: #390F39;
// Dark shade
//
// Usage: navigation background, heading text color
$color-accent: #390F39; // QUnit Secondary Purple

// Medium purple, based on 2015 qunitjs.com design
$color-medium: #6a2166;

// Very light purple (matches hue 300 of primary)
$color-bright: #fbdbfb;
// Bright color
//
// Very close to white, generally within 20 hue points of $color-vibrant,
// and within the following range: `hsl(???, 80-84%, 72-92%)`
//
// Usage: navigation link color, search result highlight background
$color-bright: hsl(300, 80%, 92.2%);
63 changes: 5 additions & 58 deletions docs/_sass/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,50 +63,6 @@
text-decoration: none;
}

/* Content table */

table {
/* Reset */
border-collapse: collapse;
border-spacing: 0;

padding: 0;
margin-bottom: $size-spacing;

@media (max-width: $screen-m) {
display: block;
overflow: auto;
}
}
tr {
border-top: 1px solid $color-off-white;
background-color: $color-white;
margin: 0;
padding: 0;
}
tr:nth-child(2n) {
background-color: $color-light;
}
tr th,
tr td {
text-align: left;
margin: 0;
padding: 0.3em 0.4em;
border: 1px solid $color-off-white;
}
tr th {
background: $color-light;
font-weight: bold;
}
tr th :first-child,
tr td :first-child {
margin-top: 0;
}
tr th :last-child,
tr td :last-child {
margin-bottom: 0;
}

/* Custom link styles */

.body a {
Expand All @@ -123,26 +79,17 @@ tr td :last-child {
.version-details {
font-size: 90%;
font-weight: bold;
background: $color-light;
padding: 0.2em 0.4em;

@media (min-width: $screen-m) {
clear: right;
float: right;
text-align: right;
border: 1px solid $color-off-white;
border-width: 1px;
border-style: solid;
}
}
.note {
padding: 0.5em $box-spacing;
margin: $box-spacing;
border-radius: 5px;

background: #fff;
border: 1px solid #5293e6;
}
.version-details--warning,
.note--warning {
background-color: #fdf5c5;
border-color: #e6d252;
.version-details:not(.note--warning) {
background: $color-light;
border-color: $color-off-white;
}

0 comments on commit 0e1430c

Please sign in to comment.