Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
28 changes: 28 additions & 0 deletions controllers/air.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const express = require('express');
const router = express.Router();

const airSigns = ['Gemini', 'Libra', 'Aquarius'];
const airTraits = ['Movement', 'Creativity', 'Action', 'Adventure', 'Exciting', 'Easily Provoked']


router.get('/', (req, res) => {
res.render('air', {
signs: airSigns,
traits: airTraits,
title: "Air Signs and Traits"
});
});

router.get('/gemini', (req, res) => {
res.sendFile('/Users/juanecabrera/seir-306/unit2/zodiac-controllers/imgs/gemini.png');
});

router.get('/libra', (req, res) => {
res.sendFile('/Users/juanecabrera/seir-306/unit2/zodiac-controllers/imgs/libra.png');
});

router.get('/aquarius', (req, res) => {
res.sendFile('/Users/juanecabrera/seir-306/unit2/zodiac-controllers/imgs/aquarius.png')
})

module.exports = router;
30 changes: 30 additions & 0 deletions controllers/earth.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const express = require('express');
const router = express.Router();

const earthSigns = ['Taurus', 'Virgo', 'Capricorn'];
const earthTraits = ['Grounded', 'Helpful', 'Practical', 'Realistic', 'Materialistic', 'Dependable']


router.get('/', (req, res) => {
res.render('earth', {
signs: earthSigns,
traits: earthTraits,
title: "Earth Signs and Traits"
});
});


router.get('/taurus', (req, res) => {
res.sendFile('/Users/juanecabrera/seir-306/unit2/zodiac-controllers/imgs/taurus.png');
});

router.get('/virgo', (req, res) => {
res.sendFile('/Users/juanecabrera/seir-306/unit2/zodiac-controllers/imgs/virgo.png');
});

router.get('/capricorn', (req, res) => {
res.sendFile('/Users/juanecabrera/seir-306/unit2/zodiac-controllers/imgs/capricorn.png')
})


module.exports = router;
28 changes: 28 additions & 0 deletions controllers/fire.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const express = require('express');
const router = express.Router();

const fireSigns = ['Aries', 'Leo', 'Sagittarius'];
const fireTraits = ['Passionate', 'Strong Emotions', 'Temperamental', 'Energetic', 'Accomplished', 'Interesting']


router.get('/', (req, res) => {
res.render('fire', {
signs: fireSigns,
traits: fireTraits,
title: "Fire Signs and Traits"
});
});

router.get('/leo', (req, res) => {
res.sendFile('/Users/juanecabrera/seir-306/unit2/zodiac-controllers/imgs/leo.png');
});

router.get('/aries', (req, res) => {
res.sendFile('/Users/juanecabrera/seir-306/unit2/zodiac-controllers/imgs/aries.png');
});

router.get('/sagittarius', (req, res) => {
res.sendFile('/Users/juanecabrera/seir-306/unit2/zodiac-controllers/imgs/sagittarius.png')
})

module.exports = router;
28 changes: 28 additions & 0 deletions controllers/water.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const express = require('express');
const router = express.Router();

const waterSigns = ['Cancer', 'Scorpio', 'Pisces'];
const waterTraits = ['Private', 'Mysterious', 'Psychic', 'Charming', 'Emotional', 'Sensitive']

router.get('/', (req, res) => {
res.render('water', {
signs: waterSigns,
traits: waterTraits,
title: "Water Signs and Traits"
});
});

router.get('/cancer', (req, res) => {
res.sendFile('/Users/juanecabrera/seir-306/unit2/zodiac-controllers/imgs/cancer.png');
});

router.get('/scorpio', (req, res) => {
res.sendFile('/Users/juanecabrera/seir-306/unit2/zodiac-controllers/imgs/scorpio.png');
});

router.get('/pisces', (req, res) => {
res.sendFile('/Users/juanecabrera/seir-306/unit2/zodiac-controllers/imgs/pisces.png')
})


module.exports = router;
Binary file added imgs.zip
Binary file not shown.
Binary file added imgs/aquarius.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/aries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/cancer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/capricorn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/gemini.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/leo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/libra.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/pisces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/sagittarius.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/scorpio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/taurus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/virgo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const express = require ("express")
const router = express.Router();
// const ejsLayouts = require('express-ejs-layouts');
const app = express()
const PORT = 8088

app.set('view engine', 'ejs')
app.use(express.static("public"))
// app.use(ejsLayouts)


app.use('/water', require('./controllers/water'));
app.use('/air', require('./controllers/air'));
app.use('/fire', require('./controllers/fire'));
app.use('/earth', require('./controllers/earth.js'));



app.get('/', (req, res) => {
res.render('index.ejs', {
title: "Zodiac Fun"
});
});


app.listen(8088, () => {
console.log('Server started on port 8088');
});


module.exports = router;
Loading