Skip to content

Instantly share code, notes, and snippets.

View robertcoopercode's full-sized avatar

Robert Cooper robertcoopercode

View GitHub Profile
.container {
background-color: #000;
color: #fff;
}
.container h1 {
color: purple;
}
.container {
background-color: #000;
color: #fff;
h1 {
color: purple;
}
}
$primary-color: #0B5351;
$secondary-color: #6B8F71;
a {
color: $primary-color;
}
a:hover {
color: $secondary-color;
}
.container {
display: block;
background-color: red;
font-family: sans-serif;
}
ul {
list-style: none;
margin: 0;
}
.container
display: block
background-color: red
font-family: sans-serif
ul
list-style: none
margin: 0
ul li
<script>
$(document).ready( () => {
$.get( '/mediumPosts', (result) => {
for (let i=1; i <= 3; i++) {
let postId = '#post' + i;
let title = 'mediumTitle' + i;
let excerpt = 'mediumExcerpt' + i;
let url = 'mediumUrl' + i;
let postDiv = document.createElement('div');
postDiv.className = 'post';
<script src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<div id='page-wrapper'>
<div id="intro-section">
<h1>Medium Blog Posts</h1>
<p>Here is a list of the most recent blog posts from <a href="https://medium.com/@jaltucher" target="_blank">James Altucher</a>.</p>
</div>
<!-- Blog posts get appended here -->
</div>
<html>
<head>
<meta charset="UTF-8">
<title>Medium Blog Posts with Node.js</title>
</head>
<body>
</body>
</html>
app.get('/mediumPosts', (request, response) => {
getMediumData( (mediumData) => {
response.send(mediumData);
});
});