Skip to content

Commit

Permalink
add more pages
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed May 11, 2024
1 parent 2aba756 commit 96848b8
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 9 deletions.
11 changes: 11 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ mongoose.connect(config.database).then(() => {
})
});

app.get('/comandos', function(req, res) {
res.render('pages/comandos',{
channel: config.twitch.channels
});
});

app.get('/rutas', function(req, res) {
res.render('pages/rutas',{
channel: config.twitch.channels
});
});

app.use('/images', express.static('images'));

Expand Down
4 changes: 2 additions & 2 deletions handlers/tempsDeFlors.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ class TempsDeFlors {
const timetable = spot.timetable ? '*Interior Abierto sólo Miércoles 15 y Sábados 11 y 18, de 9.30 a 24 h' : ''
let text = `${spot.number} - ${spot.description}`
if (spot.visited) {
text = `${text} (✔️ Visitado${this._getScreenshotText(spot)})`
text = `${text} (✔️${this._getScreenshotText(spot)})`
} else {
text = `${text} (❌ No visitado${this._getScreenshotText(spot)}) ${timetable}`
text = `${text} (❌${this._getScreenshotText(spot)}) ${timetable}`
}
return text
}
Expand Down
94 changes: 94 additions & 0 deletions views/pages/comandos.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TdF - <%= channel %> - Comandos</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>
<body>
<h3>Temps de Flors - Reto de <a href="https://twitch.tv/<%= channel %>" target="_blank"><%= channel %></a></h3>
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="listado">Listado</a>
</li>
<li class="nav-item">
<a class="nav-link" href="fotos">Fotos</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="$"><strong>Comandos</strong></a>
</li>
<li class="nav-item">
<a class="nav-link" href="rutas">Rutas</a>
</li>
</ul>

<h5>Comandos para TODOS</h5>
<table class="table">
<thead>
<tr>
<th scope="col">Comando</th>
<th scope="col">Descripción</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">!punto 2</th>
<td>er informacion del punto X. Si se ha vistiado y si link con foto.</td>
</tr>
<tr>
<th scope="row">!foto</th>
<td>sacar una foto del punto X activo.</td>
</tr>
<tr>
<th scope="row">!activo</th>
<td>ver si hay un punto activo para hacer !foto.</td>
</tr>
<tr>
<th scope="row">!info</th>
<td>ver estado del progreso, listado de puntos, galeria de fotos, mapas y comandos.</td>
</tr>
</tbody>
</table>
<br>
<h5>Comandos para Vips/Mods/Broadcaster</h5>
<table class="table">
<thead>
<tr>
<th scope="col">Comando</th>
<th scope="col">Descripción</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">!activo 2</th>
<td>poner el punto X en activo para que cualquier persona pueda sacar una !foto, luego se desactiva y se guarda la foto para el punto X y también se pone como visitado.</td>
</tr>
<tr>
<th scope="row">!visto 2</th>
<td>poner el punto X en visto por si se ha visto pero no se quiere hacer foto con el comando !activo.</td>
</tr>

</tbody>
</table>
<br>

<h5>Comandos para Mods/Broadcaster</h5>
<table class="table">
<thead>
<tr>
<th scope="col">Comando</th>
<th scope="col">Descripción</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">!borrar 2</th>
<td>Borrar el visto y la foto de un punto.</td>
</tr>
</tbody>
</table>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
</body>
</html>
9 changes: 7 additions & 2 deletions views/pages/gallery.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap demo</title>
<title>TdF - <%= channel %> - Galeria fotos</title>
<!-- OR -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/2.7.2/css/lightgallery-bundle.min.css" integrity="sha512-nUqPe0+ak577sKSMThGcKJauRI7ENhKC2FQAOOmdyCYSrUh0GnwLsZNYqwilpMmplN+3nO3zso8CWUgu33BDag==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
Expand All @@ -20,6 +19,12 @@
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#"><strong>Fotos</strong></a>
</li>
<li class="nav-item">
<a class="nav-link" href="comandos">Comandos</a>
</li>
<li class="nav-item">
<a class="nav-link" href="rutas">Rutas</a>
</li>
</ul>

<div id="lightgallery">
Expand Down
18 changes: 13 additions & 5 deletions views/pages/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap demo</title>
<title>TdF - <%= channel %> - Listado puntos</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>
<body>
Expand All @@ -15,12 +15,19 @@
<li class="nav-item">
<a class="nav-link" href="fotos">Fotos</a>
</li>
<li class="nav-item">
<a class="nav-link" href="comandos">Comandos</a>
</li>
<li class="nav-item">
<a class="nav-link" href="rutas">Rutas</a>
</li>
</ul>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Descripcion</th>
<th scope="col">Descripción</th>
<th scope="col">Ruta</th>
<th scope="col">Visto</th>
<th scope="col">Foto</th>
<th scope="col">Maps</th>
Expand All @@ -31,9 +38,10 @@
<tr class="<%= spot.visited ? 'table-success': '' %>">
<th scope="row"><%= spot.number %></th>
<td><%= spot.description %></td>
<td ><%- spot.visited ? '<span class="badge rounded-pill text-bg-success">Visitado</span>' : '' %></td>
<td><%- spot.screenshot ? '<a href="' + url + '/i/' + spot.screenshot + '" target="_blank">Ver captura</a>' : '' %></td>
<td><a href="https://maps.google.com/?q=<%= spot.coordinates %>" target="_blank">Ver en mapa</a></td>
<td><%= spot.route %></td>
<td ><%- spot.visited ? '<span class="badge rounded-pill text-bg-success">✔️</span>' : '' %></td>
<td><%- spot.screenshot ? '<a href="' + url + '/i/' + spot.screenshot + '" target="_blank">Foto</a>' : '' %></td>
<td><a href="https://maps.google.com/?q=<%= spot.coordinates %>" target="_blank">Mapa</a></td>
</tr>
<% }); %>
</tbody>
Expand Down
52 changes: 52 additions & 0 deletions views/pages/rutas.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TdF - <%= channel %> - Comandos</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>
<body>
<h3>Temps de Flors - Reto de <a href="https://twitch.tv/<%= channel %>" target="_blank"><%= channel %></a></h3>
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="listado">Listado</a>
</li>
<li class="nav-item">
<a class="nav-link" href="fotos">Fotos</a>
</li>
<li class="nav-item">
<a class="nav-link" href="comandos">Comandos</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="$"><strong>Rutas</strong></a>
</li>
</ul>

<h5>Mapas de cada ruta</h5>
<table class="table">
<thead>
<tr>
<th scope="col">Ruta</th>
<th scope="col">Mapa PDF</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td><a href="https://tempsdeflors.girona.cat/docs/planol-tempsdeflors2024-ruta1.pdf" target="_blank">Ver PDF</a></td>
</tr>
<tr>
<th scope="row">2</th>
<td><a href="https://tempsdeflors.girona.cat/docs/planol-tempsdeflors2024-ruta2.pdf" target="_blank">Ver PDF</a></td>
</tr>
<tr>
<th scope="row">3</th>
<td><a href="https://tempsdeflors.girona.cat/docs/planol-tempsdeflors2024-ruta3.pdf" target="_blank">Ver PDF</a></td>
</tr>
</tbody>
</table>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
</body>
</html>

0 comments on commit 96848b8

Please sign in to comment.