Hello,
I’ve got at template update on https://forum.billysbilling.dk/ that just over the night stopped working. Unfortunately, also our logo started to disappear on some requests (403 Forbidden response)
The layout update is taken from https://meta.discourse.org/t/the-homepage-overview-how-to-make-it-look-more-clean/28623/3 where I’ve made some smaller adjustments, to fit it to our needs.
</body>
<script type='text/x-handlebars' data-template-name='list/topic_list_item.raw'>
<td class='main-link clearfix'>
{{raw "topic-status" topic=topic}}
{{topic-link topic}}
{{#if controller.showTopicPostBadges}}
{{raw "topic-post-badges" unread=topic.unread newPosts=topic.displayNewPosts unseen=topic.unseen url=topic.lastUnreadUrl}}
{{/if}}
{{raw "list/topic-excerpt" topic=model}}
<div class='creator'>
{{~#if topic.creator ~}}
<a href="/users/{{topic.creator.username}}" data-auto-route="true" data-user-card="{{topic.creator.username}}">{{topic.creator.username}}</a>
{{format-date topic.createdAt format="medium-with-ago"}}
{{~/if ~}}
{{raw "list/action-list" topic=topic postNumbers=topic.bookmarked_post_numbers className="bookmarks" icon="bookmark"}}
{{raw "list/action-list" topic=topic postNumbers=topic.liked_post_numbers className="likes" icon="heart"}}
</div>
</td>
{{#if controller.showLikes}}
<td class="num likes">
{{number topic.like_count}} <i class='fa fa-heart'></i>
</td>
{{/if}}
{{#if controller.showOpLikes}}
<td class="num likes">
{{number topic.op_like_count}} <i class='fa fa-heart'></i>
</td>
{{/if}}
<td class="category">
{{category-link topic.category showParent="true" onlyStripe="true"}}
</td>
<td class="num views">
{{topic.views}}
</td>
<td class="num views">
{{topic.replyCount}}
</td>
<td class="last-post">
<div class='poster-avatar'>
<a href="{{topic.lastPostUr}}" data-user-card="{{topic.last_poster_username}}">{{avatar topic.lastPoster usernamePath="username" imageSize="medium"}}</a>
</div>
<div class='poster-info'>
<a href="{{topic.lastPostUrl}}">
{{format-date topic.bumpedAt format="medium-with-ago"}},
</a><br />
<span class='editor'><a href="/users/{{topic.last_poster_username}}" data-auto-route="true" data-user-card="{{topic.last_poster_username}}">{{topic.last_poster_username}}</a></span>
</div>
</td>
</script>
<script type='text/x-handlebars' data-template-name='topic-list-header.raw'>
{{raw "topic-list-header-column" order='posts' name='topic.title'}}
{{#if showLikes}}
{{raw "topic-list-header-column" sortable='true' order='likes' number='true' forceName='Likes'}}
{{/if}}
{{#if showOpLikes}}
{{raw "topic-list-header-column" sortable='true' order='op_likes' number='true' forceName='Likes'}}
{{/if}}
{{raw "topic-list-header-column" sortable='true' order='category' forceName='Kategori'}}
{{raw "topic-list-header-column" sortable='true' number='true' order='views' forceName='Visninger'}}
{{raw "topic-list-header-column" sortable='true' number='true' order='posts' forceName='Svar'}}
{{raw "topic-list-header-column" sortable='true' order='activity' forceName='Sidste indlæg'}}
</script>
<script>
Discourse.TopicListItemView.reopen({
showCategory: function(){
return !this.get('controller.hideCategory') &&
this.get('topic.creator') &&
this.get('topic.category.name') !== 'uncategorized';
}.property()
});
Discourse.Topic.reopen({
creator: function(){
var poster = this.get('posters.firstObject');
if(poster){
return poster.user;
}
}.property(),
lastPoster: function() {
var poster = this.get('posters.lastObject');
if(poster){
if (this.last_poster_username === poster.user.username){
return poster.user;
} else {
return this.get('creator');
}
}
}.property('posters'),
replyCount: function(){
return this.get('posts_count') - 1;
}.property(),
hasReplies: function(){
return this.get('posts_count') > 1;
}.property()
});
</script>
CSS
.poster-avatar {
float: left;
}
.poster-info {
float: left;
margin-left: 10px;
}
@media (max-width: 760px) {
.poster-avatar {
display: none;
}
}
@media (max-width: 560px) {
.topic-list .category {
display:none;
}
}
.topic-list .posts {
width: 640px;
}
.topic-list .num {
width: 65px;
}
.topic-list .activity {
width: 180px !important;
}
.category .badge-wrapper {
line-height: 1.6;
}
.category .badge-category-bg {
border-radius: 3px;
line-height: 2.5;
}
.category .badge-category {
padding: 10px 20px;
}
.category .badge-category-parent-bg {
border-radius: 3px;
}
.creator .relative-date {
text-transform: capitalize;
}
Unfortunately, this isn’t the first time we’ve had some loading issues (just a guess for the cause), as a hosted Discourse solution. CDN 503 on user avatars and CSS files
Anyone able to help me out here? @sam or @codinghorror eventually?