misc improvements

This commit is contained in:
Guido García 2021-01-16 18:03:36 +01:00
parent 9099328432
commit 49d2e97ced
8 changed files with 42 additions and 159 deletions

View File

@ -1,4 +1,13 @@
module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy("assets");
eleventyConfig.addPassthroughCopy("images");
eleventyConfig.addNunjucksFilter("color", function(value) {
if (value < 50) {
return "#c60c0c45";
}
// TODO complete with all values available in Mozilla Observatory
// and use "grade" (A, B, etc) instead of the numeric "score".
return "inherit";
});
};

View File

@ -1,10 +1,9 @@
@import url(fontawesome-all.min.css);
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,700,900");
/*
Phantom by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
/*
Phantom by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
html, body, div, span, applet, object,
@ -117,7 +116,7 @@ input, select, textarea {
body, input, select, textarea {
color: #585858;
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-family: Helvetica, sans-serif;
font-size: 16pt;
font-weight: 300;
line-height: 1.75;
@ -2388,10 +2387,6 @@ input, select, textarea {
border-right: 0;
}
table tbody tr:nth-child(2n + 1) {
background-color: rgba(144, 144, 144, 0.075);
}
table td {
padding: 0.75em 0.75em;
}
@ -2411,32 +2406,6 @@ input, select, textarea {
border-top: solid 2px #c9c9c9;
}
table.alt {
border-collapse: separate;
}
table.alt tbody tr td {
border: solid 1px #c9c9c9;
border-left-width: 0;
border-top-width: 0;
}
table.alt tbody tr td:first-child {
border-left-width: 1px;
}
table.alt tbody tr:first-child td {
border-top-width: 1px;
}
table.alt thead {
border-bottom: 0;
}
table.alt tfoot {
border-top: 0;
}
/* Button */
input[type="submit"],

View File

@ -20,10 +20,6 @@
border: solid _size(border-width) _palette(border);
border-left: 0;
border-right: 0;
&:nth-child(2n + 1) {
background-color: _palette(border-bg);
}
}
}
@ -46,36 +42,4 @@
tfoot {
border-top: solid (_size(border-width) * 2) _palette(border);
}
&.alt {
border-collapse: separate;
tbody {
tr {
td {
border: solid _size(border-width) _palette(border);
border-left-width: 0;
border-top-width: 0;
&:first-child {
border-left-width: _size(border-width);
}
}
&:first-child {
td {
border-top-width: _size(border-width);
}
}
}
}
thead {
border-bottom: 0;
}
tfoot {
border-top: 0;
}
}
}

View File

