more camper news improvements

This commit is contained in:
Quincy Larson
2015-04-30 15:56:14 -07:00
parent 7b61e9daa2
commit 2cb02176a4
7 changed files with 41 additions and 28 deletions

7
app.js
View File

@ -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('/learn-to-code', challengeMapController.challengeMap);
app.get('/about', function(req, res) { app.get('/about', function(req, res) {
res.redirect(301, '/map'); res.redirect(301, '/map');
@ -476,7 +473,7 @@ app.post(
); );
app.get( app.get(
'/stories/', '/news/',
storyController.hot storyController.hot
); );
@ -486,7 +483,7 @@ app.post(
); );
app.get( app.get(
'/stories/:storyName', '/news/:storyName',
storyController.returnIndividualStory storyController.returnIndividualStory
); );

View File

@ -106,7 +106,14 @@ h1, h2, h3, h4, h5, h6, p, li {
font-size: 28px; 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; white-space: normal;
-webkit-box-shadow: 2px 4px 1px rgba(0, 0, 0, 0.3); -webkit-box-shadow: 2px 4px 1px rgba(0, 0, 0, 0.3);
-moz-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; 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 { #reply-to-main-post, #upvote {
cursor: pointer; cursor: pointer;
} }

View File

@ -18,11 +18,8 @@ function storyLinkCleanup(cb) {
console.log(i++); console.log(i++);
this.pause(); this.pause();
story.storyLink = story.storyLink. story.storyLink = story.storyLink.
replace(/\'/g, '').
replace(/\"/g, '').
replace(/,/g, '').
replace(/\s+/g, ' ').
replace(/[^a-z0-9\s]/gi, ''). replace(/[^a-z0-9\s]/gi, '').
replace(/\s+/g, ' ').
toLowerCase(). toLowerCase().
trim(); trim();
story.save(function (err) { story.save(function (err) {

View File

@ -25,7 +25,7 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height
li li
a(href='/challenges/join-our-chat-room') Chat a(href='/challenges/join-our-chat-room') Chat
li li
a(href='/stories/hot') News a(href='/news') News
li li
a(href='/field-guide') Field Guide a(href='/field-guide') Field Guide
if !user if !user

View File

@ -34,7 +34,7 @@
" by <a href='/" + data[i].author.username + "'>@" + data[i].author.username + "</a> " + " by <a href='/" + data[i].author.username + "'>@" + data[i].author.username + "</a> " +
"</div>" + "</div>" +
"<div class='col-xs-12'>" + "<div class='col-xs-12'>" +
"<br><a class='btn btn-no-shadow btn-primary btn-block btn-primary-ghost' href='/stories/" + linkedName + "'>discuss</a>" + "<br><a class='btn btn-no-shadow btn-primary btn-block btn-primary-ghost' href='/news/" + linkedName + "'>discuss</a>" +
"</div>" + "</div>" +
"</div>" + "</div>" +
"</div>" + "</div>" +
@ -53,7 +53,7 @@
"</a>" + "</a>" +
"</div>" + "</div>" +
"<div class='story-byline col-xs-12 wrappable'>" + "<div class='story-byline col-xs-12 wrappable'>" +
"<a class='btn btn-no-shadow btn-primary btn-xs btn-primary-ghost' href='/stories/" + linkedName + "'>discuss</a> · " + "<a class='btn btn-no-shadow btn-primary btn-xs btn-primary-ghost' href='/news/" + linkedName + "'>discuss</a> · " +
rank + (rank > 1 ? " points" : " point") + " · posted " + rank + (rank > 1 ? " points" : " point") + " · posted " +
moment(data[i].timePosted).fromNow() + moment(data[i].timePosted).fromNow() +
" by <a href='/" + data[i].author.username + "'>@" + data[i].author.username + "</a> " + " by <a href='/" + data[i].author.username + "'>@" + data[i].author.username + "</a> " +

View File

@ -1,18 +1,20 @@
.row .panel.shadow
.col-xs-12.col-sm-9 .panel-body
.input-group .col-xs-12.col-sm-9
input#searchArea.big-text-field.field-responsive.form-control(type='text', placeholder='Search our links', autofocus) .input-group
span.input-group-btn input#searchArea.big-text-field.field-responsive.form-control(type='text', placeholder='Search our links')
button#searchbutton.btn.btn-big.btn-primary.btn-responsive(type='button') Search span.input-group-btn
.visible-xs button#searchbutton.btn.btn-big.btn-primary.btn-responsive(type='button') Search
.button-spacer .visible-xs
.col-xs-12.col-sm-3 .button-spacer
span .col-xs-12.col-sm-3
a.btn.btn-primary.btn-big.btn-block.btn-responsive(href='/stories/submit' class="#{ page === 'hot' ? '' : 'hidden' }") Submit span
span a.btn.btn-primary.btn-big.btn-block.btn-responsive(href='/stories/submit' class="#{ page === 'hot' ? '' : 'hidden' }") Submit
a.btn.btn-success.btn-big.btn-block.btn-responsive(href='/stories/' class="#{ (page !== 'hot') ? '' : 'hidden' }") All span
a.btn.btn-success.btn-big.btn-block.btn-responsive(href='/news/' class="#{ (page !== 'hot') ? '' : 'hidden' }") All
.spacer .spacer
#search-results #search-results
.spacer .spacer

View File

@ -1,7 +1,5 @@
.col-xs-12 .col-xs-12
.spacer
div(ng-controller="URLSubmitController") div(ng-controller="URLSubmitController")
form.input-group(name='URLSubmit') 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) 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 span.input-group-btn