Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Bielefeld-CeBiTec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
2024 Competition
Bielefeld-CeBiTec
Commits
13654b47
Commit
13654b47
authored
9 months ago
by
Liliana Sanfilippo
Browse files
Options
Downloads
Patches
Plain Diff
Darkmode vorerst ausgesetzt
parent
f5c1ad2e
No related branches found
Branches containing commit
No related tags found
2 merge requests
!4
React branch
,
!3
React branch
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/components/Navbar.tsx
+10
-10
10 additions, 10 deletions
src/components/Navbar.tsx
src/containers/App/App.tsx
+3
-3
3 additions, 3 deletions
src/containers/App/App.tsx
src/contents/home.tsx
+1
-9
1 addition, 9 deletions
src/contents/home.tsx
src/pages.ts
+1
-1
1 addition, 1 deletion
src/pages.ts
with
15 additions
and
23 deletions
src/components/Navbar.tsx
+
10
−
10
View file @
13654b47
...
...
@@ -5,11 +5,11 @@ import NavDropdown from "react-bootstrap/NavDropdown";
import
{
Link
}
from
"
react-router-dom
"
;
import
Pages
from
"
../pages.ts
"
;
export
function
Navbar
(
{
isDark
Mode
,
setIs
Dark
Mode
}:
any
)
{
export
function
Navbar
(
/* {isLight
Mode, setIs
Light
Mode}:any
*/
)
{
const
handleToggle
=
()
=>
{
setIs
Dark
Mode
(
!
is
Dark
Mode
);
};
/*
const handleToggle = () => {
setIs
Light
Mode(!is
Light
Mode);
};
*/
const
pages
=
Pages
.
map
((
item
,
pageIndex
)
=>
{
if
(
"
folder
"
in
item
&&
item
.
folder
)
{
...
...
@@ -45,19 +45,19 @@ export function Navbar({isDarkMode, setIsDarkMode}:any) {
});
return
(
<
BootstrapNavbar
className
=
"navbar-custom"
expand
=
"lg"
bg
=
{
isDark
Mode
?
"
d
"
:
"
l
"
}
variant
=
{
is
Dark
Mode
?
"
dark
"
:
"
light
"
}
fixed
=
"top"
>
<
BootstrapNavbar
className
=
"navbar-custom"
expand
=
"lg"
bg
=
"l"
variant
=
"light"
/* bg={isLight
Mode ? "d" : "l"} variant={is
Light
Mode ? "dark" : "light"}
*/
fixed
=
"top"
>
<
Container
>
<
BootstrapNavbar
.
Brand
>
{
import
.
meta
.
env
.
VITE_TEAM_NAME
}
</
BootstrapNavbar
.
Brand
>
<
BootstrapNavbar
.
Toggle
aria-controls
=
"basic-navbar-nav"
/>
<
BootstrapNavbar
.
Collapse
id
=
"basic-navbar-nav"
>
<
Nav
className
=
"left-aligned"
>
<
button
id
=
"theme-toggle"
className
=
"btn btn-outline-secondary ml-auto"
onClick
=
{
handleToggle
}
>
{
is
Dark
Mode
?
'
🌙
'
:
'
🔆
'
}
</
button
>
<
Nav
className
=
"left-aligned"
>
{
/*
<button id="theme-toggle" className="btn btn-outline-secondary ml-auto" onClick={handleToggle}>
{is
Light
Mode ? '🌙' : '🔆' }
</button>
*/
}
{
pages
}
</
Nav
>
</
Nav
>
</
BootstrapNavbar
.
Collapse
>
</
Container
>
</
BootstrapNavbar
>
...
...
This diff is collapsed.
Click to expand it.
src/containers/App/App.tsx
+
3
−
3
View file @
13654b47
...
...
@@ -6,11 +6,11 @@ import { getPathMapping, stringToSlug } from "../../utils";
import
{
useEffect
,
useState
}
from
"
react
"
;
const
App
=
()
=>
{
// Dark Mode toggle
/*
// Dark Mode toggle
const [isDarkMode, setIsDarkMode] = useState(true);
useEffect(() => {
document.body.className = isDarkMode ? 'dark-mode' : '';
},
[
isDarkMode
]);
}, [isDarkMode]);
*/
const
pathMapping
=
getPathMapping
();
const
currentPath
=
...
...
@@ -29,7 +29,7 @@ const App = () => {
return
(
<>
{
/* Navigation */
}
<
Navbar
isDarkMode
=
{
isDarkMode
}
setIsDarkMode
=
{
setIsDarkMode
}
/>
<
Navbar
/*
isDarkMode={isDarkMode} setIsDarkMode={setIsDarkMode}
*/
/>
{
/* Header and PageContent */
}
<
Routes
>
...
...
This diff is collapsed.
Click to expand it.
src/contents/home.tsx
+
1
−
9
View file @
13654b47
//import { Inspirations, InspirationLink } from "../components";
import
{
Link
}
from
"
react-router-dom
"
;
import
Villbuttonrow
from
'
../components/Villagebuttons.tsx
'
;
export
function
Home
()
{
...
...
@@ -9,18 +8,11 @@ export function Home() {
<
div
className
=
"col"
>
<
h2
>
Wiki under construction!
</
h2
>
<
hr
/>
<
p
>
See you soon!
</
p
>
</
div
>
<
Villbuttonrow
></
Villbuttonrow
>
</
div
>
<
div
className
=
"row"
>
<
div
className
=
"d-flex flex-column justify-content-center align-items-center"
>
<
h2
></
h2
>
<
hr
/>
<
Link
to
=
"/description"
className
=
"btn btn-secondary btn-lg"
>
Project Description
</
Link
>
</
div
>
</
div
>
</>
);
...
...
This diff is collapsed.
Click to expand it.
src/pages.ts
+
1
−
1
View file @
13654b47
...
...
@@ -46,7 +46,7 @@ const Pages: (Page | Folder)[] = [
title
:
"
Bielefeld CeBiTec
"
,
path
:
"
/
"
,
component
:
Home
,
lead
:
"
Change the fates' design...
"
,
lead
:
"
Precision with every breath
"
,
},
{
name
:
"
Team
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment