diff --git a/app.js b/app.js index 0207f8e8d1..86c1db87c9 100755 --- a/app.js +++ b/app.js @@ -310,9 +310,6 @@ app.get('/nodeschool-challenges', function(req, res) { }); -app.get('/news', function(req, res) { - res.redirect(301, '/stories/'); -}); app.get('/learn-to-code', challengeMapController.challengeMap); app.get('/about', function(req, res) { res.redirect(301, '/map'); @@ -476,7 +473,7 @@ app.post( ); app.get( - '/stories/', + '/news/', storyController.hot ); @@ -486,7 +483,7 @@ app.post( ); app.get( - '/stories/:storyName', + '/news/:storyName', storyController.returnIndividualStory ); diff --git a/public/css/main.less b/public/css/main.less index 2972861af8..b6051ad93b 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -106,7 +106,14 @@ h1, h2, h3, h4, h5, h6, p, li { font-size: 28px; } -.btn { +.btn, .shadow { + white-space: normal; + -webkit-box-shadow: 2px 4px 1px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 2px 4px 1px rgba(0, 0, 0, 0.3); + box-shadow: 2px 4px 1px rgba(0, 0, 0, 0.3); +} + +.btn, .shadow { white-space: normal; -webkit-box-shadow: 2px 4px 1px rgba(0, 0, 0, 0.3); -moz-box-shadow: 2px 4px 1px rgba(0, 0, 0, 0.3); @@ -943,6 +950,18 @@ iframe.iphone { margin-left: 20px; } +hr { + -moz-border-bottom-colors: none; + -moz-border-image: none; + -moz-border-left-colors: none; + -moz-border-right-colors: none; + -moz-border-top-colors: none; + border-color: @gray; + border-style: solid none; + border-width: 1px 0; + margin: 18px 0; +} + #reply-to-main-post, #upvote { cursor: pointer; } diff --git a/seed_data/storyCleanup.js b/seed_data/storyCleanup.js index 645ff84206..2598526c8a 100644 --- a/seed_data/storyCleanup.js +++ b/seed_data/storyCleanup.js @@ -18,11 +18,8 @@ function storyLinkCleanup(cb) { console.log(i++); this.pause(); story.storyLink = story.storyLink. - replace(/\'/g, ''). - replace(/\"/g, ''). - replace(/,/g, ''). - replace(/\s+/g, ' '). replace(/[^a-z0-9\s]/gi, ''). + replace(/\s+/g, ' '). toLowerCase(). trim(); story.save(function (err) { diff --git a/views/partials/navbar.jade b/views/partials/navbar.jade index 43a1b367fa..35b3d31519 100644 --- a/views/partials/navbar.jade +++ b/views/partials/navbar.jade @@ -25,7 +25,7 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height li a(href='/challenges/join-our-chat-room') Chat li - a(href='/stories/hot') News + a(href='/news') News li a(href='/field-guide') Field Guide if !user diff --git a/views/stories/hot-stories.jade b/views/stories/hot-stories.jade index fcf297cd49..d8d518ea0c 100644 --- a/views/stories/hot-stories.jade +++ b/views/stories/hot-stories.jade @@ -34,7 +34,7 @@ " by @" + data[i].author.username + " " + "" + "
" + - "
discuss" + + "
discuss" + "
" + "" + "" + @@ -53,7 +53,7 @@ "" + "" + "
" + - "discuss · " + + "discuss · " + rank + (rank > 1 ? " points" : " point") + " · posted " + moment(data[i].timePosted).fromNow() + " by @" + data[i].author.username + " " + diff --git a/views/stories/news-nav.jade b/views/stories/news-nav.jade index e087cab824..4750a2fb01 100644 --- a/views/stories/news-nav.jade +++ b/views/stories/news-nav.jade @@ -1,18 +1,20 @@ -.row - .col-xs-12.col-sm-9 - .input-group - input#searchArea.big-text-field.field-responsive.form-control(type='text', placeholder='Search our links', autofocus) - span.input-group-btn - button#searchbutton.btn.btn-big.btn-primary.btn-responsive(type='button') Search - .visible-xs - .button-spacer - .col-xs-12.col-sm-3 - span - a.btn.btn-primary.btn-big.btn-block.btn-responsive(href='/stories/submit' class="#{ page === 'hot' ? '' : 'hidden' }") Submit - span - a.btn.btn-success.btn-big.btn-block.btn-responsive(href='/stories/' class="#{ (page !== 'hot') ? '' : 'hidden' }") All +.panel.shadow + .panel-body + .col-xs-12.col-sm-9 + .input-group + input#searchArea.big-text-field.field-responsive.form-control(type='text', placeholder='Search our links') + span.input-group-btn + button#searchbutton.btn.btn-big.btn-primary.btn-responsive(type='button') Search + .visible-xs + .button-spacer + .col-xs-12.col-sm-3 + span + a.btn.btn-primary.btn-big.btn-block.btn-responsive(href='/stories/submit' class="#{ page === 'hot' ? '' : 'hidden' }") Submit + span + a.btn.btn-success.btn-big.btn-block.btn-responsive(href='/news/' class="#{ (page !== 'hot') ? '' : 'hidden' }") All + .spacer #search-results .spacer diff --git a/views/stories/preliminary-submit.jade b/views/stories/preliminary-submit.jade index 55d7f705b2..082f27cec5 100644 --- a/views/stories/preliminary-submit.jade +++ b/views/stories/preliminary-submit.jade @@ -1,7 +1,5 @@ .col-xs-12 - .spacer div(ng-controller="URLSubmitController") - form.input-group(name='URLSubmit') input#story-url.big-text-field.field-responsive.form-control(placeholder='Paste your link here', name='link', type='url', ng-model='possibleURL', required='required', autofocus) span.input-group-btn