Skip to content
This repository was archived by the owner on Mar 15, 2018. It is now read-only.

Commit eb0f551

Browse files
committed
clean up the oh no-ness (bug 870020)
1 parent 3bbf6d7 commit eb0f551

File tree

3 files changed

+74
-53
lines changed

3 files changed

+74
-53
lines changed

hearth/media/css/site.styl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,27 @@ body {
7575
clear: both;
7676
}
7777

78+
.detailed-error, .fragment-error {
79+
background: #fff;
80+
}
81+
82+
.detailed-error {
83+
padding: 15px;
84+
}
85+
86+
.fragment-error {
87+
display: block;
88+
padding: 15px;
89+
b {
90+
display: block;
91+
}
92+
}
93+
7894
.main {
7995
margin: 0 auto;
96+
.fragment-error {
97+
padding: 0;
98+
}
8099
}
81100
#page > .overlay {
82101
max-width: 100%;

hearth/templates/detail/main.html

Lines changed: 53 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h3>{{ _('Loading...') }}</h3>
2121
</div>
2222
<div class="tray previews full"></div>
2323
{% except %}
24-
<div>
24+
<div class="detailed-error">
2525
<h2>{{ _('Oh no!') }}</h2>
2626
<p>{{ _('The page you were looking for was not found.') }}</p>
2727
</div>
@@ -74,6 +74,7 @@ <h3>{{ _('Version') }}</h3>
7474
{% endif %}
7575
{% placeholder %}
7676
<p class="spinner alt"></p>
77+
{% except %}
7778
{% end %}
7879
</div>
7980
</section>
@@ -95,8 +96,8 @@ <h3>{{ _('Version') }}</h3>
9596
{% end %}
9697

9798
<section class="main reviews-wrapper c">
98-
<div class="reviews">
99-
{% defer (url=apiParams('reviews', {'app': slug}), id='ratings') %}
99+
{% defer (url=apiParams('reviews', {'app': slug}), id='ratings') %}
100+
<div class="reviews">
100101
<h3>{{ _('Reviews') }}</h3>
101102
{% if this.meta.total_count %}
102103
<ul class="ratings-placeholder-inner">
@@ -131,62 +132,62 @@ <h3>{{ _('Reviews') }}</h3>
131132
{% endif %}
132133
</div>
133134
{% endif %}
134-
135-
{% placeholder %}
136-
<p class="spinner alt padded"></p>
137-
{% except %}
138-
{% end %}
139-
</div>
135+
</div>
136+
{% placeholder %}
137+
<p class="spinner alt padded"></p>
138+
{% except %}
139+
{% end %}
140140
</section>
141141

142+
{% defer (url=endpoint, as='app', key=slug) %}
142143
<section class="main infobox support c">
143144
<div>
144-
{% defer (url=endpoint, as='app', key=slug) %}
145-
<ul class="c">
146-
{% if this.support_email %}
147-
<li class="support-email">
148-
{{ emaillink(this.support_email, _('Support Email'), class='button alt') }}
149-
</li>
150-
{% endif %}
151-
{% if this.support_url %}
152-
<li class="support-url">
153-
<a class="button alt" rel="external" {{ this.support_url|external_href }}>
154-
{{ _('Support Site') }}</a>
155-
</li>
156-
{% endif %}
157-
{% if this.homepage %}
158-
<li class="homepage">
159-
<a class="button alt" rel="external" {{ this.homepage|external_href }}>{{ _('Homepage') }}</a>
160-
</li>
161-
{% endif %}
162-
{% if this.privacy_policy %}
163-
<li class="privacy-policy">
164-
<a class="button alt" href="{{ url('app/privacy', [slug]) }}">
165-
{{ _('Privacy Policy') }}</a>
166-
</li>
167-
{% endif %}
168-
{% if this.public_stats %}
169-
<li class="statistics"><a class="button alt view-stats" rel="external" href="{{ url('app', [slug]) }}/statistics">
170-
{{ _('Statistics') }}</a></li>
171-
{% endif %}
172-
<li class="abuse">
173-
<a class="button alt" href="{{ url('app/abuse', [slug]) }}">
174-
{{ _('Report Abuse') }}</a>
145+
<ul class="c">
146+
{% if this.support_email %}
147+
<li class="support-email">
148+
{{ emaillink(this.support_email, _('Support Email'), class='button alt') }}
175149
</li>
176-
</ul>
177-
{% if settings.payments_enabled %}
178-
{% if this.upsell %}
179-
<a id="upsell" class="button alt"
180-
href="{{ url('app', [this.upsell.app_slug])|urlparams(src='mkt-detail-upsell') }}">
181-
<span class="avail">{{ _('Premium version available') }}</span>
182-
<img class="icon" src="{{ upsell.icon_url }}">
183-
<span class="name">{{ this.upsell.name }}</span>
184-
</a>
185-
{% endif %}
186150
{% endif %}
187-
{% end %}
151+
{% if this.support_url %}
152+
<li class="support-url">
153+
<a class="button alt" rel="external" {{ this.support_url|external_href }}>
154+
{{ _('Support Site') }}</a>
155+
</li>
156+
{% endif %}
157+
{% if this.homepage %}
158+
<li class="homepage">
159+
<a class="button alt" rel="external" {{ this.homepage|external_href }}>{{ _('Homepage') }}</a>
160+
</li>
161+
{% endif %}
162+
{% if this.privacy_policy %}
163+
<li class="privacy-policy">
164+
<a class="button alt" href="{{ url('app/privacy', [slug]) }}">
165+
{{ _('Privacy Policy') }}</a>
166+
</li>
167+
{% endif %}
168+
{% if this.public_stats %}
169+
<li class="statistics"><a class="button alt view-stats" rel="external" href="{{ url('app', [slug]) }}/statistics">
170+
{{ _('Statistics') }}</a></li>
171+
{% endif %}
172+
<li class="abuse">
173+
<a class="button alt" href="{{ url('app/abuse', [slug]) }}">
174+
{{ _('Report Abuse') }}</a>
175+
</li>
176+
</ul>
177+
{% if settings.payments_enabled %}
178+
{% if this.upsell %}
179+
<a id="upsell" class="button alt"
180+
href="{{ url('app', [this.upsell.app_slug])|urlparams(src='mkt-detail-upsell') }}">
181+
<span class="avail">{{ _('Premium version available') }}</span>
182+
<img class="icon" src="{{ upsell.icon_url }}">
183+
<span class="name">{{ this.upsell.name }}</span>
184+
</a>
185+
{% endif %}
186+
{% endif %}
188187
</div>
189188
</section>
189+
{% except %}
190+
{% end %}
190191

191192
<div class="content_ratings">
192193
{% defer (url=endpoint, as='app', key=slug) %}
@@ -209,6 +210,7 @@ <h3>
209210
</div>
210211
</div>
211212
{% endif %}
213+
{% except %}
212214
{% end %}
213215
</div>
214216

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<span class="fragment-error">
2-
<b>{{ _('Oh no!') }}</b><br>
3-
{{ _('An error occurred.') }}
2+
<b>{{ _('Oh no!') }}</b>
3+
{{ _('An error occurred.') }}
44
</span>

0 commit comments

Comments
 (0)