Skip to content

Commit c9a3324

Browse files
committed
Board positions
1 parent 5cdc684 commit c9a3324

File tree

6 files changed

+94
-17
lines changed

6 files changed

+94
-17
lines changed

.replit

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
modules = ["nodejs-20", "web"]
2+
run = "npm run dev"
3+
4+
[nix]
5+
channel = "stable-24_05"
6+
7+
[deployment]
8+
run = ["sh", "-c", "npm run dev"]
9+
10+
[[ports]]
11+
localPort = 5173
12+
externalPort = 8000
13+
exposeLocalhost = true

src/App.svelte

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import { hash } from "./stores";
55
import NotFound from "./lib/NotFound.svelte";
66
import Home from "./lib/Home.svelte";
7+
import Board from "./lib/Board.svelte";
78
89
onMount(() => {
910
console.log("Page mounted!")
@@ -24,7 +25,9 @@
2425
<Header />
2526

2627
{#if $hash == ""}
27-
<Home />
28+
<Home />
29+
{:else if $hash == "#board"}
30+
<Board />
2831
{:else}
29-
<NotFound />
32+
<NotFound />
3033
{/if}

src/lib/Board.svelte

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script lang="ts">
2+
import BoardCard from "./BoardCard.svelte";
3+
4+
5+
</script>
6+
7+
<div>
8+
<BoardCard
9+
name="John Doe"
10+
grade=9
11+
desc="lorem ipsum dolor amit something idk the rest"
12+
/>
13+
14+
</div>

src/lib/BoardCard.svelte

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<script lang="ts">
2+
export let name: string;
3+
export let grade: number;
4+
export let desc: string;
5+
</script>
6+
7+
<div class="card">
8+
<div class="img-container">
9+
<img height=200 class="img">
10+
<div class="grade">{grade}</div>
11+
</div>
12+
<div class="heading">{name}</div>
13+
<div>{desc}</div>
14+
</div>
15+
16+
<style>
17+
.card {
18+
display: flex;
19+
flex-direction: column;
20+
border: solid white 2px;
21+
border-radius: 10px;
22+
width: 220px;
23+
height: 300px;
24+
padding: 10px;
25+
margin: 10px
26+
}
27+
28+
.heading {
29+
width: max-content;
30+
display: inline;
31+
font-weight: bold;
32+
font-size: 1.5em;
33+
}
34+
35+
.img-container {
36+
position: relative;
37+
border: b
38+
}
39+
40+
.img {
41+
background: white;
42+
}
43+
44+
.grade {
45+
background-color: green;
46+
width: 40px;
47+
height: 35px;
48+
display: inline-flex;
49+
align-items: center;
50+
justify-content: center;
51+
border-radius: 5px;
52+
position: absolute;
53+
right: 10px;
54+
bottom: 10px;
55+
}
56+
57+
</style>

src/lib/Header.svelte

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<menu>
22
<a href="./#">Home</a>
3-
<a href="./#about-us">About Us</a>
4-
<a href="./#resources">Resources</a>
5-
<a href="./#contact-us">Contact us!</a>
3+
<a href="./#board">Board</a>
64
</menu>
75

86
<style>
@@ -17,9 +15,8 @@
1715
a {
1816
color: inherit;
1917
text-decoration: none;
20-
width: max-content;
21-
padding: 10px;
22-
width: 25%;
18+
/* width: max-content;*/
19+
padding: 10px;
2320
2421
display: grid;
2522
justify-items: center;

src/lib/Home.svelte

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,8 @@
44
</script>
55

66
<main>
7-
<div class="overlay-container">
8-
<div class="img-container">
9-
<img src={scifi_back} alt="Sci-fi background." width={1000}/>
10-
</div>
11-
<div class="overlay">
12-
For the
13-
<div class="fancy">Sci-fi</div>
14-
authors.
15-
</div>
7+
<div>
8+
169
</div>
1710

1811
</main>

0 commit comments

Comments
 (0)