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
9c9d501d
Commit
9c9d501d
authored
Apr 11, 2023
by
Le Dinh Trung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add banners
parent
333e6b86
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
460 additions
and
10 deletions
+460
-10
Navbar.vue
components/Navbar.vue
+5
-3
PageCarousels.vue
components/PageCarousels.vue
+29
-7
index.vue
pages/banners/index.vue
+426
-0
No files found.
components/Navbar.vue
View file @
9c9d501d
...
@@ -107,15 +107,17 @@ export default {
...
@@ -107,15 +107,17 @@ export default {
icon
:
'
mdi-newspaper
'
,
icon
:
'
mdi-newspaper
'
,
title
:
'
Posts
'
,
title
:
'
Posts
'
,
to
:
'
/posts
'
to
:
'
/posts
'
}
,
{
icon
:
'
mdi-image-marker-outline
'
,
title
:
'
Banners
'
,
to
:
'
/banners
'
}
}
],
],
miniVariant
:
false
,
miniVariant
:
false
,
title
:
'
Homepage
'
title
:
'
Homepage
'
}
}
}
,
}
,
mounted
()
{
console
.
log
(
'
123
'
)
}
,
methods
:
{
methods
:
{
async
logout
()
{
async
logout
()
{
try
{
try
{
...
...
components/PageCarousels.vue
View file @
9c9d501d
...
@@ -6,9 +6,9 @@
...
@@ -6,9 +6,9 @@
show-arrows-on-hover
show-arrows-on-hover
>
>
<v-carousel-item
<v-carousel-item
v-for=
"(
slide, i) in slide
s"
v-for=
"(
item, index) in banner
s"
:key=
"i"
:key=
"i
ndex
"
:src=
"i
mg[i]
"
:src=
"i
tem.image
"
>
>
<v-row
<v-row
class=
"fill-height"
class=
"fill-height"
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
justify=
"center"
justify=
"center"
>
>
<div
class=
"text-h2"
>
<div
class=
"text-h2"
>
{{
slide
}}
Slide
{{
index
+
1
}}
</div>
</div>
</v-row>
</v-row>
</v-carousel-item>
</v-carousel-item>
...
@@ -28,15 +28,37 @@ export default {
...
@@ -28,15 +28,37 @@ export default {
name
:
'
PageCarousels
'
,
name
:
'
PageCarousels
'
,
data
()
{
data
()
{
return
{
return
{
img
:
[
bannerss
:
[
'
https://d-themes.com/html/riode/images/demos/demo1/slides/slide1.jpg
'
,
{
src
:
'
https://d-themes.com/html/riode/images/demos/demo1/slides/slide1.jpg
'
,
ordering
:
0
}
,
'
https://d-themes.com/html/riode/images/demos/demo1/slides/slide2.jpg
'
{
src
:
'
https://d-themes.com/html/riode/images/demos/demo1/slides/slide2.jpg
'
,
ordering
:
1
}
],
],
banners
:
[],
slides
:
[
slides
:
[
'
First
'
,
'
First
'
,
'
Second
'
'
Second
'
]
]
}
}
},
mounted
()
{
this
.
getBanners
()
},
methods
:
{
async
getBanners
()
{
await
this
.
$axios
.
get
(
'
guest/banners/get-active-banners
'
,
{
headers
:
{
Authorization
:
`Bearer
${
this
.
$auth
.
$storage
.
getUniversal
(
'
token
'
)}
`
}
})
.
then
((
response
)
=>
{
this
.
banners
=
response
.
data
.
data
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
)
})
}
}
}
}
}
</
script
>
</
script
>
...
...
pages/banners/index.vue
0 → 100644
View file @
9c9d501d
This diff is collapsed.
Click to expand it.
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