changed prettier config

This commit is contained in:
Kim, Jimin 2022-01-11 17:25:15 +09:00
parent 5a3e0d2623
commit 1758571f4a
37 changed files with 236 additions and 311 deletions

View file

@ -1,59 +1,59 @@
name: Deploy to Firebase Hosting on merge name: Deploy to Firebase Hosting on merge
on: on:
push: push:
branches: branches:
- master - master
jobs: jobs:
build: build:
if: ${{ github.repository_owner == 'developomp' }} if: ${{ github.repository_owner == 'developomp' }}
name: Build name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@master uses: actions/checkout@master
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: 16 node-version: 16
cache: yarn cache: yarn
cache-dependency-path: source/yarn.lock cache-dependency-path: source/yarn.lock
- name: Install dependencies and Build - name: Install dependencies and Build
run: cd source && yarn install && yarn build run: cd source && yarn install && yarn build
- name: Archive Production Artifact - name: Archive Production Artifact
uses: actions/upload-artifact@master uses: actions/upload-artifact@master
with: with:
name: build name: build
path: source/build path: source/build
deploy: deploy:
if: ${{ github.repository_owner == 'developomp' }} if: ${{ github.repository_owner == 'developomp' }}
name: Deploy name: Deploy
needs: build needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@master uses: actions/checkout@master
- name: Download Artifact - name: Download Artifact
uses: actions/download-artifact@master uses: actions/download-artifact@master
with: with:
name: build name: build
path: source/build path: source/build
- name: Set target - name: Set target
uses: w9jds/firebase-action@master uses: w9jds/firebase-action@master
with: with:
args: use developomp-site args: use developomp-site
env: env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
- name: Apply target - name: Apply target
uses: w9jds/firebase-action@master uses: w9jds/firebase-action@master
with: with:
args: target:apply hosting stable developomp-site args: target:apply hosting stable developomp-site
env: env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
- name: Deploy to Firebase - name: Deploy to Firebase
uses: w9jds/firebase-action@master uses: w9jds/firebase-action@master
with: with:
args: deploy --only hosting:stable args: deploy --only hosting:stable
env: env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

View file

@ -1,5 +1,4 @@
{ {
"tabWidth": 4,
"useTabs": true, "useTabs": true,
"semi": false "semi": false
} }

View file

