types instead of interfaces
This commit is contained in:
parent
5457330b62
commit
95ec946780
9 changed files with 22 additions and 18 deletions
|
@ -16,10 +16,10 @@ const FAKE_IT_TIL_YOU_MAKE_IT: string[] = [
|
||||||
'Cartman', // with knobs!
|
'Cartman', // with knobs!
|
||||||
]
|
]
|
||||||
|
|
||||||
interface IAppProps {
|
type IAppProps = {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IAppState {
|
type IAppState = {
|
||||||
currentPage: string;
|
currentPage: string;
|
||||||
currentPageIndex: number;
|
currentPageIndex: number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,10 +14,10 @@ const FAKE_IT_TIL_YOU_MAKE_IT: string[] = [
|
||||||
'blog/000000000-swim.html',
|
'blog/000000000-swim.html',
|
||||||
]
|
]
|
||||||
|
|
||||||
interface IBlogProps {
|
type IBlogProps = {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IBlogState {
|
type IBlogState = {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Blog extends Component<IBlogProps, IBlogState> {
|
class Blog extends Component<IBlogProps, IBlogState> {
|
||||||
|
|
|
@ -2,10 +2,10 @@ import { Component } from 'react'
|
||||||
import ReactMarkdown from 'react-markdown'
|
import ReactMarkdown from 'react-markdown'
|
||||||
import rehypeRaw from 'rehype-raw'
|
import rehypeRaw from 'rehype-raw'
|
||||||
|
|
||||||
interface IBlogPostProps {
|
type IBlogPostProps = {
|
||||||
postURL: string;
|
postURL: string;
|
||||||
}
|
}
|
||||||
interface IBlogPostState {
|
type IBlogPostState = {
|
||||||
postHTML: string;
|
postHTML: string;
|
||||||
}
|
}
|
||||||
class BlogPost extends Component<IBlogPostProps, IBlogPostState> {
|
class BlogPost extends Component<IBlogPostProps, IBlogPostState> {
|
||||||
|
@ -19,7 +19,7 @@ class BlogPost extends Component<IBlogPostProps, IBlogPostState> {
|
||||||
return fetch(post)
|
return fetch(post)
|
||||||
.then((res) => res.text())
|
.then((res) => res.text())
|
||||||
}
|
}
|
||||||
componentDidMount() {
|
async componentDidMount() {
|
||||||
this.getPost(this.props.postURL)
|
this.getPost(this.props.postURL)
|
||||||
.then((text) => this.setState({ postHTML: text }))
|
.then((text) => this.setState({ postHTML: text }))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Component } from 'react'
|
import { Component } from 'react'
|
||||||
|
|
||||||
interface ICartmanProps {
|
type ICartmanProps = {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ICartmanState {
|
type ICartmanState = {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Cartman extends Component<ICartmanProps, ICartmanState> {
|
class Cartman extends Component<ICartmanProps, ICartmanState> {
|
||||||
|
|
|
@ -2,10 +2,10 @@ import { Component } from 'react'
|
||||||
import ReactMarkdown from 'react-markdown'
|
import ReactMarkdown from 'react-markdown'
|
||||||
import rehypeRaw from 'rehype-raw'
|
import rehypeRaw from 'rehype-raw'
|
||||||
|
|
||||||
interface IGamesProps {
|
type IGamesProps = {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IGamesState {
|
type IGamesState = {
|
||||||
html: string;
|
html: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ class Games extends Component<IGamesProps, IGamesState> {
|
||||||
'html': ''
|
'html': ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
componentDidMount() {
|
async componentDidMount() {
|
||||||
return fetch('games/index.html')
|
return fetch('games/index.html')
|
||||||
.then((res) => res.text())
|
.then((res) => res.text())
|
||||||
.then((text) => this.setState({ html: text }))
|
.then((text) => this.setState({ html: text }))
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { Component } from 'react'
|
import { Component } from 'react'
|
||||||
|
|
||||||
interface IHeaderProps {
|
type IHeaderProps = {
|
||||||
pages: string[];
|
pages: string[];
|
||||||
currentPage: string;
|
currentPage: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IHeaderState {
|
type IHeaderState = {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Header extends Component<IHeaderProps, IHeaderState> {
|
class Header extends Component<IHeaderProps, IHeaderState> {
|
||||||
|
|
|
@ -16,10 +16,10 @@ const FAKE_IT_TIL_YOU_MAKE_IT: string[] = [
|
||||||
'blog/000000000-swim.html',
|
'blog/000000000-swim.html',
|
||||||
]
|
]
|
||||||
|
|
||||||
interface IHomeProps {
|
type IHomeProps = {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IHomeState {
|
type IHomeState = {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Home extends Component<IHomeProps, IHomeState> {
|
class Home extends Component<IHomeProps, IHomeState> {
|
||||||
|
|
|
@ -11,10 +11,10 @@ const FAKE_IT_TIL_YOU_MAKE_IT: string[] = [
|
||||||
'blog/20220529-housing.html',
|
'blog/20220529-housing.html',
|
||||||
]
|
]
|
||||||
|
|
||||||
interface IProjectsProps {
|
type IProjectsProps = {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IProjectsState {
|
type IProjectsState = {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Projects extends Component<IProjectsProps, IProjectsState> {
|
class Projects extends Component<IProjectsProps, IProjectsState> {
|
||||||
|
|
|
@ -6,9 +6,13 @@ indexed by the backend then displayed on the frontend with React.
|
||||||
Idea is to just throw files at it and it'll just be handled, cause I'm lazy.
|
Idea is to just throw files at it and it'll just be handled, cause I'm lazy.
|
||||||
|
|
||||||
Home - Interleave latest from other pages, maybe add top/hot lists or something
|
Home - Interleave latest from other pages, maybe add top/hot lists or something
|
||||||
|
|
||||||
Blog - Blog, display latest posts, summarize these until clicked?
|
Blog - Blog, display latest posts, summarize these until clicked?
|
||||||
|
|
||||||
Projects - Same as blog but may have pins at the top with cards
|
Projects - Same as blog but may have pins at the top with cards
|
||||||
|
|
||||||
Games - Cards with thumbnails and summaries, pins/popular
|
Games - Cards with thumbnails and summaries, pins/popular
|
||||||
|
|
||||||
Cartman, Enigma - Own pages? Pinned projects?
|
Cartman, Enigma - Own pages? Pinned projects?
|
||||||
|
|
||||||
- Animations to make it purdy
|
- Animations to make it purdy
|
||||||
|
|
Loading…
Add table
Reference in a new issue