Skip to content

Commit d79daab

Browse files
jshasyphar
authored andcommitted
Left-align crate and release pages
Retain centered alignment for / and /about. Since the crate page is navigated as part of a crate's documentation, it's jarring for it to have different alignment than the documentation itself.
1 parent d49e8ec commit d79daab

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

templates/about-base.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{% extends "base.html" %}
22

3+
{%- block body_classes -%}
4+
centered
5+
{%- endblock body_classes -%}
6+
37
{% block header %}
48
<div class="docsrs-package-container">
59
<div class="container">

templates/core/home.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
{%- block title -%}Docs.rs{%- endblock title -%}
44

5+
{%- block body_classes -%}
6+
centered
7+
{%- endblock body_classes -%}
8+
59
{%- block body -%}
610
<div class="container landing">
711
<h1 class="brand">{{ "cubes" | fas(fw=true) }} Docs.rs</h1>

templates/style/style.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,13 @@ pre {
207207

208208
div.container {
209209
max-width: 1160px;
210-
margin: 0 auto;
211210
text-align: left;
212211
}
213212

213+
body.centered div.container {
214+
margin: 0 auto;
215+
}
216+
214217
div.landing {
215218
text-align: center;
216219
padding-top: 30px;

0 commit comments

Comments
 (0)