@ -23,7 +23,7 @@
// Font.
$font: (
family: ('Source Sans Pro', Helvetica, sans-serif),
family: (Helvetica, sans-serif),
family-fixed: ('Courier New', monospace),
weight: 300,
weight-bold: 900,

View File

@ -5,7 +5,6 @@
@import 'libs/breakpoints';
@import 'libs/html-grid';
@import 'fontawesome-all.min.css';
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,700,900');
/*
Phantom by HTML5 UP

View File

@ -7,7 +7,7 @@ for site in $SITES; do
curl -s -X POST "https://http-observatory.security.mozilla.org/api/v1/analyze?host=$site&rescan=true"
done
sleep 60
sleep 60 # XXX polling until mozilla finishes scanning the site might be more elegant
rm _data/results/*.json
for site in $SITES; do

103
index.njk
View File

@ -6,16 +6,11 @@
-->
<html>
<head>
<title>Web segura</title>
<title>Web Segura. Obsrevatorio de seguridad web de Valladolid.</title>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, user-scalable=no"
/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="assets/css/main.css" />
<noscript
><link rel="stylesheet" href="assets/css/noscript.css"
/></noscript>
<noscript><link rel="stylesheet" href="assets/css/noscript.css"/></noscript>
</head>
<body class="is-preload">
<!-- Wrapper -->
@ -25,11 +20,11 @@
<div class="inner">
<!-- Logo -->
<a href="index.html" class="logo">
<span class="symbol"><img src="images/logo.svg" alt="" /></span
><span class="title">Web segura</span>
<span class="symbol"><img src="images/logo.svg" alt="logo web segura" /></span>
<span class="title">Web Segura</span>
</a>
<!-- Nav
<!-- Nav
<nav>
<ul>
<li><a href="#menu">Menu</a></li>
@ -56,29 +51,28 @@
<div class="inner">
<header>
<h1>
Los sitios web de estas instituciones ponen en peligro tu
seguridad y la de sus empleados.
Observatorio de seguridad web de Valladolid
</h1>
<p>[[Por qué HTTPS/TLS es necesario...]]</p>
<p>
Analizamos sitios públicos de Valladolid para saber si protegen la privacidad y seguridad de sus usuarios.
El HTTPS evita que los intrusos puedan escuchar las comunicaciones entre sus sitios web y sus usuarios.
</p>
</header>
<section>
<div class="table-wrapper">
<table>
<!-- class="alt"-->
<thead>
<tr>
<th>Puntuación</th>
<th>Nota</th>
<th>Sitio web</th>
<th>Perfiles</th>
</tr>
</thead>
<tbody>
{% for web, json in results %}
<tr {% if json.score <= 50 %} style="background-color: #c60c0c45;" {% endif %}>
<td>{{json.grade}}</td>
<td>{{web | replace("!", ".")}}</td>
<td></td>
<tr style="background-color: {{ json.score | color }}">
<td>{{ json.grade }}</td>
<td>{{ web | replace("!", ".") }}</td>
</tr>
{% endfor %}
</tbody>
@ -88,89 +82,34 @@
</div>
</div>
<!-- Footer
<!-- Footer -->
<footer id="footer">
<div class="inner">
<section>
<h2>Get in touch</h2>
<form method="post" action="#">
<div class="fields">
<div class="field half">
<input type="text" name="name" id="name" placeholder="Name" />
</div>
<div class="field half">
<input
type="email"
name="email"
id="email"
placeholder="Email"
/>
</div>
<div class="field">
<textarea
name="message"
id="message"
placeholder="Message"
></textarea>
</div>
</div>
<ul class="actions">
<li><input type="submit" value="Send" class="primary" /></li>
</ul>
</form>
</section>
<section>
<h2>Follow</h2>
<ul class="icons">
<li>
<a href="#" class="icon brands style2 fa-twitter"
<a href="https://twitter.com/PucelaBits" class="icon brands style2 fa-twitter"
><span class="label">Twitter</span></a
>
</li>
<li>
<a href="#" class="icon brands style2 fa-facebook-f"
><span class="label">Facebook</span></a
>
</li>
<li>
<a href="#" class="icon brands style2 fa-instagram"
><span class="label">Instagram</span></a
>
</li>
<li>
<a href="#" class="icon brands style2 fa-dribbble"
><span class="label">Dribbble</span></a
>
</li>
<li>
<a href="#" class="icon brands style2 fa-github"
<a href="https://github.com/PucelaBits" class="icon brands style2 fa-github"
><span class="label">GitHub</span></a
>
</li>
<li>
<a href="#" class="icon brands style2 fa-500px"
<a href="https://t.me/pucelabits" class="icon brands style2 fa-telegram"
><span class="label">500px</span></a
>
</li>
<li>
<a href="#" class="icon solid style2 fa-phone"
><span class="label">Phone</span></a
>
</li>
<li>
<a href="#" class="icon solid style2 fa-envelope"
><span class="label">Email</span></a
>
</li>
</ul>
</section>
<ul class="copyright">
<li>&copy; Untitled. All rights reserved</li>
<li>Design: <a href="http://html5up.net">HTML5 UP</a></li>
<li>Una iniciativa de <a href="https://pucelabits.org/">PucelaBits</a>. Cultura libre, ágora hacker.</li>
<li>Diseño <a href="http://html5up.net">HTML5 UP</a></li>
</ul>
</div>
</footer>
-->
</div>
<!-- Scripts -->

View File

@ -1,5 +1,8 @@
www.auvasa.es,AUVASA
www.valladolid.es,Ayuntamiento de Valladolid
www.casadelaindia.org,Casa de la India
www.centroculturalmigueldelibes.com,Centro Cultural Miguel Delibes
feriavalladolid.com,Feria de Valladolid
www.fmdva.org,Fundación Municipal de Deportes
www.museocienciavalladolid.es,Museo de la Ciencia
www.uva.es,Universidad de Valladolid
www.casadelaindia.org,Casa de la India
www.valladolid.es,Ayuntamiento de Valladolid

1 www.auvasa.es AUVASA
2 www.valladolid.es www.casadelaindia.org Ayuntamiento de Valladolid Casa de la India
3 www.centroculturalmigueldelibes.com Centro Cultural Miguel Delibes
4 feriavalladolid.com Feria de Valladolid
5 www.fmdva.org Fundación Municipal de Deportes
6 www.museocienciavalladolid.es Museo de la Ciencia
7 www.uva.es Universidad de Valladolid
8 www.casadelaindia.org www.valladolid.es Casa de la India Ayuntamiento de Valladolid