forked from jackyzha0/quartz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a01ff75
commit 469bf35
Showing
30 changed files
with
7,751 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { QuartzComponentConstructor, QuartzComponentProps } from "../../quartz/components/types"; | ||
import style from "./styles/Header.scss"; | ||
|
||
interface HeaderOptions { | ||
menuItems: string[]; // Array of menu items | ||
} | ||
|
||
const defaultOptions: HeaderOptions = { | ||
menuItems: [], | ||
}; | ||
|
||
export default ((opts?: Partial<HeaderOptions>) => { | ||
const options: HeaderOptions = { ...defaultOptions, ...opts }; | ||
|
||
function Header(props: QuartzComponentProps) { | ||
const { cfg } = props; | ||
const { menuItems } = options; | ||
|
||
function toggleMobileMenu() { | ||
const mobileMenu = document.querySelector('.mobile-menu'); | ||
if (mobileMenu) { | ||
mobileMenu.classList.toggle('show'); | ||
} | ||
} | ||
|
||
return ( | ||
<header class="header" style={style}> | ||
<div class="logo">Your Logo</div> | ||
<nav class="menu"> | ||
{menuItems.map((item, index) => ( | ||
<div class="menu-item" key={index}> | ||
{item} | ||
</div> | ||
))} | ||
</nav> | ||
{/* <div class="mobile-menu" onclick={toggleMobileMenu}> | ||
β° | ||
<div class="menu"> | ||
{menuItems.map((item, index) => ( | ||
<div class="menu-item" key={index}> | ||
{item} | ||
</div> | ||
))} | ||
</div> | ||
</div> */} | ||
</header> | ||
); | ||
} | ||
|
||
Header.css = style; | ||
return Header; | ||
}) satisfies QuartzComponentConstructor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* header.scss */ | ||
|
||
.header { | ||
background-color: #333; | ||
color: #fff; | ||
padding: 1rem; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
|
||
.logo { | ||
font-size: 1.5rem; | ||
} | ||
|
||
.menu { | ||
display: flex; | ||
align-items: center; | ||
|
||
.menu-item { | ||
margin-right: 1rem; | ||
cursor: pointer; | ||
} | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.menu { | ||
display: none; | ||
} | ||
|
||
.mobile-menu { | ||
display: block; | ||
} | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Star Sailors Frontend Task 1 | ||
tags: | ||
- SSF | ||
- Ticket | ||
- Star Sailors | ||
--- | ||
|
||
Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: Classification Feed | ||
tags: | ||
- Star Sailors | ||
- Classification | ||
- Feeds | ||
--- | ||
|
||
# What it does | ||
* Fetches all posts, posts relating to a planet (and the relevant planet data) and comments | ||
|
||
Currently archived (from v1). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: Discuss Card Component | ||
tags: | ||
- Star Sailors | ||
- Content Card | ||
- Feeds | ||
--- | ||
|
||
# Overview | ||
Three react components are in this file: | ||
1. `CommentItem` -> currently tied to v1 instance of Star Sailors, where comments are created from the `posts_duplicates` table. Not currently in use functionally in v2 | ||
2. `CardForum` -> displays posts & media from classifications | ||
3. `RoverContentCard` -> More specialised form of `CardForum` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Classification Feed | ||
tags: | ||
- Star Sailors | ||
- Classification | ||
- Feeds | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Post Create Form | ||
tags: | ||
- Star Sailors | ||
- Classification | ||
- Forms | ||
- Posts | ||
--- | ||
|
||
# Overview | ||
Contains three functions: | ||
1. `CreatePostForm()` -> For creating posts based on a planet/anomaly id | ||
2. `RoverContentPostForm()` -> Creating posts based on a rover image | ||
3. `FactionPostForm()` -> Creating posts that will show up in a faction's feed | ||
|
||
# Order of operations | ||
|
||
## CreatePostForm() | ||
1. Takes an id of a planet (and has the potential to take a category id too, however this hasn't yet been implemented) | ||
2. Has the capacity for experience/currency, user avatars, media uploading state, however this functionality has currently been removed as we are re-working the currency experience | ||
3. User inserts their content into a `textarea` component | ||
|
||
Table: `posts_duplicates` (v1), `classifications` (v2) | ||
|
||
## RoverContentPostForm() | ||
1. Takes the metadata of the rover's image (NASA Appears API), a direct link to the image (extracted from the full metadata), and the sector the image came from (tied to `basePlanetsSectors` table) | ||
2. Currently there are two functions for inserting a post into the `contentROVERIMAGES` table, it appears that the `handlePostSubmit` function is the one actively being used | ||
* Takes the author (user id, foreign key), metadata, image link, content (post content), media (currently no capacity for uploading media/files, however the table does support this - just not implemented on client-side), and the sector (which replaces the planet/basePlanet columns) | ||
|
||
Table: `contentROVERIMAGES` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: contentROVERIMAGES table | ||
tags: | ||
- Star Sailors | ||
- Tables | ||
- Classification | ||
--- | ||
|
||
# Definition/Schema | ||
```sql | ||
create table | ||
public."contentROVERIMAGES" ( | ||
id bigint generated by default as identity, | ||
created_at timestamp with time zone not null default now(), | ||
metadata text null, | ||
"imageLink" text null, | ||
planet bigint null, | ||
content text null, | ||
author uuid null, | ||
media json null, | ||
"basePlanet" bigint null, | ||
sector bigint null, | ||
constraint contentROVERIMAGES_pkey primary key (id), | ||
constraint contentROVERIMAGES_author_fkey foreign key (author) references profiles (id), | ||
constraint contentROVERIMAGES_basePlanet_fkey foreign key ("basePlanet") references "basePlanets" (id), | ||
constraint contentROVERIMAGES_planet_fkey foreign key (planet) references "inventoryPLANETS" (id), | ||
constraint contentROVERIMAGES_sector_fkey foreign key (sector) references "basePlanetSectors" (id) | ||
) tablespace pg_default; | ||
``` | ||
|
||
[Link to recent export](https://github.com/signal-k/sytizen) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
--- | ||
title: Welcome to Quartz | ||
title: Talon Notes | ||
--- | ||
|
||
This is a blank Quartz installation. | ||
See the [documentation](https://quartz.jzhao.xyz) for how to get started. | ||
Index |
Oops, something went wrong.