Commit 864ff2f0 authored by Ivan Tancara's avatar Ivan Tancara
Browse files

Merge branch 'master' of gitlab.agetic.gob.bo:dbarra/sitio-firebase

parents 064c25ad 7a0de768
...@@ -3,10 +3,14 @@ ...@@ -3,10 +3,14 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>.:: Sitio ::.</title> <title>.:: Envío de notificaciones push ::.</title>
<link rel="stylesheet" href="./style.css"> <link rel="stylesheet" href="./style.css">
<script type="text/javascript"> <script type="text/javascript">
var baseURL = 'http://localhost:5000'; if (window.location.protocol.trim() === 'https') {
var baseURL = 'https://boliviasegura.gob.bo/admin-api';
} else {
var baseURL = 'http://localhost:5000';
}
function login () { function login () {
service(baseURL + '/login', { service(baseURL + '/login', {
usuario: document.getElementById('user').value, usuario: document.getElementById('user').value,
...@@ -23,7 +27,7 @@ ...@@ -23,7 +27,7 @@
alert('Credenciales incorrectas'); alert('Credenciales incorrectas');
} }
}); });
} }
async function service(url = '', data = {}, method = 'POST') { async function service(url = '', data = {}, method = 'POST') {
const response = await fetch(url, { const response = await fetch(url, {
method: method, method: method,
...@@ -63,6 +67,7 @@ ...@@ -63,6 +67,7 @@
</head> </head>
<body> <body>
<div class="main"> <div class="main">
<section class="title">Envío de notificaciones push</section>
<section id="login"> <section id="login">
<form action="#" onsubmit="event.preventDefault(); login();" class="login"> <form action="#" onsubmit="event.preventDefault(); login();" class="login">
<input type="text" id="user" required placeholder="Usuario"> <input type="text" id="user" required placeholder="Usuario">
......
/* @author dbarra@agetic.gob.bo Archivo de estilos para fuentes externas */
@font-face {
font-family: 'Sansation';
font-style: normal;
font-weight: 300;
src: local('Sansation'), local('Sansation_Light'), url('./fonts/Sansation_Light.ttf');
}
body { body {
padding: 0; padding: 0;
margin: 0; margin: 0;
font-family: 'Sansation' !important;
font-weight: 300 !important;
}
.title {
padding-top: 10px;
padding-bottom: 10px;
text-transform: uppercase;
font-size: 2em;
width: 40vh;
text-align: center;
user-select: none;
} }
.main { .main {
height: 100vh; height: 100vh;
...@@ -15,12 +35,14 @@ body { ...@@ -15,12 +35,14 @@ body {
outline: none; outline: none;
margin: 10px; margin: 10px;
width: calc(100% - 40px); width: calc(100% - 40px);
font-family: 'Sansation';
} }
.main input[type="password"] { .main input[type="password"] {
padding: 10px; padding: 10px;
outline: none; outline: none;
margin: 10px; margin: 10px;
width: calc(100% - 40px); width: calc(100% - 40px);
font-family: 'Sansation';
} }
.main button[type="submit"] { .main button[type="submit"] {
padding: 10px 0; padding: 10px 0;
...@@ -32,12 +54,14 @@ body { ...@@ -32,12 +54,14 @@ body {
width: calc(100% - 40px); width: calc(100% - 40px);
color: #FFF; color: #FFF;
cursor: pointer; cursor: pointer;
font-weight: bold;
} }
textarea { textarea {
margin: auto; margin: auto;
width: calc(95% - 20px); width: calc(95% - 20px);
padding: 10px; padding: 10px;
outline: none; outline: none;
font-family: 'Sansation';
} }
#login { #login {
display: block; display: block;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment