diff --git a/blog/index.html b/blog/index.html
index 99c5376..62b98f7 100644
--- a/blog/index.html
+++ b/blog/index.html
@@ -34,8 +34,8 @@
-So assuming I've now totally caught your interest, how about you check out my games
-and my blog, and if you want to get really invested, you could check out some of the
+
Assuming I've totally caught your interest (for now at least), how about you check out my games,
+my blog, and if you want to get really invested, you should check out some of the
following things:
- GitHub (Teascade)
diff --git a/blogtext/index.html b/blogtext/index.html
index ed0e1cc..31c6aab 100644
--- a/blogtext/index.html
+++ b/blogtext/index.html
@@ -34,8 +34,8 @@
-So assuming I've now totally caught your interest, how about you check out my games
-and my blog, and if you want to get really invested, you could check out some of the
+
Assuming I've totally caught your interest (for now at least), how about you check out my games,
+my blog, and if you want to get really invested, you should check out some of the
following things:
- GitHub (Teascade)
diff --git a/build.py b/build.py
index 367265b..07dcad7 100644
--- a/build.py
+++ b/build.py
@@ -87,16 +87,28 @@ def build_blogposts():
def apply_custom_markdown(markdown):
itch_embed_template = ''
- regex = re.compile("\[itch\$[0-9]*\]")
+ regex = re.compile(r"\[itch\$[0-9]*\]")
while regex.search(markdown) is not None:
search = regex.search(markdown)
- split = regex.split(markdown)
+ split = [markdown[:search.start()], markdown[search.end():]]
curr_id = int(markdown[(search.start() + 6):][:(search.end() - search.start() - 7)])
markdown = split[0] + itch_embed_template.replace("$id$", str(curr_id)) + split[1]
+ link_template = '$text$'
+
+ regex = re.compile(r"\[[ -รถ]*\]\$\([A-z0-9,./]*\)")
+
+ while regex.search(markdown, re.IGNORECASE) is not None:
+ search = regex.search(markdown)
+ split = [markdown[:search.start()], markdown[search.end():]]
+
+ parts = markdown[(search.start() + 1):][:(search.end() - search.start() - 2)].split("]$(")
+
+ markdown = split[0] + link_template.replace("$text$", parts[0]).replace("$link$", parts[1]) + split[1]
+
return markdown
def generate():
@@ -113,7 +125,7 @@ def generate():
template = apply_custom_markdown(template)
- print("Done!n")
+ print("Done!\n")
print("Generating pages..")
with open('index.html', 'w+', encoding="utf-8") as f:
diff --git a/css/main.css b/css/main.css
index 830bf26..e37367a 100644
--- a/css/main.css
+++ b/css/main.css
@@ -130,6 +130,10 @@ body, html {
background-color: #363636; }
.cont .stuffarea iframe.itch-embedded {
width: 100%; }
+ .cont .stuffarea .js-link {
+ text-decoration: underline; }
+ .cont .stuffarea .js-link:hover {
+ cursor: pointer; }
noscript {
color: #fff; }
diff --git a/css/main.css.map b/css/main.css.map
index c2c9e69..80ce8d5 100644
--- a/css/main.css.map
+++ b/css/main.css.map
@@ -1,6 +1,6 @@
{
"version": 3,
-"mappings": "AAIA,UAAW;EACR,gBAAgB,EAHZ,OAAO;EAIX,WAAW,EAAE,qBAAqB;EAClC,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;;AAGb,yBAA0B;EACvB,KAAM;IACH,OAAO,EAAE,gBAAgB;IACzB,KAAK,EAAE,IAAI;IAEX,aAAQ;MACL,MAAM,EAAE,eAAe;MAEvB,iBAAI;QACD,YAAY,EAAE,GAAG;QACjB,KAAK,EAAE,cAAc;QACrB,MAAM,EAAE,eAAe;QACvB,WAAW,EAAE,GAAG;QAChB,cAAc,EAAE,GAAG;IAIzB,gBAAW;MACR,WAAW,EAAE,GAAG;MAChB,aAAa,EAAE,YAAY;MAC3B,KAAK,EAAE,cAAc;MACrB,MAAM,EAAE,eAAe;MAEvB,0BAAU;QACP,OAAO,EAAE,YAAY;QACrB,YAAY,EAAE,gBAAgB;AAM1C,KAAM;EACH,OAAO,EAAE,WAAW;EACpB,cAAc,EAAE,GAAG;EACnB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EAEZ,aAAQ;IACL,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,MAAM;IAClB,OAAO,EAAC,IAAI;IACZ,eAAe,EAAC,MAAM;IACtB,WAAW,EAAC,MAAM;IAClB,gBAAgB,EAAE,OAAe;IAEjC,iBAAI;MACD,KAAK,EAAE,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],
"file": "main.css"
diff --git a/games/index.html b/games/index.html
index 2df784e..32a682f 100644
--- a/games/index.html
+++ b/games/index.html
@@ -34,8 +34,8 @@
-So assuming I've now totally caught your interest, how about you check out my games
-and my blog, and if you want to get really invested, you could check out some of the
+
Assuming I've totally caught your interest (for now at least), how about you check out my games,
+my blog, and if you want to get really invested, you should check out some of the
following things:
- GitHub (Teascade)
diff --git a/index.html b/index.html
index dfed222..db811e3 100644
--- a/index.html
+++ b/index.html
@@ -34,8 +34,8 @@
-So assuming I've now totally caught your interest, how about you check out my games
-and my blog, and if you want to get really invested, you could check out some of the
+
Assuming I've totally caught your interest (for now at least), how about you check out my games,
+my blog, and if you want to get really invested, you should check out some of the
following things:
- GitHub (Teascade)
diff --git a/js/main.js b/js/main.js
index 3090a97..dd1d3c7 100644
--- a/js/main.js
+++ b/js/main.js
@@ -1,12 +1,24 @@
function main(page) {
window.currPage = page;
window.currOpacity = 1;
- document.getElementById("about-link").attributes.removeNamedItem("href");
- document.getElementById("games-link").attributes.removeNamedItem("href");
- document.getElementById("blog-link").attributes.removeNamedItem("href");
+ document.getElementById("about-link").removeAttribute("href");
+ document.getElementById("games-link").removeAttribute("href");
+ document.getElementById("blog-link").removeAttribute("href");
document.getElementById("about-link").onclick = function () { return openPage("about"); };
document.getElementById("games-link").onclick = function () { return openPage("games"); };
document.getElementById("blog-link").onclick = function () { return openPage("blog"); };
+ var links = document.getElementsByClassName("js-link");
+ var _loop_1 = function(i) {
+ var link = links[i];
+ var href = link.getAttribute("href").split("/").filter(function (f) { return f != ""; })[0];
+ link.removeAttribute("href");
+ link.onclick = function () {
+ openPage(href);
+ };
+ };
+ for (var i = 0; i < links.length; i++) {
+ _loop_1(i);
+ }
addBlogposts();
var search = window.location.search;
if (search != "") {
@@ -29,9 +41,12 @@ function openPage(page, new_url, renew_history) {
}
slideOpacity(function () {
var link = document.getElementById(window.currPage + "-link");
+ var new_link = document.getElementById(window.currPage);
if (link) {
link.children[0].className = "";
- link.children[0].className = "active";
+ }
+ if (new_link) {
+ new_link.children[0].className = "active";
}
document.getElementById(window.currPage).className = "hiddenarea";
window.currPage = page;
diff --git a/scss/main.scss b/scss/main.scss
index ab03b01..34ed66d 100644
--- a/scss/main.scss
+++ b/scss/main.scss
@@ -175,6 +175,14 @@ body, html {
iframe.itch-embedded {
width: 100%;
}
+
+ .js-link {
+ text-decoration: underline;
+ }
+
+ .js-link:hover {
+ cursor: pointer;
+ }
}
}
diff --git a/src/about.md b/src/about.md
index 2d3b23e..4c047c3 100644
--- a/src/about.md
+++ b/src/about.md
@@ -11,8 +11,8 @@ And a few things I am not;
- _A normal person_
-So assuming I've now _totally_ caught your interest, how about you check out my games
-and my blog, and if you want to get **really** invested, you could check out some of the
+Assuming I've _totally_ caught your interest (for now at least), how about you check out [my games]$(/games),
+[my blog]$(/blog), and if you want to get **really** invested, you should check out some of the
following things:
- [GitHub (Teascade)](https://github.com/teascade)
diff --git a/ts/main.ts b/ts/main.ts
index b764b29..a960bb6 100644
--- a/ts/main.ts
+++ b/ts/main.ts
@@ -11,14 +11,24 @@ function main(page: string) {
window.currPage = page;
window.currOpacity = 1;
- document.getElementById("about-link").attributes.removeNamedItem("href");
- document.getElementById("games-link").attributes.removeNamedItem("href");
- document.getElementById("blog-link").attributes.removeNamedItem("href");
+ document.getElementById("about-link").removeAttribute("href");
+ document.getElementById("games-link").removeAttribute("href");
+ document.getElementById("blog-link").removeAttribute("href");
document.getElementById("about-link").onclick = () => openPage("about");
document.getElementById("games-link").onclick = () => openPage("games");
document.getElementById("blog-link").onclick = () => openPage("blog");
+ let links = document.getElementsByClassName("js-link");
+ for (let i = 0; i < links.length; i++) {
+ let link: HTMLLinkElement = links[i];
+ let href = link.getAttribute("href").split("/").filter(f => f != "")[0];
+ link.removeAttribute("href");
+ link.onclick = () => {
+ openPage(href);
+ }
+ }
+
addBlogposts();
let search = window.location.search;
@@ -42,9 +52,11 @@ function openPage(page: string, new_url: string = null, renew_history=true) {
slideOpacity(() => {
let link = document.getElementById(window.currPage + "-link");
+ let new_link = document.getElementById(window.currPage);
if (link) {
link.children[0].className = ""
- link.children[0].className = "active"
+ } if (new_link) {
+ new_link.children[0].className = "active"
}
document.getElementById(window.currPage).className = "hiddenarea";