mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
add class for container div on 404 page
This commit is contained in:
@ -376,6 +376,7 @@ class ApplicationController < ActionController::Base
|
|||||||
|
|
||||||
def build_not_found_page(status=404, layout=false)
|
def build_not_found_page(status=404, layout=false)
|
||||||
category_topic_ids = Category.pluck(:topic_id).compact
|
category_topic_ids = Category.pluck(:topic_id).compact
|
||||||
|
@container_class = "container not-found-container"
|
||||||
@top_viewed = Topic.where.not(id: category_topic_ids).top_viewed(10)
|
@top_viewed = Topic.where.not(id: category_topic_ids).top_viewed(10)
|
||||||
@recent = Topic.where.not(id: category_topic_ids).recent(10)
|
@recent = Topic.where.not(id: category_topic_ids).recent(10)
|
||||||
@slug = params[:slug].class == String ? params[:slug] : ''
|
@slug = params[:slug].class == String ? params[:slug] : ''
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div id="main-outlet" class="container">
|
<div id="main-outlet" class="<%= @container_class ? @container_class : 'container' %>">
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
Reference in New Issue
Block a user