diff --git a/index.html b/index.html index 6525419..0a12868 100644 --- a/index.html +++ b/index.html @@ -4,13 +4,13 @@ - + - + + - DEG Mods - Liberating Game Mods diff --git a/src/components/ProfileSection.tsx b/src/components/ProfileSection.tsx index 96e055a..4f5c3cb 100644 --- a/src/components/ProfileSection.tsx +++ b/src/components/ProfileSection.tsx @@ -20,7 +20,7 @@ export const ProfileSection = () => { className='IBMSMSMSSS_Author_Top_PP' style={{ background: - "url('assets/img/media-cache%20(4).png') center / cover no-repeat" + "url('/assets/img/media-cache%20(4).png') center / cover no-repeat" }} > @@ -219,6 +219,6 @@ const posts: Post[] = [ name: 'Freakoverse', link: `feed-note.html`, content: `This is good.`, - imageUrl: 'assets/img/media-cache%20(1).jpg' + imageUrl: '/assets/img/media-cache%20(1).jpg' } ] diff --git a/src/layout/header.tsx b/src/layout/header.tsx index 759ec41..a7fd1f5 100644 --- a/src/layout/header.tsx +++ b/src/layout/header.tsx @@ -131,7 +131,7 @@ export const Header = () => { > Login diff --git a/src/pages/about.tsx b/src/pages/about.tsx index 854c933..d85d3d9 100644 --- a/src/pages/about.tsx +++ b/src/pages/about.tsx @@ -216,7 +216,7 @@ export const AboutPage = () => { diff --git a/src/pages/innerMod.tsx b/src/pages/innerMod.tsx index 48ced6f..4b04862 100644 --- a/src/pages/innerMod.tsx +++ b/src/pages/innerMod.tsx @@ -55,18 +55,8 @@ export const InnerModPage = () => { } }) - const postBodyRef = useRef(null) - const viewFullPostBtnRef = useRef(null) const oldDownloadListRef = useRef(null) - const viewFullPost = () => { - if (postBodyRef.current && viewFullPostBtnRef.current) { - postBodyRef.current.style.maxHeight = 'unset' - postBodyRef.current.style.padding = 'unset' - viewFullPostBtnRef.current.style.display = 'none' - } - } - const handleViewOldLinks = () => { if (oldDownloadListRef.current) { // Toggle styles @@ -93,339 +83,20 @@ export const InnerModPage = () => {
- -
-
-
-
-

- {modData.title} -

-
-
-
-
-

View

-
-
-
- {modData.screenshotsUrls.map((url, index) => ( - {`ScreenShot-${index}`} - ))} -
-
- {modData.tags.map((tag, index) => ( - - {tag} - - ))} -
-
-
-
-
- -
-
- - - -
-

420

-
-
-
-
- - - -
-

69k

-
-
-
-
-
-
- - - -
-

4.2k

-
-
-
-
-
-
- - - -
-

69

-
-
-
-
-
-
-
-
-
- - - -

- {formatDate( - (modData.published_at !== -1 - ? modData.published_at - : modData.edited_at) * 1000, - 'dd/m/yyyy' - )} -

-
-
- - - -

- {formatDate(modData.edited_at * 1000, 'dd/m/yyyy')} -

-
- - - - -

- {modData.site} -

-
-
-
+ + + +
@@ -477,180 +148,7 @@ export const InnerModPage = () => {
-
-

Comments

-
-
-
- -
- -
-
- - -
-
-
- -
-

- Yo this article was insane to read! -

-
-
-
-
- - - -

52

-
-
-
-
-
- - - -

4

-
-
-
-
-
- - - -

6

-
-
-
-
-
- - - -

500K

-
-
-
-
-
- - - -

12

-

- Replies -

-
-
-

- Reply -

-
-
-
-
-
-
-
+
@@ -661,6 +159,371 @@ export const InnerModPage = () => { ) } +type GameProps = { + game: string +} + +const Game = ({ game }: GameProps) => { + return ( + + ) +} + +type BodyProps = { + featuredImageUrl: string + title: string + body: string + screenshotsUrls: string[] + tags: string[] +} + +const Body = ({ + featuredImageUrl, + title, + body, + screenshotsUrls, + tags +}: BodyProps) => { + const postBodyRef = useRef(null) + const viewFullPostBtnRef = useRef(null) + + const viewFullPost = () => { + if (postBodyRef.current && viewFullPostBtnRef.current) { + postBodyRef.current.style.maxHeight = 'unset' + postBodyRef.current.style.padding = 'unset' + viewFullPostBtnRef.current.style.display = 'none' + } + } + + return ( +
+
+
+
+

{title}

+
+
+
+
+

View

+
+
+
+ {screenshotsUrls.map((url, index) => ( + {`ScreenShot-${index}`} + ))} +
+
+ {tags.map((tag, index) => ( + + {tag} + + ))} +
+
+
+ ) +} + +const Interactions = () => { + return ( +
+
+ +
+
+ + + +
+

420

+
+
+
+
+ + + +
+

69k

+
+
+
+
+
+
+ + + +
+

4.2k

+
+
+
+
+
+
+ + + +
+

69

+
+
+
+
+
+
+ ) +} + +type PublishDetailsProps = { + published_at: number + edited_at: number + site: string +} + +const PublishDetails = ({ + published_at, + edited_at, + site +}: PublishDetailsProps) => { + return ( +
+
+
+ + + +

+ {formatDate( + (published_at !== -1 ? published_at : edited_at) * 1000, + 'dd/m/yyyy' + )} +

+
+
+ + + +

+ {formatDate(edited_at * 1000, 'dd/m/yyyy')} +

+
+ + + + +

{site}

+
+
+
+ ) +} + type DownloadProps = { url: string } @@ -843,3 +706,163 @@ const Download = ({ url }: DownloadProps) => (
) + +const Comments = () => { + return ( +
+

Comments

+
+
+
+ +
+ +
+
+ + +
+
+
+ +
+

+ Yo this article was insane to read! +

+
+
+
+
+ + + +

52

+
+
+
+
+
+ + + +

4

+
+
+
+
+
+ + + +

6

+
+
+
+
+
+ + + +

500K

+
+
+
+
+
+ + + +

12

+

Replies

+
+
+

Reply

+
+
+
+
+
+
+
+ ) +} diff --git a/src/pages/settings.tsx b/src/pages/settings.tsx index 4cfbf8a..4b43de7 100644 --- a/src/pages/settings.tsx +++ b/src/pages/settings.tsx @@ -168,7 +168,7 @@ const ProfileSettings = () => {