From e96ff1c4ec3875996780a71a653a14ab4401da08 Mon Sep 17 00:00:00 2001 From: Project_IO Date: Mon, 17 Mar 2025 15:36:04 +0900 Subject: [PATCH] feat: update file-view ui --- LICENSE | 2 +- src/App.scss | 4 ++++ src/App.tsx | 8 ++++++-- src/components/directory/directory.scss | 7 +------ src/components/directory/index.tsx | 5 ++++- src/components/file-view/fview.scss | 15 +++++++-------- src/components/file-view/index.tsx | 8 ++++---- src/index.scss | 4 ++-- 8 files changed, 29 insertions(+), 24 deletions(-) diff --git a/LICENSE b/LICENSE index 6d5cc52..4b75d63 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 devproje +Copyright (c) 2025 Project_IO Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/src/App.scss b/src/App.scss index 2084121..5d30321 100644 --- a/src/App.scss +++ b/src/App.scss @@ -88,5 +88,9 @@ align-items: flex-end; flex-direction: column; justify-content: center; + + * { + text-align: end; + } } } diff --git a/src/App.tsx b/src/App.tsx index 5b23385..dac90fa 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -130,8 +130,12 @@ function Footer() { ) : <> : <>}
- © 2020-2025 Project_IO. All rights reserved. - Powered by WSERVER. +

+ © 2020-2025 Project_IO. All rights reserved for images. +
+ Code licensed under the MIT License. +

+ Powered by WSERVER
); diff --git a/src/components/directory/directory.scss b/src/components/directory/directory.scss index b6215fe..22721c4 100644 --- a/src/components/directory/directory.scss +++ b/src/components/directory/directory.scss @@ -45,10 +45,5 @@ } .ka-readme { - padding: 1rem 1rem 0 1rem; - - h1, h2 { - width: 100%; - border-bottom: 1px solid var(--foreground); - } + padding-top: 1rem; } diff --git a/src/components/directory/index.tsx b/src/components/directory/index.tsx index f009e8b..29d18fd 100644 --- a/src/components/directory/index.tsx +++ b/src/components/directory/index.tsx @@ -84,7 +84,10 @@ function Readme() { useEffect(() => { async function refresh() { const pathname = location.pathname; - const res = await fetch(`/api/raw/${pathname}${pathname.endsWith("/") ? "" : "/"}README.md`); + const res = await fetch(`/api/raw/${pathname}${pathname.endsWith("/") ? "" : "/"}README.md`, { + cache: "no-cache" + }); + if (res.status !== 200) return; diff --git a/src/components/file-view/fview.scss b/src/components/file-view/fview.scss index 5fb0087..f55685f 100644 --- a/src/components/file-view/fview.scss +++ b/src/components/file-view/fview.scss @@ -3,27 +3,26 @@ display: flex; margin: 1rem 0; min-height: 300px; - border-radius: 15px; flex-direction: column; - background-color: var(--nav-color); - border: 1px solid var(--foreground); + border-top: 1px solid var(--foreground); + border-bottom: 1px solid var(--foreground); .title { width: 100%; display: flex; - padding: 5px 10px; align-items: center; flex-direction: row; - border-radius: 15px 15px 0 0; + padding: 0.25rem 10px; justify-content: space-between; - background-color: var(--nav-hover); + background-color: var(--nav-color); border-bottom: 1px solid var(--foreground); .name { - width: fit-content; display: flex; + width: fit-content; + align-items: center; - span { + b { margin: 0 5px; } } diff --git a/src/components/file-view/index.tsx b/src/components/file-view/index.tsx index 359d4bb..e3c56ee 100644 --- a/src/components/file-view/index.tsx +++ b/src/components/file-view/index.tsx @@ -22,13 +22,13 @@ function FileView() {
- + - {location.pathname} + {location.pathname}
- + { ev.preventDefault(); @@ -49,7 +49,7 @@ function FileView() { }) .catch(error => console.error("Download failed:", error)); }}> - +
diff --git a/src/index.scss b/src/index.scss index 8edbb98..7358508 100644 --- a/src/index.scss +++ b/src/index.scss @@ -63,11 +63,11 @@ html, body { } h1 { - font-size: 32pt; + font-size: 24pt; } h2 { - font-size: 24pt; + font-size: 20pt; } h3 {