Skip to content

Commit f3addb2

Browse files
committed
updated files
1 parent 2261d88 commit f3addb2

File tree

2 files changed

+24
-126
lines changed

2 files changed

+24
-126
lines changed

routes/speakers.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ const router = express.Router();
44
module.exports = params => {
55

66
const{speakerService} = params;
7-
router.get('/', async(req, res) => {
8-
const speakers = await speakerService.getList();
9-
return res.json(speakers);
7+
router.get('/', async (req, res) => {
8+
const speakers = await speakerService.getList()
9+
res.render('layout', { pageTitle: 'Speakers', template: 'speakers', speakers });
1010
});
11-
1211

13-
router.get('/:shortname', (req, res) => {
14-
return res.send(`Detail page of ${req.params.shortname}`);
15-
16-
});
12+
router.get('/:shortname', (req, res) => res.send(`Detail page of ${req.params.shortname}`));
1713

1814
return router;
1915
};

views/pages/speakers.ejs

Lines changed: 20 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,28 @@
1-
<!DOCTYPE html>
2-
<html>
31

4-
<head>
5-
<title>Roux Meetups--Speakers</title>
6-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
7-
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
8-
<link rel="stylesheet" href="./css/style.css">
9-
<meta name="viewport"
10-
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
11-
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&amp;display=block" rel="stylesheet">
12-
</head>
13-
14-
<body>
15-
<header>
16-
<div class="jumbotron d-none d-sm-block"></div>
17-
<nav class="navbar navbar navbar-expand-md navbar-dark bg-dark">
18-
<div class="container">
19-
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#navbar-collapse"
20-
aria-expanded="false"> <span class="sr-only">Toggle navigation</span>
21-
&#x2630;</button> <a href="./index.html" class="navbar-brand">Roux Meetups</a>
22-
<div class="collapse navbar-collapse" id="navbar-collapse">
23-
<ul class="nav navbar-nav ml-auto">
24-
<li class="nav-item"> <a href="./index.html" class="nav-link">Home</a>
25-
</li>
26-
<li class="nav-item dropdown">
27-
<a href="./speakers.html" class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
28-
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
29-
Speakers
30-
</a>
31-
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
32-
<a class="dropdown-item" href="./speakers.html">All Speakers</a>
33-
<div class="dropdown-divider"></div>
34-
<a class="dropdown-item" href="#">Lorenzo Garcia</a>
35-
<a class="dropdown-item" href="./Hillary_Goldwynn.html">Hilary Goldywynn Post</a>
36-
<a class="dropdown-item" href="#">Riley Rudolph Rewington</a>
37-
</div>
38-
</li>
39-
<li class="nav-item"> <a href="./feedback.html" class="nav-link">Feedback</a>
40-
</li>
41-
</ul>
42-
</div>
43-
</div>
44-
</nav>
45-
</header>
462
<div class="container mt-4">
473
<div class="row">
484
<div class="col-sm-8">
495
<article class="speakerslist maincontent">
50-
51-
<div class="mb-4">
52-
<h4 class="speakerslist-title">Deep Sea Wonders</h4>
53-
<div class="speakerslist-name">with
54-
<a href="./Hillary_Goldwynn.html">Hilary Goldywynn Post</a>
55-
</div>
56-
<div class="row speakerslist-info mt-2">
57-
<div class="col-sm-3">
58-
<a href="/speakers/Lorenzo_Garcia">
59-
<img class="speakerslist-img rounded-circle img-fluid" src="./images/speakers/Hillary_Goldwynn_tn.jpg"
60-
alt="Photo of Hilary Goldywynn Post">
61-
</a>
62-
</div>
63-
<div class="col-sm-9">
64-
Hillary is a sophomore art sculpture student at New York University, and has won the major international
65-
prizes for painters, including the Divinity Circle and the International Painter&#39;s Medal.
66-
Hillary&#39;s exhibit features paintings that contain only water including waves, deep sea, and river.
67-
</div>
68-
</div>
69-
</div>
70-
71-
<div class="mb-4">
72-
<h4 class="speakerslist-title">Deep Sea Wonders</h4>
73-
<div class="speakerslist-name">with
74-
<a href="./Hillary_Goldwynn.html">Hilary Goldywynn Post</a>
75-
</div>
76-
<div class="row speakerslist-info mt-2">
77-
<div class="col-sm-3">
78-
<a href="/speakers/Lorenzo_Garcia">
79-
<img class="speakerslist-img rounded-circle img-fluid" src="./images/speakers/Hillary_Goldwynn_tn.jpg"
80-
alt="Photo of Hilary Goldywynn Post">
81-
</a>
82-
</div>
83-
<div class="col-sm-9">
84-
Hillary is a sophomore art sculpture student at New York University, and has won the major international
85-
prizes for painters, including the Divinity Circle and the International Painter&#39;s Medal.
86-
Hillary&#39;s exhibit features paintings that contain only water including waves, deep sea, and river.
87-
</div>
88-
</div>
89-
</div>
90-
91-
<div class="mb-4">
92-
<h4 class="speakerslist-title">Deep Sea Wonders</h4>
93-
<div class="speakerslist-name">with
94-
<a href="./Hillary_Goldwynn.html">Hilary Goldywynn Post</a>
95-
</div>
96-
<div class="row speakerslist-info mt-2">
97-
<div class="col-sm-3">
98-
<a href="/speakers/Lorenzo_Garcia">
99-
<img class="speakerslist-img rounded-circle img-fluid" src="./images/speakers/Hillary_Goldwynn_tn.jpg"
100-
alt="Photo of Hilary Goldywynn Post">
101-
</a>
102-
</div>
103-
<div class="col-sm-9">
104-
Hillary is a sophomore art sculpture student at New York University, and has won the major international
105-
prizes for painters, including the Divinity Circle and the International Painter&#39;s Medal.
106-
Hillary&#39;s exhibit features paintings that contain only water including waves, deep sea, and river.
107-
</div>
108-
</div>
109-
</div>
6+
<% speakers.forEach( speaker=> { %>
7+
<div class="mb-4">
8+
<h4 class="speakerslist-title"><%= speaker.title %></h4>
9+
<div class="speakerslist-name">with
10+
<a href="/speakers/<%= speaker.shortname %>"><%= speaker.name %></a>
11+
</div>
12+
<div class="row speakerslist-info mt-2">
13+
<div class="col-sm-3">
14+
<a href="/speakers/<%= speaker.shortname %>">
15+
<img class="speakerslist-img rounded-circle img-fluid"
16+
src="/images/speakers/<%= speaker.shortname %>_tn.jpg"
17+
alt="Photo of <%= speaker.name %>">
18+
</a>
19+
</div>
20+
<div class="col-sm-9">
21+
spe
22+
</div>
23+
</div>
24+
<% }) %>
25+
11026

11127
</article>
11228
</div>
@@ -139,17 +55,3 @@
13955

14056
</div>
14157
</div>
142-
143-
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
144-
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
145-
crossorigin="anonymous"></script>
146-
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
147-
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
148-
crossorigin="anonymous"></script>
149-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
150-
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
151-
crossorigin="anonymous"></script>
152-
<script src="./js/pixgrid.js"></script>
153-
</body>
154-
155-
</html>

0 commit comments

Comments
 (0)