Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 28, 2019 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/c5d42df35fcfbfdf85a37b8897d1f4ed to your computer and use it in GitHub Desktop.
Save parzibyte/c5d42df35fcfbfdf85a37b8897d1f4ed to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="es">
<!--
Plantilla inicial de Bootstrap 4
@author parzibyte
Visita: parzibyte.me/blog
-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Conexión PostgreSQL y Node usando Express y Bootstrap">
<meta name="author" content="Parzibyte">
<title>Conexión PostgreSQL y Node usando Express y Bootstrap</title>
<!-- Cargar el CSS de Boostrap-->
<link href="/stylesheets/bootstrap.min.css" rel="stylesheet">
<!-- Cargar estilos propios -->
<link href="/stylesheets/style.css" rel="stylesheet">
</head>
<body>
<!-- Definición del menú -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" target="_blank" href="//parzibyte.me/blog">Node y PGSQL - By Parzibyte</a>
<button aria-label="Mostrar u ocultar menú" class="navbar-toggler" id="botonMenu" type="button">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="menu">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="/productos">Ver</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/productos/agregar">Agregar</a>
</li>
</ul>
</div>
</nav>
<script type="text/javascript">
// Tomado de https://github.com/parzibyte/cotizaciones_web/blob/master/js/cotizaciones.js#L2
document.addEventListener("DOMContentLoaded", () => {
const menu = document.querySelector("#menu"),
botonMenu = document.querySelector("#botonMenu");
if (menu) {
botonMenu.addEventListener("click", () => menu.classList.toggle("show"));
}
});
</script>
<!-- Termina la definición del menú -->
<main role="main" class="container">
<div class="row">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment