Skip to content

Commit b62d144

Browse files
committed
Collapse the news item listing
- Remove data grouping - Remove story summary - Decrease text size - Remove grouping from loadMore offset list
1 parent e190e8d commit b62d144

File tree

2 files changed

+6
-25
lines changed

2 files changed

+6
-25
lines changed

client/javascripts/components/modules/loadStories.js

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,10 @@ JS.Modules.LoadStories = (function() {
3737

3838
var _appendStories = function(data) {
3939
var stories = data.flow,
40-
lastDay = _settings.$button.data('last-day'),
4140
markup = '';
4241

4342
for (group in stories) {
4443

45-
if ( lastDay !== group ) {
46-
markup +=
47-
'<li class="list-item list-item--header bdrbl pbs">' +
48-
'<span class="mrs por pot2n">' +
49-
'<span class="srt">calendar</span>' +
50-
'<svg class="icon" width="16" height="16">' +
51-
'<use xlink:href="#icon-calendar"></use>' +
52-
'</svg>' +
53-
'</span>' +
54-
'<span>' + group + '</span>' +
55-
'</li>';
56-
}
57-
5844
stories[group].forEach(function(story) {
5945
markup +=
6046
'<li class="list-item">' +
@@ -63,18 +49,17 @@ JS.Modules.LoadStories = (function() {
6349
'<img class="thumb" src="' + story.avatar_url + '" width="50"/>' +
6450
'</div>' +
6551
'<div class="bucket-content">' +
66-
'<h2 class="h h--3">' +
52+
'<h2 class="h h--4">' +
6753
'<a class="externalLink tct twb" href="' + story.url + '" target="_blank">' + story.title +
6854
'<svg width="16" height="16" class="icon externalLink-icon">' +
6955
'<use xlink:href="#icon-external"/>' +
7056
'</svg>' +
7157
'</a>' +
7258
'</h2>' +
73-
'<p class="tcs tfh">' +
59+
'<p class="mbf tcs tfh tss">' +
7460
'via ' + '<span class="twsb">' + story.name + '</span>' +
7561
' | ' + '<a class="' + commentClass(story.comment_count) + '" href="/news/' + story.slug + '#comments">View Discussion ' + commentNumber(story.comment_count) + '</a>' +
7662
'</p>' +
77-
'<p class="tcs tfh">' + story.body + '</p>' +
7863
'</div>' +
7964
'</article>' +
8065
'</li>';

server/views/news/index.jade

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,23 @@ block content
4141
a.btn.btn--a.db.dib--s.fr--l(href='/news/new') New Post
4242

4343
.mbxl.js-loadFeed
44-
ul.list.list--l.list--divided.list--divided--l.js-loadFeed-list
44+
ul.list.list--divided.js-loadFeed-list
4545

4646
- for group, title in flow_collection
4747

48-
- dateText = title
49-
include /views/news/_data_separator
50-
5148
- for story in group
5249

5350
li.list-item
5451
article.bucket
5552
.bucket-media
5653
img.thumb(src=story.avatar_url width='50')
5754
.bucket-content
58-
h2.h.h--3
55+
h2.h.h--4
5956
a.externalLink.tct.twb(href=story.url target='_blank')
6057
= story.title
6158
- iconPartial = { name: 'external', className: 'externalLink-icon', size: 16 }
6259
include /views/partials/_icon
63-
p.tcs.tfh
60+
p.mbf.tcs.tfh.tss
6461
| via
6562
span.twsb= story.name
6663
| |
@@ -70,11 +67,10 @@ block content
7067
| (
7168
= story.comment_count
7269
| )
73-
p.mbf= story.body
7470

7571
if more
7672
.well.well--l.mbl.mbxl--m.bdrtl.ptl.tac
77-
button.btn.js-loadFeed-btn(data-last-day=lastDay) Load More
73+
button.btn.js-loadFeed-btn Load More
7874

7975
.g-b.g-b--m--2of5.sector.sector--b
8076
.well.well--l.well--m--xl

0 commit comments

Comments
 (0)