aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fonts/roboto/roboto-latin.woff2bin0 -> 10740 bytes
-rw-r--r--src/images/icons/favicon-16x16.pngbin0 -> 824 bytes
-rw-r--r--src/images/icons/moon.svg1
-rw-r--r--src/images/icons/sun.svg1
-rw-r--r--src/js/main.js119
-rw-r--r--src/js/switch-storage.js13
-rw-r--r--src/scss/styles/_base.scss246
-rw-r--r--src/scss/styles/_switch.scss57
-rw-r--r--src/scss/styles/_tipografia.scss17
-rw-r--r--src/scss/styles/_variables.scss70
-rw-r--r--src/scss/styles/home.scss15
-rw-r--r--src/scss/styles/home/_buttons.scss24
-rw-r--r--src/scss/styles/home/_modal.scss131
-rw-r--r--src/scss/styles/home/_table.scss77
-rw-r--r--src/scss/styles/licenses.scss11
-rw-r--r--src/scss/styles/licenses/_main.scss89
-rw-r--r--src/scss/styles/licenses/_table.scss77
-rw-r--r--src/scss/styles/normalize.scss349
-rw-r--r--src/scss/styles/noscript.scss9
-rw-r--r--src/scss/styles/noscript/_main.scss4
-rw-r--r--src/scss/styles/post.scss12
21 files changed, 1322 insertions, 0 deletions
diff --git a/src/fonts/roboto/roboto-latin.woff2 b/src/fonts/roboto/roboto-latin.woff2
new file mode 100644
index 0000000..d4bf378
--- /dev/null
+++ b/src/fonts/roboto/roboto-latin.woff2
Binary files differ
diff --git a/src/images/icons/favicon-16x16.png b/src/images/icons/favicon-16x16.png
new file mode 100644
index 0000000..63d6691
--- /dev/null
+++ b/src/images/icons/favicon-16x16.png
Binary files differ
diff --git a/src/images/icons/moon.svg b/src/images/icons/moon.svg
new file mode 100644
index 0000000..fd32d1e
--- /dev/null
+++ b/src/images/icons/moon.svg
@@ -0,0 +1 @@
+<svg width="12" height="12" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.492 10.511a8.177 8.177 0 0 1-1.877-8.593c.103-.281-.215-.53-.464-.364a8.16 8.16 0 0 0-1.31 1.09C.724 5.842.764 10.984 3.93 14.135a8.102 8.102 0 0 0 11.465-.024c.389-.39.73-.81 1.024-1.254a.31.31 0 0 0-.366-.461 8.102 8.102 0 0 1-8.56-1.885Z" fill="#FFD900"/><path d="M16.052 12.396a8.104 8.104 0 0 1-1.808.44 8.102 8.102 0 0 1-11-.409 8.13 8.13 0 0 1-1.422-1.905 8.115 8.115 0 0 0 2.107 3.613 8.102 8.102 0 0 0 11.465-.024c.389-.39.73-.81 1.024-1.254a.31.31 0 0 0-.366-.461Z" fill="#FB0"/></svg>
diff --git a/src/images/icons/sun.svg b/src/images/icons/sun.svg
new file mode 100644
index 0000000..bf8f032
--- /dev/null
+++ b/src/images/icons/sun.svg
@@ -0,0 +1 @@
+<svg width="12" height="12" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.4 1.8a.6.6 0 0 0 1.2 0V.6a.6.6 0 0 0-1.2 0v1.2Zm0 15.6a.6.6 0 1 0 1.2 0v-1.2a.6.6 0 0 0-1.2 0v1.2Zm7.8-9a.6.6 0 0 0 0 1.2h1.2a.6.6 0 1 0 0-1.2h-1.2ZM.6 8.4a.6.6 0 1 0 0 1.2h1.2a.6.6 0 0 0 0-1.2H.6Zm8.4 6A5.4 5.4 0 1 0 9 3.6a5.4 5.4 0 0 0 0 10.8Zm4.667-10.916a.6.6 0 1 0 .848.849l.849-.849a.6.6 0 0 0-.849-.848l-.848.848ZM2.636 14.515a.6.6 0 1 0 .848.849l.849-.849a.6.6 0 1 0-.849-.848l-.848.848Zm11.879-.848a.6.6 0 1 0-.848.848l.848.849a.6.6 0 0 0 .849-.849l-.849-.848ZM3.484 2.636a.6.6 0 1 0-.848.848l.848.849a.6.6 0 1 0 .849-.849l-.849-.848Z" fill="#FFD900"/><path d="M9 3.6c-.14 0-.28.005-.416.016a5.4 5.4 0 0 1 0 10.768A5.4 5.4 0 1 0 9 3.6Z" fill="#FB0"/><path d="M1.8 8.4H.967a.6.6 0 0 1 0 1.2H1.8a.6.6 0 0 0 0-1.2Zm15.6 0h-.833a.6.6 0 1 1 0 1.2h.833a.6.6 0 1 0 0-1.2ZM9 0a.598.598 0 0 0-.416.169.601.601 0 0 1 .183.431v1.2c0 .17-.07.322-.183.431A.6.6 0 0 0 9.6 1.8V.6a.6.6 0 0 0-.601-.6Zm0 15.6a.597.597 0 0 0-.416.169.601.601 0 0 1 .183.431v1.2c0 .17-.07.322-.183.431A.6.6 0 0 0 9.6 17.4v-1.2a.6.6 0 0 0-.601-.6Zm6.364-12.964a.6.6 0 0 0-.841-.007l.008.007a.6.6 0 0 1 0 .849l-.849.848-.008.007a.6.6 0 0 0 .841-.007l.849-.848a.6.6 0 0 0 0-.849Zm0 11.879-.849-.848a.6.6 0 0 0-.84-.007l.007.007.849.848a.6.6 0 0 1 0 .849l-.008.007a.6.6 0 0 0 .84-.856ZM4.333 3.485l-.849-.849a.6.6 0 0 0-.84-.008l.01.008.848.849a.6.6 0 0 1 0 .848l-.009.008a.6.6 0 0 0 .84-.857Zm0 10.182a.6.6 0 0 0-.84-.008l.009.008a.6.6 0 0 1 0 .848l-.849.849-.008.008a.6.6 0 0 0 .84-.008l.848-.849a.6.6 0 0 0 0-.848Z" fill="#FFD900"/></svg> \ No newline at end of file
diff --git a/src/js/main.js b/src/js/main.js
new file mode 100644
index 0000000..3fc34aa
--- /dev/null
+++ b/src/js/main.js
@@ -0,0 +1,119 @@
+(() => {
+ const $fetch = document.getElementById("countries"),
+ $fragment = document.createDocumentFragment();
+
+ async function getData($url, $method) {
+ try {
+ const res = await fetch( $url, {
+ method: $method,
+ });
+
+ let data = await res.json();
+
+ if (!res.ok) throw { status: res.status, statusText: res.statusText };
+ return data;
+
+ } catch (err) {
+ console.log(err);
+ let message = err.statusText || "Unexpected error";
+ let data = `Error ${err.status}: ${message}`;
+ return data;
+ }
+ };
+
+ // Run getData
+ getData('https://restcountries.com/v3.1/all', 'GET').then( (data) => {
+ data.forEach((el) => {
+ const $country = document.createElement("article");
+ $country.classList.add("item-box");
+ $country.innerHTML = `<div class="item-country">
+ <a class="thumbnail-box" title="${el.name.common}">
+ <div class="thumbnail">
+ <img class="thumbnail-img" alt="&#x20;" src="${el.flags.png}">
+ </div>
+ </a>
+ <h4 class="title"><a href="#simpleModal_${el.name.common}" data-target="simpleModal_${el.name.common}" data-toggle="modal" title="${el.capital}">${el.capital}</a></h4>
+ <address title="${el.name.common}"><b><a href="#simpleModal_${el.name.common}" data-target="simpleModal_${el.name.common}" data-toggle="modal">${el.name.common}</a></b></address>
+ <div class="stats horizontal-stats">
+ <span>Population</span>
+ <div>${el.population}</div>
+ </div>
+
+ <!-- Modal -->
+ <div id="simpleModal_${el.name.common}" class="modal">
+ <div class="modal-window">
+ <div class="close-modal" data-dismiss="modal">&times;</div>
+ <table id="jslicense-labels1" class="table">
+ <caption>General information for Country - ${el.name.common}</caption>
+ <thead>
+ <tr>
+ <th>Country</th>
+ <th>Capital</th>
+ <th>Region</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td data-label="Country">${el.name.common}</td>
+ <td data-label="Capital">${el.capital}</td>
+ <td data-label="Region">${el.region}</td>
+ </tr>
+ </tbody>
+ </table>
+ <button data-dismiss="modal" class="btn-close">Close</button>
+ </div>
+ </div>
+</div>`;
+ $fragment.appendChild($country);
+ });
+ $fetch.appendChild($fragment);
+ });
+
+ // Modal
+ document.addEventListener('click', function (e) {
+ e = e || window.event;
+ let target = e.target || e.srcElement;
+ if (target.dataset.target && target.dataset.target !== '') {
+ let modalId = target.dataset.target;
+ document.getElementById(modalId).classList.add('open');
+ e.preventDefault();
+ }
+ // }
+ if (target.dataset.iframe && target.dataset.iframe !== '' && target.dataset.src && target.dataset.src !== '') {
+ document.getElementById(target.dataset.iframe).src = target.dataset.src;
+ }
+ if (target.dataset.dimensions && target.dataset.dimensions !== "") {
+ // alert(target.dataset.dimensions);
+ document.querySelector('#' + target.dataset.target + ' .modal-window').setAttribute('style', target.dataset.dimensions);
+ if (target.dataset.iframe && target.dataset.iframe !== '' && target.dataset.src && target.dataset.src !== '') {
+ document.getElementById(target.dataset.iframe).setAttribute('style', target.dataset.dimensions);
+ }
+ document.querySelector('#' + target.dataset.target + ' .modal-window').setAttribute('style', target.dataset.dimensions);
+ }
+ if (target.dataset.reload && target.dataset.reload === '1') {
+ document.querySelector('.close-modal').dataset.reload = 1;
+ }
+ // Close modal window with 'data-dismiss' attribute or when the backdrop is clicked
+ if ((target.hasAttribute('data-dismiss') && target.getAttribute('data-dismiss') == 'modal') || target.classList.contains('modal')) {
+ if (target.dataset.reload && target.dataset.reload === '1') {
+ parent.location.reload(true);
+ let modal = document.querySelector('[class="modal open"]');
+ modal.classList.remove('open');
+ e.preventDefault();
+ } else {
+ let modal = document.querySelector('[class="modal open"]');
+ modal.classList.remove('open');
+ e.preventDefault();
+ }
+ }
+ }, false);
+
+ document.body.addEventListener('keydown', (e) => {
+ if (e.key === 'Escape') {
+ if (document.querySelector('.close-modal')) {
+ document.querySelector('.close-modal').click();
+ }
+ }
+ });
+
+})();
diff --git a/src/js/switch-storage.js b/src/js/switch-storage.js
new file mode 100644
index 0000000..fb200c4
--- /dev/null
+++ b/src/js/switch-storage.js
@@ -0,0 +1,13 @@
+// This code is only used to remember theme selection
+const themeSwitch = document.getElementById('theme-switch');
+themeSwitch.checked = localStorage.getItem('switchedTheme') === 'true';
+
+themeSwitch.addEventListener('change', function (e) {
+ if(e.currentTarget.checked === true) {
+ localStorage.setItem('switchedTheme', 'true');
+ console.info('Add light theme to localstorage');
+ } else {
+ localStorage.removeItem('switchedTheme');
+ console.info('Remove light theme of localstorage');
+ }
+});
diff --git a/src/scss/styles/_base.scss b/src/scss/styles/_base.scss
new file mode 100644
index 0000000..7299643
--- /dev/null
+++ b/src/scss/styles/_base.scss
@@ -0,0 +1,246 @@
+body {
+ display: grid;
+ grid-gap: 20px;
+ grid-template-areas:
+ "header"
+ "main"
+ "footer";
+ height: 100vh;
+ grid-template-rows: auto 1fr auto;
+ margin-left: 1rem;
+ margin-right: 1rem;
+}
+
+.home-link {
+ font-size: 1.5rem;
+}
+
+img {
+ width: 100%;
+ height: auto;
+}
+
+a:link {
+ color: var(--link);
+}
+
+a:visited {
+ color: var(--link-visited);
+}
+
+header {
+ display: grid;
+ grid-gap: 1px;
+ grid-template-areas:
+ "home"
+ "form"
+ "playlist";
+ grid-area: header;
+}
+
+.home {
+ grid-area: home;
+ margin-left: auto;
+ margin-right: auto;
+ margin-bottom: 1rem;
+ margin-top: 1rem;
+}
+
+.main {
+ grid-area: main;
+ display: grid;
+ grid-row-gap: 1rem;
+}
+
+.result-info {
+ justify-self: center;
+}
+
+.countries-container {
+ display: grid;
+ grid-row-gap: 0.5rem;
+}
+
+.length {
+ position: absolute;
+ background-color: rgba(35, 35, 35, 0.75);
+ color: #fff;
+ border-radius: 2px;
+ padding: 2px;
+ font-size: 16px;
+ right: 0.25em;
+ bottom: -0.75em;
+}
+
+.item-box {
+ display: grid;
+ grid-template-columns: 1fr;
+ grid-template-rows: 1fr;
+ grid-template-areas: "item-country";
+}
+
+.item-country {
+ grid-area: item-country;
+
+ display: grid;
+ grid-template-columns: auto;
+ grid-template-rows: repeat(4, auto);
+ grid-row-gap: 0.4rem;
+ grid-template-areas:
+ "thumbnail-box"
+ "info-box";
+ align-items: center;
+
+ font-size: 0.7rem;
+}
+
+.item-country a {
+ text-decoration: none;
+ cursor: pointer;
+}
+
+.item-country.channel-item .thumbnail.channel {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding: 0px;
+ text-align: center;
+}
+
+.item-country.channel-item .thumbnail-img.channel {
+ width: 56.25%;
+ position: relative;
+}
+
+.thumbnail-box {
+ grid-area: thumbnail-box;
+ position: relative;
+}
+
+.thumbnail {
+ padding: 28.125%;
+ position: relative;
+ box-sizing: border-box;
+}
+
+.thumbnail-img {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ left: 0;
+ top: 0;
+ object-fit: cover;
+ background-color: var(--s-background);
+}
+
+.title {
+ font-size: 0.8rem;
+ margin: 0px;
+ font-weight: normal;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.info-box address {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.thumbnail-info {
+ background-color: var(--time-background);
+ color: #fff;
+ padding: 2px 5px;
+ text-transform: uppercase;
+ font-weight: 700;
+ font-size: 12px;
+ position: absolute;
+ right: 0;
+ bottom: .2rem;
+}
+
+.item-checkbox {
+ grid-area: item-checkbox;
+ justify-self: start;
+ align-self: center;
+ min-width: 30px;
+ margin: 0px;
+}
+
+.stats {
+ display: flex;
+ justify-content: space-between;
+}
+
+.horizontal-stats > li {
+ display: inline;
+}
+
+
+.horizontal-stats > li:first-child::after {
+ content: " | ";
+}
+
+.footer {
+ grid-area: footer;
+ display: grid;
+ grid-template-columns: auto;
+ align-items: center;
+ justify-content: center;
+ margin: auto;
+ text-align: center;
+}
+
+.footer > p {
+ text-align: center;
+}
+
+@media (min-width: 480px) {
+ .item-country {
+ font-size: 0.85rem;
+ }
+ .info-box {
+ grid-gap: 2px;
+ }
+ .title {
+ font-size: 1rem;
+ }
+}
+
+@media (min-width: 600px) {
+ .countries-container {
+ display: grid;
+ grid-row-gap: 0.5rem;
+ grid-template-columns: 1fr 1fr;
+ }
+}
+
+@media (min-width: 992px) {
+ body {
+ display: grid;
+ grid-template-columns: 0.3fr 2fr 1fr 0.3fr;
+ grid-template-rows: auto 1fr auto;
+ grid-template-areas:
+ "header header header header"
+ "main main main main"
+ "footer footer footer footer";
+ }
+
+ .countries-container {
+ display: grid;
+ grid-template-columns: repeat(4, 1fr);
+ grid-row-gap: 1rem;
+ grid-column-gap: 1rem;
+ }
+
+ .footer {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ grid-column-gap: 2rem;
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+ }
+}
diff --git a/src/scss/styles/_switch.scss b/src/scss/styles/_switch.scss
new file mode 100644
index 0000000..7361ee5
--- /dev/null
+++ b/src/scss/styles/_switch.scss
@@ -0,0 +1,57 @@
+.theme-switch {
+ display: none;
+}
+
+label[for=theme-switch] {
+ cursor: pointer;
+}
+
+.theme-switch:checked ~ .page {
+ --text: var(--light-text);
+ --aside-text: var(--light-aside-text);
+ --p-background: var(--light-p-bg);
+ --s-background: var(--light-s-bg);
+ --link: var(--light-link);
+ --link-visited: var(--light-link-visited);
+ --link-hover: var(--light-link-hover);
+ --border: var(--light-border);
+ --button: var(--light-button);
+ --button-text: var(--light-button-text);
+ --button-hover: var(--light-button-hover);
+ --button-border: var(--light-button-border);
+ --search-text: var(--light-search-text);
+ --switch-icon: var(--light-switch-icon);
+ --switch-shadow-color: var(--light-switch-shadow);
+ --switch-p-bg: var(--light-switch-p-bg);
+ --switch-s-bg: var(--light-switch-s-bg);
+ --switch-border: var(--light-switch-border);
+ --switch-transform: var(--light-switch-transform);
+}
+
+.switch-label {
+ display: inline-flex;
+ width: 35px;
+ height: 1rem;
+ border-radius: 1rem;
+ background-color: var(--switch-p-bg);
+ align-items: center;
+ align-content: center;
+}
+
+.switch-label::before {
+ content: var(--switch-icon);
+ position: relative;
+ transition: text-shadow .2s;
+ background: var(--switch-s-bg);
+ border: 1px solid var(--switch-border);
+ border-radius: 50%;
+ transform: var(--switch-transform);
+ width: 18px;
+ height: 18px;
+}
+
+.theme-switch:focus ~ .page .switch-label::before,
+.switch-label:hover::before {
+ text-shadow: 0 0 15px var(--switch-shadow-color);
+ transition: transform 0.25s;
+}
diff --git a/src/scss/styles/_tipografia.scss b/src/scss/styles/_tipografia.scss
new file mode 100644
index 0000000..08a54b2
--- /dev/null
+++ b/src/scss/styles/_tipografia.scss
@@ -0,0 +1,17 @@
+/* latin */
+@font-face {
+ font-family: 'Roboto Condensed';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: local('Roboto Condensed'),
+ local('RobotoCondensed-Regular'),
+ url(../fonts/roboto/roboto-latin.woff2) format('woff2');
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+
+html {
+ font-family: 'Roboto Condensed', Nimbus Sans, sans-serif;
+ background: var(--p-background);
+ color: var(--text);
+}
diff --git a/src/scss/styles/_variables.scss b/src/scss/styles/_variables.scss
new file mode 100644
index 0000000..d7515e7
--- /dev/null
+++ b/src/scss/styles/_variables.scss
@@ -0,0 +1,70 @@
+:root {
+ /* Light mode */
+ --light-text: #000000;
+ --light-aside-text: #FFFFFF;
+ --light-p-bg: #080808;
+ --light-s-bg: #FFFFFF;
+ --light-link: #1976D2;
+ --light-link-visited: #7755FF;
+ --light-link-hover: #FFC20E;
+ --light-border: #1976D2;
+ --light-shadow: #999999;
+ --light-button: #004BA0;
+ --light-button-text: #FFFFFF;
+ --light-button-hover: #1976D2;
+ --light-button-border: #080808;
+ --light-search-text: #FFFFFF;
+ --light-modal-p-background: indianred;
+ --light-switch-icon: url("/dist/images/icons/sun.svg");
+ --light-switch-shadow: #373D4E;
+ --light-switch-p-bg: #1976d2;
+ --light-switch-s-bg: #FFFFFF;
+ --light-switch-border: #1976d2;
+ --light-switch-transform: translate(0%, 0%);
+
+ /* Dark mode */
+ --dark-text: #FFFFFF;
+ --dark-aside-text: #FFFFFF;
+ --dark-p-bg: #212529;
+ --dark-s-bg: #101010;
+ --dark-link: #1976D2;
+ --dark-link-visited: #7755FF;
+ --dark-link-hover: #FFC20E;
+ --dark-border: #1976D2;
+ --dark-shadow: #999999;
+ --dark-button: #004BA0;
+ --dark-button-text: #FFFFFF;
+ --dark-button-hover: #1976D2;
+ --dark-button-border: #080808;
+ --dark-search-text: #FFFFFF;
+ --dark-modal-p-background: indianred;
+ --dark-switch-icon: url("/dist/images/icons/moon.svg");
+ --dark-switch-shadow: #FCE477;
+ --dark-switch-p-bg: #1976d2;
+ --dark-switch-s-bg: #080808;
+ --dark-switch-border: #1976d2;
+ --dark-switch-transform: translate(74%, 0%);
+
+ /* Default mode */
+ --text: var(--dark-text);
+ --aside-text: var(--dark-aside-text);
+ --p-background: var(--dark-p-bg);
+ --s-background: var(--dark-s-bg);
+ --link: var(--dark-link);
+ --link-visited: var(--dark-link-visited);
+ --link-hover: var(--dark-link-hover);
+ --border: var(--dark-border);
+ --shadow: var(--dark-shadow);
+ --button: var(--dark-button);
+ --button-text: var(--dark-button-text);
+ --button-hover: var(--dark-button-hover);
+ --button-border: var(--dark-button-border);
+ --search-text: var(--dark-search-text);
+ --modal-p-background: var(--dark-modal-p-background);
+ --switch-icon: var(--dark-switch-icon);
+ --switch-shadow-color: var(--dark-switch-shadow);
+ --switch-p-bg: var(--dark-switch-p-bg);
+ --switch-s-bg: var(--dark-switch-s-bg);
+ --switch-border: var(--dark-switch-border);
+ --switch-transform: var(--dark-switch-transform);
+}
diff --git a/src/scss/styles/home.scss b/src/scss/styles/home.scss
new file mode 100644
index 0000000..cb23a84
--- /dev/null
+++ b/src/scss/styles/home.scss
@@ -0,0 +1,15 @@
+@charset "utf-8";
+/*!
+ * Single CSS - Home
+ * Author: Jesus E.
+ * Version: 1.0.0
+ * Licensed under GPLv3 (https://www.gnu.org/licenses/gpl-3.0.txt)
+ */
+
+@import "variables";
+@import 'tipografia';
+@import "switch";
+@import "base";
+@import "home/_buttons.scss";
+@import "home/_modal.scss";
+@import "home/_table.scss";
diff --git a/src/scss/styles/home/_buttons.scss b/src/scss/styles/home/_buttons.scss
new file mode 100644
index 0000000..64f7a54
--- /dev/null
+++ b/src/scss/styles/home/_buttons.scss
@@ -0,0 +1,24 @@
+.button-container > a.button {
+ display: flex;
+ background-color: var(--button);
+ border-color: var(--button-border);
+ border-width: 1px;
+ box-shadow: none;
+ color: var(--button-text);
+ cursor: pointer;
+ margin: 1rem 0;
+ padding: 0.6rem;
+ text-align: center;
+ white-space: nowrap;
+ justify-content: center;
+}
+
+.button-container > a.button:hover {
+ background-color: var(--button-hover);
+}
+
+@media (min-width: 768px) {
+ .button-container > a.button {
+ display: inline-block;
+ }
+}
diff --git a/src/scss/styles/home/_modal.scss b/src/scss/styles/home/_modal.scss
new file mode 100644
index 0000000..7d0ca26
--- /dev/null
+++ b/src/scss/styles/home/_modal.scss
@@ -0,0 +1,131 @@
+.modal {
+ font-family: sans-serif;
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ display: none;
+ overflow: auto;
+ background-color: rgba(0, 0, 0, 0.7);
+ z-index: 9999;
+}
+
+.modal-window {
+ position: relative;
+ background-color: var(--p-background);
+ width: 50%;
+ margin: 10% auto;
+ border-radius: 0.5rem;
+ padding: 20px;
+ border: 1px groove var(--border);
+ box-shadow: 1px 1px 1px var(--shadow), 2px 2px 2px #000;
+}
+
+.modal-window.small {
+ width: 75%;
+}
+
+.modal-window.large {
+ width: 75%;
+}
+
+.close-modal {
+ position: absolute;
+ top: -15px;
+ right: -15px;
+ color: var(--text);
+ height: 50px;
+ width: 50px;
+ margin: -5px -5px;
+ padding: 1px 2px 5px 2px;
+ font-size: 3rem;
+ text-align: center;
+ background: var(--modal-p-background);
+ border-radius: 50%;
+ transition: 1s;
+}
+
+.close-modal:hover,
+.close-modal:focus {
+ color: var(--text);
+ cursor: pointer;
+ background: red;
+ transition: 1s;
+ text-shadow:1px 1px 1px #999, 2px 2px 2px #000;
+}
+
+.open {
+ display: block;
+}
+
+button {
+ font-size: 1rem;
+ cursor: pointer;
+ padding: 1rem;
+ background: var(--button);
+ color: var(--text);
+ border: none;
+ outline: none;
+ border-radius:0.5rem;
+ transition:1s;
+}
+
+.btn-close {
+ margin-top: 1rem;
+}
+
+button:hover {
+ background: var(--button-hover);
+ color:var(--text);
+ transition:1s;
+}
+
+button.close-modal {
+ padding: 0;
+ font-size: 3rem;
+ background: var(--modal-p-background);
+ color: var(--text);
+ border: none;
+}
+
+.subheading {
+ font-style: italic;
+}
+.trigger {
+ border-radius: 0.5rem;
+ color: var(--text);
+}
+.trigger:hover {
+ color: var(--text);
+ background: red;
+}
+.dismiss {
+ font-size: 3rem;
+ background: var(--modal-p-background);
+ color:var(--text);
+ padding: 0.1rem 0.75rem;
+ margin: 0.5rem;
+ border-radius:0.5rem;
+ transition:1s;
+}
+.dismiss:hover {
+ font-size: 3rem;
+ background:red;
+ padding: 0.1rem 0.75rem;
+ margin: 0.5rem;
+ border-radius:0.5rem;
+ transition:1s;
+}
+iframe {
+ width:100%;
+}
+
+aside {
+ width: 600px;
+ margin:0 auto;
+}
+
+code {
+ font-size: 1rem;
+}
diff --git a/src/scss/styles/home/_table.scss b/src/scss/styles/home/_table.scss
new file mode 100644
index 0000000..cb9df6a
--- /dev/null
+++ b/src/scss/styles/home/_table.scss
@@ -0,0 +1,77 @@
+/* ---- ---- Table ---- ---- */
+.table {
+ width: 100%;
+ border-collapse: collapse;
+}
+
+.table caption {
+ margin: 1rem 0;
+ width: 100%;
+}
+
+.table td,.table th {
+ padding: 10px 10px;
+ border: 1px solid var(--s-background);
+ text-align: center;
+}
+
+.table th {
+ background-color: var(--s-background);
+ color: var(--text);
+}
+
+.table tbody tr:nth-child(even) {
+ background-color: var(--s-focus);
+}
+
+.table tbody tr:nth-child(2n+1) {
+ background-color: var(--p-background);
+}
+
+.table thead tr th:nth-last-child(1) {
+ padding: 0;
+}
+
+.table tbody tr td:nth-last-child(1) > button {
+ color: var(--text);
+ width: 40px;
+ height: 30px;
+ background-color: var(--s-background);
+ border: 1px solid var(--s-background);
+ cursor: pointer;
+}
+
+.table tbody tr td:nth-last-child(1) > a {
+ color: var(--text);
+ cursor: pointer;
+ padding: 2px 10px;
+}
+
+/* ---- ---- End table ---- ---- */
+
+/* ---- Table responsive ---- */
+@media (max-width: 580px) {
+ .table thead {
+ display: none;
+ }
+
+ .table tr{
+ margin-bottom:15px;
+ }
+
+ .table,
+ .table tbody,
+ .table caption,
+ .table tr,
+ .table td {
+ display: block;
+ width: auto;
+ text-align: justify;
+ }
+
+ .table td::before {
+ content: attr(data-label) ": ";
+ font-weight: bold;
+ }
+}
+/* End table responsive */
diff --git a/src/scss/styles/licenses.scss b/src/scss/styles/licenses.scss
new file mode 100644
index 0000000..682bc87
--- /dev/null
+++ b/src/scss/styles/licenses.scss
@@ -0,0 +1,11 @@
+@charset "utf-8";
+/*!
+ * Single CSS - Post
+ * Author: Jesus E.
+ * Version: 1.0.0
+ * Licensed under GPLv3 (https://www.gnu.org/licenses/gpl-3.0.txt)
+ */
+@import "variables";
+@import 'tipografia';
+@import "licenses/_main.scss";
+@import "licenses/_table.scss";
diff --git a/src/scss/styles/licenses/_main.scss b/src/scss/styles/licenses/_main.scss
new file mode 100644
index 0000000..76e041d
--- /dev/null
+++ b/src/scss/styles/licenses/_main.scss
@@ -0,0 +1,89 @@
+body {
+ display: grid;
+ grid-gap: 20px;
+ grid-template-areas:
+ "header"
+ "main"
+ "footer";
+ /* Fix height */
+ height: 100vh;
+ grid-template-rows: auto 1fr auto;
+ /* fix top and bottom */
+ margin-left: 1rem;
+ margin-right: 1rem;
+}
+
+.home-link {
+ font-size: 1.5rem;
+}
+
+a:link {
+ color: var(--link);
+}
+
+a:visited {
+ color: var(--link-visited);
+}
+
+header {
+ display: grid;
+ grid-gap: 1px;
+ grid-template-areas:
+ "home";
+ grid-area: header;
+}
+
+.home {
+ grid-area: home;
+ margin-left: auto;
+ margin-right: auto;
+ margin-bottom: 1rem;
+ margin-top: 1rem;
+}
+
+.main {
+ grid-area: main;
+ margin: 0 auto;
+ max-width: 80ch;
+}
+
+.code-error {
+ background: var(--s-background);
+ padding: 1rem;
+}
+
+.footer {
+ grid-area: footer;
+ display: grid;
+ grid-template-columns: auto;
+ align-items: center;
+ justify-content: center;
+ margin: auto;
+ text-align: center;
+}
+
+.footer > p {
+ text-align: center;
+}
+
+@media (min-width: 780px) {
+ body {
+ display: grid;
+ grid-template-columns: 0.3fr 2fr 1fr 0.3fr;
+ grid-template-rows: auto 1fr auto;
+ grid-template-areas:
+ "header header header header"
+ "main main main main"
+ "footer footer footer footer";
+ }
+ .footer {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ grid-column-gap: 2rem;
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+ }
+}
diff --git a/src/scss/styles/licenses/_table.scss b/src/scss/styles/licenses/_table.scss
new file mode 100644
index 0000000..cb9df6a
--- /dev/null
+++ b/src/scss/styles/licenses/_table.scss
@@ -0,0 +1,77 @@
+/* ---- ---- Table ---- ---- */
+.table {
+ width: 100%;
+ border-collapse: collapse;
+}
+
+.table caption {
+ margin: 1rem 0;
+ width: 100%;
+}
+
+.table td,.table th {
+ padding: 10px 10px;
+ border: 1px solid var(--s-background);
+ text-align: center;
+}
+
+.table th {
+ background-color: var(--s-background);
+ color: var(--text);
+}
+
+.table tbody tr:nth-child(even) {
+ background-color: var(--s-focus);
+}
+
+.table tbody tr:nth-child(2n+1) {
+ background-color: var(--p-background);
+}
+
+.table thead tr th:nth-last-child(1) {
+ padding: 0;
+}
+
+.table tbody tr td:nth-last-child(1) > button {
+ color: var(--text);
+ width: 40px;
+ height: 30px;
+ background-color: var(--s-background);
+ border: 1px solid var(--s-background);
+ cursor: pointer;
+}
+
+.table tbody tr td:nth-last-child(1) > a {
+ color: var(--text);
+ cursor: pointer;
+ padding: 2px 10px;
+}
+
+/* ---- ---- End table ---- ---- */
+
+/* ---- Table responsive ---- */
+@media (max-width: 580px) {
+ .table thead {
+ display: none;
+ }
+
+ .table tr{
+ margin-bottom:15px;
+ }
+
+ .table,
+ .table tbody,
+ .table caption,
+ .table tr,
+ .table td {
+ display: block;
+ width: auto;
+ text-align: justify;
+ }
+
+ .table td::before {
+ content: attr(data-label) ": ";
+ font-weight: bold;
+ }
+}
+/* End table responsive */
diff --git a/src/scss/styles/normalize.scss b/src/scss/styles/normalize.scss
new file mode 100644
index 0000000..192eb9c
--- /dev/null
+++ b/src/scss/styles/normalize.scss
@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+ ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+ line-height: 1.15; /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+ ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+ margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+ display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+/* Grouping content
+ ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+ box-sizing: content-box; /* 1 */
+ height: 0; /* 1 */
+ overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+ ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+ background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+ border-bottom: none; /* 1 */
+ text-decoration: underline; /* 2 */
+ text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+ font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+sup {
+ top: -0.5em;
+}
+
+/* Embedded content
+ ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+ border-style: none;
+}
+
+/* Forms
+ ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+ font-family: inherit; /* 1 */
+ font-size: 100%; /* 1 */
+ line-height: 1.15; /* 1 */
+ margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+ overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+ text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+ padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ */
+
+legend {
+ box-sizing: border-box; /* 1 */
+ color: inherit; /* 2 */
+ display: table; /* 1 */
+ max-width: 100%; /* 1 */
+ padding: 0; /* 3 */
+ white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+ vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+ overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+ -webkit-appearance: button; /* 1 */
+ font: inherit; /* 2 */
+}
+
+/* Interactive
+ ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+ display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+ display: list-item;
+}
+
+/* Misc
+ ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+ display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+ display: none;
+}
diff --git a/src/scss/styles/noscript.scss b/src/scss/styles/noscript.scss
new file mode 100644
index 0000000..04af5fa
--- /dev/null
+++ b/src/scss/styles/noscript.scss
@@ -0,0 +1,9 @@
+@charset "utf-8";
+/*!
+ * Single CSS - Home
+ * Author: Jesus E.
+ * Version: 1.0.0
+ * Licensed under GPLv3 (https://www.gnu.org/licenses/gpl-3.0.txt)
+ */
+
+@import "noscript/_main.scss";
diff --git a/src/scss/styles/noscript/_main.scss b/src/scss/styles/noscript/_main.scss
new file mode 100644
index 0000000..542a642
--- /dev/null
+++ b/src/scss/styles/noscript/_main.scss
@@ -0,0 +1,4 @@
+body { display: block; }
+.header { display: none; }
+.main { display: none; }
+.footer { display: none; }
diff --git a/src/scss/styles/post.scss b/src/scss/styles/post.scss
new file mode 100644
index 0000000..5f411a0
--- /dev/null
+++ b/src/scss/styles/post.scss
@@ -0,0 +1,12 @@
+@charset "utf-8";
+/*!
+ * Single CSS - Post
+ * Author: Jesus E.
+ * Version: 1.0.0
+ * Licensed under GPLv3 (https://www.gnu.org/licenses/gpl-3.0.txt)
+ */
+
+@import "variables";
+@import 'tipografia';
+@import "switch";
+@import "base";