more camper news improvements
This commit is contained in:
7
app.js
7
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('/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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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) {
|
||||||
|
@ -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
|
||||||
|
@ -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> " +
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
.row
|
.panel.shadow
|
||||||
|
.panel-body
|
||||||
.col-xs-12.col-sm-9
|
.col-xs-12.col-sm-9
|
||||||
.input-group
|
.input-group
|
||||||
input#searchArea.big-text-field.field-responsive.form-control(type='text', placeholder='Search our links', autofocus)
|
input#searchArea.big-text-field.field-responsive.form-control(type='text', placeholder='Search our links')
|
||||||
span.input-group-btn
|
span.input-group-btn
|
||||||
button#searchbutton.btn.btn-big.btn-primary.btn-responsive(type='button') Search
|
button#searchbutton.btn.btn-big.btn-primary.btn-responsive(type='button') Search
|
||||||
.visible-xs
|
.visible-xs
|
||||||
@ -12,7 +13,8 @@
|
|||||||
span
|
span
|
||||||
a.btn.btn-primary.btn-big.btn-block.btn-responsive(href='/stories/submit' class="#{ page === 'hot' ? '' : 'hidden' }") Submit
|
a.btn.btn-primary.btn-big.btn-block.btn-responsive(href='/stories/submit' class="#{ page === 'hot' ? '' : 'hidden' }") Submit
|
||||||
span
|
span
|
||||||
a.btn.btn-success.btn-big.btn-block.btn-responsive(href='/stories/' class="#{ (page !== 'hot') ? '' : 'hidden' }") All
|
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
|
||||||
|
@ -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
|
||||||
|
Reference in New Issue
Block a user