Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
idatt2106_2024_02_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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IDATT2106 - Gruppe 2
idatt2106_2024_02_frontend
Commits
7b313991
Commit
7b313991
authored
10 months ago
by
Valdemar Åstorp Beere
Browse files
Options
Downloads
Patches
Plain Diff
refactor(component)
refactored ButtonDisplayStreak placement
parent
adecdc5c
No related branches found
No related tags found
3 merge requests
!66
Final merge
,
!56
refactor(component)
,
!4
Pipeline fix
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/ButtonDisplayStreak.vue
+3
-4
3 additions, 4 deletions
src/components/ButtonDisplayStreak.vue
src/components/NavBarComponent.vue
+10
-9
10 additions, 9 deletions
src/components/NavBarComponent.vue
with
13 additions
and
13 deletions
src/components/ButtonDisplayStreak.vue
+
3
−
4
View file @
7b313991
<
template
>
<div
class=
"flex flex-col items-center absolute"
>
<span
class=
"text-sm text-bold"
>
STREAK
</span>
<div
class=
"flex flex-col items-center relative"
>
<button
@
mouseover=
"display"
@
mouseleave=
"hide"
...
...
@@ -15,7 +14,7 @@
<div
v-if=
"displayStreakCard"
class=
"w-[30vh] h-[20vh] md:w-auto md:h-auto group z-50 bg-opacity-50 overflow-hidden absolute
left-0
top-14 md:top-20 flex flex-col justify-evenly text-wrap"
class=
"w-[30vh] h-[20vh] md:w-auto md:h-auto group z-50 bg-opacity-50 overflow-hidden absolute
right-[-4rem]
top-14 md:top-20 flex flex-col justify-evenly text-wrap"
>
<div
class=
"flex flex-col justify-evenly w-full h-full py-2 px-4 md:py-0 bg-white rounded-2xl border-4 border-green-300"
...
...
@@ -63,7 +62,7 @@
class=
"flex flex-row items-center mx-auto h-20 w-4/5 md:w-full bg-black-400 gap-4"
>
<div
class=
"flex flex-1 overflow-x-auto"
>
<div
v-for=
"index in
7
"
:key=
"index"
class=
"min-w-max mx-auto"
>
<div
v-for=
"index in
6
"
:key=
"index"
class=
"min-w-max mx-auto"
>
<div
class=
"flex flex-col justify-around items-center"
>
<!-- Display the current streak day number adjusted by index -->
<span
class=
"text-black text-xs md:text-1xl font-bold"
>
...
...
This diff is collapsed.
Click to expand it.
src/components/NavBarComponent.vue
+
10
−
9
View file @
7b313991
<
template
>
<nav
class=
"flex justify-between items-center min-h-32 text-xl w-full px-3 my-0"
>
<div>
<div
class=
"order-first basis-1/5"
>
<router-link
to=
"/hjem"
@
click=
"hamburgerOpen = false"
>
<img
alt=
"logo"
...
...
@@ -8,12 +8,8 @@
src=
"@/assets/spareSti.png"
/>
</router-link>
<div
class=
"flex flex-row justify-center"
>
<ButtonDisplayStreak
/>
</div>
</div>
<div
v-if=
"!isHamburger"
class=
"flex flex-row
gap-10
"
>
<div
v-if=
"!isHamburger"
class=
"flex flex-row
justify-center gap-10 mx-auto basis-3/5
"
>
<router-link
active-class=
"border-b-2"
to=
"/hjem"
>
🏠Hjem
</router-link>
<router-link
active-class=
"border-b-2"
to=
"/sparemaal"
>
🎯Sparemål
</router-link>
<router-link
active-class=
"border-b-2"
to=
"/spareutfordringer"
...
...
@@ -22,15 +18,20 @@
<router-link
active-class=
"border-b-2"
to=
"/profil"
>
🤭Profil
</router-link>
</div>
<div
v-if=
"!isHamburger"
class=
"flex justify-center w-40"
>
<div
v-if=
"!isHamburger"
class=
"flex-row flex gap-2 justify-end w-auto h-14 basis-1/5"
>
<ButtonDisplayStreak/>
<button
class=
"primary bg-[#95e35d] logout focus:ring focus:ring-black-300"
class=
"primary
basis-1/2
bg-[#95e35d] logout focus:ring focus:ring-black-300
text-nowrap
"
@
click=
"openModal"
>
Logg ut
</button>
</div>
<button
class=
"primary logout"
v-if=
"isHamburger"
@
click=
"toggleMenu"
>
☰
</button>
<div
class=
"flex flex-row gap-2"
>
<ButtonDisplayStreak
v-if=
"isHamburger"
/>
<button
class=
"primary logout"
v-if=
"isHamburger"
@
click=
"toggleMenu"
>
☰
</button>
</div>
</nav>
<div
v-if=
"hamburgerOpen"
class=
"flex flex-col bg-white border border-slate-300 z-50"
>
...
...
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