Author SHA1 Message Date
maik 29c4ec29ca Show current path in navbar 2022-11-20 11:49:45 +01:00
102 changed files with 796 additions and 1907 deletions
+12 -40
View File
@@ -10,53 +10,25 @@ defaults:
working-directory: ./
jobs:
build:
cd:
timeout-minutes: 6
name: Build
name: CD
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v2
- name: Setup hugo
uses: peaceiris/actions-hugo@v3
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true
- name: Build
run: hugo --minify
- name: Upload deployment
uses: actions/upload-artifact@v4
run: hugo -D -F
- name: Create GitHub deployment
uses: chrnorm/deployment-action@releases/v1
id: deployment
with:
name: public-html
path: ./public
deploy:
timeout-minutes: 6
name: Deploy
runs-on: ubuntu-latest
needs: build
environment:
name: production
url: https://maik.dev/
steps:
- name: Download deployment
uses: actions/download-artifact@v4
with:
name: public-html
path: ./public-html
- name: Setup SSH config for remote server
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
echo "${{ secrets.SSH_HOST }} ssh-ed25519 ${{ secrets.SSH_HOST_KEY }}" > ~/.ssh/known_hosts
chmod 600 ~/.ssh/id_ed25519
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
- name: Transfer deployment to remote server
run: |
rsync -avh --delete-after ./public-html/ ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:~/maik.dev
token: "${{ github.token }}"
target_url: https://maik.dev/
environment: production
initial_status: "success"
+2 -4
View File
@@ -22,13 +22,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v2
- name: Setup hugo
uses: peaceiris/actions-hugo@v3
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true
- name: Build
run: hugo -D -F
+13
View File
@@ -0,0 +1,13 @@
+++
author = "Maik de Kruif"
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
description = ""
images = []
tags = [
"untagged",
]
categories = [
"uncategorized",
]
+++
+13
View File
@@ -0,0 +1,13 @@
+++
author = "Maik de Kruif"
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
description = ""
images = []
tags = [
"untagged",
]
categories = [
"uncategorized",
]
+++
Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 969 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

