Skip to content

Commit

Permalink
Adjust public files
Browse files Browse the repository at this point in the history
  • Loading branch information
slhmy committed Sep 29, 2023
1 parent 133e0d0 commit 9cbdd6c
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="./katex-dist/katex.min.css">
<link rel="icon" href="./favicon.ico" />
<link rel="icon" href="./images/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="./logo192.png" />
<link rel="apple-touch-icon" href="./images/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand Down
3 changes: 3 additions & 0 deletions public/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
⚠️ Usually, you should avoid placing files in the root of `public` directory.

For you may routing page route and static file route together that can easilty cause conflict, and you may need to configure the routing of each file manually.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
6 changes: 3 additions & 3 deletions public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"src": "images/favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"src": "images/logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"src": "images/logo512.png",
"type": "image/png",
"sizes": "512x512"
}
Expand Down
10 changes: 4 additions & 6 deletions src/layouts/adminLayout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { useTranslation } from "react-i18next";
import { joinClasses } from "../../utils/common";
import { useNavigate } from "react-router-dom";

const iconPath = "/images/oj-lab-icon.svg";

const navigation = [
{ name: "Problem", href: "/admin/problem", icon: HomeIcon, current: true },
{ name: "User", href: "/admin/user", icon: UsersIcon, current: false },
Expand Down Expand Up @@ -79,7 +81,7 @@ export default function Sidebar(props: SidebarProps) {
<div className="flex h-16 shrink-0 items-center">
<img
className="h-14 w-auto gap-4"
src="/OJ-lab-icon.svg"
src={iconPath}
alt="OJ Lab"
/>
<h1 className="text-xl font-bold text-white">
Expand Down Expand Up @@ -132,11 +134,7 @@ export default function Sidebar(props: SidebarProps) {
{/* Sidebar component, swap this element with another sidebar if you like */}
<div className="flex grow flex-col gap-y-5 overflow-y-auto bg-indigo-600 px-6 pb-4">
<div className="flex h-16 shrink-0 items-center gap-4">
<img
className="h-14 w-auto"
src="/OJ-lab-icon.svg"
alt="OJ Lab"
/>
<img className="h-14 w-auto" src={iconPath} alt="OJ Lab" />
<h1 className="text-xl font-bold text-white">OJ Lab Admin</h1>
</div>
<nav className="flex flex-1 flex-col">
Expand Down
6 changes: 4 additions & 2 deletions src/layouts/userLayout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { joinClasses } from "../../utils/common";
import LanguageMenu from "../LanguageMenu";
import { useTranslation } from "react-i18next";

const iconPath = "/images/oj-lab-icon.svg";

const user = {
name: "Tom Cook",
email: "[email protected]",
Expand Down Expand Up @@ -49,12 +51,12 @@ export default function Header() {
<div className="flex flex-shrink-0 items-center">
<img
className="block h-14 w-auto lg:hidden"
src="/OJ-lab-icon.svg"
src={iconPath}
alt="OJ Lab"
/>
<img
className="hidden h-14 w-auto lg:block"
src="/OJ-lab-icon.svg"
src={iconPath}
alt="OJ Lab"
/>
</div>
Expand Down

0 comments on commit 9cbdd6c

Please sign in to comment.