Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
K
kiaisoft_tuananh_nuxt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TTS Tran Viet Anh
kiaisoft_tuananh_nuxt
Commits
2fbb2ce4
Commit
2fbb2ce4
authored
Feb 23, 2023
by
vietanh-0511
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
navigation bar
parent
1983ff78
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
174 additions
and
50 deletions
+174
-50
PageCarousels.vue
components/PageCarousels.vue
+46
-0
Header.vue
components/user/Header.vue
+4
-48
NavBar.vue
components/user/NavBar.vue
+114
-0
index.vue
pages/home-page/index.vue
+10
-2
No files found.
components/PageCarousels.vue
0 → 100644
View file @
2fbb2ce4
<
template
>
<v-carousel
cycle
height=
"550"
hide-delimiter-background
show-arrows-on-hover
>
<v-carousel-item
v-for=
"(slide, i) in slides"
:key=
"i"
:src=
"img[i]"
>
<v-row
class=
"fill-height"
align=
"center"
justify=
"center"
>
<div
class=
"text-h2"
>
{{
slide
}}
Slide
</div>
</v-row>
</v-carousel-item>
</v-carousel>
</
template
>
<
script
>
export
default
{
name
:
'
PageCarousels
'
,
data
()
{
return
{
img
:
[
'
https://d-themes.com/html/riode/images/demos/demo1/slides/slide1.jpg
'
,
'
https://d-themes.com/html/riode/images/demos/demo1/slides/slide2.jpg
'
],
slides
:
[
'
First
'
,
'
Second
'
]
}
}
}
</
script
>
<
style
>
</
style
>
components/user/Header.vue
View file @
2fbb2ce4
...
@@ -202,45 +202,7 @@
...
@@ -202,45 +202,7 @@
<!-- end header middle -->
<!-- end header middle -->
<!-- header bottom -->
<!-- header bottom -->
<div
class=
"header-bottom"
>
<div
class=
"header-bottom"
>
<v-container>
<NavBar
/>
<div
class=
"navbar d-flex justify-space-between col-md-7"
>
<div>
<span>
Home
</span>
</div>
<div>
<span>
Categories
</span>
</div>
<div>
<span>
Products
</span>
</div>
<div>
<span>
Pages
</span>
</div>
<div>
<span>
Elements
</span>
</div>
<div>
<span>
Blogs
</span>
</div>
<div>
<span>
About
</span>
</div>
</div>
</v-container>
</div>
</div>
<!-- end header bottom -->
<!-- end header bottom -->
...
@@ -300,12 +262,14 @@
...
@@ -300,12 +262,14 @@
<
script
>
<
script
>
import
LoginModal
from
'
~/components/LoginModal.vue
'
import
LoginModal
from
'
~/components/LoginModal.vue
'
import
SignupModal
from
'
~/components/RegisterModal.vue
'
import
SignupModal
from
'
~/components/RegisterModal.vue
'
import
NavBar
from
'
~/components/user/NavBar
'
export
default
{
export
default
{
name
:
'
UserHeader
'
,
name
:
'
UserHeader
'
,
components
:
{
components
:
{
LoginModal
,
LoginModal
,
SignupModal
SignupModal
,
NavBar
},
},
data
:
()
=>
{
data
:
()
=>
{
return
{
return
{
...
@@ -371,14 +335,6 @@ export default {
...
@@ -371,14 +335,6 @@ export default {
.v-application
.d-flex
{
.v-application
.d-flex
{
align-items
:
center
;
align-items
:
center
;
}
}
.navbar
span
{
font-weight
:
bold
;
cursor
:
pointer
;
transition
:
0.3s
;
}
.navbar
span
:hover
{
color
:
#26c
;
}
.favorite-modal
{
.favorite-modal
{
position
:
fixed
;
position
:
fixed
;
}
}
...
...
components/user/NavBar.vue
0 → 100644
View file @
2fbb2ce4
<
template
>
<v-container>
<div
class=
"navbar d-flex justify-space-between col-md-7"
>
<div>
<span>
Home
</span>
</div>
<div
class=
"dropdown"
>
<span>
Products
</span>
<v-icon>
mdi-chevron-down
</v-icon>
<div
class=
"dropdown-content"
>
<v-treeview
:active.sync=
"active"
rounded
dense
hoverable
activatable
:items=
"categories"
/>
</div>
</div>
<div>
<span>
Pages
</span>
</div>
<div>
<span>
Blogs
</span>
</div>
<div>
<span>
About
</span>
</div>
</div>
</v-container>
</
template
>
<
script
>
export
default
{
name
:
'
NavBar
'
,
data
:
()
=>
({
active
:
[],
open
:
[],
categories
:
[]
}),
computed
:
{
selected
()
{
if
(
!
this
.
active
.
length
)
{
return
undefined
}
const
id
=
this
.
active
[
0
]
console
.
log
(
id
)
return
this
.
categories
.
find
(
category
=>
category
.
id
===
id
)
}
},
watch
:
{
selected
()
{
if
(
!
this
.
active
.
length
)
{
return
undefined
}
const
id
=
this
.
active
[
0
]
return
id
}
},
created
()
{
this
.
$axios
.
get
(
'
guest/categories/index
'
)
.
then
((
response
)
=>
{
this
.
categories
=
response
.
data
.
data
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
)
})
},
methods
:
{
}
}
</
script
>
<
style
scoped
>
.navbar
span
{
font-weight
:
bold
;
cursor
:
pointer
;
transition
:
0.3s
;
}
.navbar
span
:hover
{
color
:
#26c
;
}
.dropdown
{
position
:
relative
;
}
.dropdown
:hover
.dropdown-content
{
display
:
block
;
}
.dropdown-content
{
display
:
none
;
position
:
absolute
;
z-index
:
1
;
background-color
:
#ffffff
;
min-width
:
350px
;
}
</
style
>
<
style
>
div
.v-treeview-node__label
{
cursor
:
pointer
;
}
</
style
>
pages/home-page/index.vue
View file @
2fbb2ce4
<
template
>
<
template
>
<div>
this is body
</div>
<div>
<!-- Banners -->
<PageCarousels
/>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
PageCarousels
from
'
@/components/PageCarousels
'
export
default
{
export
default
{
layout
:
'
user
'
layout
:
'
user
'
,
component
:
{
PageCarousels
}
}
}
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment