Skip to content

Commit 9aa8c5e

Browse files
committed
17.0 alpha 2
webutils bundle page, fix imports, fix listeners, fix styles
1 parent fb122aa commit 9aa8c5e

16 files changed

Lines changed: 38 additions & 40 deletions

File tree

.eleventy.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,24 @@ module.exports = function (eleventyConfig) {
1010
watch: ["_site/static/**"]
1111
});
1212

13+
eleventyConfig.addShortcode("addScript", function (filename) {
14+
return `<script src="/static/js/app/${filename}.js"></script>`;
15+
});
16+
17+
eleventyConfig.addShortcode("addStyle", function (filename) {
18+
return `<link rel="stylesheet" href="/static/css/app/${filename}.css">`;
19+
});
20+
1321
eleventyConfig.addShortcode("version", function() {
1422
let json = require('./package.json');
15-
let version = json.version || 'unknown';
16-
let release = json.release && json.release !== 'RTW' ? ` (${json.release})` : '';
17-
return `${version}${release}`;
23+
let version = json.version;
24+
let channel = json.channel && json.channel !== 'RTW' ? ` (${json.channel})` : '';
25+
return `${version}${channel}`;
1826
});
1927

2028
eleventyConfig.addShortcode("top", function() {
2129
return `
22-
<span id="top" class="button">top ↑</span>
30+
<span id="top" class="button topbtn">top ↑</span>
2331
`;
2432
});
2533

package.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/content/collections/projects/backup.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ permalink: /backup/
66
demo: /backup
77
keywords: backup, backup carrera, epi, epi gijón, asignaturas, giitin, informática, ingeniería informática, ingeniería, engineering, computer engineering, gijón
88
icons: [fa-brands fa-markdown, fa-brands fa-github]
9-
project_css: /static/css/backup.css
109
star: star
1110
---
1211

12+
{% addStyle 'backup' %}
13+
1314
## Resumen
1415
backup es una colección de repositorios de todas las asignaturas de la carrera de Ingeniería Informática en Tecnologías de la Información (GIITIN) en la Escuela Politécnica de Ingeniería de Gijón (EPI Gijón).
1516

src/content/collections/projects/gti.njk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ title: gti quiz
33
desc: homemade quiz made up of official questions of the course <i>Gestión de Tecnologías de la Información</i>
44
icons: [devicon-eleventy-plain, devicon-javascript-plain]
55
permalink: /gti/
6-
project_css: gti
7-
project_js: gti
86
demo: /gti/
97
---
108

9+
{% addStyle 'gti' %}
10+
{% addScript 'gti' %}
11+
1112
<div id="results">
1213
<span id="correct">0</span> / <span id="total">?</span>
1314
<span id="">→</span>

src/content/collections/projects/webutils.njk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,10 @@ demo: /webutils/
77
---
88

99
{% for util in collections.webutils %}
10-
10+
<div id="{{ util.fileSlug }}" class="util">
11+
<h2><a href="/{{ util.fileSlug }}">{{ util.fileSlug }}</a></h2>
12+
{% set name = './src/content/collections/webutils/' + util.fileSlug + '.njk' %}
13+
{% renderFile name %}
14+
</div>
15+
<hr>
1116
{% endfor %}
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
---
2-
title: base64
3-
---
1+
{% addScript 'base64' %}
42

5-
<textarea id="decoded" rows="10" cols="50"></textarea>
3+
<textarea id="decoded"></textarea>
64
<span><=></span>
7-
<textarea id="encoded" rows="10" cols="50"></textarea>
5+
<textarea id="encoded"></textarea>

src/content/collections/webutils/tiny.njk

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
---
2-
title: tiny
3-
project_css: true
4-
---
1+
{% addScript 'tiny' %}
2+
{% addStyle 'tiny' %}
53

64
<input id="input">
75
<br> <br>
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"tags": "webutils",
33
"layout": "project.njk",
4-
"permalink": "/{{ page.fileSlug }}/",
5-
"project_js": true
4+
"permalink": "/{{ page.fileSlug }}/"
65
}

0 commit comments

Comments
 (0)