chore: update intro, email, and switch to Hyvor comments
This commit is contained in:
parent
b70dba44c2
commit
f168cfec0e
5 changed files with 23 additions and 18 deletions
|
|
@ -77,7 +77,7 @@ const { title, description, image = "/astro-micro.jpg" } = Astro.props;
|
|||
animate();
|
||||
updateThemeButtons();
|
||||
addCopyCodeButtons();
|
||||
setGiscusTheme();
|
||||
setHyvorTheme();
|
||||
|
||||
const backToTop = document.getElementById("back-to-top");
|
||||
backToTop?.addEventListener("click", (event) => scrollToTop(event));
|
||||
|
|
@ -199,7 +199,7 @@ const { title, description, image = "/astro-micro.jpg" } = Astro.props;
|
|||
window.getComputedStyle(css).opacity;
|
||||
document.head.removeChild(css);
|
||||
|
||||
setGiscusTheme();
|
||||
setHyvorTheme();
|
||||
}
|
||||
|
||||
function preloadTheme() {
|
||||
|
|
@ -249,15 +249,10 @@ const { title, description, image = "/astro-micro.jpg" } = Astro.props;
|
|||
}
|
||||
}
|
||||
|
||||
const setGiscusTheme = () => {
|
||||
const giscus = document.querySelector(".giscus-frame");
|
||||
|
||||
const setHyvorTheme = () => {
|
||||
const isDark = document.documentElement.classList.contains("dark");
|
||||
|
||||
if (giscus) {
|
||||
const url = new URL(giscus.src);
|
||||
url.searchParams.set("theme", isDark ? "dark" : "light");
|
||||
giscus.src = url.toString();
|
||||
if (window.hyvorTalk) {
|
||||
window.hyvorTalk.changeTheme(isDark ? "dark" : "light");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
13
src/components/Hyvor.astro
Normal file
13
src/components/Hyvor.astro
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
// Hyvor Talk comments component
|
||||
const WEBSITE_ID = 12930; // Your Hyvor Talk website ID
|
||||
---
|
||||
|
||||
<hyvor-talk-comments
|
||||
website-id={WEBSITE_ID}
|
||||
page-id={Astro.url.pathname}
|
||||
colors="light"
|
||||
color-scheme="auto"
|
||||
></hyvor-talk-comments>
|
||||
|
||||
<script is:inline src="https://talk.hyvor.com/embed/embed.js" type="module"></script>
|
||||
|
|
@ -3,7 +3,7 @@ import type { Metadata, Site, Socials } from "@types";
|
|||
export const SITE: Site = {
|
||||
TITLE: "Neeldhara",
|
||||
DESCRIPTION: "Musings on algorithms, games, teaching, and the occasional wandering thought.",
|
||||
EMAIL: "neeldhara.m@iitgn.ac.in",
|
||||
EMAIL: "neeldhara.misra@gmail.com",
|
||||
NUM_POSTS_ON_HOMEPAGE: 5,
|
||||
NUM_PROJECTS_ON_HOMEPAGE: 3,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { readingTime } from "@lib/utils";
|
|||
import BackToPrevious from "@components/BackToPrevious.astro";
|
||||
import PostNavigation from "@components/PostNavigation.astro";
|
||||
import TableOfContents from "@components/TableOfContents.astro";
|
||||
import Giscus from "@components/Giscus.astro";
|
||||
import Hyvor from "@components/Hyvor.astro";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = (await getCollection("blog"))
|
||||
|
|
@ -93,7 +93,7 @@ const { Content, headings } = await render(post);
|
|||
<PostNavigation prevPost={prevPost} nextPost={nextPost} />
|
||||
</div>
|
||||
<div class="mt-24">
|
||||
<Giscus />
|
||||
<Hyvor />
|
||||
</div>
|
||||
</article>
|
||||
</Container>
|
||||
|
|
|
|||
|
|
@ -24,16 +24,13 @@ const projects: CollectionEntry<"projects">[] = (
|
|||
<Container>
|
||||
<aside data-pagefind-ignore>
|
||||
<h1 class="font-semibold text-black dark:text-white">
|
||||
Hello!
|
||||
👋
|
||||
</h1>
|
||||
<div class="space-y-16">
|
||||
<section>
|
||||
<article class="space-y-4">
|
||||
<p>
|
||||
I'm Neeldhara, an Associate Professor in Computer Science & Engineering at <Link href="https://iitgn.ac.in">IIT Gandhinagar</Link>. My research spans algorithm design, computational social choice, and combinatorial games.
|
||||
</p>
|
||||
<p class="animate">
|
||||
This is a space for short notes, stray observations, and things I find interesting. For more about my work, visit <Link href="https://neeldhara.com">neeldhara.com</Link>.
|
||||
I am Neeldhara, a faculty member with the Computer Science and Engineering Department at <Link href="https://iitgn.ac.in">IIT Gandhinagar</Link>. This page is mostly a stream of consciousness braindump so I can reduce spamming my friends individually!
|
||||
</p>
|
||||
</article>
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue