Skip to content

Center 404 copy in a janky way :) #2768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 31, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions readthedocs/donate/templates/donate/promo_404.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{% endblock %}

{% block content %}
<div style="margin-left: auto; margin-right: auto; width: 900px; text-align: center">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't be putting inline styles into templates, and the width shouldn't be set at a static width here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems to go against the goal of keeping the donate stuff as it's own app? I think it probably makes sense for a small use-case like this.

Copy link
Contributor

@agjohnson agjohnson Mar 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These rules don't need to be brought into core.css if they are specific to just this use case. A simple CSS include from a file in donate/static works. Inline styles should always be avoided as CSS can't be overhauled without sifting through templates on top of CSS.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, that was pretty simple.

How should I fix the width?

{% if suggestion %}
<div class="suggestions">
<h1>You've found something that doesn't exist.</h1>
Expand Down Expand Up @@ -41,4 +42,5 @@ <h1>
<p>
Read the Docs is sponsored by <a href="{{ promo_data.link }}">Sentry</a>, which gives developers the tools to keep calm when things catch fire.
</p>
</div>
{% endblock %}