|
1 |
| -<template> |
2 |
| - <section class="section section--demo-1"> |
3 |
| - <div class="container"> |
4 |
| - <div class="row"> |
5 |
| - <div class="col-xs-12"> |
6 |
| - <h2 class="section__title"><strong>#2</strong> demo</h2> |
7 |
| - <p class="section__description">vue-agile as a full size image carousel with custom styles for |
8 |
| - arrows and dots indicators</p> |
9 |
| - </div> |
10 |
| - </div> |
11 |
| - |
12 |
| - <div class="row"> |
13 |
| - <div class="col-xs-12"> |
14 |
| - <p class="codepen" data-height="582" data-theme-id="dark" data-default-tab="result" data-user="lukaszflorczak" data-slug-hash="ROJKQg" style="height: 582px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid black; margin: 1em 0; padding: 1em;" data-pen-title="vue-agile – full size image carousel with custom styles for arrows and dots indicators"> |
15 |
| - <span>See the Pen <a href="https://codepen.io/lukaszflorczak/pen/ROJKQg/"> |
16 |
| - vue-agile – full size image carousel with custom styles for arrows and dots indicators</a> by Lukasz Florczak (<a href="https://codepen.io/lukaszflorczak">@lukaszflorczak</a>) |
17 |
| - on <a href="https://codepen.io">CodePen</a>.</span> |
18 |
| - </p> |
19 |
| - </div> |
20 |
| - </div> |
21 |
| - </div> |
22 |
| - </section> |
23 |
| -</template> |
| 1 | +<template lang="pug"> |
| 2 | + section.section.section--demo-2 |
| 3 | + div.container |
| 4 | + div.row |
| 5 | + div.col-xs-12 |
| 6 | + h2.section__title #[strong #2] demo |
| 7 | + code-pen(id="ROJKQg") |
| 8 | + p.section__description vue-agile as a full size image carousel with custom styles for arrows and dots indicators |
| 9 | + |
| 10 | + div.container-fluid |
| 11 | + div.row |
| 12 | + div.col-xs-12 |
| 13 | + agile(:initial-slide="3") |
| 14 | + img.slide(src='https://images.unsplash.com/photo-1506260408121-e353d10b87c7?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb&w=1600&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ') |
| 15 | + img.slide(src='https://images.unsplash.com/photo-1523712999610-f77fbcfc3843?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb&w=1600&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ') |
| 16 | + img.slide(src='https://images.unsplash.com/photo-1524260855046-f743b3cdad07?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb&w=1600&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ') |
| 17 | + img.slide(src='https://images.unsplash.com/photo-1526080676457-4544bf0ebba9?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb&w=1600&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ') |
| 18 | + img.slide(src='https://images.unsplash.com/photo-1519681393784-d120267933ba?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb&w=1600&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ') |
| 19 | + img.slide(src='https://images.unsplash.com/photo-1426170042593-200f250dfdaf?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb&w=1600&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ') |
| 20 | + img.slide(src='https://images.unsplash.com/photo-1529815481058-55e5b656f6d6?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb&w=1600&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ') |
| 21 | + |
| 22 | + template(slot="prevButton") |
| 23 | + i.fas.fa-chevron-left |
| 24 | + |
| 25 | + template(slot="nextButton") |
| 26 | + i.fas.fa-chevron-right |
24 | 27 |
|
25 | 28 |
|
| 29 | +</template> |
| 30 | + |
26 | 31 | <script>
|
27 | 32 | export default {
|
28 | 33 | name: 'Example2'
|
29 | 34 | }
|
30 | 35 | </script>
|
| 36 | + |
| 37 | +<style lang="sass"> |
| 38 | + .section--demo-2 |
| 39 | + .agile |
| 40 | + &__nav-button |
| 41 | + background: transparent |
| 42 | + border: none |
| 43 | + color: #fff |
| 44 | + cursor: pointer |
| 45 | + font-size: 24px |
| 46 | + height: 100% |
| 47 | + position: absolute |
| 48 | + top: 0 |
| 49 | + transition-duration: .3s |
| 50 | + width: 80px |
| 51 | +
|
| 52 | + &:hover |
| 53 | + background-color: rgba(#000, .5) |
| 54 | + opacity: 1 |
| 55 | +
|
| 56 | + &--prev |
| 57 | + left: 0 |
| 58 | +
|
| 59 | + &--next |
| 60 | + right: 0 |
| 61 | +
|
| 62 | + &__dots |
| 63 | + bottom: 10px |
| 64 | + left: 50% |
| 65 | + position: absolute |
| 66 | + transform: translateX(-50%) |
| 67 | +
|
| 68 | + &__dot |
| 69 | + margin: 0 10px |
| 70 | +
|
| 71 | + button |
| 72 | + background-color: transparent |
| 73 | + border: 1px solid #fff |
| 74 | + border-radius: 50% |
| 75 | + cursor: pointer |
| 76 | + display: block |
| 77 | + height: 10px |
| 78 | + font-size: 0 |
| 79 | + line-height: 0 |
| 80 | + margin: 0 |
| 81 | + padding: 0 |
| 82 | + transition-duration: .3s |
| 83 | + width: 10px |
| 84 | +
|
| 85 | + &--current, |
| 86 | + &:hover |
| 87 | + button |
| 88 | + background-color: #fff |
| 89 | +
|
| 90 | + // Slides styles |
| 91 | + .slide |
| 92 | + display: block |
| 93 | + height: 550px |
| 94 | + object-fit: cover |
| 95 | + width: 100% |
| 96 | +
|
| 97 | +</style> |
0 commit comments