Skip to content

Commit

Permalink
css stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
elischutze committed Jul 2, 2016
1 parent db53b9c commit 8b64080
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 27 deletions.
11 changes: 1 addition & 10 deletions data/posts.json
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
{
"1467464845605": {
"blogTitle": "HIPSTER 1",
"blogpost": "DIY knausgaard literally listicle chartreuse sriracha retro schlitz yuccie, venmo cronut cred thundercats. Bushwick seitan lomo viral. Chambray waistcoat echo park meditation brooklyn pork belly, asymmetrical ennui franzen. Hammock listicle man bun, shoreditch pinterest kitsch flexitarian before they sold out green juice semiotics put a bird on it keffiyeh neutra taxidermy cold-pressed. Kickstarter leggings sartorial humblebrag knausgaard. Everyday carry chicharrones meggings asymmetrical, echo park cronut yuccie viral shoreditch biodiesel affogato authentic. Irony quinoa single-origin coffee disrupt asymmetrical +1 gochujang, vinyl gastropub direct trade.\r\n\r\nTruffaut heirloom venmo 3 wolf moon. Cronut meditation tote bag pabst, disrupt slow-carb selvage locavore. Yuccie church-key post-ironic roof party cold-pressed mixtape. Cornhole skateboard portland vinyl mixtape, heirloom mustache brooklyn intelligentsia. Try-hard intelligentsia marfa, pork belly microdosing man braid farm-to-table knausgaard tote bag semiotics yr selfies green juice raw denim. Pop-up waistcoat hella plaid artisan twee microdosing forage, flexitarian post-ironic. Shabby chic taxidermy brunch post-ironic lumbersexual hammock, yuccie retro ennui."
},
"1467465520102": {
"blogTitle": "TITLE",
"blogpost": "TESST"
}
}
{"1467464845605":{"blogTitle":"HIPSTER 1","blogpost":"DIY knausgaard literally listicle chartreuse sriracha retro schlitz yuccie, venmo cronut cred thundercats. Bushwick seitan lomo viral. Chambray waistcoat echo park meditation brooklyn pork belly, asymmetrical ennui franzen. Hammock listicle man bun, shoreditch pinterest kitsch flexitarian before they sold out green juice semiotics put a bird on it keffiyeh neutra taxidermy cold-pressed. Kickstarter leggings sartorial humblebrag knausgaard. Everyday carry chicharrones meggings asymmetrical, echo park cronut yuccie viral shoreditch biodiesel affogato authentic. Irony quinoa single-origin coffee disrupt asymmetrical +1 gochujang, vinyl gastropub direct trade.\r\n\r\nTruffaut heirloom venmo 3 wolf moon. Cronut meditation tote bag pabst, disrupt slow-carb selvage locavore. Yuccie church-key post-ironic roof party cold-pressed mixtape. Cornhole skateboard portland vinyl mixtape, heirloom mustache brooklyn intelligentsia. Try-hard intelligentsia marfa, pork belly microdosing man braid farm-to-table knausgaard tote bag semiotics yr selfies green juice raw denim. Pop-up waistcoat hella plaid artisan twee microdosing forage, flexitarian post-ironic. Shabby chic taxidermy brunch post-ironic lumbersexual hammock, yuccie retro ennui."},"1467471524780":{"blogTitle":"HIPSTER IPSUM 2 ","blogpost":"Humblebrag butcher fixie, selfies semiotics next level cornhole portland everyday carry pork belly quinoa mumblecore. Photo booth slow-carb distillery fingerstache aesthetic stumptown. Asymmetrical drinking vinegar four dollar toast ennui. Godard drinking vinegar mlkshk forage, single-origin coffee sartorial normcore. Leggings four dollar toast post-ironic bicycle rights pickled, messenger bag bushwick lomo. Cred tacos intelligentsia cornhole fixie. Banjo 90's banh mi mixtape.\r\n\r\nSwag truffaut schlitz cornhole vice street art. Letterpress roof party poutine everyday carry cliche kombucha, hella organic messenger bag. Gochujang tumblr small batch, pabst artisan man braid kickstarter mustache listicle celiac keytar plaid. Try-hard meh PBR&B, craft beer pickled helvetica cold-pressed. Bespoke mixtape pug deep v banh mi helvetica, keytar keffiyeh authentic before they sold out gluten-free gochujang kombucha echo park kickstarter. Intelligentsia kogi cred lomo, iPhone small batch wayfarers celiac gastropub keytar tumblr photo booth. 90's occupy godard swag direct trade celiac."},"1467471724636":{"blogTitle":"HIPSTER IPSUM 3","blogpost":"Ethical plaid readymade, blog hashtag pour-over green juice. Sriracha normcore roof party, pork belly jean shorts readymade four loko fashion axe green juice intelligentsia gentrify butcher offal. Slow-carb portland flannel crucifix fanny pack vegan irony, thundercats mumblecore deep v. Heirloom pour-over art party, twee direct trade before they sold out plaid iPhone taxidermy beard tote bag banjo fanny pack affogato. Disrupt truffaut occupy neutra, small batch four dollar toast hoodie man braid authentic shabby chic taxidermy. Trust fund 90's freegan truffaut salvia. DIY cardigan cray roof party messenger bag.\r\n\r\nCred meditation farm-to-table meh, williamsburg bespoke irony selvage banjo deep v typewriter forage semiotics. Craft beer VHS kickstarter bitters mumblecore, freegan tote bag chia mixtape messenger bag yuccie paleo twee. Portland selvage pickled locavore ramps, semiotics roof party craft beer you probably haven't heard of them wolf art party. Kickstarter four loko bushwick gluten-free. Blog polaroid post-ironic shabby chic jean shorts, swag hoodie skateboard squid. Ennui roof party pour-over church-key. Mustache squid pork belly, stumptown cred portland polaroid whatever waistcoat pickled pug bitters farm-to-table VHS pop-up."}}
3 changes: 2 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ <h1 class="title">Node Girls</h1>
<div class="entry-container">
<h3>Create a blog post</h3>
<form action="/create-post" method="POST">
<input type="text" name="blogTitle" placeholder="Enter Post Title"><br>
<input type="text" name="blogTitle" placeholder="Enter Post Title"><br/>
<br/>
<textarea name="blogpost" rows="10" cols="14">

