Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Self Service Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fachschaften der Fakultät für Informatik
Identity Management
Self Service Frontend
Commits
8db3a2fb
Verified
Commit
8db3a2fb
authored
1 year ago
by
Adrian Paschkowski
Browse files
Options
Downloads
Patches
Plain Diff
Animate mobile nav
parent
4c3cccd3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+5
-0
5 additions, 0 deletions
README.md
src/components/layout/MobileNavigation.tsx
+14
-6
14 additions, 6 deletions
src/components/layout/MobileNavigation.tsx
with
19 additions
and
6 deletions
README.md
+
5
−
0
View file @
8db3a2fb
# Self Service Frontend
## TODOs
-
RUB Auth + Auth Gates
-
Dark Mode
This diff is collapsed.
Click to expand it.
src/components/layout/MobileNavigation.tsx
+
14
−
6
View file @
8db3a2fb
...
...
@@ -4,23 +4,31 @@ import { useNavigationStore } from "../../data/state/navigation";
import
{
HeaderLogo
}
from
"
./Header
"
;
import
HR
from
"
../widgets/HR
"
;
import
LanguageSelect
from
"
../widgets/LanguageSelect
"
;
import
classNames
from
"
classnames
"
;
export
default
function
MobileNavigation
()
{
const
[
isVisible
,
setVisible
]
=
useNavigationStore
(
s
=>
[
s
.
isVisible
,
s
.
setVisible
]);
if
(
!
isVisible
)
{
return
<></>;
}
const
sidebarClasses
=
// Layout
"
lg:hidden fixed inset-y-0 right-0 w-64 overflow-y-auto
"
+
// Visual
`bg-body border-t border-b
${
STYLES
.
BORDER_COLOR
}
shadow-md`
;
`bg-body border-t border-b
${
STYLES
.
BORDER_COLOR
}
shadow-md `
+
// Animation
"
transition-transform will-change-transform
"
+
classNames
({
"
translate-x-full
"
:
!
isVisible
,
"
translate-x-0
"
:
isVisible
,
});
const
backdropClasses
=
classNames
(
"
lg:hidden fixed inset-0 bg-black transition-opacity
"
,
{
"
opacity-0 pointer-events-none
"
:
!
isVisible
,
"
opacity-50
"
:
isVisible
,
});
return
(
<>
<
div
className
=
"lg:hidden fixed inset-0 bg-black opacity-40"
onClick
=
{
()
=>
setVisible
(
false
)
}
/>
<
div
className
=
{
backdropClasses
}
onClick
=
{
()
=>
setVisible
(
false
)
}
/>
<
div
className
=
{
sidebarClasses
}
>
<
HeaderLogo
className
=
"m-4"
/>
<
div
className
=
"font-bold text-xl text-center"
>
FSI Self-Service
</
div
>
...
...
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