Skip to content

Commit 6ac6dc2

Browse files
committed
Use more full width content
1 parent 3233e94 commit 6ac6dc2

File tree

4 files changed

+28
-18
lines changed

4 files changed

+28
-18
lines changed

guides/_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ defaults:
2121
path: ""
2222
values:
2323
layout: "default"
24+
fullwidth: true
2425

2526
algolia:
2627
application_id: '8VO8708WUV'

guides/_layouts/default.html

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,27 +53,29 @@
5353
<a href="{{ site.baseurl }}/" class="img-link">
5454
<img class="graphql-ruby-img" src="{{ site.baseurl }}/graphql-ruby.png" alt="GraphQL Ruby Logo" />
5555
</a>
56-
<a href="{{ site.baseurl }}/getting_started">Get Started</a>
57-
<a href="{{ site.baseurl }}/guides">Guides</a>
58-
<a href="{% api_doc_root %}">API</a>
59-
<a href="https://buttondown.email/graphql-ruby">Newsletter</a>
60-
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
61-
<a href="https://graphql.pro">Upgrade to Pro</a>
62-
<input
63-
class="search-input"
64-
onkeyup="GraphQLRubySearch.run(this)"
65-
type="text"
66-
placeholder="Search the docs..."
67-
/>
68-
<a href="#" onclick="event.preventDefault(); detectDarkTheme(true)" class="dark-theme-button"></a>
56+
<div class="nav-links">
57+
<a href="{{ site.baseurl }}/getting_started">Get Started</a>
58+
<a href="{{ site.baseurl }}/guides">Guides</a>
59+
<a href="{% api_doc_root %}">API</a>
60+
<a href="https://buttondown.email/graphql-ruby">Newsletter</a>
61+
<a href="https://github.com/rmosolgo/graphql-ruby">Source Code</a>
62+
<a href="https://graphql.pro">Upgrade to Pro</a>
63+
<input
64+
class="search-input"
65+
onkeyup="GraphQLRubySearch.run(this)"
66+
type="text"
67+
placeholder="Search the docs..."
68+
/>
69+
<a href="#" onclick="event.preventDefault(); detectDarkTheme(true)" class="dark-theme-button"></a>
70+
</div>
6971
</div>
7072
</div>
7173
<div class="search-results-container">
7274
<div id="search-results">
7375
</div>
7476
</div>
7577
</div>
76-
<div class="container">
78+
<div class="container {% if page.fullwidth %} fullwidth {% endif %}">
7779
{{ content }}
7880
</div>
7981
<script src="https://cdn.jsdelivr.net/algoliasearch/3/algoliasearchLite.min.js"></script>

guides/css/main.scss

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ strong, b {
9292
align-items: center;
9393
$fade-time: 0.2s;
9494

95+
.nav-links {
96+
margin-left: auto;
97+
display: flex;
98+
}
99+
95100
.img-link {
96101
transition: background $fade-time;
97102

@@ -133,12 +138,15 @@ strong, b {
133138
}
134139

135140
.header-container {
136-
max-width: 1240px;
137-
margin: 0px auto;
141+
margin: 0px 20px 0px 20px;
138142
}
139143

140144
.container {
141145
max-width: 1200px;
146+
&.fullwidth {
147+
max-width: 100%;
148+
margin: 0px 20px 0px 20px;
149+
}
142150
margin: 0px auto;
143151
padding: 10px 20px;
144152
background: $container-color;
@@ -448,8 +456,6 @@ table {
448456
margin: 10px;
449457
border: 1px solid $subtle-color;
450458
border-radius: 3px;
451-
// make it float right in a flex container
452-
margin-left: auto;
453459
}
454460

455461
.search-results-container {

guides/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Welcome
3+
fullwidth: false
34
---
45
<div class="hero">
56
<div class="hero-title">

0 commit comments

Comments
 (0)