</textarea>
Expand Down
5 changes: 4 additions & 1 deletion public/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ textarea, input {
border-radius: 3px;
border: 1px solid #848484;
padding: 5px 2%;
font-size: 18px;
}

button[type="submit"] {
Expand Down Expand Up @@ -162,7 +163,7 @@ h3 {
}

.single-post p {
padding: 10px;
padding: 20px 100px;
font-weight: lighter;
text-align: justify;

Expand All @@ -171,9 +172,11 @@ h3 {
.single-post a {
display: block;
padding: 15px;
font-size: 26px;
color: #A5DF00;
font-weight: bold;
text-decoration: underline;


}

2 changes: 2 additions & 0 deletions public/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ $(document).ready(function() {

thumbnail.src = "./img/logo2.png";
thumbnail.className = "thumbnail";
// NEW THINGS
postLink.setAttribute(
"href", '/posts/'+blogPost
);
postTitle.innerHTML = data[blogPost].blogTitle;
postText.innerHTML = data[blogPost].blogpost ;
////
postDiv.className = "post";

postDiv.appendChild(thumbnail);
Expand Down
29 changes: 14 additions & 15 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
var express = require('express');
var bodyParser = require('body-parser');
var fs = require('fs');
var mustacheExpress = require('mustache-express');



//NEW THINGS
var mustacheExpress = require('mustache-express');
///

// To initialise our server, we just need to call the express() function. This will create an Express application for us to work with.
var app = express()
app.use(bodyParser.urlencoded({ extended: true }));

// app.get("/",function(req,res){
// res.send("THIS IS A MESSAGE HAAAY");

// });

app.use(express.static("public"));

// NEW THINGS
// Register '.mustache' extension with The Mustache Express
app.engine('mustache', mustacheExpress());

app.set('view engine', 'mustache');
app.set('views', __dirname + '/views');
/////




app.post("/create-post",function(req,res){
res.redirect('/');
Expand All @@ -34,18 +32,16 @@ app.post("/create-post",function(req,res){
var JSONText = JSON.stringify(parsedFile);
fs.writeFile(myFile,JSONText,function(error){
// console.log("imhere");


})

});

});

app.get('/get-posts', function(req,res){
res.sendFile(__dirname+'/data/posts.json');
});


//NEW THINGS
app.get('/posts/:postId', function(req,res){
// var blogpost;
fs.readFile(__dirname+'/data/posts.json',function(error,file){
Expand All @@ -57,9 +53,12 @@ app.get('/posts/:postId', function(req,res){
res.render('post',{ title: title, body: blogpost.blogpost});
});


////
});




app.listen(3000, function(){
console.log("Server is listening on Port 3000! Ready to accept requests.." );
});

0 comments on commit 8b64080

Please sign in to comment.