Skip to content

Commit cbb4442

Browse files
committed
20.4
[index] - downsize and compress background videos - remove background overlay - add `target=_blank` to links - fix style in big screens [general] - add new "questions" page - add description about this site - remove umami - small content adjustments
1 parent e968a19 commit cbb4442

File tree

23 files changed

+219
-212
lines changed

23 files changed

+219
-212
lines changed

.eleventy.js

Lines changed: 86 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,13 @@ module.exports = function (eleventyConfig) {
9595

9696
eleventyConfig.addShortcode("breadcrumbs", function(navPages) {
9797
if (!this.page.url) return ''; // if permalink is false in frontmatter, don't show breadcrumbs
98+
9899
let targetName = this.page.url.replace('/', '').replace('/', '').replace('.html', '').toLowerCase();
99-
// let beta = this.page.url.replace('.html', '').split('/');
100-
// beta.shift();
101-
// beta = beta.join('/');
102-
// if (beta.endsWith('/')) beta = beta.slice(0, -1);
100+
// let targetName = this.page.url.replace('.html', '').split('/');
101+
// targetName.shift();
102+
// targetName = targetName.join('/');
103+
// if (targetName.endsWith('/')) targetName = targetName.slice(0, -1);
104+
103105
let currentPage = findSelfInNavPages(navPages, targetName);
104106
if (!currentPage) {
105107
console.log(`unable to produce breadcrumbs for ${targetName}.`);
@@ -121,16 +123,90 @@ module.exports = function (eleventyConfig) {
121123
return `<span id="top" class="button topbtn">top ↑</span>`;
122124
});
123125

124-
eleventyConfig.addShortcode("quizButtons", (data) => {
125-
import('./src/static/js/app/quiz/load.mjs').then((module) => {
126-
return module.blocks(data);
126+
eleventyConfig.addShortcode("qka", function(data) {
127+
let template = ""
128+
data.forEach((d, i) => {
129+
let sources = d.s.map(s => `<li><a href="${s}">${s}</a></li>`).join(' ')
130+
template += `
131+
<div class="doubt hoverborder">
132+
<span class="question">${i+1}. ${d.q}</span>
133+
<span class="answer">${d.a}</span>
134+
<span class="sources">sources: <br>${sources}</span>
135+
<span class="bottom">keywords: <code>${d.k}</code>, date asked: ${d.d}</span>
136+
</div>`
137+
})
138+
return template
139+
});
140+
141+
eleventyConfig.addShortcode("quizButtons", function(json) {
142+
let blocks = getBlocksFromJson(json);
143+
if (blocks.length == 0 || blocks.length == 1) return '';
144+
145+
let template = `<div id="block-selection"> <h3>preguntas.</h3> <ul>`;
146+
blocks.forEach(b => {
147+
template += `<li><code>${b}</code>: ${json[b]['info']}</li>`;
127148
});
149+
template += '<li><code>todas</code>: todas las preguntas</li></ul>';
150+
151+
blocks.forEach((b) => {
152+
template += `<span class="button select-block" id="${b}">${b}</span>`
153+
});
154+
155+
template += '<span class="button select-block" id="all">todas</span>';
156+
template += '</div>';
157+
return template;
128158
});
129159

130-
eleventyConfig.addShortcode("quizQuestions", (data) => {
131-
import('./src/static/js/app/quiz/load.mjs').then((module) => {
132-
return module.questions(data);
160+
eleventyConfig.addShortcode("quizQuestions", function(json) {
161+
let blocks = getBlocksFromJson(json);
162+
let template = '<div id="questions">';
163+
164+
blocks.forEach((block) => {
165+
let questions = json[block]['questions'];
166+
167+
questions.forEach((q) => {
168+
let exam = q.exam == "true";
169+
170+
template += `
171+
<div class="question-block" block="${block}" exam="${exam}">
172+
<h2 class="question">
173+
${q.title}
174+
</h2>
175+
`;
176+
177+
if (q.options) {
178+
template += `<div class="options">`;
179+
180+
q.options.forEach((o, j) => {
181+
template += `<h3 class="option">${j+1}. ${o}</h3>`;
182+
});
183+
184+
template += `</div>`;
185+
}
186+
187+
let shuffle = q.shuffle != "false";
188+
189+
template += `<div class="answer-block" shuffle="${shuffle}">`;
190+
q.answers.forEach((a, j) => {
191+
template += `
192+
<span class="button answer${j == q.correct ? " correct" : ""}">
193+
${a}
194+
</span> <br>`;
195+
});
196+
197+
template += '</div>';
198+
if (exam || !shuffle) {
199+
template += `<ul class="asterisks">
200+
${exam ? '<li class="exam">pregunta de examen reciente</li>' : ''}
201+
${!shuffle ? '<li class="shuffle">orden de respuestas fijado</li>' : ''}
202+
</ul>`;
203+
}
204+
template += '</div>';
205+
});
133206
});
207+
208+
template += `</div>`;
209+
return template;
134210
});
135211

136212
const nunjucksEnvironment = new Nunjucks.Environment(
-1.25 MB
Binary file not shown.
-1.08 MB
Binary file not shown.
-1.71 MB
Binary file not shown.
-144 KB
Binary file not shown.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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/about.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
- i like climbing, cycling and playing bass.
55
- ruby, python, java and a little bit of everything else (c/c++, shell, web, sql, ...)
66
- i take notes in markdown using [obsidian](https://obsidian.md).
7-
- this webpage is a tribute to the legendary [daft punk's 90s website](https://web.archive.org/web/20220223020719/https://daftpunk.com/)

src/content/collections/experience/okticket.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ class: okticket
99

1010
---
1111

12-
- back-end system migration (laravel 10, PHP 8.2, composer 2).
13-
- local deploy automation with Docker and Ruby.
14-
- load and stress tests with [Locust](https://locust.io/).
15-
- implementation of code styling and linting tools such as [duster](https://github.com/tighten/duster).
16-
- configuration of brand new environments for Mexico.
17-
- optimization and refactoring of legacy code.
12+
- **2024: current**
13+
- **2023: internship, software developer**
14+
- back-end system migration (laravel 10, PHP 8.2, composer 2).
15+
- local deploy automation with Docker and Ruby.
16+
- load and stress tests with [Locust](https://locust.io/).
17+
- implementation of code styling and linting tools such as [duster](https://github.com/tighten/duster).
18+
- configuration of brand new environments for Mexico.
19+
- optimization and refactoring of legacy code.

src/content/collections/projects/mier.info.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,44 @@ title: mier.info
33
desc: my personal portfolio, the very website you are looking at right now.
44
source: https://github.com/miermontoto/miermontoto
55
icons: [eleventy, firebase, sass, markdown, nunjucks, js]
6-
links: [{icon: "β", url: "https://mier-f6277--beta-ski9fkat.web.app/", "name": "beta"}]
6+
links: [{icon: "β", url: "https://mier-f6277--beta-ski9fkat.web.app/", name: "beta"}]
77
star: star
8+
permalink: /this/
9+
redirect_from: [/mier.info/, /self/]
810
emoji: 🌐
11+
buttons: [
12+
{img: "β ", url: "https://mier-f6277--beta-ski9fkat.web.app/", text: "beta"}
13+
]
14+
eleventyNavigation:
15+
key: this
16+
title: mier.info
917
---
18+
19+
## intro
20+
this webpage is a collection of my personal projects, a place that i control that allows me to build and publish my own small ideas.
21+
i've spent a lot of time building it and slowly redefining it (yet it still looks like this)
22+
even though it's not impressive neither visually nor technically, it represents my ideas and beliefs.
23+
24+
<br>
25+
26+
## tech
27+
almost everything you see, from the breadcrumbs to the buttons, is handcrafted and built from scratch with <img src="/assets/icons/tech/eleventy.svg" class="icon" alt="eleventy">, hosted in <img src="/assets/icons/tech/firebase.svg" class="icon" alt="firebase">, using <img src="/assets/icons/tech/nunjucks.svg" class="icon" alt="nunjucks">, <img src="/assets/icons/tech/sass.svg" class="icon" alt="sass">, <img src="/assets/icons/tech/markdown.svg" class="icon" alt="markdown"> (and a ton of client-side <img src="/assets/icons/tech/js.svg" class="icon" alt="javascript">).
28+
29+
apart from having its github repo, it is connected to firebase hosting through CI/CD using github actions, including the 'beta' branch that hosts the latest changes before going live.
30+
31+
<br>
32+
33+
## design
34+
the "design" is a tribute to the legendary [daft punk 90's website](https://web.archive.org/web/20220223020719/https://daftpunk.com/).
35+
as you can probably tell, it's a very important reference for me, and even though it doesn't hold up to today's standards, i've always loved the simplicty and the way that it looks.
36+
37+
from the 1st of december to the 7th of january every year, there is snow falling falling (thanks to [snowstorm](https://www.schillmania.com/projects/snowstorm/))
38+
39+
several other inspirations include:
40+
- [mschf](https://mschf.com/)
41+
- [crlf.link](https://crlf.link/)
42+
- [stacksorted](https://stacksorted.com/)
43+
- [dmaorg / clancy's blog](http://dmaorg.info/)
44+
- [ramsus' portfolio](https://rsms.me/)
45+
- [eduardorl's portfolio](https://eduardorl.vercel.app/)
46+
- [ruflas' portfolio](https://ruflas.dev/)

0 commit comments

Comments
 (0)