Dev (#33)
* fixed css fuckup
Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com>
* tweaked css
Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com>
* tweaked css
Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com>
* updated exec names
Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com>
* fixed blogpost sort (#30)
Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com>
* Hotfix/done goofery (#32)
* fixed blogpost sort
Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com>
* forgor to change the path of my pfp lol
Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com>
---------
Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com>
* Revert "Bugfix/blogpost sort (#28)" (#29)
This reverts commit 58f452c9bb
.
---------
Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com>
main
parent
6388bbd180
commit
1376a56766
|
@ -3,7 +3,6 @@ import Center from "../components/base/Center.astro";
|
|||
import Icon from "../components/base/Icon.astro";
|
||||
import Boilerplate from "../layouts/Boilerplate.astro";
|
||||
|
||||
|
||||
const rawPosts = await Astro.glob("./posts/*.mdx");
|
||||
const search = Astro.url.searchParams.get("q") || "";
|
||||
|
||||
|
@ -13,15 +12,14 @@ const posts = rawPosts
|
|||
return {
|
||||
url: post.url ?? "/",
|
||||
data: post.frontmatter,
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
const filteredPosts = posts.filter((post) => {
|
||||
return post.data.title.toLowerCase()
|
||||
.includes(search.toLowerCase())
|
||||
||
|
||||
post.data.description.toLowerCase()
|
||||
.includes(search.toLowerCase());
|
||||
return (
|
||||
post.data.title.toLowerCase().includes(search.toLowerCase()) ||
|
||||
post.data.description.toLowerCase().includes(search.toLowerCase())
|
||||
);
|
||||
});
|
||||
|
||||
// sort posts in decscending order of date
|
||||
|
@ -29,10 +27,6 @@ filteredPosts.sort((a, b) => {
|
|||
return a.data.date < b.data.date ? 1 : -1;
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const keywords = [
|
||||
"hull",
|
||||
"computer",
|
||||
|
@ -62,10 +56,15 @@ const keywords = [
|
|||
<div id="blog_main">
|
||||
<div class="blog_search">
|
||||
<Center id="search">
|
||||
<form action="/blog" method="get">
|
||||
<input type="text" name="q" placeholder={search || "Search..."} value="" />
|
||||
<form action="/blog" method="get">
|
||||
<input
|
||||
type="text"
|
||||
name="q"
|
||||
placeholder={search || "Search..."}
|
||||
value=""
|
||||
/>
|
||||
<button type="submit">
|
||||
<Icon icon={{code: "f002", bold: true}}/>
|
||||
<Icon icon={{ code: "f002", bold: true }} />
|
||||
</button>
|
||||
</form>
|
||||
</Center>
|
||||
|
@ -73,21 +72,28 @@ const keywords = [
|
|||
<div class="blog_posts">
|
||||
{
|
||||
filteredPosts.map((post) => (
|
||||
<div class="blog_post" id={ post.url.split("/").pop() }>
|
||||
<div class="blog_post" id={post.url.split("/").pop()}>
|
||||
<h2>
|
||||
<span class="blog_post_hash">#</span>
|
||||
<a href={post.url}>
|
||||
<span class="blog_post_title">{post.data.title}</span>
|
||||
{ /* <span class="blog_post_link"><Icon icon={{code: "f0c1", bold: true}}/></span> */ }
|
||||
{/* <span class="blog_post_link"><Icon icon={{code: "f0c1", bold: true}}/></span> */}
|
||||
</a>
|
||||
</h2>
|
||||
<p>
|
||||
{post.data.description}
|
||||
</p>
|
||||
<h3><em>
|
||||
<span class="blog_post_author"> By: <a href={post.data.link}> @{post.data.author.replace(" ", "_").toLowerCase()}</a> </span>
|
||||
<span class="blog_post_date"> ({post.data.date}) </span>
|
||||
</em></h3>
|
||||
<p>{post.data.description}</p>
|
||||
<h3>
|
||||
<em>
|
||||
<span class="blog_post_author">
|
||||
{" "}
|
||||
By:{" "}
|
||||
<a href={post.data.link}>
|
||||
{" "}
|
||||
@{post.data.author.replace(" ", "_").toLowerCase()}
|
||||
</a>{" "}
|
||||
</span>
|
||||
<span class="blog_post_date"> ({post.data.date}) </span>
|
||||
</em>
|
||||
</h3>
|
||||
</div>
|
||||
))
|
||||
}
|
||||
|
@ -97,13 +103,9 @@ const keywords = [
|
|||
|
||||
<script>
|
||||
document.addEventListener("keydown", (e) => {
|
||||
if (
|
||||
e.key === "k" && (e.metaKey || e.ctrlKey) ||
|
||||
e.key === "/"
|
||||
) {
|
||||
if ((e.key === "k" && (e.metaKey || e.ctrlKey)) || e.key === "/") {
|
||||
e.preventDefault();
|
||||
document.querySelector("input")?.focus();
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -44,7 +44,7 @@ const keywords = [
|
|||
</div>
|
||||
|
||||
<div class="execs">
|
||||
<h2>Meet the Team (2024-2025): </h2>
|
||||
<h2>Meet the Team (2024-2025):</h2>
|
||||
|
||||
<Exec
|
||||
title="President"
|
||||
|
@ -153,11 +153,11 @@ const keywords = [
|
|||
help, message me on discord :)
|
||||
</Exec>
|
||||
|
||||
<Exec
|
||||
title="Secretary"
|
||||
name="Will"
|
||||
pronouns="he"
|
||||
gh=""
|
||||
<Exec
|
||||
title="Secretary"
|
||||
name="Will"
|
||||
pronouns="he"
|
||||
gh=""
|
||||
img="2023/will.png"
|
||||
>
|
||||
Hey! I'm Will and I am a second year computer science student on the
|
||||
|
|
Loading…
Reference in New Issue