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
c3b5aa5b
Commit
c3b5aa5b
authored
10 months ago
by
Malin Haugland Høli
Browse files
Options
Downloads
Patches
Plain Diff
refactor:
Add sti decoration to certain pages
parent
9dbe1ade
No related branches found
No related tags found
3 merge requests
!66
Final merge
,
!50
fix(styling):
,
!4
Pipeline fix
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/App.vue
+51
-22
51 additions, 22 deletions
src/App.vue
with
51 additions
and
22 deletions
src/App.vue
+
51
−
22
View file @
c3b5aa5b
...
...
@@ -14,29 +14,58 @@ const showNavBar = computed(() => {
route
.
path
.
startsWith
(
'
/konfigurasjon
'
)
)
})
</
script
>
<
template
>
<NavBarComponent
v-if=
"showNavBar"
/>
<main
class=
"mb-10"
>
<RouterView
/>
</main>
</
template
>
const
showSti
=
computed
(()
=>
{
return
!
(
route
.
path
==
'
/
'
||
route
.
path
==
'
/registrer
'
||
route
.
path
==
'
/logginn
'
||
route
.
path
==
'
/forgotPassword
'
||
route
.
path
.
startsWith
(
'
/konfigurasjon
'
)
||
route
.
path
==
'
/hjem
'
||
route
.
path
==
'
/profil
'
)
})
<
style
>
nav
{
display
:
flex
;
justify-content
:
center
;
gap
:
1rem
;
margin
:
1rem
0
;
}
const
backgroundImageStyle
=
computed
(()
=>
{
if
(
showSti
.
value
)
{
return
{
backgroundImage
:
"
url('src/assets/sti.png')
"
}
}
else
{
return
{
backgroundImage
:
"
none
"
}
}
})
nav
a
.router-link-exact-active
{
color
:
var
(
--color-text
);
}
</
script
>
nav
a
.router-link-exact-active
:hover
{
background-color
:
transparent
;
}
</
style
>
<
template
>
<div
class=
"min-h-screen bg-left-bottom bg-phone md:bg-pc bg-no-repeat"
:style=
"backgroundImageStyle"
>
<NavBarComponent
v-if=
"showNavBar"
/>
<main
class=
"mb-10 "
>
<RouterView
/>
</main>
</div>
</
template
>
<
style
>
nav
{
display
:
flex
;
justify-content
:
center
;
gap
:
1rem
;
margin
:
1rem
0
;
}
nav
a
.router-link-exact-active
{
color
:
var
(
--color-text
);
}
nav
a
.router-link-exact-active
:hover
{
background-color
:
transparent
;
}
</
style
>
\ No newline at end of file
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