Skip to content

Instantly share code, notes, and snippets.


parzibyte/header.ejs Secret

Created Jun 28, 2019
What would you like to do?
<!doctype html>
<html lang="es">
Plantilla inicial de Bootstrap 4
@author parzibyte
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Conexión MySQL y Node">
<meta name="author" content="Parzibyte">
<title>Conexión MySQL y Node</title>
<!-- Cargar el CSS de Boostrap-->
<link href="/stylesheets/bootstrap.min.css" rel="stylesheet">
<!-- Cargar estilos propios -->
<link href="/stylesheets/style.css" rel="stylesheet">
<!-- Definición del menú -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" target="_blank" href="//">Node y MySQL - By Parzibyte</a>
<button aria-label="Mostrar u ocultar menú" class="navbar-toggler" id="botonMenu" type="button">
<span class="navbar-toggler-icon"></span>
<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 class="nav-item">
<a class="nav-link" href="/productos/agregar">Agregar</a>
<script type="text/javascript">
// Tomado de
document.addEventListener("DOMContentLoaded", () => {
const menu = document.querySelector("#menu"),
botonMenu = document.querySelector("#botonMenu");
if (menu) {
botonMenu.addEventListener("click", () => menu.classList.toggle("show"));
<!-- 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