Skip to content

Commit d0addbe

Browse files
committed
16.0 RC1: general changes, js & css opt, versioning
1 parent 4ab4e8d commit d0addbe

9 files changed

Lines changed: 106 additions & 97 deletions

File tree

.eleventy.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ module.exports = function (eleventyConfig) {
1111
});
1212

1313
eleventyConfig.addShortcode("version", function() {
14-
return require("./package.json").version || 'unknown';
14+
let json = require('./package.json');
15+
let version = json.version || 'unknown';
16+
let release = json.release ? ` (${json.release})` : '';
17+
return `${version}${release}`;
1518
});
1619

1720
eleventyConfig.addShortcode("top", function() {

package.json

Lines changed: 1 addition & 0 deletions
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ source: https://github.com/miermontoto/backup
55
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
8-
icons: [fa-brands fa-markdown, fa-brands fa-square-github]
8+
icons: [fa-brands fa-markdown, fa-brands fa-github]
99
project_css: /static/css/backup.css
10-
star: yes
10+
star: star
1111
---
1212

1313
## Resumen

src/content/collections/projects/epicalendar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permalink: /epiCalendar/
88
icons: [devicon-flask-original, devicon-python-plain, devicon-react-plain]
99
date: 1800-01-01
1010
status: https://dashboard.mier.info/api/badge/2/status?style=flat-square
11-
star: yes
11+
star: star
1212
---
1313

1414
# [\[enlace\]](https://epicalendar.mier.info)

src/content/collections/projects/sumatres.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ title: SumaTres
33
desc: Threes! clone made in Java, product of several subjects' final projects.
44
source: https://github.com/miermontoto/SumaTres
55
icons: [devicon-java-plain]
6-
star: yes
76
---

src/content/collections/projects/web.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: mier.info
33
desc: my personal portfolio, the very website you are looking at right now.
44
source: https://github.com/miermontoto/miermontoto
5-
icons: [devicon-eleventy-plain, fa-brands fa-markdown, devicon-firebase-plain]
5+
icons: [devicon-eleventy-plain, fa-brands fa-markdown, devicon-firebase-plain, devicon-sass-original]
66
status: https://dashboard.mier.info/api/badge/1/uptime/48?style=flat-square
7-
star: yes
7+
star: star
88
---

src/static/css/index.sass

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -95,68 +95,70 @@ a:hover .dot, span:hover .dot
9595
100%
9696
transform: translateX(-100%)
9797

98-
// Cards
98+
// cards
9999
.carded
100100
display: flex
101101
flex-wrap: wrap
102102
justify-content: center
103103

104-
.card
105-
width: max(20%, 300px)
106-
display: grid
107-
gap: 1em
108-
align-items: center
104+
.card
105+
width: max(20%, 300px)
106+
display: grid
107+
gap: 1em
108+
align-items: center
109109

110-
p
111-
margin: 1em
110+
p
111+
margin: 1em
112112

113-
.card-bottom
114-
display: flex
115-
align-items: center
116-
justify-content: center
117-
height: 100%
113+
.card-bottom
114+
display: flex
115+
align-items: center
116+
justify-content: center
117+
height: 100%
118+
119+
.card-title
120+
display: flex
121+
align-items: center
122+
justify-content: center
123+
124+
.card-icons
125+
user-select: none
118126

127+
// icons
119128
.icon
120129
margin: 0 2px
121130
font-size: 1.25em
122131

123-
.card-title
124-
display: flex
125-
align-items: center
126-
justify-content: center
127-
128132
.experience-logo
129133
width: 1.5em
130134
margin-right: 0.5em
131135
border-radius: 5%
132136
user-select: none
133137

134-
.card-icons
135-
user-select: none
136-
137138
// projects table
138139
table#projects
140+
table-layout: auto
139141
margin: 1em 0
140142
border: 3px solid base.$light
141143
border-radius: $radius
142144
padding: 1em
143145

144-
.project-title
146+
.project.star > .project-title
145147
font-size: 1.5em
146-
margin-bottom: 0.5em
147148

148-
.project-links
149-
padding: 0 0.75em
149+
.project-title
150+
font-size: 1.25em
150151

152+
.project-links
151153
a
152154
text-decoration: none
153155
font-size: 1.25em
154156

155157
i
156158
font-size: 1.25em
157159

158-
td
159-
padding: 1.5em 0
160+
td:not(.project-icons)
161+
padding: 1.5em 0.75em
160162

161163
tr:not(:last-child)
162164
td

src/static/js/index.js

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
1-
const projectSection = document.getElementById('project-section');
2-
const projectButton = document.getElementById('project-button');
3-
41
const sections = [
5-
{ button: projectButton, section: projectSection },
2+
{ button: document.getElementById('project-button'), section: document.getElementById('project-section') },
63
{ button: document.getElementById('about-button'), section: document.getElementById('about-section') }
74
];
85

6+
const projects = document.querySelector('table#projects');
7+
8+
const strings = [
9+
"still celebrating Homework 25th anniversary.",
10+
"the prime time of your life. now, live it.",
11+
"something's in the air.",
12+
"we are human, after all.",
13+
"WDPK 83.7, the sound of tomorrow the music of today, brings you exclusively the essential mix.",
14+
"if love is the answer, you're home.",
15+
"the perfect song is framed with silence.",
16+
"make love.",
17+
"and we will never be alone again.",
18+
"many rooms to explore but the doors look the same.",
19+
"ROCK. ROBOT ROCK.",
20+
"touch it. bring it. pay it. watch it. turn it. leave it. stop. format it.",
21+
"around the world.",
22+
"music sounds better with you.",
23+
"one more time."
24+
];
25+
926
sections.forEach(({ button, section }) => {
1027
button.addEventListener('click', () => {
11-
toggleSection(section, button);
28+
toggleSection(section);
1229
});
1330
});
1431

@@ -18,22 +35,27 @@ document.getElementById('title').addEventListener('click', () => {
1835

1936
marqueeString();
2037

38+
// order projects by starred
39+
projects.querySelectorAll('.project').forEach((project) => {
40+
if (project.classList.contains('star')) {
41+
projects.append(project);
42+
43+
project.querySelector('.project-title').innerHTML += ' ⭐';
44+
}
45+
});
46+
47+
projects.querySelectorAll('.project').forEach((project) => {
48+
if (!project.classList.contains('star')) {
49+
projects.append(project);
50+
}
51+
});
52+
2153
// --------------------------------------------- //
2254

23-
function toggleSection(section, button) {
55+
function toggleSection(section) {
2456
// if section is already active, save to constant
2557
const sectionIsActive = section.classList.contains('active');
2658

27-
// toggle active class on button
28-
button.classList.toggle('active');
29-
30-
// remove active class from other buttons
31-
sections.forEach(({ button: b }) => {
32-
if (b !== button) {
33-
b.classList.remove('active');
34-
}
35-
});
36-
3759
// remove active class from all sections
3860
document.querySelectorAll('.section').forEach((s) => {
3961
s.classList.remove('active');
@@ -47,24 +69,6 @@ function toggleSection(section, button) {
4769

4870

4971
function marqueeString() {
50-
let strings = [
51-
"still celebrating Homework 25th anniversary.",
52-
"the prime time of your life. now, live it.",
53-
"something's in the air.",
54-
"we are human, after all.",
55-
"WDPK 83.7, the sound of tomorrow the music of today, brings you exclusively the essential mix.",
56-
"if love is the answer, you're home.",
57-
"the perfect song is framed with silence.",
58-
"make love.",
59-
"and we will never be alone again.",
60-
"many rooms to explore but the doors look the same.",
61-
"ROCK. ROBOT ROCK.",
62-
"touch it. bring it. pay it. watch it. turn it. leave it. stop. format it.",
63-
"around the world.",
64-
"music sounds better with you.",
65-
"one more time."
66-
];
67-
6872
let randomString = strings[Math.floor(Math.random() * strings.length)];
6973
document.getElementById('marquee').innerHTML = randomString;
7074
}

src/static/macros.njk

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,45 @@ permalink: false
1111
{% macro renderProjects(projects) %}
1212
<table id="projects">
1313
{% for project in projects %}
14-
<tr> {{ renderProject(project) }} </tr>
14+
{{ renderProject(project) }}
1515
{% endfor %}
1616
</table>
1717
{% endmacro %}
1818

1919
{% macro renderProject(project) %}
20-
<td class="project-title">
21-
{% if project.data.demo %}
22-
<a href="{{ project.data.demo }}" rel="noopener noreferrer">
20+
<tr class="project {{ project.data.star }}" id="{{ project.data.title | slug }}">
21+
<td class="project-title">
22+
{% if project.data.demo %}
23+
<a href="{{ project.data.demo }}" rel="noopener noreferrer">{{ project.data.title }}</a>
24+
{% else %}
2325
{{ project.data.title }}
24-
</a>
25-
{% else %}
26-
{{ project.data.title }}
27-
{% endif %}
28-
</td>
26+
{% endif %}
27+
</td>
2928

30-
<td class="project-links">
31-
{% if project.data.source %}
32-
<a href="{{ project.data.source }}" target="_blank" rel="noopener noreferrer"><i class="fa-brands fa-square-github"></i></a>
33-
{% endif %}
34-
{% if project.data.info %}
35-
<br>
36-
<a href="{{ project.data.info }}" target="_blank" rel="noopener noreferrer">🛈</a>
37-
{% endif %}
38-
</td>
29+
<td class="project-links">
30+
{% if project.data.source %}
31+
<a href="{{ project.data.source }}" target="_blank" rel="noopener noreferrer"><i class="fa-brands fa-square-github"></i></a>
32+
{% endif %}
33+
{% if project.data.info %}
34+
<br>
35+
<a href="{{ project.data.info }}" target="_blank" rel="noopener noreferrer">🛈</a>
36+
{% endif %}
37+
</td>
3938

40-
<td class="project-description">
41-
{{ project.data.desc | safe }}
42-
</td>
39+
<td class="project-description">
40+
{{ project.data.desc | safe }}
41+
</td>
4342

44-
<td class="project-icons">
45-
{{ renderIcons(project.data.icons) }}
46-
</td>
43+
<td class="project-icons">
44+
{{ renderIcons(project.data.icons) }}
45+
</td>
4746

48-
<td class="project-image">
49-
{% if project.data.image %}
50-
<img src="{{ project.data.image }}" alt="{{ project.data.title }} image">
51-
{% endif %}
52-
</td>
47+
{# <td class="project-image">
48+
{% if project.data.image %}
49+
<img src="{{ project.data.image }}" alt="{{ project.data.title }} image">
50+
{% endif %}
51+
</td> #}
52+
</tr>
5353
{% endmacro %}
5454

5555
{% macro renderExperiences(experiences) %}

0 commit comments

Comments
 (0)