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('/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
);

View File

@ -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;
}

View File

@ -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) {

View File

@ -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

View File

@ -34,7 +34,7 @@
" by <a href='/" + data[i].author.username + "'>@" + data[i].author.username + "</a> " +
"</div>" +
"<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>" +
@ -53,7 +53,7 @@
"</a>" +
"</div>" +
"<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 " +
moment(data[i].timePosted).fromNow() +
" by <a href='/" + data[i].author.username + "'>@" + data[i].author.username + "</a> " +

View File

@ -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

View File

@ -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