-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
308687a
commit 6a4e363
Showing
8 changed files
with
1,419 additions
and
749 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
$header-height: 40px; | ||
$sidebar-width: 300px; | ||
$responsive-breakpoint: 768px; | ||
|
||
.layout { | ||
display: grid; | ||
grid-template-rows: $header-height auto; | ||
grid-template-columns: $sidebar-width auto; | ||
grid-template-areas: | ||
'sidebar header' | ||
'sidebar content' | ||
; | ||
height: 100vh; | ||
|
||
>header { | ||
grid-area: header; | ||
} | ||
|
||
>aside { | ||
grid-area: sidebar; | ||
} | ||
|
||
>main { | ||
grid-area: content; | ||
overflow-y: auto; | ||
} | ||
|
||
@media (--sm) { | ||
grid-template-areas: | ||
'header header' | ||
'content content' | ||
; | ||
|
||
>aside { | ||
grid-area: content; | ||
position: relative; | ||
left: 0; | ||
} | ||
|
||
>aside.collapsed { | ||
left: -100%; | ||
} | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
import { Outlet, createBrowserRouter, redirect } from "react-router-dom"; | ||
|
||
const settings = {}; // TODO: replace with your actual settings store | ||
const site = {}; // TODO: replace with your actual site store | ||
|
||
const router = createBrowserRouter([ | ||
{ | ||
path: "/", | ||
element: <div />, | ||
loader: async ({ params }) => { | ||
// Replace with your logic | ||
const orgInParam = params.org; // TODO: Get the parameter from the current location | ||
|
||
if (orgInParam || settings.defaultOpen === "Home" || !site.jwtToken) { | ||
// Do the necessary redirect logic here | ||
return redirect('/org/' + params.org) | ||
} else { | ||
// Do the necessary redirect logic here | ||
return redirect('/favorites/') | ||
// return <div>Redirecting to Favorites...</div>; | ||
} | ||
} | ||
}, | ||
{ | ||
path: "/favorites", | ||
element: <div>Favorites</div>, | ||
}, | ||
{ | ||
path: "/search", | ||
element: <div>Search</div>, | ||
}, | ||
{ | ||
path: "/org/:org", | ||
element: <div>Home_Org</div>, | ||
}, | ||
{ | ||
path: "/channels", | ||
element: <RedirectToChannelsOrg />, | ||
}, | ||
{ | ||
path: "/org404", | ||
element: <div>OrgNotFound</div>, | ||
}, | ||
{ | ||
path: "/org/:org/channels", | ||
element: <div>Channels_Org</div>, | ||
}, | ||
{ | ||
path: "/channel/:id", | ||
element: <Channel />, | ||
children: [ | ||
{ | ||
path: "about", | ||
element: <div>Channel_About</div>, | ||
}, | ||
{ | ||
path: "clips", | ||
element: <div>Channel_Clips</div>, | ||
}, | ||
{ | ||
path: "collabs", | ||
element: <div>Channel_Collabs</div>, | ||
}, | ||
{ | ||
path: "music", | ||
element: <RedirectToMusicdex />, | ||
}, | ||
{ | ||
path: "", | ||
element: <div>Channel</div>, | ||
}, | ||
], | ||
}, | ||
{ | ||
path: "/profile", | ||
element: <div>Profile</div>, | ||
}, | ||
{ | ||
path: "/settings", | ||
element: <Settings />, | ||
children: [ | ||
// Add children routes similar to above pattern | ||
], | ||
}, | ||
{ | ||
path: "/playlists", | ||
element: <div>Playlists</div>, | ||
}, | ||
{ | ||
path: "/about", | ||
element: <About />, | ||
children: [ | ||
// Add children routes similar to above pattern | ||
], | ||
}, | ||
{ | ||
path: "/kitchensink", | ||
element: <div>Kitchen Sink</div>, | ||
}, | ||
{ | ||
path: "/login", | ||
element: <div>Login</div>, | ||
}, | ||
{ | ||
path: "/tlclient", | ||
element: <div>Translation Client</div>, | ||
}, | ||
{ | ||
path: "/scripteditor", | ||
element: <div>Translation Scripter</div>, | ||
}, | ||
{ | ||
path: "/watch/:id", | ||
element: <div>Watch</div>, | ||
}, | ||
{ | ||
path: "/debug", | ||
element: <div>Debug</div>, | ||
}, | ||
{ | ||
path: "/debug/run", | ||
element: <div>Debug Run</div>, | ||
}, | ||
]); | ||
|
||
export default router; | ||
|
||
function RedirectToChannelsOrg() { | ||
// Replace with your logic | ||
return <div>Redirecting to Channels_Org...</div>; | ||
} | ||
|
||
function Channel() { | ||
// Add logic if needed | ||
return <div>Channel main page<Outlet /></div>; | ||
} | ||
|
||
function RedirectToMusicdex() { | ||
// Add logic for redirection | ||
return <div>Redirecting to Musicdex...</div>; | ||
} | ||
|
||
function Settings() { | ||
// Add logic if needed | ||
return <div>Settings main page<Outlet /></div>; | ||
} | ||
|
||
function About() { | ||
// Add logic if needed | ||
return <div>About main page<Outlet /></div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters