Skip to content

Instantly share code, notes, and snippets.

View cziem's full-sized avatar
:octocat:
Coding

Favour George C cziem

:octocat:
Coding
View GitHub Profile
@cziem
cziem / section.css
Created November 12, 2018 10:13
style the section and paragraphs
section {
padding: .5rem 2rem;
margin: 1rem auto;
color: #272727;
}
section h3 {
padding: 2rem 0 0.5rem;
}
@cziem
cziem / navbar.css
Created November 12, 2018 10:11
Get the navbar in shape
nav {
display: flex;
background: #0e496b;
width: 100%;
position: relative;
}
ul {
display: flex;
list-style: none;
@cziem
cziem / hero.css
Created November 12, 2018 10:08
style the hero section
.hero {
background: url('../assets/images/ext.jpeg');
background-size: cover;
background-position: center center;
height: 20rem;
}
.overlay {
display: flex;
justify-content: center;
align-items: center;
@cziem
cziem / normalize.css
Created November 12, 2018 09:09
reset the client stylesheet
* {
padding: 0;
margin: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
background: #f3f3f3;
}
@cziem
cziem / content.html
Created November 12, 2018 09:04
Add the contents of the file
<header>
<div class="hero">
<div class="overlay">
<h2>Learn new sticky tricks</h2>
</div>
</div>
</header>
<nav>
<ul>
<li class="logo">
@cziem
cziem / body_partial.html
Created November 12, 2018 08:59
add this line to the index.html file
<link rel="stylesheet" href="style.css">
</head>
<body>
<script src="main.js"></script>
</body>
</html>
@cziem
cziem / sticky_navbar.html
Created November 11, 2018 21:58
Starter code for the sticky navbar
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="style.css">
<title>Sticky Navbar</title>
</head>
<body>
@cziem
cziem / server.js
Created November 4, 2018 23:30
updated server.js file
const express = require('express')
const bodyParser = require('body-parser')
const mongoose = require('mongoose')
const cors = require('cors')
require('dotenv').config()
// import routes
const default = require('./routes/welcome')
const app = express()
const port = process.env.PORT || 5000
@cziem
cziem / default.js
Created November 4, 2018 23:28
a default route
const express = require('express')
const router = express.Router()
// create a route for default endpoint
router.get('/', (req, res) => {
 res.json({
 message: 'Welcome to the server-side'
 })
})
@cziem
cziem / server.js
Created November 4, 2018 23:26
minimal setup for the server.js
const express = require('express')
const bodyParser = require('body-parser')
const mongoose = require('mongoose')
const cors = require('cors')
require('dotenv').config()
const app = express()
const port = process.env.PORT || 5000
// Connect to the database