Skip to content

Commit c44bf82

Browse files
committed
Finish writing pages for projects
1 parent e9268fd commit c44bf82

File tree

20 files changed

+176
-31
lines changed

20 files changed

+176
-31
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"eslint-config-prettier": "^9.1.0",
2727
"eslint-plugin-svelte": "^2.46.0",
2828
"globals": "^15.12.0",
29+
"highlight.js": "^11.10.0",
2930
"lucide-svelte": "^0.456.0",
3031
"mode-watcher": "^0.4.1",
3132
"prettier": "^3.3.3",
@@ -36,6 +37,7 @@
3637
"stylelint-config-tailwindcss": "^0.0.7",
3738
"svelte": "^5.1.12",
3839
"svelte-check": "^4.0.6",
40+
"svelte-highlight": "^7.7.0",
3941
"svelte-sonner": "^0.3.28",
4042
"tailwind-merge": "^2.5.4",
4143
"tailwind-variants": "^0.2.1",

pnpm-lock.yaml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/components/home/ContactMe.svelte

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,21 @@
55
<div class="space-y-2">
66
<p class="text-2xl font-bold text-foreground">Contact</p>
77
<p>
8-
You can contact me via <a class="text-blue-500" href="mailto:discussercodes@gmail.com">mail</a>,
9-
or on Discord:
8+
You can contact me via <a
9+
target="_blank"
10+
class="text-blue-500"
11+
href="mailto:discussercodes@gmail.com">mail</a
12+
>, or on Discord:
1013
</p>
1114
<div class="grid w-1/2 auto-cols-min grid-cols-2 gap-y-2">
1215
<span>Email</span>
13-
<a href="mailto:discussercodes@gmail.com" class="underline hover:text-foreground"
14-
>discussercodes@gmail.com</a
16+
<a
17+
target="_blank"
18+
href="mailto:discussercodes@gmail.com"
19+
class="underline hover:text-foreground">discussercodes@gmail.com</a
1520
>
1621
<span>GitHub</span>
17-
<a href="https://github.com/Discusser" class="underline">Discusser</a>
22+
<a target="_blank" href="https://github.com/Discusser" class="underline">Discusser</a>
1823
<span>Discord</span>
1924
<div class="flex justify-start">
2025
<button on:click={() => copyToClipboard('Discusser')} class="underline decoration-dotted">

src/lib/components/projects/Project.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{project.label}
2525
</p>
2626
{#if project.hasGithub}
27-
<Button href={getGithubURLForProject(project)} variant="outline" size="icon">
27+
<Button target="_blank" href={getGithubURLForProject(project)} variant="outline" size="icon">
2828
<IconBrandGithub />
2929
</Button>
3030
{/if}

src/lib/components/shared/Footer.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<div class="flex w-1/2">
99
<p class="flex-grow text-muted-foreground/50">Web page made by Discusser with Svelte</p>
1010
<div class="flex space-x-4">
11-
<a href="mailto:discussercodes@gmail.com">
11+
<a target="_blank" href="mailto:discussercodes@gmail.com">
1212
<IconMail />
1313
</a>
14-
<a href="https://github.com/Discusser">
14+
<a target="_blank" href="https://github.com/Discusser">
1515
<IconBrandGithub />
1616
</a>
1717
</div>

src/lib/components/shared/Video.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
{@render children?.()}
3232
<source {src} />
3333
<p>
34-
Your browser can't display videos! Download the video <a href={src}>here</a>
34+
Your browser can't display videos! Download the video <a target="_blank" href={src}>here</a>
3535
</p>
3636
</video>
3737
<p class="text-sm">{alt}</p>

src/lib/constants/projects.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ export const columns: ColumnDef<Project>[] = [
5151
const snippet = createRawSnippet<[string | null]>((getUrl) => {
5252
const url = getUrl();
5353
return {
54-
render: () => (url ? `<a class="text-blue-500" href=${url}>${url}</a>` : '<span></span>')
54+
render: () =>
55+
url
56+
? `<a class="text-blue-500" target="_blank" href=${url}>${url}</a>`
57+
: '<span></span>'
5558
};
5659
});
5760
return renderSnippet(snippet, getGithubURLForProject(ctx.row.original));
@@ -135,6 +138,7 @@ export const MINESWEEPER = addProject({
135138
category: Category.Web,
136139
name: 'Minesweeper',
137140
hasGithub: true,
141+
hasPage: true,
138142
notes: 'A minesweeper clone written in HTML and JS'
139143
});
140144
export const IMG_TO_ASCII = addProject({

src/routes/blog/+page.svelte

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<script lang="ts"></script>
2+
3+
<div class="flex flex-col space-y-4">
4+
<p class="text-2xl font-bold text-foreground">Blog</p>
5+
<p>
6+
For now, this page is empty. I will add articles once I have something interesting to write
7+
about.
8+
</p>
9+
</div>

src/routes/projects/+page.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
using Dart along with Flutter, which was for my
1414
<a
1515
class="text-blue-500"
16+
target="_blank"
1617
href="https://pll.harvard.edu/course/cs50-introduction-computer-science">CS50</a
1718
>
1819
final project. To top it all off, I of course know JavaScript (along with HTML and CSS even if they
1920
aren't programming languages). I've used Vue in the past, but now I'm making this website with Svelte
2021
as I prefer it over Vue. My most worthy projects are available on my
21-
<a class="text-blue-500" href="https://github.com/Discusser">GitHub</a> profile
22+
<a class="text-blue-500" target="_blank" href="https://github.com/Discusser">GitHub</a> profile
2223
</p>
2324
<p>You can find a non-exhaustive list of my projects below:</p>
2425
<ProjectsTable />

src/routes/projects/cpp/markovsentencegenerator/+page.svelte

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
specific event depends solely on the state attained at the previous event. For a more complete
1010
description of these, feel free to consult the <a
1111
class="text-blue-500"
12+
target="_blank"
1213
href="https://en.wikipedia.org/wiki/Markov_chain">Wikipedia article</a
1314
>
1415
on markov chains. Concretely, markov chains are used for autocompletion when typing. You can see
@@ -21,13 +22,13 @@
2122
in the input file, the probability of a certain word appearing right after it. The
2223
<code>big.json</code>
2324
model in the GitHub repository is created from a few books, taken from
24-
<a class="text-blue-500" href="https://www.gutenberg.org/">Project Gutenberg</a>. In this model,
25-
the word "zinc" has a 50% chance to be followed by "and", 25% chance to be followed by
26-
"Immersion" and a 25% chance to be followed by "A". This is essentially what a markov chain is.
27-
After parsing the JSON file and storing the information into a data structure that is optimized
28-
for our needs, the program will spout whole paragraphs on autocomplete from one starting word,
29-
even if they tend to be nonsensical at times, which is normal, since the words proposed by the
30-
model are just suggestions of the most common words.
25+
<a target="_blank" class="text-blue-500" href="https://www.gutenberg.org/">Project Gutenberg</a
26+
>. In this model, the word "zinc" has a 50% chance to be followed by "and", 25% chance to be
27+
followed by "Immersion" and a 25% chance to be followed by "A". This is essentially what a
28+
markov chain is. After parsing the JSON file and storing the information into a data structure
29+
that is optimized for our needs, the program will spout whole paragraphs on autocomplete from
30+
one starting word, even if they tend to be nonsensical at times, which is normal, since the
31+
words proposed by the model are just suggestions of the most common words.
3132
</p>
3233
<p>Example prompt using a model based on the Frankenstein book:</p>
3334
<code>

0 commit comments

Comments
 (0)