@ -8,8 +8,8 @@ Source code for my (developomp's) <a href="https://developomp.com" target="_blan
### Requirements ### Requirements
- [nodeJS](https://nodejs.org) - [nodeJS](https://nodejs.org)
- [yarn](https://github.com/yarnpkg/yarn) - [yarn](https://github.com/yarnpkg/yarn)
### Steps ### Steps
@ -39,10 +39,10 @@ yarn start
## Special thanks ## Special thanks
- My dear friend [Aditya Prakash](https://github.com/AdityaPrakash-26) for extensive testing and wonderful suggestions - My dear friend [Aditya Prakash](https://github.com/AdityaPrakash-26) for extensive testing and wonderful suggestions
- [Ruipeng Zhang](https://github.com/ppoffice) for design inspiration ([hexo-icarus-theme](https://github.com/ppoffice/hexo-theme-icarus)) - [Ruipeng Zhang](https://github.com/ppoffice) for design inspiration ([hexo-icarus-theme](https://github.com/ppoffice/hexo-theme-icarus))
- [Artem Golubin](https://github.com/rushter) for design inspiration ([his blog](https://rushter.com/blog)) - [Artem Golubin](https://github.com/rushter) for design inspiration ([his blog](https://rushter.com/blog))
- [discord](http://discord.com) for dark theme color palette (before the [rebranding of May 2021](https://blog.discord.com/how-were-making-discord-more-welcoming-for-everyone-ee152f198c60)) - [discord](http://discord.com) for dark theme color palette (before the [rebranding of May 2021](https://blog.discord.com/how-were-making-discord-more-welcoming-for-everyone-ee152f198c60))
## License ## License
@ -52,5 +52,5 @@ Font licenses:
[Open Font License (OFL)](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL#5667e9e4): [Open Font License (OFL)](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL#5667e9e4):
- [Source Code Pro](https://fonts.google.com/specimen/Source+Code+Pro?query=source+code+pro) (monospaced code font) - [Source Code Pro](https://fonts.google.com/specimen/Source+Code+Pro?query=source+code+pro) (monospaced code font)
- [Noto Sans KR](https://fonts.google.com/specimen/Noto+Sans+KR) (Korean and English font) - [Noto Sans KR](https://fonts.google.com/specimen/Noto+Sans+KR) (Korean and English font)

View file

@ -79,8 +79,7 @@ export function parseFrontMatter(
).data ).data
if (mode != ParseMode.PORTFOLIO) { if (mode != ParseMode.PORTFOLIO) {
if (!frontMatter.title) if (!frontMatter.title) throw Error(`Title is not defined in file: ${path}`)
throw Error(`Title is not defined in file: ${path}`)
if (mode != ParseMode.UNSEARCHABLE && !frontMatter.date) if (mode != ParseMode.UNSEARCHABLE && !frontMatter.date)
throw Error(`Date is not defined in file: ${path}`) throw Error(`Date is not defined in file: ${path}`)

View file

@ -1,4 +1,5 @@
<div class="items-wrapper"> <div class="items-wrapper">
<% badges.forEach((badge) => { %> <%- include("badge.ejs", { badge }) %> <% <% badges.forEach((badge) => { %>
}) %> <%- include("badge.ejs", { badge }) %>
<% }) %>
</div> </div>

View file

@ -44,9 +44,7 @@ function parseSeries() {
// series length and order // series length and order
for (const seriesURL in seriesMap) { for (const seriesURL in seriesMap) {
map.series[seriesURL].length = seriesMap[seriesURL].length map.series[seriesURL].length = seriesMap[seriesURL].length
map.series[seriesURL].order = seriesMap[seriesURL].map( map.series[seriesURL].order = seriesMap[seriesURL].map((item) => item.url)
(item) => item.url
)
} }
} }
@ -68,13 +66,9 @@ function generatePortfolioSVGs() {
} }
for (const skillCategory in skills) { for (const skillCategory in skills) {
skills[skillCategory as keyof typeof skills].forEach( skills[skillCategory as keyof typeof skills].forEach((badge: string) => {
(badge: string) => { data[skillCategory as keyof typeof skills].push(parseBadge(badge))
data[skillCategory as keyof typeof skills].push( })
parseBadge(badge)
)
}
)
} }
const renderedSVG = ejs.render( const renderedSVG = ejs.render(
@ -92,9 +86,7 @@ function parseBadge(badgeRaw: string): Badge {
const isMultiWord = badgeRaw.includes(" ") const isMultiWord = badgeRaw.includes(" ")
const words = badgeRaw.split(" ") const words = badgeRaw.split(" ")
const icon = isMultiWord const icon = isMultiWord ? simpleIcon.Get(words[0]) : simpleIcon.Get(badgeRaw)
? simpleIcon.Get(words[0])
: simpleIcon.Get(badgeRaw)
const color = tinycolor(icon.hex).lighten(5).desaturate(5) const color = tinycolor(icon.hex).lighten(5).desaturate(5)

View file

@ -7,13 +7,8 @@ import { map } from ".."
import { DataToPass } from "." import { DataToPass } from "."
export default function parsePost(data: DataToPass): void { export default function parsePost(data: DataToPass): void {
const { const { urlPath, markdownRaw, markdownData, humanizedDuration, totalWords } =
urlPath, data
markdownRaw,
markdownData,
humanizedDuration,
totalWords,
} = data
const postData: PostData = { const postData: PostData = {
title: markdownData.title as string, title: markdownData.title as string,

View file

@ -114,8 +114,7 @@ export default function parseSeries(data: DataToPass): void {
) )
) )
if (isNaN(index)) if (isNaN(index)) throw Error(`Invalid series index at: ${path}`)
throw Error(`Invalid series index at: ${path}`)
const itemToPush = { const itemToPush = {
index: index, index: index,

View file

@ -21,8 +21,7 @@ export function path2URL(pathToConvert: string): string {
*/ */
export function path2FileOrFolderName(inputPath: string): string { export function path2FileOrFolderName(inputPath: string): string {
// remove trailing slash // remove trailing slash
if (inputPath[-1] == "/") if (inputPath[-1] == "/") inputPath = inputPath.slice(0, inputPath.length - 1)
inputPath = inputPath.slice(0, inputPath.length - 1)
// get the last section // get the last section
return inputPath.slice(inputPath.lastIndexOf("/") + 1) return inputPath.slice(inputPath.lastIndexOf("/") + 1)

View file

@ -4,14 +4,14 @@ overview: my website for blogging, portfolio, and resume.
image: /img/portfolio/developomp.com.png image: /img/portfolio/developomp.com.png
repo: https://github.com/developomp/developomp-site repo: https://github.com/developomp/developomp-site
badges: badges:
- typescript - typescript
- javascript - javascript
- nodedotjs - nodedotjs
- firebase - firebase
- amazonaws - amazonaws
- react - react
- html5 - html5
- css3 - css3
--- ---
## Intro ## Intro

View file

@ -4,7 +4,7 @@ overview: A setup script and dotfiles for my arch linux setup.
image: /img/portfolio/linux-setup-script.png image: /img/portfolio/linux-setup-script.png
repo: https://github.com/developomp/setup repo: https://github.com/developomp/setup
badges: badges:
- linux - linux
- gnubash - gnubash
- vim - vim
--- ---

View file

@ -4,11 +4,11 @@ overview: A discord bot.
image: /img/portfolio/llama-bot.png image: /img/portfolio/llama-bot.png
repo: https://github.com/llama-bot repo: https://github.com/llama-bot
badges: badges:
- firebase - firebase
- nodedotjs - nodedotjs
- javascript - javascript
- typescript - typescript
- react - react
- html5 - html5
- css3 - css3
--- ---

View file

@ -4,13 +4,13 @@ overview: A cross-platform desktop download manager built with web technologies.
image: /img/portfolio/mocha-downloader.png image: /img/portfolio/mocha-downloader.png
repo: https://github.com/Mocha-Downloader repo: https://github.com/Mocha-Downloader
badges: badges:
- typescript - typescript
- javascript - javascript
- nodedotjs - nodedotjs
- electron - electron
- react - react
- html5 - html5
- css3 - css3
--- ---
Mocha Downloader is a cross-platform desktop download manager built with web technologies. Mocha Downloader is a cross-platform desktop download manager built with web technologies.

View file

@ -4,10 +4,12 @@ overview: A conky-like system monitor.
image: /img/portfolio/pomky.png image: /img/portfolio/pomky.png
repo: https://github.com/developomp/pomky repo: https://github.com/developomp/pomky
badges: badges:
- rust - rust
# - gtk # - gtk
# - cairo # - cairo
--- ---
## Intro
Pomky is a [conky](https://github.com/brndnmtthws/conky)-like system monitor written in rust. Pomky is a [conky](https://github.com/brndnmtthws/conky)-like system monitor written in rust.
It is built to teach myself the rust programming language and to write a more flexible, efficient, and tailored version of conky. It is built to teach myself the rust programming language and to write a more flexible, efficient, and tailored version of conky.

View file

@ -4,14 +4,14 @@ overview: A game mod for a unity game. Provides in-game UI and OBS overlays.
image: /img/portfolio/wbm.png image: /img/portfolio/wbm.png
repo: https://github.com/War-Brokers-Mods repo: https://github.com/War-Brokers-Mods
badges: badges:
- csharp - csharp
- dotnet - dotnet
- javascript - javascript
- html5 - html5
- css3 - css3
- svelte - svelte
- tailwindcss - tailwindcss
- rust - rust
--- ---
## Intro ## Intro

View file

@ -2,7 +2,7 @@
title: Test post title: Test post
date: 2021-07-26 date: 2021-07-26
tags: tags:
- test - test
--- ---
<!-- comment --> <!-- comment -->
@ -32,23 +32,23 @@ A post have title, post date, tags, and content.
## List ## List
- Unordered list item - Unordered list item
- Unordered list item - Unordered list item
- unordered list sub-item - unordered list sub-item
- unordered list sub-item - unordered list sub-item
- [ ] Unordered task list item (unchecked) - [ ] Unordered task list item (unchecked)
- [x] Unordered task list item (checked) - [x] Unordered task list item (checked)
- [ ] unordered task list sub-item (unchecked) - [ ] unordered task list sub-item (unchecked)
- [x] unordered task list sub-item (checked) - [x] unordered task list sub-item (checked)
1. Ordered list item 1. Ordered list item
2. Ordered list item 2. Ordered list item
1. ordered list sub item 1. ordered list sub item
2. ordered list sub item 2. ordered list sub item
3. [ ] Ordered list task item (unchecked) 3. [ ] Ordered list task item (unchecked)
4. [x] Ordered list task item (checked) 4. [x] Ordered list task item (checked)
1. [ ] Ordered list task sub-item (unchecked) 1. [ ] Ordered list task sub-item (unchecked)
2. [x] Ordered list task sub-item (checked) 2. [x] Ordered list task sub-item (checked)
## Footnote ## Footnote

View file

@ -1,8 +1,8 @@
--- ---
title: My Quote NO.2 title: My Quote NO.2
date: 2021-03-22 date: 2021-03-22
--- ---
> The 1000 miles you've walked so far are less important than another mile you are willing to walk. > The 1000 miles you've walked so far are less important than another mile you are willing to walk.
<div style="text-align: right"><i>- developomp 2019</i></div> <div style="text-align: right"><i>- developomp 2019</i></div>

View file

@ -1,10 +1,10 @@
--- ---
title: My Quote NO.3 title: My Quote NO.3
date: 2021-03-22 date: 2021-03-22
--- ---
> Yesterday is a lecture for today. > Yesterday is a lecture for today.
<div style="text-align: right"> <i>- developomp 2019</i> </div> <div style="text-align: right"> <i>- developomp 2019</i> </div>
Don't forget the peaks and the valleys of your life. Don't forget the peaks and the valleys of your life.

View file

@ -1,10 +1,10 @@
--- ---
title: My Quote NO.4 title: My Quote NO.4
date: 2021-03-22 date: 2021-03-22
--- ---
> Those who see only the present lose their future.<br /> > Those who see only the present lose their future.<br />
> Those who see only the future lose both the present and the future. <br /> > Those who see only the future lose both the present and the future. <br />
> Only those who can see both the present and the future are given the future. > Only those who can see both the present and the future are given the future.
<div style="text-align: right"> <i>- developomp 2019</i> </div> <div style="text-align: right"> <i>- developomp 2019</i> </div>

View file

@ -1,10 +1,10 @@
--- ---
title: My Quote NO.5 title: My Quote NO.5
date: 2021-03-22 date: 2021-03-22
--- ---
> Words of wisdom deepens the more you think about it. > Words of wisdom deepens the more you think about it.
<div style="text-align: right"> <i>- developomp 2019</i> </div> <div style="text-align: right"> <i>- developomp 2019</i> </div>
They should not be taken lightly. They should not be taken lightly.

View file

@ -1,10 +1,10 @@
--- ---
title: My Quote NO.6 title: My Quote NO.6
date: 2021-03-22 date: 2021-03-22
--- ---
> The quickest way to learn the preciousness of time is to stare at a clock for 5 minutes. > The quickest way to learn the preciousness of time is to stare at a clock for 5 minutes.
<div style="text-align: right"> <i>- developomp 2019</i> </div> <div style="text-align: right"> <i>- developomp 2019</i> </div>
This small investment will take you farther than you think. This small investment will take you farther than you think.

View file

@ -7,4 +7,4 @@ date: 2020-08-16
<div style="text-align: right"> <i>- Mahatma Ghanghi (1885)</i> </div> <div style="text-align: right"> <i>- Mahatma Ghanghi (1885)</i> </div>
This quote is $e^{\pi i} \times 100$% true. This quote is $e^{\pi i} \times 100$% true.

View file

@ -10,8 +10,8 @@ Year of Birth: 2002
## Links ## Links
- [Github](https://github.com/developomp) - [Github](https://github.com/developomp)
- [goals](/goals) - [goals](/goals)
## Contact ## Contact

View file

@ -4,38 +4,38 @@ title: Goals
## Programming ## Programming
- Get a total of X stars on github (not counting mine) - Get a total of X stars on github (not counting mine)
- [x] 10 - [x] 10
- [ ] 100 - [ ] 100
- [ ] 500 - [ ] 500
- [ ] 1,000 - [ ] 1,000
- [ ] 10,000 - [ ] 10,000
- Create... - Create...
- [x] My own website ([Github](https://github.com/developomp/developomp-site)) - [x] My own website ([Github](https://github.com/developomp/developomp-site))
- [x] My own linux setup script ([Github](https://github.com/developomp/setup)) - [x] My own linux setup script ([Github](https://github.com/developomp/setup))
- [ ] My own programming language ([Github](https://github.com/boy-lang)) - [ ] My own programming language ([Github](https://github.com/boy-lang))
- [ ] Push at least one commit every day for 365 days - [ ] Push at least one commit every day for 365 days
- [ ] Get my code in the linux kernel - [ ] Get my code in the linux kernel
## Lean how to ## Lean how to
- Type at least X letters per minute (rules: count the number of correct keystrokes made in one minute. Use [10fastfingers.com](https://10fastfingers.com/typing-test) for testing. The typing speed must be consistent and could be replicated on-demand.) - Type at least X letters per minute (rules: count the number of correct keystrokes made in one minute. Use [10fastfingers.com](https://10fastfingers.com/typing-test) for testing. The typing speed must be consistent and could be replicated on-demand.)
- Korean - Korean
- [x] 100 - [x] 100
- [x] 200 - [x] 200
- [ ] 300 - [ ] 300
- English - English
- [x] 100 - [x] 100
- [x] 200 - [x] 200
- [ ] 300 - [ ] 300
- [ ] Type without looking at keyboard - [ ] Type without looking at keyboard
- Speak basic Chinese - Speak basic Chinese
- [ ] Counting up to 15 digits - [ ] Counting up to 15 digits
- [ ] Greetings - [ ] Greetings
- Speak basic Japanese - Speak basic Japanese
- [ ] Counting up to 15 digits - [ ] Counting up to 15 digits
- [ ] Greetings - [ ] Greetings
## Etc ## Etc
- [ ] Make a high quality video that I'm proud of with at least 1M views on YouTube - [ ] Make a high quality video that I'm proud of with at least 1M views on YouTube

View file

@ -91,10 +91,7 @@ const App = () => {
<Loading /> <Loading />
) : ( ) : (
<Routes> <Routes>
<Route <Route path="/" element={<PostList howMany={5} title="Home" />} />
path="/"
element={<PostList howMany={5} title="Home" />}
/>
<Route path="/search" element={<Search />} /> <Route path="/search" element={<Search />} />
<Route path="/portfolio" element={<Portfolio />} /> <Route path="/portfolio" element={<Portfolio />} />
<Route path="/404" element={<NotFound />} /> <Route path="/404" element={<NotFound />} />

View file

@ -27,9 +27,7 @@ const StyledSVG = styled.div<{ isDark: boolean }>`
svg { svg {
height: 16px; height: 16px;
fill: ${(props) => fill: ${(props) =>
props.isDark props.isDark ? theming.dark.color1 : theming.light.color1} !important;
? theming.dark.color1
: theming.light.color1} !important;
} }
` `

View file

@ -87,9 +87,7 @@ const ReadProgress = () => {
const b = document.body const b = document.body
// https://stackoverflow.com/a/8028584/12979111 // https://stackoverflow.com/a/8028584/12979111
setScroll( setScroll(((h[st] || b[st]) / ((h[sh] || b[sh]) - h.clientHeight)) * 100)
((h[st] || b[st]) / ((h[sh] || b[sh]) - h.clientHeight)) * 100
)
} }
window.addEventListener("scroll", scrollHandler) window.addEventListener("scroll", scrollHandler)
@ -107,9 +105,7 @@ const Navbar = () => {
<StyledNav> <StyledNav>
<StyledContainer> <StyledContainer>
<Link to="/"> <Link to="/">
<StyledImg <StyledImg src={process.env.PUBLIC_URL + "/icon/icon_circle.svg"} />
src={process.env.PUBLIC_URL + "/icon/icon_circle.svg"}
/>
</Link> </Link>
<StyledNavLinks> <StyledNavLinks>

View file

@ -58,9 +58,7 @@ const PostCard = (props: Props) => {
return ( return (
<StyledPostCard <StyledPostCard
onClick={() => onClick={() => navigate(process.env.PUBLIC_URL + props.postData.url)}
navigate(process.env.PUBLIC_URL + props.postData.url)
}
> >
<StyledTitle>{props.postData?.title || "No title"}</StyledTitle> <StyledTitle>{props.postData?.title || "No title"}</StyledTitle>
@ -70,12 +68,7 @@ const PostCard = (props: Props) => {
<TagList direction="left"> <TagList direction="left">
{props.postData.tags && {props.postData.tags &&
props.postData.tags.map((tag) => { props.postData.tags.map((tag) => {
return ( return <Tag key={props.postData.title + tag} text={tag} />
<Tag
key={props.postData.title + tag}
text={tag}
/>
)
})} })}
</TagList> </TagList>
<hr /> <hr />

View file

@ -89,10 +89,7 @@ const Sidebar = () => {
return ( return (
<> <>
<StyledOverlay <StyledOverlay isSidebarOpen={isSidebarOpen} onClick={toggleSidebar} />
isSidebarOpen={isSidebarOpen}
onClick={toggleSidebar}
/>
<StyledToggleSidebarButton <StyledToggleSidebarButton
data-tip data-tip

View file

@ -25,16 +25,10 @@ const Navbar = () => {
data-tip data-tip
data-for="theme" data-for="theme"
className="right" className="right"
onClick={() => onClick={() => setTheme(currentTheme === "dark" ? "light" : "dark")}
setTheme(currentTheme === "dark" ? "light" : "dark")
}
> >
{currentTheme == "dark" && ( {currentTheme == "dark" && <FontAwesomeIcon icon={faMoon} />}
<FontAwesomeIcon icon={faMoon} /> {currentTheme == "light" && <FontAwesomeIcon icon={faSun} />}
)}
{currentTheme == "light" && (
<FontAwesomeIcon icon={faSun} />
)}
</StyledThemeButton> </StyledThemeButton>
{!isMobile && ( {!isMobile && (
<ReactTooltip id="theme" type="dark" effect="solid"> <ReactTooltip id="theme" type="dark" effect="solid">

View file

@ -48,9 +48,7 @@ const Toc = (props: { data?: string }) => {
> >
<strong> <strong>
Table of Contents{" "} Table of Contents{" "}
<FontAwesomeIcon <FontAwesomeIcon icon={isTocOpened ? faCaretUp : faCaretDown} />
icon={isTocOpened ? faCaretUp : faCaretDown}
/>
</strong> </strong>
</StyledTocToggleButton> </StyledTocToggleButton>
<StyledCollapseContainer> <StyledCollapseContainer>

View file

@ -95,8 +95,7 @@ const Page = () => {
} }
case PageType.SERIES: { case PageType.SERIES: {
if (!(url.slice(0, url.lastIndexOf("/")) in map.series)) if (!(url.slice(0, url.lastIndexOf("/")) in map.series)) show404 = true
show404 = true
break break
} }
@ -182,9 +181,7 @@ const Page = () => {
pageData.seriesHome = seriesURL pageData.seriesHome = seriesURL
pageData.prev = pageData.prev =
prev >= 0 prev >= 0 ? map.series[seriesURL].order[prev] : undefined
? map.series[seriesURL].order[prev]
: undefined
pageData.next = pageData.next =
next < map.series[seriesURL].order.length next < map.series[seriesURL].order.length
? map.series[seriesURL].order[next] ? map.series[seriesURL].order[next]
@ -195,9 +192,7 @@ const Page = () => {
case PageType.PORTFOLIO_PROJECT: { case PageType.PORTFOLIO_PROJECT: {
const data = const data =
portfolio.projects[ portfolio.projects[url as keyof typeof portfolio.projects]
url as keyof typeof portfolio.projects
]
pageData.content = fetched_content.content pageData.content = fetched_content.content
pageData.toc = fetched_content.toc pageData.toc = fetched_content.toc
@ -246,10 +241,7 @@ const Page = () => {
<MainContent> <MainContent>
{/* next/previous series post buttons */} {/* next/previous series post buttons */}
{pageType == PageType.SERIES && ( {pageType == PageType.SERIES && (
<NextPrevButtons <NextPrevButtons prevURL={pageData.prev} nextURL={pageData.next} />
prevURL={pageData.prev}
nextURL={pageData.next}
/>
)} )}
{pageType == PageType.PORTFOLIO_PROJECT && ( {pageType == PageType.PORTFOLIO_PROJECT && (
@ -262,9 +254,7 @@ const Page = () => {
</StyledTitle> </StyledTitle>
{pageType == PageType.PORTFOLIO_PROJECT && {pageType == PageType.PORTFOLIO_PROJECT &&
pageData.badges.map((badge) => ( pageData.badges.map((badge) => <Badge key={badge} slug={badge} />)}
<Badge key={badge} slug={badge} />
))}
<small> <small>
{/* Post tags */} {/* Post tags */}
@ -294,10 +284,7 @@ const Page = () => {
<Toc data={pageData.toc} /> <Toc data={pageData.toc} />
{pageType == PageType.PORTFOLIO_PROJECT && ( {pageType == PageType.PORTFOLIO_PROJECT && (
<ProjectImage <ProjectImage src={pageData.image} alt="project example image" />
src={pageData.image}
alt="project example image"
/>
)} )}
{/* page content */} {/* page content */}

View file

@ -33,9 +33,7 @@ const ProjectCard = (props: ProjectCardProps) => {
const navigate = useNavigate() const navigate = useNavigate()
useEffect(() => { useEffect(() => {
setBadges( setBadges(project.badges.map((badge) => <Badge key={badge} slug={badge} />))
project.badges.map((badge) => <Badge key={badge} slug={badge} />)
)
}, []) }, [])
return ( return (

View file

@ -52,10 +52,7 @@ const Portfolio = () => {
property="og:image" property="og:image"
content="http://developomp.com/icon/icon.svg" content="http://developomp.com/icon/icon.svg"
/> />
<meta <meta property="og:description" content="developomp's Portfolio" />
property="og:description"
content="developomp's Portfolio"
/>
</Helmet> </Helmet>
<MainContent> <MainContent>

View file

@ -50,10 +50,7 @@ const PostList = (props: Props) => {
postCount++ postCount++
const url: string = map.date[date][length - i - 1] const url: string = map.date[date][length - i - 1]
_postCards.push( _postCards.push(
<PostCard <PostCard key={url} postData={{ url: url, ...map.posts[url] }} />
key={url}
postData={{ url: url, ...map.posts[url] }}
/>
) )
} }
} }

View file

@ -81,8 +81,7 @@ const TagSelect = (props: TagSelectProps) => {
":hover": { ":hover": {
backgroundColor: theming backgroundColor: theming
.theme(currentTheme.currentTheme, { .theme(currentTheme.currentTheme, {
light: theming.light light: theming.light.backgroundColor0,
.backgroundColor0,
dark: theming.dark.backgroundColor0, dark: theming.dark.backgroundColor0,
}) })
.toString(), .toString(),
@ -96,13 +95,10 @@ const TagSelect = (props: TagSelectProps) => {
dark: theming.dark.backgroundColor1, dark: theming.dark.backgroundColor1,
}) })
.toString(), .toString(),
border: theming.theme( border: theming.theme(currentTheme.currentTheme, {
currentTheme.currentTheme, light: "1px solid #ccc",
{ dark: "1px solid #555",
light: "1px solid #ccc", }),
dark: "1px solid #555",
}
),
}), }),
multiValue: (styles) => ({ multiValue: (styles) => ({
...styles, ...styles,

View file

@ -114,15 +114,11 @@ const Search = () => {
for (const [key, value] of URLSearchParams.entries()) { for (const [key, value] of URLSearchParams.entries()) {
switch (key) { switch (key) {
case "date_from": case "date_from":
setDateRange((prev) => [ setDateRange((prev) => [{ ...prev[0], startDate: new Date(value) }])
{ ...prev[0], startDate: new Date(value) },
])
break break
case "date_to": case "date_to":
setDateRange((prev) => [ setDateRange((prev) => [{ ...prev[0], endDate: new Date(value) }])
{ ...prev[0], endDate: new Date(value) },
])
break break
case "tags": case "tags":
@ -258,17 +254,12 @@ const Search = () => {
value={searchInput} value={searchInput}
autoComplete="off" autoComplete="off"
placeholder="Search" placeholder="Search"
onChange={(event) => onChange={(event) => setSearchInput(event.target.value)}
setSearchInput(event.target.value)
}
onKeyPress={(event) => { onKeyPress={(event) => {
event.key === "Enter" && event.key === "Enter" && searchInput && doSearch()
searchInput &&
doSearch()
}} }}
/> />
{postCards.length}{" "} {postCards.length} {postCards.length > 1 ? "results" : "result"}
{postCards.length > 1 ? "results" : "result"}
<TagSelect <TagSelect
defaultValue={selectedTags} defaultValue={selectedTags}
onChange={(newValue) => { onChange={(newValue) => {