diff --git a/posts/bettercolors/post_frontmatter.toml b/posts/bettercolors/post_frontmatter.toml index 638385b..e3d280d 100644 --- a/posts/bettercolors/post_frontmatter.toml +++ b/posts/bettercolors/post_frontmatter.toml @@ -2,7 +2,8 @@ title = 'got lazy today' file_name = 'bettercolors' description = 'Pathethic excuse of an update' tags = ["Website update"] -posted = '2024. oct. 03.' +posted = "2024. oct. 03." +unix = '1727917200' estimated_reading_time = 5 author = 'IMK' # feel free to swap with your own name order = 1 diff --git a/posts/colorful/post_frontmatter.toml b/posts/colorful/post_frontmatter.toml index 0a46278..0c2d036 100644 --- a/posts/colorful/post_frontmatter.toml +++ b/posts/colorful/post_frontmatter.toml @@ -2,7 +2,8 @@ title = 'Cured your color blindness, no problem' file_name = 'colorful' description = 'FINALLY NO LONGER MONOCHROME' tags = ["website update"] -posted = '2024. oct. 2.' +posted = "2024. oct. 2." +unix = '1727830800' estimated_reading_time = 2 author = 'IMK' # feel free to swap with your own name order = 1 diff --git a/posts/my-first-article/post_frontmatter.toml b/posts/my-first-article/post_frontmatter.toml index 8129483..3c3a4c9 100644 --- a/posts/my-first-article/post_frontmatter.toml +++ b/posts/my-first-article/post_frontmatter.toml @@ -2,7 +2,8 @@ title = 'Welcommeeee :3' file_name = 'my-first-article' description = 'about this blog and stuff' tags = ["Casual"] -posted = '2024. sept. 30.' +posted = "2024 sept. 30." +unix = '1727658000' estimated_reading_time = 1 author = 'IMK' # feel free to swap with your own name order = 1 diff --git a/posts/newstuff/post_frontmatter.toml b/posts/newstuff/post_frontmatter.toml index 53ca3bb..5af2024 100644 --- a/posts/newstuff/post_frontmatter.toml +++ b/posts/newstuff/post_frontmatter.toml @@ -2,7 +2,8 @@ title = 'BACK FROM THE DEAD YEAHH' file_name = 'newstuff' description = 'NO UPDATES FOR 3 DAYS??? UNSATISFACTORY' tags = ["Rant"] -posted = '2024. oct. 08.' +posted = "2024. oct. 8." +unix = '1728349200' estimated_reading_time = 1 author = 'IMK' # feel free to swap with your own name order = 1 diff --git a/posts/search/post.md b/posts/search/post.md new file mode 100644 index 0000000..e185520 --- /dev/null +++ b/posts/search/post.md @@ -0,0 +1,9 @@ +# heyyy + +so I have added a search bar + +and did some minor changes on the home page + +yeah + +bye die yeah i said die yeah i really said that diff --git a/posts/search/post_frontmatter.toml b/posts/search/post_frontmatter.toml new file mode 100644 index 0000000..9361e52 --- /dev/null +++ b/posts/search/post_frontmatter.toml @@ -0,0 +1,10 @@ +title = 'Search and you may find' +file_name = 'update1' +description = 'Searchin' +tags = ["Website update"] +posted = "2024. oct. 09." +unix = '1728503144' +estimated_reading_time = 1 +author = 'IMK' +order = 1 +pinned = false diff --git a/posts/update1/post_frontmatter.toml b/posts/update1/post_frontmatter.toml index 994e267..277b38e 100644 --- a/posts/update1/post_frontmatter.toml +++ b/posts/update1/post_frontmatter.toml @@ -2,7 +2,8 @@ title = 'Website Update: Pins, Tags' file_name = 'update1' description = 'new features' tags = ["Website update"] -posted = '2024. oct. 01.' +posted = "2024. oct. 01." +unix = '1727744400' estimated_reading_time = 1 author = 'IMK' order = 1 diff --git a/posts/wokedot/post_frontmatter.toml b/posts/wokedot/post_frontmatter.toml index e331a3e..7950d3d 100644 --- a/posts/wokedot/post_frontmatter.toml +++ b/posts/wokedot/post_frontmatter.toml @@ -2,7 +2,8 @@ title = 'GODOT GONE WOKE???K' file_name = 'wokedot' description = 'Ranting about the ridiculous godot controversy' tags = ["Rant"] -posted = '2024. oct. 03.' +posted = "2024. oct. 03." +unix = '1727920800' estimated_reading_time = 5 author = 'IMK' # feel free to swap with your own name order = 1 diff --git a/static/css/index.css b/static/css/index.css index fe0406a..9b6a7d3 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -1,3 +1,4 @@ + :root { --bg-color: #24273a; --text-color: #59a685; @@ -92,9 +93,31 @@ div.post li { } h1.htitle{ - text-align: right; + text-align: center; text-size: 6vw; + } +div.title{ + height: 100%; + background-color: var(--border-color); + padding-bottom: 1vw; +} + +#search { + width:96%; + margin: auto; + display:block; + border-radius: 0%; + font-family: "Zilla slab"; + background-color: var(--bg-color); + border: var(--text-color) solid 2px; + color: var(--text-color); + +} + +#search:focus { + outline: none; +}; h2.post-title{ diff --git a/static/scripts/search.js b/static/scripts/search.js new file mode 100644 index 0000000..8aba620 --- /dev/null +++ b/static/scripts/search.js @@ -0,0 +1,19 @@ +function searcher(){ + let bar = document.getElementById("search"); + let filter = bar.value.toUpperCase(); + let posts = Array.from(document.getElementsByClassName("mb-3")); + let a, b, txtValue; + console.log(posts.length); + console.log(posts) + for (i=0; i < posts.length; i++){ + a = posts[i].getElementsByTagName("h2")[0]; + b = posts[i].getElementsByTagName("li")[3]; + if(a.innerText.toUpperCase().indexOf(filter) > -1 || b.innerText.toUpperCase().indexOf(filter) > -1){ + posts[i].style.display = ""; + } + else { + posts[i].style.display = "none"; + } + + } +} diff --git a/templates/base.html b/templates/base.html index b3ef41b..66b6414 100644 --- a/templates/base.html +++ b/templates/base.html @@ -11,6 +11,8 @@ + {% block scripts %} + {% endblock scripts %}
{% block header %}{% endblock header %}
@@ -24,7 +26,5 @@ {% endblock footer %} - - diff --git a/templates/home.html b/templates/home.html index 16391b8..4aa4d8b 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,8 +1,12 @@ {% extends "base.html" %} +{% block scripts %}{% endblock scripts %} {% block title %}ALEPH 1 | IMK'S BLOG{% endblock title %} {% block content %}
-

ℵ₁ | IMK'S BLOG

+
+

ℵ₁ | IMK'S BLOG

+ +

{% for fm in posts %} @@ -11,7 +15,7 @@

{{fm.title}}