diff --git a/index.html b/index.html index 92004ea..3c4a172 100644 --- a/index.html +++ b/index.html @@ -149,7 +149,7 @@

Blog

- Occasionally I enjoy writing stuff. So here's some of the stuff I've written. Just click on any of the headers to expand the post. Alternatively, you can subscribe to this blog using RSS, Atom or JSON. + Occasionally I enjoy writing stuff. So here's some of the stuff I've written. Just click on any of the headers to open the post. Alternatively, you can subscribe to this blog using RSS, Atom or JSON.

diff --git a/node/blog.js b/node/blog.js index 91ccbca..315b609 100644 --- a/node/blog.js +++ b/node/blog.js @@ -41,7 +41,7 @@ module.exports = function () { document.querySelector('meta[property="og:description"]').setAttribute("content", post["summary"]); var nav = ""; - nav += 'Back to Main Page'; + nav += 'Back to Main Page'; if (i > 0) nav += 'Previous Post'; if (i < json.length - 1) diff --git a/scripts/blog.js b/scripts/blog.js index ff65722..7c2316e 100644 --- a/scripts/blog.js +++ b/scripts/blog.js @@ -18,60 +18,11 @@ $.ajax({ p += ''; p += '
'; p += '
'; - p += '

' + obj["name"] + '

'; - p += ''; - p += '
' + obj["summary"] + '
'; - p += '
'; + p += '

' + obj["name"] + '

'; + p += '
' + obj["summary"] + '
'; p += '' + obj["date"] + ""; - var discussLink = obj["discuss"]; - if (discussLink) - p += '' p += '
'; list.append(p); - - $("#blog-button-" + id).on('click', function () { - var post = $("#blog-post-" + id); - if (post.html() !== "") { - post.html(""); - var discuss = $("#blog-discuss-" + id); - if (discuss.length) - discuss.html(""); - $("#blog-summary-" + id).show(); - $("#reading-mode-" + id).html(""); - history.pushState(null, null, "#blog"); - } else { - openBlogPost(id); - history.pushState(null, null, "#blog-" + id); - } - }); - } - - if (window.location.hash.startsWith("#blog-")) { - var anchor = $(window.location.hash); - if (anchor.length) { - openBlogPost(window.location.hash.substring(6), function () { - $('html, body').animate({ - scrollTop: anchor.offset().top - }, 0) - }); - } } } -}); - -function openBlogPost(id, onDone) { - $.get("blog/" + id + ".md", function (markdown) { - let html = converter.makeHtml(markdown); - $("#blog-post-" + id).html(html); - - var discuss = $("#blog-discuss-" + id); - if (discuss.length) - discuss.html("Discuss this post"); - $("#blog-summary-" + id).hide(); - $("#reading-mode-" + id).html("Reading Mode"); - - PR.prettyPrint(); - if (onDone) - onDone(); - }); -} \ No newline at end of file +}); \ No newline at end of file diff --git a/style/dark.css b/style/dark.css index 70ce8f3..1ae907a 100644 --- a/style/dark.css +++ b/style/dark.css @@ -29,4 +29,14 @@ body { .modal-content { background-color: #404142; +} + +.blog-button:link, +.blog-button:visited { + color: #d8d8d8 !important; +} + +.blog-button:hover, +.blog-button:active { + color: white !important; } \ No newline at end of file diff --git a/style/style.css b/style/style.css index d6e2f1a..98f752b 100644 --- a/style/style.css +++ b/style/style.css @@ -86,8 +86,16 @@ body { visibility: hidden; } -.blog-button { - cursor: pointer; +.blog-button:link, +.blog-button:visited { + color: rgb(73, 73, 73); + text-decoration: none; +} + +.blog-button:hover, +.blog-button:active { + color: black; + text-decoration: none; } .blog-entry {