+24 -31
View File
@@ -1,8 +1,12 @@
baseURL = "http://localhost:1313/"
baseURL = "https://maik.dev/"
# baseURL = "http://localhost:1313/"
title = "Maik de Kruif"
languageCode = "en-us"
theme = "maik-blog"
paginate = 12
rssLimit = 10
copyright = "© Maik de Kruif (maik_dev). All rights reserved."
PygmentsCodeFences = true
@@ -23,27 +27,36 @@ canonifyURLs = true
enableRobotsTXT = true
enableGitInfo = true
enableEmoji = true
enableMissingTranslationPlaceholders = false
disableRSS = false
disableSitemap = false
disable404 = false
disableHugoGeneratorInject = false
googleAnalytics = "UA-136337666-1"
[permalinks]
[permalinks.page]
posts = "/posts/:title/"
writeups = "/:sections/:title/"
# writeups = "/writeups/:title/"
portfolio = "/portfolio/:title/"
posts = "/posts/:title/"
writeups = "/:sections/:title/"
[author]
name = "Maik de Kruif"
email = "maik@maik.dev"
twitter = "@maik_dev"
image = "/img/home/portrait.png"
[social]
twitter = "@maik_dev"
[outputs]
home = ["HTML", "RSS"]
page = ["HTML", "RSS"]
[pagination]
pagerSize = 12
[params]
dateform = "Jan 2, 2006"
dateformShort = "Jan 2"
dateformNum = "2006-01-02"
dateformNumTime = "2006-01-02 15:04 -0700"
dateformMonth = "Jan, 2006"
# Metadata mostly used in document's head
description = "Hey there, my name is Maik de Kruif, I create websites, bots and other kinds of software. At the moment, I'm still studying computer science at Avans University of Applied Sciences. I am also a big fan of open-source software, which is why you'll find many of my projects on Github. And last but not least, I love playing around with cyber-security related stuff."
@@ -52,8 +65,6 @@ enableEmoji = true
genre = "Blog"
rssLimit = 15
showReadingTimeInList = false
homeSubtitle = "Software Engineering, Linux and Cyber Security"
@@ -61,12 +72,6 @@ enableEmoji = true
# Prefix of link to the git commit detail page. GitInfo must be enabled.
gitUrl = "https://github.com/maikka39/Personal-Website/commit/"
# Add domain for GoatCounter to enable
goatCounter = "webstats.maik.dev"
# Show pageviews on posts, writeups, etc.
showPageViews = true
# Set disableReadOtherPosts to true in order to hide the links to other posts.
disableReadOtherPosts = false
@@ -96,25 +101,12 @@ enableEmoji = true
msapplication = "#252627"
theme = "#252627"
[params.logo]
logoText = "$ cd /home/"
logoHomeLink = "/"
# Uncomment this if you want a portrait on your start page
[params.portrait]
path = "/img/home/portrait.png"
alt = "Portrait"
size = "175px"
[params.author]
name = "Maik de Kruif"
email = "maik@maik.dev"
twitter = "@maik_dev"
image = "/img/home/portrait.png"
[params.general]
twitter = "@maik_dev"
# Wallets
[[params.wallets]]
name = "XMR"
@@ -179,6 +171,7 @@ enableEmoji = true
[languages]
[languages.en]
subtitle = "maik.dev"
weight = 1
copyright = "© Maik de Kruif (maik_dev). All rights reserved."
-5
View File
@@ -1,5 +0,0 @@
baseURL = "https://maik.dev/"
[services]
[services.googleAnalytics]
id = "UA-136337666-1"
-23
View File
@@ -1,23 +0,0 @@
+++
author = "Maik de Kruif"
title = "Advent of Code"
start_date = 2020-10-15
end_date = 2099-05-04
company_name = "Personal"
company_url = "https://maik.dev"
cover = "img/portfolio/adventofcode/screenshot.png"
description = "Advent of Code is an annual programming event that presents daily coding puzzles. I actively participate in the events, solving the challenges and improving my coding skills."
source_code = "https://github.com/maikka39/Advent-of-Code"
skills = [
"Problem-solving",
"Programming efficiency",
"Time management",
]
+++
[Advent of Code](https://adventofcode.com/) is a popular annual programming event that presents a series of coding puzzles, one for each day of December until Christmas. Each puzzle involves solving a problem using a programming language of your choice, with (generally) increasing difficulty as the event progresses.
I actively participate in Advent of Code, relishing the daily challenges and the opportunity to sharpen my coding skills. The puzzles covered a wide range of topics, from string manipulation and data structures to algorithms and game theory.
By consistently solving the puzzles, I hone my problem-solving abilities, improve my understanding of different programming paradigms, and discover new and innovative approaches to coding challenges.
-26
View File
@@ -1,26 +0,0 @@
+++
author = "Maik de Kruif"
title = "Google Foobar"
start_date = 2020-10-15
end_date = 2021-05-04
company_name = "Personal"
company_url = "https://maik.dev"
cover = "img/portfolio/google-foobar/screenshot.png"
description = "Google Foobar is a mysterious coding challenge platform launched by Google. I successfully solved all the challenges presented by the platform, showcasing my coding abilities and problem-solving skills."
source_code = "https://github.com/maikka39/Google-Foobar"
skills = [
"Problem-solving",
"Algorithm design",
"Time management",
]
+++
Google Foobar is a mysterious coding challenge platform launched by Google. It's designed to identify exceptional engineering talent through a series of progressively difficult coding problems. The platform's unique approach involves inviting users to solve challenges directly via the Google Search page, adding an element of intrigue and surprise.
I was fortunate enough to receive an invitation to Google Foobar. The initial challenge was a simple warm-up, but subsequent levels escalated in complexity, requiring me to delve into various algorithms and data structures.
Throughout my journey, I faced a diverse range of problems, from graph traversal and dynamic programming to string manipulation and number theory. Each challenge presented a unique opportunity to test my problem-solving skills and explore new coding techniques.
With dedication and perseverance, I managed to successfully solve all the challenges presented by Google Foobar. It was a rewarding experience that allowed me to showcase my coding abilities and learn new maths concepts.
~~If you're a passionate coder looking for a stimulating challenge, Google Foobar is definitely worth exploring. It's a great way to test your skills, learn new concepts, and potentially open doors to exciting opportunities.~~ Unfortunately, Google shut down the platform, and the challenges are no longer available. You can still try them by taking a look at the challenge texts in my GitHub repo, by clicking the link at the top of this post.
+3 -4
View File
@@ -7,12 +7,11 @@ company_name = "Personal"
company_url = "https://maik.dev"
cover = "img/portfolio/learn-to-program/screenshot.png"
description = "This website was created for a school assignment. It was created with HTML and CSS only and no frameworks were used."
source_code = "https://github.com/maikka39/Learn-to-Program"
live_demo = "https://maikka39.github.io/Learn-to-Program/"
skills = [
"Pure HTML and CSS",
"Web design",
]
+++
This website was created for a school assignment. It was created with HTML and CSS only and no frameworks were used. Not even JS was allowed (so I had to get creative with animations).
This website was created for a school assignment. It was created with HTML and CSS only and no frameworks were used.
[Github](https://github.com/maikka39/Learn-to-Program)
-21
View File
@@ -1,21 +0,0 @@
+++
author = "Maik de Kruif"
title = "MailServerSetup"
start_date = 2021-04-22
end_date = 2021-06-24
company_name = "Personal"
company_url = "https://maik.dev"
description = "A script that automates the grueling process of installing and setting up an email server. It perfectly reproduces my successful steps to ensure the same setup time and time again, now with many improvements."
source_code = "https://github.com/maikka39/MailServerSetup"
skills = [
"Mailing protocol",
"SPF, DKIM, DMARC",
"Bash scripting",
]
+++
A script that automates the grueling process of installing and setting up an email server. It perfectly reproduces my successful steps to ensure the same setup time and time again, now with many improvements.
MailServerSetup ensures a consistent and efficient deployment. It leverages Postfix, Dovecot, and SpamAssassin, providing an all-round email solution.
Simply specify your desired domain, and the script will handle the setup, including generating the necessary SPF, DMARC, and DKIM records and providing them to you.
-32
View File
@@ -1,32 +0,0 @@
+++
author = "Maik de Kruif"
title = "MinecraftClient"
start_date = 2022-08-30
end_date = 2022-12-29
company_name = "Personal"
company_url = "https://maik.dev"
cover = "img/portfolio/minecraft-client/cover.png"
description = "A Minecraft client that was designed to overcome a series of challenges presented by a YouTuber named LiveOverflow. The client was built using Kotlin and Fabric, and it featured creative solutions to bypass the server's defenses."
source_code = "https://github.com/maikka39/MinecraftClient"
skills = [
"Java code injection",
"Reverse engineering",
"Java & Gradle",
]
+++
A Minecraft client that was designed to overcome a series of challenges presented by a YouTuber named LiveOverflow. The client was built using Kotlin and Fabric, and it featured creative solutions to bypass the server's defenses.
LiveOverflow set up a secret Minecraft server with a twist: finding it was the first challenge. After some clever detective work, including exploiting a slip-up in one of LiveOverflow's videos, I gained access.
The real fun began with the server's challenges. One required the client to move the player in a way that mimicked a bot, not a human. This meant overcoming the limitations of how computers represent numbers to ensure the server wouldn't detect "human-like" rounding errors.
Another challenge involved reaching a protected chest. The initial solution involved some trickery, but the server was patched. To adapt, the client needed to exploit a loophole in how the server tracked player movement. By manipulating the game's internal state and sending carefully crafted packets, the client achieved imperceptible movements, bypassing the server's defenses.
Reverse engineering the server's code was crucial in finding these exploits. By understanding the server's logic and implementation, I could identify vulnerabilities and devise strategies to exploit them. This process required a deep dive into the Minecraft server's source code and a keen eye for potential weaknesses.
The code for this client was written in Kotlin and injected into the Minecraft client using Fabric. This approach allowed for flexibility and customization, perfectly suited for tackling the server's unique challenges.
This project was a fascinating exploration of Minecraft's inner workings and the creativity required to overcome seemingly impossible challenges. As new challenges emerge, this client was ready to evolve and conquer them!
See also [my post about the experience]({{% ref "posts/liveoverflow-minecraft-server.md" %}}) for a more in-depth explanation.
+4 -3
View File
@@ -6,7 +6,6 @@ end_date = 2021-04-24
company_name = "Personal"
company_url = "https://maik.dev"
description = "A Discord bot I wrote for my own server so that I could manage the server better and listen to music in voice channels."
source_code = "https://github.com/maikka39/SuperBot"
skills = [
"Python",
"Asynchronous programming",
@@ -16,6 +15,8 @@ skills = [
An amazing Discord bot with lots of functionalities!
SuperBot is a Discord bot I wrote for my own server so that I could manage the server better and listen to music together in voice channels.
A Discord bot I wrote for my own server so that I could manage the server better and listen to music in voice channels.
I developed SuperBot using Python. Through this project, I gained experience in Discord bot development, including API interactions, event handling, and user interface design. Additionally, I learned valuable lessons in error handling, optimization, and scalability.
SuperBot is the solution to your crowded and chaotic Discord server!
[Github](https://github.com/maikka39/SuperBot)
+4 -7
View File
@@ -2,11 +2,10 @@
author = "Maik de Kruif"
title = "Toy-Neural-Network-Py"
start_date = 2019-03-02
end_date = 2021-06-07
end_date = 2019-04-16
company_name = "Personal"
company_url = "https://maik.dev"
description = "Neural Network Python library for experimenting with Machine Learning."
source_code = "https://github.com/maikka39/Toy-Neural-Network-Py"
description = "Neural Network Python library for experimenting with Machine Learning"
skills = [
"Machine Learning",
"Neural Networks",
@@ -15,8 +14,6 @@ skills = [
]
+++
Neural Network Python library for experimenting with Machine Learning.
Neural Network Python library for experimenting with Machine Learning
Based on the amazing work done by [Daniel Shiffman](https://github.com/shiffman) at [TheCodingTrain](https://thecodingtrain.com/), I built my own Neural Network library in Python. I used [Chapter 10: Neural Networks](https://natureofcode.com/neural-networks/) of his Nature of Code book as a reference.
Building this library was a very valuable learning experience. It’s helped me grasp the underlying principles of these models, from basic neuron structures to more complex algorithms like backpropagation.
[Github](https://github.com/maikka39/Toy-Neural-Network-Py)
-32
View File
@@ -1,32 +0,0 @@
+++
author = "Maik de Kruif"
title = "UnEngine"
start_date = 2022-11-09
end_date = 2022-12-22
company_name = "Personal"
company_url = "https://maik.dev"
cover = "img/portfolio/unengine/screenshot.png"
description = "Together with three other students, I built a game engine from the ground up using C++. To put our engine to the test, we also developed a fun racing game."
skills = [
"Low level programming",
"Game engine architecture",
"Event-driven programming",
"Networking",
"Teamwork",
]
[source_code]
engine = "https://github.com/Systems-Programming-in-C-Minor/engine"
game = "https://github.com/Systems-Programming-in-C-Minor/game"
server = "https://github.com/Systems-Programming-in-C-Minor/server"
+++
Together with three other students, I built a game engine from the ground up using C++. To put our engine to the test, we also developed a fun racing game.
The racing game offered a variety of features: AI-controlled opponents that challenged players, controller support for a more immersive experience, local multiplayer for split-screen fun, and online multiplayer capabilities using a game server.
To add variety and replayability, we included multiple maps and game modes. Players could race on different tracks, each with its own unique challenges, obstacles and sound effects.
Our game engine was crafted using C++ and SDL2, and provided the foundation for our racing game. We adopted an event-driven architecture, allowing our engine to efficiently handle various inputs and events. To create a realistic experience, we implemented physics calculations for collisions, speed, and traction.
To enhance the audio experience, we developed a sound engine that allowed us to incorporate a variety of sound effects into our game. To optimize performance and memory usage, we implemented texture pooling, which efficiently manages and reuses textures. Finally, to enable multiplayer functionality, we integrated networking capabilities into our engine, allowing players to connect and compete with each other online.
+3 -9
View File
@@ -2,7 +2,7 @@
author = "Maik de Kruif"
title = "WatchTogether"
start_date = 2018-08-17
end_date = 2021-01-25
end_date = 9999-01-01
company_name = "Personal"
company_url = "https://maik.dev"
cover = "img/portfolio/watch-together/screenshot.png"
@@ -15,16 +15,10 @@ skills = [
"Real time synchronization",
"REST API",
]
[source_code]
frontend = "https://github.com/maikka39/WatchTogether"
backend = "https://github.com/maikka39/WatchTogether-Server"
+++
WatchTogether is an online service that lets you watch a video together with your friends without being in the same room!
WatchTogether is an online service that synchronizes video playback across users' web browsers, allowing friends to enjoy videos together virtually. This project challenged me to build both the front-end and back-end. I utilized React to create a user-friendly interface and Node.js with Socket.IO in the back-end to handle the real-time communication and video synchronization.
[Github](https://github.com/maikka39/WatchTogether)
However, I quickly realized that synchronizing anything between clients on terrible network connections is a real challenge. This project pushed me to find solutions to ensure a smooth viewing experience, even on potato internet connections.
WatchTogether not only provided a fun solution for remote movie nights, but also deepened my knowledge of front-end frameworks like React and back-end technologies like Node.js and Socket.IO.
[Github (backend)](https://github.com/maikka39/WatchTogether-Server)
@@ -7,7 +7,6 @@ company_name = "Personal"
company_url = "https://maik.dev"
cover = "img/portfolio/youtube-music-desktop-player/screenshot.png"
description = "YouTube Music Desktop Player converts YouTube Music to a standalone desktop app. Because of this, you will never have to go through all your tabs to control your music."
source_code = "https://github.com/maikka39/Youtube-Music-Desktop-Player"
skills = [
"Desktop Application Development",
"Electron",
@@ -18,8 +17,6 @@ skills = [
YouTube Music Desktop Player converts YouTube Music to a standalone desktop app. Because of this, you will never have to go through all your tabs to control your music.
Before Google released their official YouTube Music desktop app, I created my own using Electron. I used script injection to add custom features like buttons, media key control, Discord rich presence, and custom styling. Additionally, I implemented [MPRIS](https://specifications.freedesktop.org/mpris-spec/latest/) support for integration with desktop environments.
_This software has no affiliation this Google, YouTube Music is a trademark of Google LCC._
This project was a valuable learning experience, as it allowed me to explore the capabilities of Electron and deepen my understanding of web technologies and desktop app development. It also gave me the opportunity to solve real-world problems and create a tool that enhanced the YouTube Music experience.
_This software has no affiliation this Google, YouTube Music is a trademark of Google LLC._
[Github](https://github.com/maikka39/Youtube-Music-Desktop-Player)
-77
View File
@@ -1,77 +0,0 @@
+++
author = "Maik de Kruif"
title = "FIRST LEGO League"
date = 2020-01-01T08:00:00+02:00
description = "Together with the other members of Brainbuddies, I participated twice in the FIRST LEGO League competition. We reached the Benelux finals and received prizes for both our Robot and Core Values presentations."
cover = "img/posts/first-lego-league/cover.jpg"
tags = [
"personal",
]
categories = [
"personal",
"misc",
]
+++
Together with the other members of Brainbuddies, I participated twice in the FIRST LEGO League competition. We reached the Benelux finals and received prizes for both our Robot and Core Values presentations.
[FIRST LEGO League (FLL)](https://en.wikipedia.org/wiki/FIRST_Lego_League_Challenge) is an international competition for elementary and middle school students. Each year in August FIRST LEGO League introduces a scientific and real-world challenge for teams to focus and research on. The robotics part of the competition involves designing and programming LEGO Mindstorms robots to complete tasks. The students also work out a solution to a problem related to the theme (changes every year) and then meet for regional, national and international tournaments to compete, share their knowledge, compare ideas, and display their robots.
## The beginning
The story starts in 2014. Being 12 years old at the time, the amount of things you need to manage as a team can be overwhelming.
The FLL challenge consists of three parts; research a real-world problem, design a solution, and create a LEGO robot to complete missions related to the theme. At the finals, the teams also present their research project and robot design to judges, demonstrating their creativity, problem-solving skills, and teamwork.
Our team consisted of six people, one of which being [Raymon](https://raymon.dev/). Since we each had different strenths, we each were in charge of own subject. My primary focus was on developing the robot.
## Robot design and programming
When I started, I had hardly any knowledge of LEGO Mindstorms, let alone how to program one. I had played around a bit with [Scratch](https://en.wikipedia.org/wiki/Scratch_(programming_language)) at the time, which is what got me interested in programming, but never developed something tangible.
As a team we went to work on an old track from a previous edition first. This way, we could increase our knowledge of LEGO Mindstorms, and how its programming works. In the beginning it was quite a challenge. As it turns out, physics is a real thing, and telling the robot to go straight doesn't mean it actually will:smiling_face_with_tear:. In the end we were able to solve most of the challenges from this previous edition.
Since we were young and had plenty of other things to distract us, we took our time, and worked on the robot on and off for a few years. As we were perfecting the previous track, the new theme was announced: Hydrodynamics. The track that came with it was on a completely different level. It took us quite some time to adapt.
{{< figure class="small" src="/img/posts/first-lego-league/robot.jpg" title="Our robot around 2016" >}}
## Regionals
It's now November 24th 2017, regional finals time!
There were many teams present. Each and every one of them prepared themselves and now the competition can truly begin. All the teams were putting the finishing touches on their robot, and it was fun to see the creative solutions the other teams came up with.
### The Robot Competition
In the first round we got 80 points, which gave us first place for the first round. After that we remained high, but the Facimus team overtook us in the second round. In the third round we were unfortunately again overtaken, this time by the Robodirck team. We eventually came third in the robot section.
### The Project Presentation
When we walked into the jury room, and put the project on the table, you could already see that the jury was impressed. The presentation itself went well, and they thought it was a nice project.
### The Core Values ​​presentation
The core values ​​presentation went fantastically, we were able to tell a lot about our team, how we worked and how we experienced it. The jury gave us full points, they really liked our team and presentation.
### The Robot presentation
Finally we showed our robot. We explained how we came up with the robot, how we first we had an internal competition within the team to experiment, and later had brought back the best aspects of all robots in one new robot. This presentation was also well received.
### The award ceremony
Finally the most exciting moment came, the award ceremony. We were not called forward for the 'smaller' prizes for the separate components, which we thought was a bit strange having received very good feedback from the juries. But in the end we turned out to have won the main prize!!! This meant that we could go straight to the Benelux finals. A moment never to forget.
{{< figure class="small" src="/img/posts/first-lego-league/nationals-invitation.jpg" title="Invitation to the Benelux finals" >}}
_Note: Benelux is an intergovernmental union of Belgium, the Netherlands, and Luxembourg._
## The Benelux finals
The moment we won the regional finals, we could breathe again. The pressure from the regionals came of, but was partly replaced by the upcoming finals. Luckily there was quite a bit of time between the events, and we needed it. We decided to mainly work on improving our robot. We gained a lot of experience from the regional finals, and our most important lesson was that changing the robot for the different challenges took far too long. The runs on the table are time limited, and we were losing half our time changing the extensions. Extensions were the LEGO constructions that we were adding to the robot to perform certain tasks. We had to think of a different design and create it quickly.
Unfortunately, we couldn't win this one:cry:. The competition was simply too fierce.
## Looking back
Looking back at this all, I learned a lot. Working with a team on a complex project at that age, was an experience that helped me throughout my early career. To all kids between age 9 and 15 I would say to try and participate in an event like this if they have the chance. I certainly would do it again.
@@ -1,425 +0,0 @@
+++
author = "Maik de Kruif"
title = "LiveOverflow's Minecraft Server"
date = 2022-09-14T02:46:01+02:00
description = "Around five months ago LiveOverflow started a series called Minecraft:HACKED. He invited everyone to find the server and join, but that was easier said than done."
cover = "img/posts/liveoverflow-minecraft-server/cover.png"
tags = [
"minecraft",
"challenge",
"hacking",
]
categories = [
"games",
"hacking",
]
+++
Around five months ago [LiveOverflow](https://www.youtube.com/c/LiveOverflow) started a series called [Minecraft:HACKED](https://www.youtube.com/playlist?list=PLhixgUqwRTjwvBI-hmbZ2rpkAl4lutnJG). He invited everyone to find the server and join, but that was easier said than done.
## Concept
During one of his earlier videos, LiveOverflow challenged his viewers to find the Minecraft server he was playing on and come join it. At first, this was the only challenge, but as time went on and the server existed for longer, more challenge were added. At first, players had to bypass an algorithm that would kick players who moved like humans, but later on, we had to bypass a popular server plugin. All in all, I had/have a great time playing on the server and learned a lot about how Minecraft works, and how to write mods for it.
## Finding the server
In LiveOverflow's eighth video, [he told his viewers that the server has been opened to the public](https://youtu.be/QradKmQ27JY?t=1246). I immediately started looking for ways to find it. After researching for a while, I found multiple ways to find it, but I thought they would all take a fair bit of time (I'll get back to this later). So, instead of spending time actually learning stuff, I rewatched his videos to see if there would be a clue in there. Luckily it worked out. In [one video](https://youtu.be/Hmmr1oLt-V8?t=28) he blurred the IP inside the terminal, but forgot about the terminal title bar :smile:. I notified him of this, as it was obviously unintended, and the IP was changed shortly after, as many people apparently found it.
{{< figure src="/img/posts/liveoverflow-minecraft-server/first_ip_screenshot.png" title="Screenshot of video containing the IP address" >}}
### IP change
The IP change happened of the 26th of August. Finding the new IP was going to be a harder challenge, as the change meant there was no way to find the server using the videos. At the time I was looking into it, no new video had been released, after all.
During my research, I came across masscan. This is a piece of software that lets you scan the entire internet, and even does it pretty quickly. This may come as a surprise, but It doesn't support Minecraft packets… I could add support for this, but I would have to get familiar with the code base, and I thought it would over all just be easier to write a python script that interfaces or uses the output from masscan.
I got to work and wrote a script that scans the IP range in which the old IP was located. It starts by using masscan to scan the entire range of IP addresses, and saves it to a file to use later. I then read this file, and request basic Minecraft server information like its MOTD, players and favicon. This information was saved in another file, in which, I could easily search for LiveOverflow. In the end, the new IP only had one digit changed.
{{< code language="python" title="scan.py" isCollapsed="true" >}}
```py
import masscan
import json
import os
from mcstatus import JavaServer
from queue import Queue, Empty
from threading import Thread
import base64
from time import sleep
from contextlib import suppress
from os import remove
ip_ranges = [
"116.202.0.0/16",
"116.203.0.0/16",
"128.140.0.0/17",
"135.181.0.0/16",
"136.243.0.0/16",
"138.201.0.0/16",
"142.132.128.0/17",
"144.76.0.0/16",
"148.251.0.0/16",
"157.90.0.0/16",
"159.69.0.0/16",
"162.55.0.0/16",
"167.233.0.0/16",
"167.235.0.0/16",
"168.119.0.0/16",
"171.25.225.0/24",
"176.9.0.0/16",
"178.212.75.0/24",
"178.63.0.0/16",
"185.107.52.0/22",
"185.110.95.0/24",
"185.112.180.0/24",
"185.126.28.0/22",
"185.12.65.0/24",
"185.136.140.0/23",
"185.157.176.0/23",
"185.157.178.0/23",
"185.157.83.0/24",
"185.171.224.0/22",
"185.189.228.0/24",
"185.189.229.0/24",
"185.189.230.0/24",
"185.189.231.0/24",
"185.209.124.0/22",
"185.213.45.0/24",
"185.216.237.0/24",
"185.226.99.0/24",
"185.228.8.0/23",
"185.242.76.0/24",
"185.36.144.0/22",
"185.50.120.0/23",
"188.34.128.0/17",
"188.40.0.0/16",
"193.110.6.0/23",
"193.163.198.0/24",
"193.25.170.0/23",
"194.35.12.0/23",
"194.42.180.0/22",
"194.42.184.0/22",
"194.62.106.0/24",
"195.201.0.0/16",
"195.248.224.0/24",
"195.60.226.0/24",
"195.96.156.0/24",
"197.242.84.0/22",
"201.131.3.0/24",
"213.133.96.0/19",
"213.232.193.0/24",
"213.239.192.0/18",
"23.88.0.0/17",
"45.136.70.0/23",
"45.148.28.0/22",
"45.15.120.0/22",
"46.4.0.0/16",
"49.12.0.0/16",
"49.13.0.0/16",
"5.75.128.0/17",
"5.9.0.0/16",
"65.108.0.0/16",
"65.109.0.0/16",
"65.21.0.0/16",
"78.46.0.0/15",
"85.10.192.0/18",
"88.198.0.0/16",
"88.99.0.0/16",
"91.107.128.0/17",
"91.190.240.0/21",
"91.233.8.0/22",
"94.130.0.0/16",
"94.154.121.0/24",
"95.216.0.0/16",
"95.217.0.0/16",
]
thread_count = 100
# selected_range = "176.9.0.0/16"
selected_range = None
mas = masscan.PortScanner()
ip_ranges_to_scan = [selected_range] if selected_range else ip_ranges
for i, ip_range in enumerate(ip_ranges_to_scan):
print(f"Starting on range: {ip_range} [{i+1}/{len(ip_ranges_to_scan)}]")
mas.scan(ip_range, ports="25565", arguments="--max-rate 8000")
with open("hosts.json", "r+") as file:
hosts_json = json.load(file)
previous_hosts = hosts_json.get(ip_range, [])
hosts_json[ip_range] = list(set(previous_hosts) | set(mas.all_hosts))
file.seek(0)
json.dump(hosts_json, file)
with open("hosts.json", "r") as file:
hosts_json = json.load(file)
if selected_range:
hosts = hosts_json.get(selected_range, [])
else:
hosts = [host for ip_range in hosts_json.values() for host in ip_range]
hosts = list(set(hosts))
hosts[:5], len(hosts)
with open("masscans/hosts.json", "r") as file:
json_data = json.load(file)
hosts = [entry['ip'] for entry in json_data]
hosts = list(set(hosts))
hosts[:5], len(hosts)
with open("valid_hosts.json", "r") as file:
valid_hosts = json.load(file)
def handle_ip(ip):
try:
server = JavaServer.lookup(ip)
status = server.status()
server_info = {
"version": status.version.name,
"motd": status.description,
"favicon": status.favicon is not None,
"player_count": status.players.online,
"players": [player.name for player in status.players.sample or []],
}
valid_hosts[ip] = server_info
if status.favicon:
with open(f"servers/{ip}.png", 'wb') as file:
file.write(base64.b64decode(status.favicon[len("data:image/png;base64,"):]))
except Exception as e:
print(f"Failed for IP: {ip} ({type(e)})")
def do_stuff(queue):
with suppress(Empty):
while True:
handle_ip(queue.get(block=False))
queue.task_done()
def print_progress(queue):
initial_size = queue.qsize()
def p(current_size):
print(f"Progress: {(((initial_size-current_size)/initial_size)*100):.2f}% [{initial_size-current_size}/{initial_size}]")
while (current_size := queue.qsize()) > 0:
p(current_size)
sleep(1)
p(current_size)
queue = Queue(maxsize=0)
for host in hosts:
queue.put(host)
threads = []
progress_printer = Thread(target=print_progress, args=(queue,))
progress_printer.daemon = True
progress_printer.start()
threads.append(progress_printer)
for _ in range(thread_count):
worker = Thread(target=do_stuff, args=(queue,))
worker.daemon = True
worker.start()
threads.append(worker)
queue.join()
for thread in threads:
thread.join()
with open("valid_hosts.json", "w") as file:
json.dump(valid_hosts, file)
with open("valid_hosts.json", "r") as file:
valid_hosts_data = json.load(file)
# list({data.get("version") for ip, data in valid_hosts_data.items()})
current_servers = [filename[:-4] for filename in os.listdir("possible_hits")]
def is_1_19(ip) -> bool:
return "1.19" in valid_hosts_data.get(ip).get("version")
valid_servers = list(filter(is_1_19, current_servers))
for filename in os.listdir("possible_hits"):
if filename[:-4] not in valid_servers:
remove(f"possible_hits/{filename}")
print(len(current_servers))
print(len(valid_servers))
```
{{< /code >}}
_This code is copied from a Jupyter Notebook, so it's not the most efficient and may not even work, the [here for the Github Gist of the Notebook](https://gist.github.com/maikka39/8019e2f1a45e1021fff05bd1e1688e14)_
Later, I found out the physical server was actually the same, and you could also use `traceroute` to find the new server as well.
```txt
traceroute to 176.9.20.201 (176.9.20.201), 30 hops max, 60 byte packets
1 _gateway (10.0.0.1) 1.435 ms 1.407 ms 1.381 ms
2 192.168.2.254 (192.168.2.254) 16.733 ms 16.722 ms 16.712 ms
3 static.kpn.net (195.190.228.90) 17.893 ms 17.882 ms 17.882 ms
4 139.156.98.101 (139.156.98.101) 128.740 ms 128.730 ms 128.720 ms
5 * * *
6 core24.fsn1.hetzner.com (213.239.224.253) 32.245 ms core23.fsn1.hetzner.com (213.239.224.249) 30.209 ms core24.fsn1.hetzner.com (213.239.224.253) 43.727 ms
7 ex9k1.dc6.fsn1.hetzner.com (213.239.229.94) 30.182 ms 19.697 ms 22.575 ms
8 static.205.20.9.176.clients.your-server.de (176.9.20.205) 19.665 ms 22.329 ms 22.306 ms
9 * * *
10 * * *
```
### Third IP change
The “new” IP quickly got leaked, and so a new server had been created. This time, `traceroute` did not yield any useful results, so I used the above script again. The only change I made, was adding all Hetzner ranges to the list of ranges.
### Abuse emails
Not every ISP likes people scanning the internet. I ran the script on both a VPS, and on my home network. Especially the latter was a mistake, though, as I quickly received an email telling me to stop, or I would have my internet cut off. So, If you want to scan the whole internet, don't do it from home :smile:.
{{< figure src="/img/posts/liveoverflow-minecraft-server/kpn_abuse.png" title="Screenshot of abuse email (in Dutch)" >}}
## Challenges
I had a great time playing on the server. The other players were mostly nice, having to have some technical skills to find the server probably kept most griefers out. What I found most fun about the server, were the challenges, though.
### Bot movement challenge
After some time playing on the server, the first challenge was released. As LiveOverflow explained in [this video](https://www.youtube.com/watch?v=WEMOCFe4EFE), if you move on the server, without rounding your player position to 1/100th, you get kicked with the following message:
{{< figure src="/img/posts/liveoverflow-minecraft-server/human_movement_kick_message.png" title="Human movement kick message" >}}
#### Writing a Fabric mod
Where do you even get started with solving this challenge? I didn't have any Minecraft modding experience, but had heard about [Fabric](https://fabricmc.net/). I downloaded [an example mod](https://github.com/FabricMC/fabric-example-mod) from their GitHub, and got it to intercept `PlayerMoveC2SPacket`. These are the packets your Minecraft client sends to the server, so it knows where you are.
Unfortunately, I don't have my original code anymore, so I can't give any code snippets for this part. I _can_ explain the business logic, though.
#### Moving like a bot
You might say this is a straightforward challenge, but you might be surprised. This is because the naive approach of simply multiplying a coordinate by one hundred, rounding it, and then dividing it by one hundred again will only work some of the time. The reason for this is [how floating-point numbers work](https://en.wikipedia.org/wiki/Floating-point_arithmetic). You might have heard about the classic meme that `0.1` + `0.2` equals `0.30000000000000004`. We humans work in base 10, but computers work in base 2, and not all base 10 numbers can efficiently be represented in base 2. Our mod will not work when we're sending a number that's rounded down to, for instance, x.9999999, as casting that to an int would result into a non-rounded number. The easiest way to fix this is by adding the following step:
```kt
fun round(n: Double): Double {
val rounded = Math.round(n * 100) / 100;
return Math.nextAfter(rounded, rounded + Math.signum(rounded)); // <--
}
```
This will get the first exact floating-point number after the given number. We can then pass the x and/or z value of the current coordinate to this method, and replace the value with the result.
### Club Mate challenge
#### Original version
Some time after the bot movement challenge, a new challenge was released. This time, we had to open a chest in a protected area. Part of the challenge was actually finding it, I stumbled across it by accident, but a hint was otherwise also given [at the end of the bot movement video](https://www.youtube.com/watch?v=WEMOCFe4EFE).
Upon entering the area, you're teleported to a floating island and greeted with a message;
{{< figure src="/img/posts/liveoverflow-minecraft-server/club_mate_original.png" title="Club Mate message" >}}
This challenge had some unintended solutions. I'll get to the intended one later, but let's first solve it the easy way :smile:.
When looking at the given pseudocode, we can see we're only teleported back on a `PlayerMoveEvent`. As LiveOverflow [later showed in a video](https://www.youtube.com/watch?v=RDkWagIW6gw), many people found bypasses to it. My solution was to throw an Ender Pearl into the region, and then immediately block all outgoing movement packets. This way the server teleports us into the region, which does not trigger a `PlayerMoveEvent`, after which, we can open a chest. A message is also sent in chat after opening the chest;
{{< figure src="/img/posts/liveoverflow-minecraft-server/acquired_club_mate.png" title="Club Mate message" >}}
#### Patched version
After LiveOverflow noticed the unintended solutions, he used the plugin WorldGuard instead of his own. This made the challenge quite a bit harder, as silly things like throwing an Ender Pearl don't work.
After reading lots of [Paper source code](https://github.com/PaperMC/Paper), I came across the following code:
```java
// Prevent 40 event-calls for less than a single pixel of movement >.>
double delta = Math.pow(this.lastPosX - to.getX(), 2) + Math.pow(this.lastPosY - to.getY(), 2) + Math.pow(this.lastPosZ - to.getZ(), 2);
float deltaAngle = Math.abs(this.lastYaw - to.getYaw()) + Math.abs(this.lastPitch - to.getPitch());
if ((delta > 1f / 256 || deltaAngle > 10f) && !this.player.isImmobile()) {
// ...
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
// ...
}
```
In short, this code means we can move around a tiny bit before a `PlayerMoveEvent` is sent. This caught my interest, as I thought there might be a way to change the `lastPos`. After reading more code, I found out there was!
If we send a position that is far away, like x+100, y+100, the player will be teleported back before the `PlayerMoveEvent` gets sent. During this teleport action, `lastPos` get set to the position the player had before the “far away packet” was sent.
```java
public void handleMovePlayer(ServerboundMovePlayerPacket packet) {
// ...
// d11 and d10 contain a difference in player position
if (d11 - d10 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
// ...
this.teleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot());
// ...
}
// ...
}
public boolean teleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set, boolean flag, PlayerTeleportEvent.TeleportCause cause) {
// ...
this.internalTeleport(d0, d1, d2, f, f1, set, flag);
// ...
}
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set, boolean flag) {
// ...
this.awaitingPositionFromClient = new Vec3(d0, d1, d2);
// ...
this.lastPosX = this.awaitingPositionFromClient.x;
this.lastPosY = this.awaitingPositionFromClient.y;
this.lastPosZ = this.awaitingPositionFromClient.z;
this.lastYaw = f;
this.lastPitch = f1;
// ...
this.player.moveTo(d0, d1, d2, f, f1);
this.player.connection.send(new ClientboundPlayerPositionPacket(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.awaitingTeleport, flag));
}
```
This meant that, as long as we sent a "far away packet" every `(1 / 256)**0.5` (`0.0625`) blocks, we can travel without triggering any events.
After implementing this, I could enter the region and jump in the fountain, after which, I got the HACKER rank and a bottle of Club Mate.
> maik_dev drank from the Club Mate fountain and became a real Minecraft HACKER
{{< figure src="/img/posts/liveoverflow-minecraft-server/club_mate_bottle_patched.png" title="Club Mate bottle" >}}
##### Speeding things up
This method was very slow, however. After taking another look at the [WorldGuard source code](https://github.com/EngineHub/WorldGuard), I noticed that it checks whether the player actually moved a block;
```java
public void onPlayerMove(PlayerMoveEvent event) {
Location from = event.getFrom();
Location to = event.getTo();
if (from.getBlockX() == to.getBlockX()
&& from.getBlockY() == to.getBlockY()
&& from.getBlockZ() == to.getBlockZ()) {
return;
}
// ...
}
```
This check means we only have to actually prevent a `PlayerMoveEvent` when we are changing from one block to another. The final code for which can be found in [my GitHub repo](https://github.com/maikka39/MinecraftClient).
## Conclusion
As of writing this, these are all the challenges I'm aware of. I'll update this post when more challenges are added.
@@ -1,8 +0,0 @@
+++
author = "Maik de Kruif"
title = "SANS Holiday Hack Challenge 2024"
breadcrumb = "2024"
description = "A collection of my writeups for the 2024 edition of the SANS Holiday Hack Challenge (HHC). HHC is a free series of fun, quality, hands-on cybersecurity challenges."
+++
A collection of my writeups for the 2024 edition of the SANS Holiday Hack Challenge (HHC). HHC is a free series of fun, quality, hands-on cybersecurity challenges.
@@ -1,8 +0,0 @@
+++
author = "Maik de Kruif"
title = "Prologue - SANS HHC 2024"
breadcrumb = "Prologue"
description = "A collection of my writeups for the 2024 edition of the SANS Holiday Hack Challenge (HHC). HHC is a free series of fun, quality, hands-on cybersecurity challenges."
+++
A collection of my writeups for the 2024 edition of the SANS Holiday Hack Challenge (HHC). HHC is a free series of fun, quality, hands-on cybersecurity challenges.
@@ -1,172 +0,0 @@
+++
author = "Maik de Kruif"
title = "Elf Connect"
subtitle = "Prologue - SANS Holiday Hack Challenge 2024"
date = 2024-11-21T14:23:34+01:00
description = "Let's play our first game of the Holiday Hack Challenge. To win, we'll have to use the DevTools to read some code, and figure out how the scoring mechanism works."
cover = "img/writeups/holiday-hack-challenge/2024/prologue/elf-connect/cover.png"
tags = [
"Holiday Hack Challenge",
"Prologue",
"ctf",
"hacking",
"writeup",
]
categories = [
"ctf",
"writeups",
"hacking",
]
+++
## Link
If you want to play the challenge yourself, you can find it here:
<https://2024.holidayhackchallenge.com/>
## Story line
Let's start off by talking to Angel Candysalt:
```txt
Welcome back, island adventurer! I'm Angel Candysalt — so happy to finally meet you!
I'm thrilled you're here because I could really use a hand with something.
Have you ever heard of a game called Connections?
It’s simple! All you need to do is find groups of four related words.
I've been stuck on it all day, and I'm sure someone as sharp as you will breeze through it.
Oh, and while you're at it, check out randomElf's score — they hit fifty thousand points, which seems… oddly suspicious.
Think they might have tampered with the game? Just a hunch!
```
## Recon
Upon opening the challenge, we're greeted with an explanation of the game:
{{< figure src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-connect/game-welcome.png" title="Game explanation" >}}
## Silver
The game seems simple enough, click four words that are connected and go through the rounds. Depending on your knowledge of Christmas terms, you may fly through this no problem. My knowledge about it is not so good, but I decided to play the game normally at first anyway. With some Googling I got through the challenge and got the silver medal.
There are, however, multiple ways to solve the game. And we'll need to exploit this to get the gold medal.
## Gold
For gold, we'll need to inspect the code behind the game.
We can open the DevTools, and under "Sources" we can find the iframe in which the game is running. Here we can see all the files that are being used.
{{< figure src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-connect/sources.png" title="DevTools Sources" >}}
Looking through this code, we can actually find the correct word sets.
<!-- prettier-ignore-start -->
```js
const wordSets = {
1: ["Tinsel", "Sleigh", "Belafonte", "Bag", "Comet", "Garland", "Jingle Bells", "Mittens", "Vixen", "Gifts", "Star", "Crosby", "White Christmas", "Prancer", "Lights", "Blitzen"],
2: ["Nmap", "burp", "Frida", "OWASP Zap", "Metasploit", "netcat", "Cycript", "Nikto", "Cobalt Strike", "wfuzz", "Wireshark", "AppMon", "apktool", "HAVOC", "Nessus", "Empire"],
3: ["AES", "WEP", "Symmetric", "WPA2", "Caesar", "RSA", "Asymmetric", "TKIP", "One-time Pad", "LEAP", "Blowfish", "hash", "hybrid", "Ottendorf", "3DES", "Scytale"],
4: ["IGMP", "TLS", "Ethernet", "SSL", "HTTP", "IPX", "PPP", "IPSec", "FTP", "SSH", "IP", "IEEE 802.11", "ARP", "SMTP", "ICMP", "DNS"]
};
// ...
let correctSets = [
[0, 5, 10, 14], // Set 1
[1, 3, 7, 9], // Set 2
[2, 6, 11, 12], // Set 3
[4, 8, 13, 15] // Set 4
];
```
<!-- prettier-ignore-end -->
This means two things. Firstly, if your knowledge is as bad as mine, you can just write some code to get the correct combinations. But, secondly, and more importantly, if the correct set is here, the checks are also likely done client-side (meaning in your browser, and not on the server).
If you're wondering how to get the correct combinations, you can do it like this:
```js
Object.keys(wordSets).map((round) =>
correctSets.map((correctSet) =>
correctSet.map((index) => wordSets[round][index])
)
);
```
This might look a little complicated, so let me explain it for you. We start by looping over `wordSets`, this contains all the words for a specific round. We then look at the correct sets, and map the four indices to the actual word in the list. If we execute this code, we get the following output:
{{< code language="json" title="Results" isCollapsed="true" >}}
```json
[
[
["Tinsel", "Garland", "Star", "Lights"],
["Sleigh", "Bag", "Mittens", "Gifts"],
["Belafonte", "Jingle Bells", "Crosby", "White Christmas"],
["Comet", "Vixen", "Prancer", "Blitzen"]
],
[
["Nmap", "netcat", "Wireshark", "Nessus"],
["burp", "OWASP Zap", "Nikto", "wfuzz"],
["Frida", "Cycript", "AppMon", "apktool"],
["Metasploit", "Cobalt Strike", "HAVOC", "Empire"]
],
[
["AES", "RSA", "Blowfish", "3DES"],
["WEP", "WPA2", "TKIP", "LEAP"],
["Symmetric", "Asymmetric", "hash", "hybrid"],
["Caesar", "One-time Pad", "Ottendorf", "Scytale"]
],
[
["IGMP", "IPX", "IP", "ICMP"],
["TLS", "SSL", "IPSec", "SSH"],
["Ethernet", "PPP", "IEEE 802.11", "ARP"],
["HTTP", "FTP", "SMTP", "DNS"]
]
]
```
{{< /code >}}
This just get us the correct answer though, and we'll need more for gold.
Scanning further through the code, we find the `checkSelectedSet` function with some logic in it:
```js
function checkSelectedSet(scene) {
// ...
if (isCorrectSet) {
// ...
// Update score by 100 points
score += 100;
scoreText.setText("Score: " + score);
// Add high-score board
if (score > 50000) {
highScoreText.setText("High Score: " + score);
emitter.explode(20);
submitAction(2);
displaySuccessMessage(
"Great Job Hacker! Elf Connect Complete and Hacked!",
function () {}
);
}
// ...
}
// ...
}
```
In the code we can see that once a score of over 50000 has been achieved, it calls `submitAction(2)`. This looks suspicious. The only other place where the function is being called is on a normal win, in that case it passes `1` as the argument instead of `2`.
Let's execute this function on its own. To do this, we'll first need to attach our console to the iframe the game is running in. We can do so by clicking "top" in the top left corner of the DevTools, and selecting the iframe.
{{< figure src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-connect/iframe-console.png" title="Attach console to iframe" >}}
We can then enter the code in the console, and..., we got the gold medal!
{{< figure src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-connect/submitaction.png" title="Running the code" >}}
@@ -1,265 +0,0 @@
+++
author = "Maik de Kruif"
title = "Elf Minder"
subtitle = "Prologue - SANS Holiday Hack Challenge 2024"
date = 2024-11-21T15:18:53+01:00
description = "On to our second game of the Holiday Hack Challenge. This time we'll have to find some routes."
cover = "img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/cover.png"
tags = [
"Holiday Hack Challenge",
"Prologue",
"ctf",
"hacking",
"writeup",
]
categories = [
"ctf",
"writeups",
"hacking",
]
+++
## Link
If you want to play the challenge yourself, you can find it here:
<https://2024.holidayhackchallenge.com/>
## Story line
Let's start off by talking to Poinsettia McMittens:
```txt
Center your mind, and become one with the island!
Relax...
This isn't working! I'm trying to play this game but the whole "moving back to the North Pole" thing completely threw me off.
Say, how about you give it a try. It's really simple. All you need to do is help the elf get to the exit.
The faster you get there, the better your score!
I've run into some weirdness with the springs though. If I had created this game it would've been a lot more stable, but I won't comment on that any further.
```
## Recon
Upon opening the challenge, we're greeted with yet another game. This time with twelve levels.
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/levels.png" title="Welcome screen" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/game-help.png" title="Game help" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/game.png" title="Game screen" >}}
## Silver
Just like with the previous challenge, we can likely get silver here by just playing the game as described. They seem progressively more difficult, and near the end we'll have to get creative with some.
Here are some screenshots of how I solved them. Definitely didn't get on the leaderboard with them, but they're enough for silver.
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level1.png" title="Sandy Start" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level2.png" title="Waves and Crates" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level3.png" title="Tidal Treasures" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level4.png" title="Dune Dash" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level5.png" title="Coral Cove" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level6.png" title="Shell Seekers" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level7.png" title="Palm Grove Shuffle" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level8.png" title="Tropical Tangle" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level9.png" title="Crate Caper" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level10.png" title="Shoreline Shuffle" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level11.png" title="Beachy Bounty" >}}
{{< figure class="small inline" src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level12.png" title="Driftwood Dunes" >}}
Once we finish them all, we get a silver medal and a popup message.
{{< figure src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/silver.png" title="Silver Popup" >}}
Looking at the message, we'll probably have to dive into the game's code again.
## Gold
Looking at the last level, it seems impossible. It doesn't seem like there is any way to reach the flag.
{{< figure src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level13-default.png" title="A Real Pickle" >}}
This is where we'll have to delve into the code, and see what's going on behind the scenes. In this process, I found there were multiple ways to reach the end flag, let's go over them one by one.
### Method 1 - Admin Tools
After opening the DevTools, we can immediately find something suspicious, a div with a class called `admin-controls`.
{{< figure src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/admin-controls-devtool.png" title="Admin controls in DevTools" >}}
Let's double click on `hidden`, and remove it.
{{< figure src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/admin-controls.png" title="Admin controls" >}}
Wooah, a nice toolbar shows up! In it, there are several options we can use. The one that can really help us is the "Clear Entities" button; it removes all the entities like rocks from the map. Without these entities, we can place tunnels on places which are normally already occupied.
Let's draw a route which goes by all the boxes, and end with a tunnel. Since the end flag is no longer there, we can put a tunnel there to end. Don't forget to also put a path here, so we can walk to the finish.
{{< figure src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level13-clear.png" title="Cleared level" >}}
Once the map has been drawn, we can click "Go Home" on the top left, and then reopen the level again. Now, all the removed entities have been put back, and our route is still there.
{{< figure src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level13.png" title="Finished level" >}}
Now we can click start, and let the elf walk to the finish. Don't forget to rotate the angled path towards the tunnel when the elf is on its way up.
We should now have received gold!
### Method 2 - Springs
From the hint given in the conversation with the elf Poinsettia, we got the following line: "I've run into some weirdness with the springs though." This hints at the possibility to use springs to get to the end as well.
A good starting point here would be to first figure out how the springs work.
{{< code language="js" title="guide.js (getSpringTarget)" isCollapsed="true" >}}
```js
getSpringTarget(springCell) {
const journey = this.hero.journey;
const dy = journey[1][1] - journey[0][1];
const dx = journey[1][0] - journey[0][0];
let nextPoint = [springCell[0], springCell[1]];
let entityHere;
let searchLimit = 15;
let searchIndex = 0;
let validTarget;
do {
searchIndex += 1;
nextPoint = [nextPoint[0] + dx, nextPoint[1] + dy];
entityHere = this.entities.find(
(entity) =>
~[EntityTypes.PORTAL, EntityTypes.SPRING].indexOf(
entity[2]
) &&
searchIndex &&
entity[0] === nextPoint[0] &&
entity[1] === nextPoint[1]
);
if (searchIndex >= searchLimit) {
break;
}
validTarget = this.isPointInAnySegment(nextPoint) || entityHere;
} while (!validTarget);
if (this.isPointInAnySegment(nextPoint) || entityHere) {
if (entityHere) return this.segments[0][0]; // fix this
return nextPoint;
} else {
return;
}
}
```
{{< /code >}}
In one of the source files, `guide.js`, there is a function called `getSpringTarget`. This function, as the name suggests, returns the location where the elf should go after encountering a spring.
Let's go over the code. I have attached the original version above and below a version with comments added by me.
```js
getSpringTarget(springCell) {
const journey = this.hero.journey; // This contains the last two positions of the elf
const dy = journey[1][1] - journey[0][1]; // The vertical direction of the elf
const dx = journey[1][0] - journey[0][0]; // The horizontal direction of the elf
let nextPoint = [springCell[0], springCell[1]]; // Initialize the destination to the spring location
let entityHere; // Initialize the variable, will later contain whether an entity has been found on the path
let searchLimit = 15; // Set a limit after which to stop searching for a destination
let searchIndex = 0; // Current offset from the spring
let validTarget; // Initialize the variable, will contain whether the destination which is currently being checked is valid
do {
searchIndex += 1; // Up the offset from the spring
nextPoint = [nextPoint[0] + dx, nextPoint[1] + dy]; // Up the destination by one in the direction of travel
entityHere = this.entities.find( // Loop over the entities until the condition below is true
(entity) =>
~[EntityTypes.PORTAL, EntityTypes.SPRING].indexOf( // Check if the entity is a tunnel of spring
entity[2] // entity[2] is the type of the entity
) &&
searchIndex && // searchIndex should be bigger than 0, always true in this scenario
entity[0] === nextPoint[0] && // Check if the entity is on the destination (horizontally)
entity[1] === nextPoint[1] // Check if the entity is on the destination (vertically)
);
if (searchIndex >= searchLimit) { // If we gave gone too far from the spring
break; // Stop the search
}
validTarget = this.isPointInAnySegment(nextPoint) || entityHere; // Check if there is a path at the current position, or that an entity has been found
} while (!validTarget); // Keep going as long as there is no valid destination
if (this.isPointInAnySegment(nextPoint) || entityHere) { // Same check as above
if (entityHere) return this.segments[0][0]; // If an entity has been found, return the location of the very first path
return nextPoint; // Return the destination we found
} else {
return; // If we ever end up here, something has gone very wrong
}
}
```
The key line in the code is the following:
```js
if (entityHere) return this.segments[0][0]; // fix this
```
_Note: The comment here if from the original file._
What this line does, is that, if an entity has been found in the path of the spring, it directs the elf to the very first path we put down.
So, if we draw the very **first path** on the finish line, and make sure we end our path with two springs or a spring and a tunnel in a row, we can travel there.
To test this hypothesis, we can draw a route that follows these rules.
{{< figure src="/img/writeups/holiday-hack-challenge/2024/prologue/elf-minder/level13-spring-tp.png" title="Finished level" >}}
Afterwards, we hit start, and the elf reached the flag!
## Bonus
Here's some nice bonus content. In the level's grid, we can also place paths and entities on corners. Also, the amount of springs if not validated. Of course, we can't do this by hand, we'll have to do it in code.
Using this method we can create more optimized (or the opposite for evil boss mode) paths.
Try the following code for example to see how it works.
<!-- prettier-ignore-start -->
```js
game.segments = [
[[10, 9], [11, 9]],
[[1, 1], [2, 1]],
[[9, 1], [9, 2]],
[[9, 2], [9, 3]],
[[9, 3], [8, 3]],
[[6, 3], [5, 3]],
[[5, 3], [5, 4]],
[[5, 4], [5, 5]],
[[5, 5], [6, 5]],
[[6, 5], [7, 5]],
[[7, 5], [7, 6]],
[[7, 6], [7, 7]],
[[7, 7], [6, 7]],
[[4, 7], [3, 7]],
[[3, 7], [2, 7]],
[[2, 7], [2, 6]],
[[2, 6], [2, 5]],
[[2, 5], [2, 4]],
];
game.entities.push([2, 1, EntityTypes.SPRING]);
game.entities.push([8, 3, EntityTypes.SPRING]);
game.entities.push([6, 7, EntityTypes.SPRING]);
game.entities.push([2, 4, EntityTypes.SPRING]);
startBtn.classList.add("ready") // Makes sure the start button is clickable
```
<!-- prettier-ignore-end -->
@@ -1,58 +0,0 @@
+++
author = "Maik de Kruif"
title = "Holiday Hack Orientation"
subtitle = "Prologue - SANS Holiday Hack Challenge 2024"
date = 2024-11-21T13:46:55+01:00
description = "An easy start of the Holiday Hack Challenge 2024."
cover = "img/writeups/holiday-hack-challenge/2024/prologue/orientation/cover.png"
tags = [
"Holiday Hack Challenge",
"Prologue",
"ctf",
"hacking",
"writeup",
]
categories = [
"ctf",
"writeups",
"hacking",
]
+++
## Link
If you want to play the challenge yourself, you can find it here:
<https://2024.holidayhackchallenge.com/>
## Story line
Let's start off by talking to Jingle Ringford:
```txt
Welcome to the Geese Islands and the 2023 SANS Holiday Hack Challenge!
I'm Jingle Ringford, one of Santa's many elves.
...
Just kidding! It's actually the 2024 SANS Holiday Hack Challenge!
And although we're on Frosty's Beach on Christmas Island, we'll soon be on our way back to the North Pole.
I thought it best to wait here for people that heard we're on the Geese Islands but may not know we're leaving.
I haven't seen Santa since we started packing up, but he always asks me to give a quick orientation to newcomers, so I'm continuing the tradition.
Before you head out any further onto the island, you need to accomplish two simple tasks.
```
## Solving
Okay, I doubt we'll need a long writeup here, the HHC starts off easy.
Next the elf there is a "First Terminal", let's open it. At the top we can see a simple instruction; "Enter the answer here".
{{< figure src="/img/writeups/holiday-hack-challenge/2024/prologue/orientation/terminal.png" title="First Terminal" >}}
Let's follow the instruction and enter the text in the top console. And that's it! We got the gold medal!
@@ -1,7 +0,0 @@
+++
author = "Maik de Kruif"
title = "SANS Holiday Hack Challenge"
description = "A collection of my writeups for the SANS Holiday Hack Challenge (HHC). HHC is a free series of fun, quality, hands-on cybersecurity challenges."
+++
A collection of my writeups for the SANS Holiday Hack Challenge (HHC). HHC is a free series of fun, quality, hands-on cybersecurity challenges.
+1 -4
View File
@@ -1,16 +1,13 @@
+++
author = "Maik de Kruif"
title = "{{ replace .Name "-" " " | title }}"
subtitle = ""
# showPageViews = false
date = {{ .Date }}
description = ""
cover = "img/writeups/google-ctf/2021/beginners-quest/10/cover.png"
images = []
tags = [
"untagged",
]
categories = [
"uncategorized",
]
# aliases = []
+++
+13
View File
@@ -0,0 +1,13 @@
+++
author = "Maik de Kruif"
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
description = ""
cover = ""
tags = [
"untagged",
]
categories = [
"uncategorized",
]
+++
@@ -0,0 +1,26 @@
function resizeItem(masonry, item){
let rowHeight = parseInt(window.getComputedStyle(masonry).getPropertyValue('grid-auto-rows'));
let rowGap = parseInt(window.getComputedStyle(masonry).getPropertyValue('grid-row-gap'));
let rowSpan = Math.ceil((item.querySelector('.masonry-item-content').getBoundingClientRect().height+rowGap)/(rowHeight+rowGap));
item.style.gridRowEnd = "span "+rowSpan;
}
function resizeAll(){
let masonry = document.getElementsByClassName("masonry")[0];
if (!masonry) return;
masonry.style.gridAutoRows = "20px"
masonry.style.marginBottom = "80px"
let allItems = masonry.getElementsByClassName("masonry-item");
for (const item of allItems) {
resizeItem(masonry, item)
}
}
window.addEventListener("load", () => {
resizeAll()
window.addEventListener("resize", resizeAll);
})
+1 -20
View File
@@ -1,20 +1 @@
window.addEventListener("load", () => {
for (let figure of document.getElementsByTagName("figure")) {
if (figure.classList.contains("post-cover") || figure.classList.contains("portfolio-cover"))
continue
figure.addEventListener("click", () => {
figure.classList.toggle("floated-focus")
})
}
document.addEventListener('keydown', (e) => {
if (e.keyCode !== 27)
return
for (let figure of document.getElementsByClassName("floated-focus")) {
figure.classList.remove("floated-focus")
}
})
})
// Some code could be here ...
+58 -16
View File
@@ -1,38 +1,80 @@
window.addEventListener("load", () => {
const terminal = document.getElementById('nav-terminal')
const terminalCommand = document.getElementById("terminal-command")
const terminalInput = document.getElementById("terminal-input")
const keyDown = (e) => {
if (e.keyCode === 13) {
if (document.activeElement !== document.body) return
if (terminal.textContent.length === 0) return
const onSubmit = () => {
if (document.activeElement !== document.body) return
if (terminalInput.textContent.length === 0) return
if (terminal.textContent.includes("~")) terminal.textContent = ""
terminalCommand.click()
}
window.location.href = window.location.origin + "/" + terminal.textContent
return
}
const handleKey = (e) => {
if (e.keyCode === 13) return onSubmit()
if (e.keyCode === 8) {
terminal.textContent = terminal.textContent.slice(0, -1)
terminalInput.textContent = terminalInput.textContent.slice(0, -1)
return
}
if (e.keyCode === 192) {
if (terminal.textContent.length !== 0) return
if (terminalInput.textContent.length !== 0) return
terminal.textContent += "~"
terminalInput.textContent += "~"
return
}
if (e.keyCode === 189) {
terminalInput.textContent += "-"
return
}
if (e.keyCode === 191) {
terminal.textContent += "/"
let lastChar = terminalInput.textContent.slice(-1)
if (lastChar === "/") return
terminalInput.textContent += "/"
return
}
if (e.keyCode < 65 || e.keyCode > 90) return
if (e.keyCode === 190) {
let lastChar = terminalInput.textContent.slice(-1)
if (terminalInput.textContent.length > 0 && lastChar !== "/" && lastChar !== ".") return
terminal.textContent += e.key.toLowerCase()
if (terminalInput.textContent.length >= 2 && lastChar === "." && terminalInput.textContent.slice(-2)[0] === ".") return
terminalInput.textContent += "."
return
}
if (e.keyCode >= 65 && e.keyCode <= 90) {
let lastChar = terminalInput.textContent.slice(-1)
if (lastChar === "." || lastChar === "~") return
terminalInput.textContent += e.key.toLowerCase()
}
}
document.addEventListener('keydown', keyDown)
const updateCommandHref = () => {
let href = terminalInput.textContent
if (href.includes("~")) href = "/" + href.substring(1)
if (href.length === 0)
href = window.location.origin
else if (href[0] === "/")
href = window.location.origin + href
else
href = window.location.href + href
terminalCommand.href = href
}
const keyDown = (e) => {
handleKey(e)
updateCommandHref()
}
// terminalCommand.addEventListener("click", onSubmit)
document.addEventListener("keydown", keyDown)
})
+2
View File
@@ -5,6 +5,7 @@
font-weight: bold;
font-display: auto;
font-family: monospace, monospace;
white-space: pre;
img {
height: 44px;
@@ -12,6 +13,7 @@
&__mark {
margin-right: 5px;
white-space: nowrap;
}
&__text {
+1 -44
View File
@@ -184,7 +184,7 @@ figure {
figcaption {
font-size: 1.125rem;
line-height: 1.3;
margin-top: 0.4em;
margin: 1.33em 0;
font-weight: bold;
opacity: 0.8;
@@ -204,43 +204,11 @@ figure {
&.small {
max-width: 300px;
width: 90%;
margin: 5px 0;
}
&.inline {
display: inline-table;
}
&.floated-focus {
display: flex;
position:fixed;
top: 0;
left: 0;
width: 100vw;
max-width: unset;
height: 100vh;
padding: 3rem;
margin: 0;
align-items: center;
justify-content: center;
flex-direction: column;
background-color: #212020ec;
z-index: 10000;
figcaption {
color: #ddd3c6;
font-size: 1.5rem;
}
&:after {
content: "Close";
margin-top: 1rem;
text-decoration: underline;
cursor: pointer;
display: block;
color: #999288;
}
}
}
code {
@@ -453,14 +421,3 @@ table {
}
}
}
.feather {
display: inline-block;
vertical-align: -0.125em;
width: 1em;
height: 1em;
}
.nostyle {
text-decoration: none;
}
@@ -1,15 +1,10 @@
.masonry {
display: grid;
margin-top: 20px;
grid-gap: 20px 90px;
grid-template-columns: repeat(2, minmax(250px, 1fr));
// grid-auto-rows: 20px; // Set by JavaScript
// margin-bottom: calc(4 * 20px); // Set by JavaScript
> * {
margin: 0;
}
@media #{$media-size-medium} {
grid-template-columns: 1fr;
}
+14 -20
View File
@@ -13,6 +13,12 @@
max-width: 600px;
}
&-start-date {
&:after {
content: "—";
}
}
&-title {
font-size: 2.625rem;
margin: 0 0 20px;
@@ -26,11 +32,6 @@
}
}
&-timespan {
margin-top: -20px;
font-size: 0.9em;
}
&-tags {
display: block;
margin-bottom: 20px;
@@ -46,23 +47,9 @@
margin-top: 30px;
}
&-links {
font-size: 0.8em;
margin-top: -8px;
opacity: 0.7;
a {
text-decoration: none;
}
> * {
margin-right: 8px;
}
}
&-cover {
border-radius: 8px;
margin: 30px -50px;
margin: 40px -50px;
width: 1060px;
max-width: 1060px;
@@ -102,6 +89,13 @@
content: "#";
}
}
.feather {
display: inline-block;
vertical-align: -0.125em;
width: 1em;
height: 1em;
}
}
.flag {
+12 -9
View File
@@ -68,20 +68,23 @@
&-title {
font-size: 1rem;
margin: 5px 0 2px 0;
}
&-company {
font-size: 0.9rem;
margin: 5px 0 5px 0;
}
&-meta {
font-size: 0.8em;
&-company {
font-size: 1rem;
margin: 5px 0 5px 0;
}
&-content {
margin-top: 12px;
&-year {
padding-top: 6px;
margin-right: 1.8em;
font-size: 1.6em;
@include dimmed;
@media #{$media-size-tablet} {
margin: -6px 0 4px;
}
}
&-item {
+13 -19
View File
@@ -38,21 +38,9 @@
@media #{$media-size-phone} {
font-size: 1.6rem;
}
}
&-breadcrumbs {
font-size: 1.15rem;
margin: 10px 0 5px;
@media #{$media-size-phone} {
font-size: 0.9rem;
}
}
&-description {
font-size: 1.15rem;
@media #{$media-size-phone} {
font-size: 1.075rem;
a {
text-decoration: none;
}
}
@@ -73,10 +61,9 @@
&-cover {
border-radius: 8px;
margin: 30px -5.20%;
width: 110%;
max-width: 110%;
text-decoration: none;
margin: 40px -50px;
width: 1060px;
max-width: 1060px;
@media #{$media-size-medium} {
max-width: 860px;
@@ -84,7 +71,7 @@
@media #{$media-size-tablet} {
margin: 20px 0;
width: 100% !important;
width: 100%;
}
img {
@@ -118,6 +105,13 @@
content: "#";
}
}
.feather {
display: inline-block;
vertical-align: -0.125em;
width: 1em;
height: 1em;
}
}
.flag {
+14 -20
View File
@@ -38,23 +38,27 @@
list-style: none;
}
&-breadcrumbs {
margin: 0 0 -25px;
@media #{$media-size-phone} {
font-size: 0.9rem;
margin: 0 0 -15px;
}
}
.post {
&.masonry-item {
.post-cover {
width: 115%;
margin: 40px -30px;
img {
max-height: 20rem;
margin: 0 auto;
object-fit: contain;
}
}
}
&-title {
font-size: 1.9rem;
margin: 5px 0 5px 0;
}
&-subtitle {
font-size: 1.1rem;
font-size: 1.2rem;
margin: 5px 0 10px 0;
font-weight: 600;
}
@@ -87,15 +91,5 @@
margin-left: 1em;
@include dimmed;
}
&-cover {
margin-top: 20px;
margin-bottom: 20px;
}
&-content {
margin-top: 10px;
margin-bottom: 10px;
}
}
}
@@ -17,7 +17,6 @@ $dark-border-color: #4a4b50;
$media-size-phone: "(max-width: 684px)";
$media-size-tablet: "(max-width: 900px)";
$media-size-medium: "(max-width: 1200px)";
$media-size-medium-min: "(min-width: 1200px)";
/* variables for js, must be the same as these in @custom-media queries */
:root {
-11
View File
@@ -34,14 +34,3 @@ other = "Table of Contents"
[wordCount]
one = "One Word"
other = "{{ .Count }} Words"
[post]
pageViews = "Views"
unknownViews = "Unknown"
present = "Present"
[portfolio]
skillsDeveloped = "Skills developed"
viewSource = "View source"
viewSourceKind = "View {{ . }} source"
liveDemo = "Live demo"
@@ -1,3 +1,4 @@
{{- $paginator := .Paginate .RegularPagesRecursive }}
<!DOCTYPE html>
<html lang="{{ .Site.Language }}">
@@ -19,8 +20,6 @@
</div>
{{ partial "javascript.html" . }}
<!-- SEO stuff -->
{{ partial "seo.html" . }}
</body>
</html>
@@ -2,8 +2,6 @@
{{ $paginator := .Paginate .Data.Pages }}
<main class="posts">
<p class="posts-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">" "min" 1) }}</p>
<h1>{{ .Title }}</h1>
{{- if and .Content (not .Paginator.HasPrev) }}
@@ -45,7 +43,6 @@
{{- end }}
{{- if .Params.Cover }}
<a href="{{ .Permalink }}" class="nostyle">
<figure class="post-cover">
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify)) }}
@@ -53,7 +50,6 @@
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
{{- end }}
</figure>
</a>
{{- end }}
<div class="post-content">
+5 -5
View File
@@ -7,11 +7,11 @@
{{- with .Site.LanguageCode }}
<language>{{.}}</language>
{{- end }}
{{- with .Site.Params.author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</managingEditor>
{{- with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>
{{- end }}
{{- with .Site.Params.author.email }}
<webMaster>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</webMaster>
{{- with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>
{{- end }}
{{- with .Site.Copyright }}
<copyright>{{.}}</copyright>
@@ -22,7 +22,7 @@
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}
{{ range .Pages | first .Site.Params.rssLimit }}
{{ range .Pages | first 15 }}
<item>
<title>{{ .Title }}{{ with .Params.Subtitle }} // {{ . }}{{ end }}</title>
<link>{{ .Permalink }}</link>
+53 -168
View File
@@ -1,181 +1,66 @@
{{ define "main" }}
<main class="post">
<div class="post-info">
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-clock">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
{{- $readingTime := .Page.ReadingTime }}
{{- if eq .Type "writeups" }}
{{- $readingTime = mul 1.5 .Page.ReadingTime | int }}
{{- end }}
{{ i18n "readingTime" $readingTime }}
<div class="post-info">
{{ if .IsTranslated }}
{{ i18n "postAvailable" }}
{{ range .Translations }}
<a href="{{ .Permalink }}"><span
class="flag flag-icon flag-icon-{{ index $.Site.Data.langFlags (.Lang) }} flag-icon-squared"></span></a>
{{ end}}
{{ end }}
</div>
{{- if .IsTranslated }} | {{ i18n "postAvailable" }}
{{- range .Translations }}
<a href="{{ .Permalink }}"><span
class="flag flag-icon flag-icon-{{ index $.Site.Data.langFlags (.Lang) }} flag-icon-squared"></span></a>
{{- end }}
{{- end }}
</p>
</div>
<article>
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<article>
<p class="post-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">" "min" 1) }}</p>
{{- if .Params.toc }}
<hr />
<aside id="toc">
<div class="toc-title">{{ i18n "tableOfContents" }}</div>
{{ .TableOfContents }}
</aside>
<hr />
{{- end }}
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
{{- with .Params.Description }}
<p class="post-description">{{ . | markdownify }}</p>
{{- end }}
{{- with .Params.Cover }}
{{- partial "image.html" (dict "path" . "alt" "" "class" "post-cover") }}
{{- end }}
{{- if .Params.Cover }}
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify) "class" "post-cover") }}
{{- end }}
<div class="post-content">
{{ .Content }}
</div>
</article>
{{- if .Params.toc }}
<hr />
<aside id="toc">
<div class="toc-title">{{ i18n "tableOfContents" }}</div>
{{ .TableOfContents }}
</aside>
<hr />
{{- end }}
<div class="post-content">
{{ .Content }}
<div class="post-info">
{{- with .Params.tags }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-tag meta-icon">
<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path>
<line x1="7" y1="7" x2="7" y2="7"></line>
</svg>
{{- range . -}}
<span class="tag"><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">{{.}}</a></span>
{{- end }}
</p>
{{- end }}
{{- if .GitInfo }}
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-git-commit">
<circle cx="12" cy="12" r="4"></circle>
<line x1="1.05" y1="12" x2="7" y2="12"></line>
<line x1="17.01" y1="12" x2="22.96" y2="12"></line>
</svg><a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank"
rel="noopener">{{ .GitInfo.AbbreviatedHash }}</a> @
{{ if .Site.Params.dateformNum }}{{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}{{ else }}{{ dateFormat "2006-01-02" .GitInfo.AuthorDate.Local }}{{ end }}
</p>
{{- end }}
</div>
</article>
<hr />
<div class="post-info">
{{- with .Params.tags }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-tag meta-icon">
<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path>
<line x1="7" y1="7" x2="7" y2="7"></line>
</svg>
{{- range . -}}
<span class="tag"><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}/">{{.}}</a></span>
{{- end }}
</p>
{{- end }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-file-text">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
<polyline points="14 2 14 8 20 8"></polyline>
<line x1="16" y1="13" x2="8" y2="13"></line>
<line x1="16" y1="17" x2="8" y2="17"></line>
<polyline points="10 9 9 9 8 9"></polyline>
</svg>
{{ i18n "wordCount" .Page.WordCount }}
</p>
{{- if and (default true .Params.showPageViews) (default true .Site.Params.showPageViews) }}
{{- if .Site.Params.goatCounter }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-activity">
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
<circle cx="12" cy="12" r="3"></circle>
</svg>
{{- partial "page_views.html" . -}}
</p>
{{- end }}
{{- end }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-calendar">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
{{- $dateFormat := default "2006-01-02 15:04 -0700" .Site.Params.dateformNumTime }}
{{ dateFormat $dateFormat .Date.Local }}
</p>
{{- if .GitInfo }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-git-commit">
<circle cx="12" cy="12" r="4"></circle>
<line x1="1.05" y1="12" x2="7" y2="12"></line>
<line x1="17.01" y1="12" x2="22.96" y2="12"></line>
</svg>
<a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank"
rel="noopener">{{ .GitInfo.AbbreviatedHash }}</a>
{{- " @ " -}}
{{- if .Site.Params.dateformNum -}}
{{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}
{{- else -}}
{{ dateFormat "2006-01-02" .GitInfo.AuthorDate.Local }}
{{- end }}
</p>
{{- end }}
</div>
{{- if .Site.Params.EnableSharingButtons }}
<hr />
<div class="sharing-buttons">
{{ partial "sharing-buttons.html" . }}
</div>
{{- end }}
{{- if and (not $.Site.Params.DisableReadOtherPosts) (or .NextInSection .PrevInSection) }}
<div class="pagination">
<div class="pagination__title">
<span class="pagination__title-h">{{ .Site.Params.ReadOtherPosts }}</span>
<hr />
</div>
<div class="pagination__buttons">
{{- if .NextInSection }}
<span class="button previous">
<a href="{{ .NextInSection.Permalink }}">
<span class="button__icon">←</span>
<span class="button__text">{{ .NextInSection.Title }}</span>
</a>
</span>
{{- end }}
{{- if .PrevInSection }}
<span class="button next">
<a href="{{ .PrevInSection.Permalink }}">
<span class="button__text">{{ .PrevInSection.Title }}</span>
<span class="button__icon">→</span>
</a>
</span>
{{- end }}
</div>
</div>
{{- end }}
{{- if .Site.Config.Services.Disqus.Shortname }}
{{- if not (eq .Params.Comments "false") }}
<div id="comments">
{{ template "_internal/disqus.html" . }}
</div>
{{- end }}
{{- end }}
</main>
{{ end }}
@@ -1,26 +0,0 @@
{{- $breadcrumbs := slice }}
{{- $path := .page.RelPermalink }}
{{- $path = trim $path "/" }}
{{- $currentPath := "" }}
{{- range split $path "/" }}
{{- $currentPath = printf "%s/%s" $currentPath . }}
{{- $page := $.page.GetPage $currentPath }}
{{- if ne (trim $currentPath "/") $path }}
{{- $title := $page.Title }}
{{- with $page.Params.breadcrumb }}
{{- $title = . }}
{{- end }}
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $title "url" $page.Permalink) }}
{{- end }}
{{- end }}
{{- $breadcrumbs = after (int .page.IsPage) $breadcrumbs}}
{{- if ne .page.Type "page"}}
{{- if lt (default 0 .min) (len $breadcrumbs) }}
{{- range $index, $breadcrumb := $breadcrumbs }}
<a href="{{ $breadcrumb.url }}">{{ $breadcrumb.name }}</a>{{ if ne $index (sub (len $breadcrumbs) 1) }}<span> > </span>{{ end }}
{{- end }}
{{- if and $breadcrumbs .end }}
{{ .end }}
{{- end }}
{{- end }}
{{- end }}
@@ -3,17 +3,19 @@
<div class="footer__content">
<div class="footer__content__section regular">
<span>&copy; {{ now.Format "2006" }}</span>
{{- if .Site.Params.author.name }}
<span><a href="{{ .Site.BaseURL }}">{{ .Site.Params.author.name }}</a></span>
{{- if .Site.Author.name }}
<span><a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a></span>
{{- end }}
{{- if .Site.Copyright }}
<span>All rights reserved.</span>
{{- end }}
<span><a href="/privacy/">Privacy</a></span>
<span>
{{- with (not (in (.Site.Language.Get "disableKinds") "RSS")) }}
<a href="{{ "index.xml" | absLangURL }}" target="_blank" title="rss">
{{ partial "svg.html" (dict "name" "rss") }}
</a>
{{- end }}
</span>
</div>
<div class="footer__content__section donations">
+5 -2
View File
@@ -10,11 +10,11 @@
crossorigin="anonymous">
{{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{- $style := resources.Get "scss/main.scss" | css.Sass $options | resources.Fingerprint }}
{{- $style := resources.Get "scss/main.scss" | resources.ToCSS $options | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{ $options := (dict "targetPath" "syntax_highlighting.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{- $style := resources.Get "scss/syntax_highlighting.scss" | css.Sass $options | resources.Fingerprint }}
{{- $style := resources.Get "scss/syntax_highlighting.scss" | resources.ToCSS $options | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{- range $val := $.Site.Params.customCSS }}
@@ -28,6 +28,9 @@
<!-- Meta tags -->
{{- partial "meta-tags.html" . -}}
<!-- SEO stuff -->
{{- partial "seo.html" . -}}
<!-- RSS -->
<!-- {{- with .OutputFormats.Get "rss" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
@@ -5,10 +5,10 @@
{{- $secureJS := slice $main $menu $theme $nav | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
{{- if .Site.Config.Services.GoogleAnalytics.ID }}
{{- if .Site.GoogleAnalytics }}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Config.Services.GoogleAnalytics.ID }}"></script>
<script async>
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.GoogleAnalytics }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
@@ -16,7 +16,7 @@
}
gtag('js', new Date());
gtag('config', '{{ .Site.Config.Services.GoogleAnalytics.ID }}');
gtag('config', '{{ .Site.GoogleAnalytics }}');
</script>
{{- end }}
@@ -24,10 +24,4 @@
{{- if gt (len $val) 0 }}
<script src="{{ $val }}"></script>
{{- end }}
{{- end }}
{{- if .Site.Params.goatCounter }}
<script data-goatcounter="https://{{ .Site.Params.goatCounter }}/count"
data-goatcounter-settings='{"path": "{{ .RelPermalink }}"}'
async src="//gc.zgo.at/count.js"></script>
{{- end}}
{{- end }}
+55 -12
View File
@@ -1,13 +1,56 @@
<a
href="{{ if .Site.Params.Logo.LogoHomeLink }}{{ .Site.Params.Logo.LogoHomeLink }}{{else}}{{ .Site.BaseURL }}{{ end }}">
<div class="logo">
{{- if .Site.Params.Logo.path }}
{{- /*
<!-- paths --> */}}
{{- $paths := slice }}
{{- $path := "" }}
{{- if or (eq .Kind "taxonomy") (or (eq .Kind "term") (eq .Kind "404")) }}
{{- $path = .RelPermalink }}
{{- else if .File }}
{{- $path = string .File }}
{{- else if .IsHome }}
{{- $path = "" }}
{{- else }}
{{- errorf "Could not find page at url: \"%s\"!" .RelPermalink }}
{{- end }}
{{- $path = trim $path "/" }}
{{- $currentPath := "" }}
{{- $paths = $paths | append (dict "name" "~" "url" $.Site.BaseURL) }}
{{- range split $path "/" }}
{{- $currentPath = printf "%s/%s" $currentPath . }}
{{- $page := $.GetPage $currentPath }}
{{- if not $.IsHome }}
{{- if ne . "_index.md" }}
{{- if eq $.Kind "404" }}
{{- $paths = $paths | append (dict "name" "not-found" "url" (printf "%s%s" $.Site.BaseURL (strings.TrimLeft
"/" $currentPath))) }}
{{- else }}
{{/* {{- $title := $page.Title }} */}}
{{- $title := delimit (split $page.Permalink "/" | last 2 | first 1) ""}}
{{- $paths = $paths | append (dict "name" ($title) "url" $page.Permalink)}}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- $zshPaths := slice }}
{{- range $index, $path := $paths }}
{{- if ne (index $paths (sub (len $paths) 1)) $path}}
{{- $zshPaths = $zshPaths | append (dict "name" (printf "%s/" ($path.name | first 1)) "url" $path.url) }}
{{- else }}
{{- $zshPaths = $zshPaths | append (dict "name" ($path.name) "url" $path.url) }}
{{- end }}
{{- end }}
<div class="logo">
{{- if .Site.Params.Logo.path }}
<a href="{{ .Site.BaseURL }}">
{{- partial "image.html" (dict "path" .Site.Params.Logo.path "alt" .Site.Params.Logo.alt) }}
{{- else }}
<span class="logo__mark">></span>
<span class="logo__text">{{- with .Site.Params.Logo.logoText }}{{ . }}{{ else }}$ cd /home/{{ end }}<span
id="nav-terminal"></span></span>
<span class="logo__cursor"></span>
{{- end }}
</div>
</a>
</a>
{{- else }}
<span class="logo__mark">
{{- range $index, $path := $zshPaths }}<a href="{{ $path.url }}">{{ $path.name }}</a>{{- end }}>
</span>
<a class="logo__text" id="terminal-command" href="/">cd <span id="terminal-input"></span></a>
<span class="logo__cursor"></span>
{{- end }}
</div>
@@ -1,6 +1,6 @@
<!-- Default -->
<meta name="author"
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ with .Site.Params.author.name }}{{ . }}{{ end }}{{ end }}">
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ with .Site.Author.name }}{{ . }}{{ end }}{{ end }}">
<meta name="description"
content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ .Params.description | plainify }}{{ end }}" />
<meta name="keywords"
@@ -26,7 +26,7 @@
<!-- Article -->
<meta property="article:publisher" content="{{ .Site.BaseURL }}" />
<meta name="article:author"
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ with .Site.Params.author.name }}{{ . }}{{ end }}{{ end }}">
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ with .Site.Author.name }}{{ . }}{{ end }}{{ end }}">
{{- if isset .Params "date" }}
<meta property="article:published_time" content="{{ time .Date }}" />
@@ -60,9 +60,9 @@
<meta name="twitter:description"
content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}" />
<meta name="twitter:url" content="{{ .Permalink }}" />
{{- with .Site.Params.general.twitter }}
{{- with .Site.Social.twitter }}
<meta name="twitter:site" content="{{ . }}" />
{{- end }}
{{- with .Site.Params.author.twitter }}
{{- with .Site.Author.twitter }}
<meta name="twitter:creator" content="{{ . }}" />
{{- end }}
@@ -1,16 +0,0 @@
{{- if .Site.Params.goatCounter }}
<span id="{{ .File.UniqueID }}" title="{{ i18n "post.pageViews" }}">{{ i18n "post.unknownViews" }}</span>
<script async>
let url =
"https://{{ .Site.Params.goatCounter }}/counter/" +
encodeURIComponent({{ .RelPermalink }}.replace(/(\/)?$/, "")) +
".json";
fetch(url)
.then(res => res.json())
.then(data => data.count)
.then(count => {
document.getElementById("{{ .File.UniqueID }}").innerText = count + " " + {{ i18n "post.pageViews" }};
});
</script>
{{- end}}
+24 -26
View File
@@ -1,9 +1,10 @@
{{- /* <!-- Breadcrumbs --> */}}
{{- $visiblePage := .}}
{{- $breadcrumbs := slice }}
{{- $path := "" }}
{{- if or (eq .Kind "taxonomy") (or (eq .Kind "term") (or (eq .Kind "404") (.File))) }}
{{- if or (eq .Kind "taxonomy") (or (eq .Kind "term") (eq .Kind "404")) }}
{{- $path = .RelPermalink }}
{{- else if .File }}
{{- $path = string .File }}
{{- else if .IsHome }}
{{- $path = "" }}
{{- else }}
@@ -21,13 +22,10 @@
{{- $breadcrumbs = $breadcrumbs | append (dict "name" "Not Found" "url" (printf "%s%s" $.Site.BaseURL (strings.TrimLeft "/" $currentPath))) }}
{{- else }}
{{- $title := $page.Title }}
{{- with $page.Params.breadcrumb }}
{{- $title = . }}
{{- end }}
{{- if eq (trim $currentPath "/") $path }}
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $visiblePage.Title "url" $visiblePage.Permalink) }}
{{- else }}
{{- if eq $page $ }}
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $title "url" $page.Permalink) }}
{{- else }}
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $title "url" $page.Permalink)}}
{{- end }}
{{- end }}
{{- end }}
@@ -41,11 +39,11 @@
{
"@type": "Person",
"@id": "{{ $.Site.BaseURL }}#website_founder",
"name": {{ $.Site.Params.author.name | safeHTML }},
{{- with $.Site.Params.author.email }}
"name": {{ $.Site.Author.name | safeHTML }},
{{- with $.Site.Author.email }}
"email": {{ . | safeHTML }},
{{- end }}
{{- with $.Site.Params.author.image }}
{{- with $.Site.Author.image }}
{{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"image": {
@@ -59,7 +57,7 @@
},
{
"@type": "Organization",
"name": {{ $.Site.Params.author.name | safeHTML }},
"name": {{ $.Site.Author.name | safeHTML }},
"slogan": {{$.Site.Params.HomeSubtitle | safeHTML }},
{{- with $socials := .Site.Params.social }}
"sameAs": [
@@ -68,10 +66,10 @@
{{- end }}
],
{{- end }}
{{- with $.Site.Params.author.email }}
{{- with $.Site.Author.email }}
"email": {{ . | safeHTML }},
{{- end }}
{{- with $.Site.Params.author.image }}
{{- with $.Site.Author.image }}
{{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"logo": {
@@ -110,15 +108,15 @@
{{- with .Site.Copyright }}
"license": {{ . | safeHTML }},
{{- end }}
{{- if .Site.Params.author.name }}
{{- if .Site.Author.name }}
{{- range slice "publisher" "author" }}
{{ . }}: {
"@type": "Person",
"name": {{ $.Site.Params.author.name | safeHTML }},
{{- with $.Site.Params.author.email }}
"name": {{ $.Site.Author.name | safeHTML }},
{{- with $.Site.Author.email }}
"email": {{ . | safeHTML }},
{{- end }}
{{- with $.Site.Params.author.image }}
{{- with $.Site.Author.image }}
{{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"image": {
@@ -189,15 +187,15 @@
{{- with .Site.Copyright }}
"license": {{ . | safeHTML }},
{{- end }}
{{- if .Site.Params.author.name }}
{{- if .Site.Author.name }}
{{- range slice "publisher" "author" }}
{{ . }}: {
"@type": "Person",
"name": {{ $.Site.Params.author.name | safeHTML }},
{{- with $.Site.Params.author.email }}
"name": {{ $.Site.Author.name | safeHTML }},
{{- with $.Site.Author.email }}
"email": {{ . | safeHTML }},
{{- end }}
{{- with $.Site.Params.author.image }}
{{- with $.Site.Author.image }}
{{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"image": {
@@ -260,15 +258,15 @@
{{- with .Site.Copyright }}
"license": {{ . | safeHTML }},
{{- end }}
{{- if .Site.Params.author.name }}
{{- if .Site.Author.name }}
{{- range slice "publisher" "author" }}
{{ . }}: {
"@type": "Person",
"name": {{ $.Site.Params.author.name | safeHTML }},
{{- with $.Site.Params.author.email }}
"name": {{ $.Site.Author.name | safeHTML }},
{{- with $.Site.Author.email }}
"email": {{ . | safeHTML }},
{{- end }}
{{- with $.Site.Params.author.image }}
{{- with $.Site.Author.image }}
{{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"image": {
+15 -11
View File
@@ -1,8 +1,6 @@
{{ define "main" }}
<main class="portfolios">
<p class="posts-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">") }}</p>
<h1>Portfolio</h1>
{{- if and .Content (not .Paginator.HasPrev) }}
@@ -20,15 +18,21 @@
<div class="portfolio-meta">
{{- if .Params.start_date }}
<span class="portfolio-start-date">
{{- $dateFormat := default "Jan, 2006" .Site.Params.dateformMonth }}
{{ dateFormat $dateFormat .Params.start_date }}
</span>
—
<span class="portfolio-end-date">
{{- if and .Params.end_date (lt .Params.end_date now) }}
{{ dateFormat $dateFormat .Params.end_date }}
{{- if eq (printf "%T" .Params.start_date) "time.Time"}}
{{ .Params.start_date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
{{- else }}
{{ i18n "post.present" }}
{{ .Params.start_date }}
{{- end }}
</span>
<span class="portfolio-end-date">
{{- if eq (printf "%T" .Params.end_date) "time.Time"}}
{{- if lt .Params.end_date now }}
{{ .Params.end_date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
{{- else }}
Present
{{- end }}
{{- else }}
{{ .Params.end_date }}
{{- end }}
</span>
{{- end }}
@@ -56,7 +60,7 @@
{{- end }}
</div>
{{- with .Params.skills }}
<h3 class="portfolio-skills-title">{{ i18n "portfolio.skillsDeveloped"}}:</h3>
<h3 class="portfolio-skills-title">Skills used:</h3>
<ul class="portfolio-skills">
{{- range . }}
<li class="portfolio-skill">{{ . }}</li>
+8 -78
View File
@@ -1,5 +1,6 @@
{{ define "main" }}
<main class="portfolio">
<div class="portfolio-info">
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
@@ -20,87 +21,30 @@
</div>
<article>
<p class="post-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">" "min" 1) }}</p>
<h1 class="portfolio-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<p class="portfolio-timespan">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-calendar">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
{{- if .Params.start_date }}
{{- $dateFormat := default "Jan, 2006" .Site.Params.dateformMonth }}
{{ dateFormat $dateFormat .Params.start_date }} — {{ if and .Params.end_date (lt .Params.end_date now) }}{{ dateFormat $dateFormat .Params.end_date }}{{ else }}{{ i18n "post.present" }}{{ end }}
{{- end }}
</p>
<div class="portfolio-links">
{{- if .Params.source_code }}
{{- if hasPrefix (printf "%T" .Params.source_code) "map" }}
{{- range $name, $url := .Params.source_code }}
<span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-code">
<polyline points="16 18 22 12 16 6"></polyline>
<polyline points="8 6 2 12 8 18"></polyline>
</svg>
<a href="{{ $url }}">{{ i18n "portfolio.viewSourceKind" $name}}</a>
</span>
{{- end }}
{{- else }}
<span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-code">
<polyline points="16 18 22 12 16 6"></polyline>
<polyline points="8 6 2 12 8 18"></polyline>
</svg>
<a href="{{ .Params.source_code }}">{{ i18n "portfolio.viewSource"}}</a>
</span>
{{- end }}
{{- end }}
{{- if .Params.live_demo }}
<span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-monitor">
<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect>
<line x1="8" y1="21" x2="16" y2="21"></line>
<line x1="12" y1="17" x2="12" y2="21"></line>
</svg>
<a href="{{ .Params.live_demo }}">{{ i18n "portfolio.liveDemo"}}</a>
</span>
{{- end }}
</div>
{{- if .Params.Cover }}
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify) "class" "portfolio-cover") }}
{{- end }}
{{- if .Params.toc }}
<hr />
<aside id="toc">
<h2>{{ i18n "tableOfContents" }}</h2>
<div class="toc-title">{{ i18n "tableOfContents" }}</div>
{{ .TableOfContents }}
</aside>
<hr />
{{- end }}
{{- if .Params.Cover }}
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify) "class" "portfolio-cover") }}
{{- end }}
<div class="portfolio-content">
{{ .Content }}
</div>
<div>
{{- with .Params.skills }}
<h2 class="portfolio-skills-title">{{ i18n "portfolio.skillsDeveloped"}}:</h2>
<h2 class="portfolio-skills-title">Skills used:</h2>
<ul class="portfolio-skills">
{{- range . }}
<li class="portfolio-skill">{{ . }}</li>
@@ -141,20 +85,6 @@
{{ i18n "wordCount" .Page.WordCount }}
</p>
{{- if and (default true .Params.showPageViews) (default true .Site.Params.showPageViews) }}
{{- if .Site.Params.goatCounter }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-activity">
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
<circle cx="12" cy="12" r="3"></circle>
</svg>
{{- partial "page_views.html" . -}}
</p>
{{- end }}
{{- end }}
{{- if .GitInfo }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
@@ -214,7 +144,7 @@
{{- end }}
{{- if .Site.Config.Services.Disqus.Shortname }}
{{- if .Site.DisqusShortname }}
{{- if not (eq .Params.Comments "false") }}
<div id="comments">
{{ template "_internal/disqus.html" . }}
+164
View File
@@ -0,0 +1,164 @@
{{ define "main" }}
<main class="post">
<div class="post-info">
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-clock">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
{{ i18n "readingTime" .Page.ReadingTime }}
{{- if .IsTranslated }} | {{ i18n "postAvailable" }}
{{- range .Translations }}
<a href="{{ .Permalink }}"><span
class="flag flag-icon flag-icon-{{ index $.Site.Data.langFlags (.Lang) }} flag-icon-squared"></span></a>
{{- end}}
{{- end }}
</p>
</div>
<article>
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
{{- with .Params.Subtitle }}
<p class="post-subtitle">{{ . | markdownify }}</p>
{{- end }}
{{- if .Params.toc }}
<hr />
<aside id="toc">
<div class="toc-title">{{ i18n "tableOfContents" }}</div>
{{ .TableOfContents }}
</aside>
<hr />
{{- end }}
{{- if .Params.Cover }}
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify) "class" "post-cover") }}
{{- end }}
<div class="post-content">
{{ .Content }}
</div>
</article>
<hr />
<div class="post-info">
{{- with .Params.tags }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-tag meta-icon">
<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path>
<line x1="7" y1="7" x2="7" y2="7"></line>
</svg>
{{- range . -}}
<span class="tag"><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}/">{{.}}</a></span>
{{- end }}
</p>
{{- end }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-file-text">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
<polyline points="14 2 14 8 20 8"></polyline>
<line x1="16" y1="13" x2="8" y2="13"></line>
<line x1="16" y1="17" x2="8" y2="17"></line>
<polyline points="10 9 9 9 8 9"></polyline>
</svg>
{{ i18n "wordCount" .Page.WordCount }}
</p>
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-calendar">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
{{- if .Site.Params.dateformNumTime }}
{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}
{{- else }}
{{ dateFormat "2006-01-02 15:04 -0700" .Date.Local }}
{{- end }}
</p>
{{- if .GitInfo }}
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-git-commit">
<circle cx="12" cy="12" r="4"></circle>
<line x1="1.05" y1="12" x2="7" y2="12"></line>
<line x1="17.01" y1="12" x2="22.96" y2="12"></line>
</svg>
<a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank"
rel="noopener">{{ .GitInfo.AbbreviatedHash }}</a>
{{- " @ " -}}
{{- if .Site.Params.dateformNum -}}
{{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}
{{- else -}}
{{ dateFormat "2006-01-02" .GitInfo.AuthorDate.Local }}
{{- end }}
</p>
{{- end }}
</div>
{{- if .Site.Params.EnableSharingButtons }}
<hr />
<div class="sharing-buttons">
{{ partial "sharing-buttons.html" . }}
</div>
{{- end }}
{{- if and (not $.Site.Params.DisableReadOtherPosts) (or .NextInSection .PrevInSection) }}
<div class="pagination">
<div class="pagination__title">
<span class="pagination__title-h">{{ .Site.Params.ReadOtherPosts }}</span>
<hr />
</div>
<div class="pagination__buttons">
{{- if .NextInSection }}
<span class="button previous">
<a href="{{ .NextInSection.Permalink }}">
<span class="button__icon">←</span>
<span class="button__text">{{ .NextInSection.Title }}</span>
</a>
</span>
{{- end }}
{{- if .PrevInSection }}
<span class="button next">
<a href="{{ .PrevInSection.Permalink }}">
<span class="button__text">{{ .PrevInSection.Title }}</span>
<span class="button__icon">→</span>
</a>
</span>
{{- end }}
</div>
</div>
{{- end }}
{{- if .Site.DisqusShortname }}
{{- if not (eq .Params.Comments "false") }}
<div id="comments">
{{ template "_internal/disqus.html" . }}
</div>
{{- end }}
{{- end }}
</main>
{{ end }}
+5 -5
View File
@@ -7,11 +7,11 @@
{{- with .Site.LanguageCode }}
<language>{{.}}</language>
{{- end }}
{{- with .Site.Params.author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</managingEditor>
{{- with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>
{{- end }}
{{- with .Site.Params.author.email }}
<webMaster>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</webMaster>
{{- with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>
{{- end }}
{{- with .Site.Copyright }}
<copyright>{{.}}</copyright>
@@ -27,7 +27,7 @@
{{- $allContent = union $allContent .RegularPagesRecursive }}
{{- end }}
{{- $allContent = sort $allContent "Date" "desc" }}
{{- $allContent = $allContent | first .Site.Params.rssLimit }}
{{- $allContent = $allContent | first 15 }}
{{- range $allContent }}
<item>
<title>{{ .Title }}{{ with .Params.Subtitle }} // {{ . }}{{ end }}</title>
+49 -59
View File
@@ -1,9 +1,6 @@
{{ define "main" }}
{{ $paginator := (.Paginate .RegularPagesRecursive) }}
<main class="posts">
<p class="posts-breadcrumbs">{{ partial "breadcrumbs.html" (dict "page" . "end" ">") }}</p>
<h1>{{ .Title }}</h1>
{{- if and .Content (not .Paginator.HasPrev) }}
@@ -15,68 +12,61 @@
{{- end }}
<div class="posts-list masonry">
{{ range $paginator.Pages }}
<div class="post">
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
{{ range .Paginator.Pages }}
<div class="post masonry-item">
<div class="masonry-item-content">
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
{{- with .Params.Subtitle }}
<p class="post-subtitle">{{ . | markdownify }}</p>
{{- end }}
<div class="post-meta">
{{- if .Date }}
<span class="post-date">
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
</span>
{{- end }}
{{- with .Params.Author }}
<span class="post-author">{{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>
{{- end }}
{{- if $.Site.Params.ShowReadingTimeInList }}
<span class="post-read-time">— {{ .ReadingTime }}
{{ $.Site.Params.MinuteReadingTime | default "min read" }}</span>
{{- end }}
</div>
<p class="post-subtitle">
{{/* {{- with .Params.Subtitle }}
{{ . | markdownify }}
<br>
{{- end }} */}}
{{ partial "breadcrumbs.html" (dict "page" . "min" 0) }}
</p>
<div class="post-meta">
{{- if .Date }}
<span class="post-date">
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
{{- if .Params.tags }}
<span class="post-tags">
{{- range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}/">{{ . }}</a>&nbsp;
{{- end }}
</span>
{{- end }}
{{- with .Params.Author }}
<span class="post-author">{{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>
{{- if .Params.Cover }}
<figure class="post-cover">
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify)) }}
{{- if .Params.CoverCaption }}
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
{{- end }}
</figure>
{{- end }}
{{- if $.Site.Params.ShowReadingTimeInList }}
<span class="post-read-time">— {{ .ReadingTime }}
{{ $.Site.Params.MinuteReadingTime | default "min read" }}</span>
<div class="post-content">
{{- with .Description }}
{{ . | markdownify }}
{{- else }}
{{- if .Truncated }}
{{ .Summary | markdownify }}
{{- end }}
{{- end }}
</div>
{{- if not .Params.hideReadMore }}
<div><a class="read-more button"
href="{{.Permalink}}">{{ $.Site.Params.ReadMore | default "Read more" }}
→</a></div>
{{- end }}
</div>
{{- if .Params.tags }}
<span class="post-tags">
{{- range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}/">{{ . }}</a>&nbsp;
{{- end }}
</span>
{{- end }}
{{- if .Params.Cover }}
<a href="{{ .Permalink }}" class="nostyle">
<figure class="post-cover">
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify)) }}
{{- if .Params.CoverCaption }}
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
{{- end }}
</figure>
</a>
{{- end }}
<div class="post-content">
{{- with .Description }}
{{ . | markdownify }}
{{- else }}
{{- if .Truncated }}
{{ .Summary | markdownify }}
{{- end }}
{{- end }}
</div>
{{- if not .Params.hideReadMore }}
<div><a class="read-more button"
href="{{.Permalink}}">{{ $.Site.Params.ReadMore | default "Read more" }}
→</a></div>
{{- end }}
</div>
{{- end }}
</div>

Some files were not shown because too many files have changed in this diff Show More