Skip to content

Commit

Permalink
Add support for wide docs pages
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-nenashev committed Sep 28, 2023
1 parent fa31fd5 commit 09148db
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion _docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
crumbtitle: "Documentation"
toc_rank: 1001
permalink: /docs/
docs-wide: true
description: >
All of WireMock’s features are accessible via its REST (JSON) interface and its Java API.
Additionally, stubs can be configured via JSON files. Read the full doc here.
Expand All @@ -15,7 +16,7 @@
display: grid;
margin-left: auto;
margin-right: auto;
max-width: 61rem;
max-width: 160rem;
gap: 1rem;
grid-template-columns: repeat(auto-fill, 15rem);
vertical-align: middle;
Expand Down
2 changes: 1 addition & 1 deletion _layouts/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

</style>

<article class="page" itemscope itemtype="http://schema.org/CreativeWork">
<article class="{% if page.docs-wide %}page-wide{% else %}page{% endif %}" itemscope itemtype="http://schema.org/CreativeWork">
{% if page.seo_title %}<meta itemprop="headline" content="{{ page.seo_title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date: "%B %d, %Y" }}">{% endif %}
Expand Down
13 changes: 13 additions & 0 deletions _sass/_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
@include breakpoint($x-large) {
max-width: $x-large;
}

@include breakpoint($x2-large) {
max-width: $x2-large;
}
}

.custom-doc-wrapper {
Expand All @@ -38,6 +42,11 @@
}
}

.page-wide {
@extend .page;
@include suffix(0 of 12);
}

.page__title {
margin-top: 0;
line-height: 1;
Expand Down Expand Up @@ -142,6 +151,10 @@
@include breakpoint($x-large) {
max-width: $x-large;
}

@include breakpoint($x2-large) {
max-width: $x2-large;
}
}

.page__title,
Expand Down
1 change: 1 addition & 0 deletions _sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ $medium: 768px;
$medium-wide: 900px;
$large: 1024px;
$x-large: 1280px;
$x2-large: 1920px;

/*
Grid
Expand Down

0 comments on commit 09148db

Please sign in to comment.