From 92ae3aac7b99cca7d5a3159190a3f1945a1a3129 Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Sun, 22 Jan 2023 12:21:37 -0800 Subject: [PATCH] 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. --- templates/about-base.html | 4 ++++ templates/core/home.html | 4 ++++ templates/style/style.scss | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/templates/about-base.html b/templates/about-base.html index 3cee859cd..a7366f831 100644 --- a/templates/about-base.html +++ b/templates/about-base.html @@ -1,5 +1,9 @@ {% extends "base.html" %} +{%- block body_classes -%} +centered +{%- endblock body_classes -%} + {% block header %}
diff --git a/templates/core/home.html b/templates/core/home.html index 1c4593ae2..a99fb6edc 100644 --- a/templates/core/home.html +++ b/templates/core/home.html @@ -2,6 +2,10 @@ {%- block title -%}Docs.rs{%- endblock title -%} +{%- block body_classes -%} +centered +{%- endblock body_classes -%} + {%- block body -%}

{{ "cubes" | fas(fw=true) }} Docs.rs

diff --git a/templates/style/style.scss b/templates/style/style.scss index a5da2da43..a88a4341b 100644 --- a/templates/style/style.scss +++ b/templates/style/style.scss @@ -211,7 +211,6 @@ pre { div.container { max-width: 1160px; - margin: 0 auto; text-align: left; > .chartjs-render-monitor { @@ -220,6 +219,10 @@ div.container { } } +body.centered div.container { + margin: 0 auto; +} + div.landing { text-align: center; padding-top: 30px;