forked from node-girls/node-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor workshop to avoid using branches.
- Loading branch information
1 parent
4d3429a
commit 08e00b1
Showing
21 changed files
with
363 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Node Girls CMS tutorial</title> | ||
</head> | ||
<body> | ||
<h1> This is the index page </h1> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
</p> | ||
|
||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
</p> | ||
<img src="./img/image.jpg"> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
/******************* | ||
* Basic Resets | ||
********************/ | ||
|
||
body, html, div, label, p, h1, h2, h3, h4, h5, h6, form, a, input, textarea { | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
outline: none; | ||
} | ||
|
||
|
||
body { | ||
line-height: 1; | ||
font-size: 88%; | ||
font-family: 'Open Sans', arial, sans-serif; | ||
background: #FAFAFA; | ||
color: #585858; | ||
} | ||
|
||
div { | ||
width: 100%; | ||
} | ||
|
||
|
||
h1, h2, h3, h4, h5, h6 { | ||
font-size: 100%; | ||
padding: 23px 0; | ||
margin: 0 15px; | ||
color: #FF0040; | ||
letter-spacing: 1px; | ||
} | ||
|
||
h1 { | ||
font-size: 32px; | ||
} | ||
|
||
h2 { | ||
font-size: 25px; | ||
} | ||
|
||
main { | ||
display: block; | ||
width: 80%; | ||
margin: 0 auto; | ||
} | ||
|
||
/******************* | ||
* Header | ||
********************/ | ||
|
||
|
||
header { | ||
background: #FF0040; | ||
background: -webkit-linear-gradient(#F5A9BC, #FF0040); | ||
background: -o-linear-gradient(#F5A9BC, #FF0040); | ||
background: -moz-linear-gradient(#F5A9BC, #FF0040); | ||
background: linear-gradient(#F5A9BC, #FF0040); | ||
} | ||
|
||
.title { | ||
color: white; | ||
} | ||
|
||
.main-logo { | ||
float: left; | ||
width: 100px; | ||
height: auto; | ||
} | ||
|
||
|
||
/******************* | ||
* Enter a New Post | ||
********************/ | ||
|
||
.entry-container { | ||
margin: 20px 0 50px; | ||
} | ||
|
||
label { | ||
width: 100%; | ||
} | ||
|
||
.text-wrapper { | ||
width: 80%; | ||
} | ||
|
||
textarea { | ||
width: 96%; | ||
border-radius: 3px; | ||
border: 1px solid #848484; | ||
padding: 5px 2%; | ||
} | ||
|
||
button[type="submit"] { | ||
background: #A5DF00; | ||
background: -webkit-linear-gradient(#93C503, #ABCC4B); | ||
background: -o-linear-gradient(#93C503, #ABCC4B); | ||
background: -moz-linear-gradient(#93C503, #ABCC4B); | ||
background: linear-gradient(#93C503, #ABCC4B); | ||
border: none; | ||
color: white; | ||
padding: 4px 25px; | ||
text-transform: uppercase; | ||
letter-spacing: 1px; | ||
float: right; | ||
margin-top: 10px; | ||
border-radius: 3px; | ||
} | ||
|
||
/******************* | ||
* Posts | ||
********************/ | ||
|
||
hr { | ||
background: #BDBDBD; | ||
} | ||
|
||
.thumbnail { | ||
float: left; | ||
width: 50px; | ||
height: auto; | ||
margin-left: 3px; | ||
margin-top: 3px; | ||
} | ||
|
||
.post { | ||
width: 100%; | ||
border: 1px solid #848484; | ||
float: left; | ||
margin: 2%; | ||
border-radius: 3px; | ||
-webkit-box-shadow: 7px 7px 5px 0px rgba(50, 50, 50, 0.75); | ||
-moz-box-shadow: 7px 7px 5px 0px rgba(50, 50, 50, 0.75); | ||
box-shadow: 3px 3px 3px 0px rgba(50, 50, 50, 0.4); | ||
background: white; | ||
} | ||
|
||
.post p { | ||
margin: 5px 10px; | ||
} | ||
|
||
@media (min-width: 600px) { | ||
.post { | ||
width: 28.9%; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
$(document).ready(function() { | ||
$.ajax({ | ||
url: '/posts', | ||
dataType: 'json', | ||
success: function(data) { | ||
|
||
for (var blogPost in data) { | ||
var postDiv = document.createElement('div'); | ||
var postText = document.createElement('p'); | ||
var thumbnail = document.createElement('img'); | ||
var postContainer = document.getElementsByClassName('post-container')[0]; | ||
|
||
thumbnail.src = "./img/logo2.png"; | ||
thumbnail.className = "thumbnail"; | ||
postText.innerHTML = data[blogPost]; | ||
postDiv.className = "post"; | ||
|
||
postDiv.appendChild(thumbnail); | ||
postDiv.appendChild(postText); | ||
postContainer.appendChild(postDiv); | ||
|
||
} | ||
}, | ||
error: function(error){ | ||
console.log(error); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"1456059074613": "This is your first blog post" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.