From 5e60b8febad4ab8d4c59bafb5496e32bdf09461c Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 12 Feb 2023 12:18:45 +0100 Subject: [PATCH] improved the way anchors work --- main/_includes/about.html | 5 ++--- main/_includes/blog.html | 14 +++++++------- main/_includes/projects.html | 5 ++--- main/_includes/social.html | 5 ++--- main/_includes/support.html | 3 +-- main/_layouts/default.html | 2 +- main/actaddmanual/index.js | 5 ++--- main/actaddmanual/style.css | 13 +++++-------- main/style/style.css | 11 ++--------- 9 files changed, 24 insertions(+), 39 deletions(-) diff --git a/main/_includes/about.html b/main/_includes/about.html index e9a0c0a..9ee97fd 100644 --- a/main/_includes/about.html +++ b/main/_includes/about.html @@ -1,6 +1,5 @@ -
-

💬 About

+

💬 About

Sometimes, some people ask me some questions about myself or my projects, so I decided to compile a list of some of the answers in a Q&A-like fashion so that I don't have to keep repeating them. If you're curious about me, this might be interesting to you!

@@ -18,4 +17,4 @@ let ageSinceStart = new Date(todayMillis - birthdayMillis); $("#age").html(ageSinceStart.getUTCFullYear() - 1970); -
\ No newline at end of file + diff --git a/main/_includes/blog.html b/main/_includes/blog.html index 30455da..54c4d69 100644 --- a/main/_includes/blog.html +++ b/main/_includes/blog.html @@ -1,11 +1,11 @@ - - -{% for tag in site.tags %} - -{% endfor %} -
-

📔 Blog

+

+ + {% for tag in site.tags %} + + {% endfor %} + 📔 Blog +

This is my blog, where I post about gaming, programming and life. The featured posts are the ones you'll probably be most interested in, but you can select a different category to see every post.

diff --git a/main/_includes/projects.html b/main/_includes/projects.html index 31a41ed..3bbba51 100644 --- a/main/_includes/projects.html +++ b/main/_includes/projects.html @@ -1,6 +1,5 @@ -
-

💻 Projects

+

💻 Projects

Here is a list of some of my bigger projects as well as some things you might know me from.
For a more exhaustive list of my projects, you can also check out the Social section. @@ -33,4 +32,4 @@ }); } -

\ No newline at end of file +
diff --git a/main/_includes/social.html b/main/_includes/social.html index c2ea1e5..b029e78 100644 --- a/main/_includes/social.html +++ b/main/_includes/social.html @@ -1,6 +1,5 @@ -
-

🔗 Social

+

🔗 Social

These are other websites where you can find me and the things I do, including the pages where I publish my code and games and where I sometimes stream and upload videos. This list also includes a lot of ways to reach me.

@@ -48,4 +47,4 @@ $("#discord-widget").attr("src", `https://discordapp.com/widget?id=181435613147430913&theme=${theme}`);
- \ No newline at end of file + diff --git a/main/_includes/support.html b/main/_includes/support.html index b5eb1a1..80e4b2d 100644 --- a/main/_includes/support.html +++ b/main/_includes/support.html @@ -1,6 +1,5 @@ -
-

💸 Support Me

+

💸 Support Me

Most of the projects you know me from, I work on in my free time, but by supporting me, you help out with all of my projects equally. As I'm a student, a bit of extra cash is always helpful for me, and it feels especially good when it comes from something that I enjoy doing a lot.
Please only support me if you have money to spare. Always take care of your own finances first. diff --git a/main/_layouts/default.html b/main/_layouts/default.html index d725d3e..ac05344 100644 --- a/main/_layouts/default.html +++ b/main/_layouts/default.html @@ -30,7 +30,7 @@ - + {% include nav/navbar.html %} diff --git a/main/actaddmanual/index.js b/main/actaddmanual/index.js index a9eb7a5..411abb2 100644 --- a/main/actaddmanual/index.js +++ b/main/actaddmanual/index.js @@ -35,8 +35,7 @@ function populateManual(lang) { let name = lines[0].substring(lines[0].indexOf("=") + 1); let id = lines[0].match(/chapter\.([^\.]*)\.name/)[1]; sidebar.append(`${name}`); - t += ``; - t += `

${name}

`; + t += `

${name}

`; // following lines are content for (let i = 1; i < lines.length; i++) { let text = lines[i].substring(lines[i].indexOf("=") + 1); @@ -57,4 +56,4 @@ function replaceFormatting(text) { }); } return text; -} \ No newline at end of file +} diff --git a/main/actaddmanual/style.css b/main/actaddmanual/style.css index 98c23e9..f2ac23f 100644 --- a/main/actaddmanual/style.css +++ b/main/actaddmanual/style.css @@ -1,3 +1,7 @@ +html { + scroll-padding-top: 40px; +} + body { font-family: Roboto, sans-serif; font-display: swap; @@ -74,13 +78,6 @@ body { padding: 15px; } -.anchor { - display: block; - position: relative; - top: -40px; - visibility: hidden; -} - .sellout { display: flex; align-items: center; @@ -128,4 +125,4 @@ body { padding-left: 15px; padding-right: 15px; } -} \ No newline at end of file +} diff --git a/main/style/style.css b/main/style/style.css index d7c123d..9aaa4be 100644 --- a/main/style/style.css +++ b/main/style/style.css @@ -1,4 +1,5 @@ html { + scroll-padding-top: 136px; position: relative; min-height: 100%; } @@ -12,10 +13,9 @@ body { } sup { - scroll-margin-top: 70px; + scroll-margin-top: -66px; } - .main { margin-top: 20px; margin-bottom: 40px; @@ -114,13 +114,6 @@ sup { display: none; } -.anchor { - display: block; - position: relative; - top: -46px; - visibility: hidden; -} - .blog-button:link, .blog-button:visited { color: black;