Skip to content

Commit

Permalink
πŸ†πŸ›Ά ↝ Content
Browse files Browse the repository at this point in the history
  • Loading branch information
Gizmotronn committed Feb 12, 2024
1 parent a01ff75 commit 469bf35
Show file tree
Hide file tree
Showing 30 changed files with 7,751 additions and 476 deletions.
52 changes: 52 additions & 0 deletions components/Core/Navbar.tsx
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;
34 changes: 34 additions & 0 deletions components/Core/styles/Header.scss
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 removed content/.gitkeep
Empty file.
9 changes: 9 additions & 0 deletions content/Projects/Star Sailors Frontend/SSF-1.md
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
12 changes: 12 additions & 0 deletions content/Star Sailors/Classify/ClassifyFeed.md
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).
13 changes: 13 additions & 0 deletions content/Star Sailors/Classify/DiscussCard.md
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`
7 changes: 7 additions & 0 deletions content/Star Sailors/Classify/PostCard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Classification Feed
tags:
- Star Sailors
- Classification
- Feeds
---
30 changes: 30 additions & 0 deletions content/Star Sailors/Forms/CreatePostForm.md
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`
31 changes: 31 additions & 0 deletions content/Star Sailors/Tables/ContentRoverImages.md
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)
5 changes: 2 additions & 3 deletions content/index.md
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
Loading

0 comments on commit 469bf35

Please sign in to comment.