Skip to content

Commit 6128a2f

Browse files
committed
Improve global UI.
1 parent 4bed68e commit 6128a2f

File tree

4 files changed

+66
-49
lines changed

4 files changed

+66
-49
lines changed

src/app.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,24 @@ w-app(:class="{ ready }" v-scroll="onScroll")
44
router-view
55

66
w-transition-twist
7-
w-button(color="primary" fixed bottom right round v-show="!goTopHidden" v-scroll-to="'#top'")
7+
w-button(
8+
v-show="!goTopHidden"
9+
bg-color="primary"
10+
icon="material-icons keyboard_arrow_up"
11+
fixed
12+
bottom
13+
right
14+
round
15+
xl
16+
v-scroll-to="'#top'")
817
//- Width to prevent ugly first load animation when icon is not yet ready.
9-
w-icon(color="white" size="26" style="width: 24px") material-icons keyboard_arrow_up
18+
//- w-icon(color="white" size="26" style="width: 24px")
1019
1120
footer.py2(color="white")
1221
w-flex.max-widthed(wrap justify-center)
13-
.xs12.sm6.text-center.text-sm-left.copyright.
22+
.xs12.sm6.text-center.sm-text-left.copyright.
1423
Copyright © {{ (new Date()).getFullYear() }} Antoni André, all rights reserved.
15-
.xs12.sm6.text-center.text-sm-right.made-with
24+
.xs12.sm6.text-center.sm-text-right.made-with
1625
.mb1 This documentation is made with #[w-icon fab fa-vuejs], #[w-icon fab fa-html5], #[w-icon fab fa-css3], #[w-icon fab fa-sass] & #[w-icon.heart material-icons favorite]
1726
| View this project on #[a(href="https://github.com/antoniandre/vueper-slides" target="_blank") #[w-icon fab fa-github] Github].
1827
</template>

src/documentation/_base.scss

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ ul, ol {
2424
padding-left: 1.3em;
2525
}
2626

27-
.code {font-family: monospace, sans-serif;}
27+
code, .code {
28+
font-family: monospace, sans-serif;
29+
border-radius: 4px;
30+
font-size: 90%;
31+
font-weight: 400;
32+
color: currentColor;
33+
padding: .15em .4em;
34+
}
35+
code {background-color: rgba(0,0,0,.05);}
2836

2937
p {margin-bottom: 16px;}
3038

@@ -36,6 +44,8 @@ p {margin-bottom: 16px;}
3644
border-radius: 4px;
3745
display: block;
3846
box-shadow: none;
47+
font-size: 0.9em;
48+
line-height: 1.4;
3949
}
4050

4151
.page__title {
@@ -58,8 +68,8 @@ p {margin-bottom: 16px;}
5868
text-transform: uppercase;
5969
font-weight: 500;
6070

61-
&.size--md {
62-
height: 30px;
71+
&.size--md:not(.w-button--round) {
72+
height: 28px;
6373
padding-left: 12px;
6474
padding-right: 12px;
6575
}

src/documentation/examples.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
padding: 4px 25px;
191191
background: orange;
192192
color: #fff;
193-
font-size: 10px;
193+
font-size: 11px;
194194
transform: translateX(30%) rotate(45deg);
195195
transform-origin: 0 0;
196196
box-shadow: 0 0 9px rgba(0, 0, 0, 0.2);

src/documentation/index.vue

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,12 @@
167167
| The autoplay circles between all the slides and goes back to the begining after the last slide.#[br]
168168
| You can also pause and resume the autoplay from an external button using Vue refs like this:
169169
w-button.ml2(
170-
small
171170
bg-color="primary"
172171
@click="$refs.exBasic[`${autoPlaying ? 'pause' : 'resume'}Autoplay`]();autoPlaying = !autoPlaying;pauseOnHover = false")
173-
w-icon.mr1(md) material-icons {{ autoPlaying ? 'pause_circle_outline' : 'play_circle_outline' }}
172+
w-icon.mr1(lg) material-icons {{ autoPlaying ? 'pause_circle_outline' : 'play_circle_outline' }}
174173
| {{ autoPlaying ? 'Pause' : 'Resume' }}
175-
w-button.ml2(small bg-color="primary" :outline="!pauseOnHover" @click="pauseOnHover = !pauseOnHover")
176-
w-icon.mr1(v-if="pauseOnHover" md) material-icons check
174+
w-button.ml2(bg-color="primary" :outline="!pauseOnHover" @click="pauseOnHover = !pauseOnHover")
175+
w-icon.mr1(v-if="pauseOnHover" lg) material-icons check
177176
| Pause on mouseover
178177
code.ml2 Currently {{ internalAutoPlaying ? 'playing' : 'paused' }}
179178
vueper-slides.ex2(
@@ -340,7 +339,7 @@
340339
:title="i.toString()"
341340
:style="'background-color: ' + colors[(i + 1) % 4]")
342341
template(#bullet="{ active, slideIndex, index }")
343-
w-icon.mr1(:color="colors[(index + 1) % 4]") material-icons {{ active ? 'check_circle' : 'radio_button_unchecked' }}
342+
w-icon.mr1(:style="'color: ' + colors[(index + 1) % 4]" lg) material-icons {{ active ? 'check_circle' : 'radio_button_unchecked' }}
344343
strong(:style="`color: ${colors[(index + 1) % 4]}`") Slide \#{{ index }}
345344

346345
p.mb0 When using the #[span.code bullet] slot, 3 variables are accessible:
@@ -373,7 +372,7 @@
373372
:title="i.toString()"
374373
:style="'background-color: ' + colors[(i + 1) % 4]")
375374
template(#bullets="{ bulletIndexes, goToSlide, previous, next, currentSlide }")
376-
button.px1.py3(
375+
button.px1.py3.transparent--bg.bd0(
377376
v-for="(slideIndex, i) in bulletIndexes"
378377
:key="i"
379378
:class="{ 'active': currentSlide === slideIndex }"
@@ -382,7 +381,7 @@
382381
@click="goToSlide(slideIndex)"
383382
@keyup.left="previous()"
384383
@keyup.right="next()")
385-
w-icon(:color="colors[(i + 2) % 4]")
384+
w-icon(:style="'color: ' + colors[(i + 2) % 4]" lg)
386385
| material-icons {{ currentSlide === slideIndex ? 'check_circle' : 'radio_button_unchecked' }}
387386

388387
p.mb0 When using the #[span.code bullets] slot, 5 variables are accessible:
@@ -597,7 +596,7 @@
597596
template(#content)
598597
.vueperslide__content-wrapper
599598
.subtitle-1
600-
w-icon.mr2(color="white") material-icons check
599+
w-icon.mr2(color="white" lg) material-icons check
601600
| Complex content {{ i.toString() }} with Vue.js
602601
| {{ 1 === 1 ? 'interpreted' : 'non-interpreted' }} compilable content like
603602
| components &amp; #[span(v-pre) {{&nbsp;mustaches&nbsp;}}].
@@ -613,9 +612,8 @@
613612
&lt;/template&gt;
614613
&lt;/vueper-slide&gt;
615614
&lt;/vueper-slides&gt;
616-
highlight(type="info")
617-
ul.my0
618-
li if both #[span.code :content="..."] and #[span.code #content] are provided, the content slot will be displayed.
615+
highlight.pl6(type="info").
616+
If both #[span.code :content="..."] and #[span.code #content] are provided, the content slot will be displayed.
619617

620618
h3
621619
a(href="#ex--updating-content" v-scroll-to="'#ex--updating-content'") Updating Content Inside/Outside
@@ -628,7 +626,7 @@
628626
In this example the content is set in a slot (refer to #[a(href="#ex--complex-slide-title-and-content" v-scroll-to="'#ex--complex-slide-title-and-content'") Complex Slide Title &amp; Content]
629627
for more details) and uses interpreted mustaches #[span.code(v-pre) {{ }} and Vuetify components like #[span.code v-layout] &amp; #[span.code v-icon]].
630628

631-
highlight(type="tips")
629+
highlight.mt4(type="tips")
632630
strong.red WARNING: The following tip does not apply to Vue 3. Vue 3 resolves this internally.
633631
p.
634632
The only thing that does not keep updated by default - as more costly, is the slides clones
@@ -637,14 +635,14 @@
637635
This is only for particular cases like this clock and you usually don't need this as the slides are copied from original content on mounted.
638636
w-flex.max-widthed.mb4(align-center wrap)
639637
w-flex.shrink.mr4(align-center wrap)
640-
w-button.mt2.mr2(bg-color="primary" @click="toggleSlidesTime" small)
641-
w-icon.pr2 material-icons {{ slidesTimeTimerId ? 'highlight_off' : 'access_time' }}
638+
w-button.mt2.mr2(bg-color="primary" @click="toggleSlidesTime")
639+
w-icon.pr2(lg) material-icons {{ slidesTimeTimerId ? 'highlight_off' : 'access_time' }}
642640
| {{ slidesTimeTimerId ? 'Stop' : 'Keep' }} updating time
643641
w-transition-expand(x)
644-
w-tag.mt2(v-if="slidesTimeTimerId === 0" small outline) CPU says THANK YOU!
642+
w-tag.mt2.grey.text-nowrap(v-if="slidesTimeTimerId === 0" outline) CPU says THANK YOU!
645643
w-flex(align-center wrap)
646-
w-button.mt2.mx2(bg-color="primary" @click="contentPositionChange" small)
647-
w-icon material-icons swap_vert
644+
w-button.mt2.mx2(bg-color="primary" @click="contentPositionChange")
645+
w-icon(lg) material-icons swap_vert
648646
| &nbsp;Move content position
649647
strong.mt2.code {{ contentPosition === 'false' ? ':' : '' }}slide-content-outside="#[span.primary {{ contentPosition }}]"
650648
vueper-slides.ex--updating-content(
@@ -656,7 +654,7 @@
656654
vueper-slide(v-for="(slide, i) in slides4" :key="i" :style="'background-color: ' + ['#42b983', '#ff5252'][i % 2]")
657655
template(#content)
658656
.vueperslide__content-wrapper(style="flex-direction: row")
659-
w-icon.pr3(color="white" size="5em") material-icons access_time
657+
w-icon.mr4(color="white" size="5em" lg) material-icons access_time
660658
span(style="font-size: 3.7em") {{ slide.title }}
661659

662660
ssh-pre(language="html-vue" label="HTML Vue Template").
@@ -711,14 +709,14 @@
711709
p
712710
| This example illustrates how to add or remove slides on the fly from a running Vueper Slides instance.#[br]
713711
| You can also completely freeze the slideshow and unfreeze when you want to.#[br]
714-
w-button.ma1(bg-color="primary" @click="appendSlide" small)
715-
w-icon material-icons add
712+
w-button.ma1(bg-color="primary" @click="appendSlide" )
713+
w-icon(lg) material-icons add
716714
| &nbsp; Add Slide
717-
w-button.ma1(bg-color="primary" @click="removeSlide" small)
718-
w-icon material-icons remove
715+
w-button.ma1(bg-color="primary" @click="removeSlide" )
716+
w-icon(lg) material-icons remove
719717
| &nbsp; Remove Slide
720-
w-button.ma1(bg-color="secondary" @click="toggleSlideshow" small)
721-
w-icon material-icons {{ slideshowDisabled ? 'check_circle' : 'highlight_off'}}
718+
w-button.ma1(bg-color="secondary" @click="toggleSlideshow" )
719+
w-icon(lg) material-icons {{ slideshowDisabled ? 'check_circle' : 'highlight_off'}}
722720
| &nbsp; {{ slideshowDisabled ? 'Enable' : 'Disable' }} Slideshow
723721
highlight Note that the slideshow disables controls if you have only 1 slide or none.
724722
p The arrows are also disabled on edges in this example.
@@ -736,13 +734,13 @@
736734
:content="slide.content"
737735
:style="'background-color: ' + ['#ff5252', '#42b983'][i % 2]")
738736
ssh-pre(language="html-vue" label="HTML Vue Template").
739-
&lt;button @click="appendSlide" small&gt;
737+
&lt;button @click="appendSlide" &gt;
740738
&lt;i class="icon material-icons"&gt;add&lt;/i&gt; Add Slide
741739
&lt;/button&gt;
742-
&lt;button @click="removeSlide" small&gt;
740+
&lt;button @click="removeSlide" &gt;
743741
&lt;i class="icon material-icons"&gt;remove&lt;/i&gt; Remove Slide
744742
&lt;/button&gt;
745-
&lt;button @click="toggleSlideshow" small&gt;
743+
&lt;button @click="toggleSlideshow" &gt;
746744
&lt;i class="icon material-icons"&gt; {{ "\{\{ slideshowDisabled ? 'check_circle' : 'highlight_off'\}\}" }}&lt;/i&gt; {{ "\{\{ slideshowDisabled ? 'Enable' : 'Disable' \}\}" }} Slideshow
747745
&lt;/button&gt;
748746

@@ -840,8 +838,8 @@
840838
div.grey(v-if="logs")
841839
strong // event-name:
842840
span.ml2 params
843-
w-button(bg-color="primary" sm outline @click="logs = []")
844-
w-icon.mr1(small) material-icons close
841+
w-button(color="primary" sm outline @click="logs = []")
842+
w-icon.mr1() material-icons close
845843
| Clear logs
846844
div(v-for="(log, i) in logs")
847845
strong.mr2 {{ log.eventName }}:
@@ -878,7 +876,7 @@
878876
padding: 4px 25px;
879877
background: orange;
880878
color: #fff;
881-
font-size: 10px;
879+
font-size: 11px;
882880
transform: translateX(30%) rotate(45deg);
883881
transform-origin: 0 0;
884882
box-shadow: 0 0 9px rgba(0, 0, 0, 0.2);
@@ -966,13 +964,13 @@
966964
You might also want to set a fixed content on top of the moving background using
967965
the #[span.code parallax-fixed-content] option.
968966
w-flex.max-widthed.mb4(align-center wrap)
969-
w-button.my1.mr2(small bg-color="primary" @click="parallax *= -1;$refs.exParallax.refreshParallax()")
970-
w-icon material-icons sync
967+
w-button.my1.mr2( bg-color="primary" @click="parallax *= -1;$refs.exParallax.refreshParallax()")
968+
w-icon(lg) material-icons sync
971969
| &nbsp; Reverse parallax effect
972970
strong.code.mr4 :parallax="#[span.primary {{ parallax.toString() }}]"
973971

974-
w-button.my1.mr2(small bg-color="primary" @click="parallaxFixedContent = !parallaxFixedContent")
975-
w-icon material-icons {{ parallaxFixedContent ? 'close' : 'remove_from_queue' }}
972+
w-button.my1.mr2( bg-color="primary" @click="parallaxFixedContent = !parallaxFixedContent")
973+
w-icon(lg) material-icons {{ parallaxFixedContent ? 'close' : 'remove_from_queue' }}
976974
| &nbsp; Add a fix content
977975
strong.code :parallax-fixed-content="#[span.primary {{ parallaxFixedContent.toString() }}]"
978976
vueper-slides.ex--parallax(ref="exParallax" :parallax="parallax" :parallax-fixed-content="parallaxFixedContent")
@@ -1225,14 +1223,14 @@
12251223
refer to the #[a(href="#ex--parallax" v-scroll-to="'#ex--parallax'") Parallax Effect] example.
12261224

12271225
div.text-center.mb3
1228-
w-button.ma1(bg-color="primary" small @click="$refs.myVueperSlides.previous()")
1229-
w-icon material-icons arrow_back
1226+
w-button.ma1(bg-color="primary" @click="$refs.myVueperSlides.previous()")
1227+
w-icon(lg) material-icons arrow_back
12301228
| &nbsp; Previous
1231-
w-button.ma1(bg-color="primary" small @click="$refs.myVueperSlides.goToSlide(5)")
1232-
w-icon material-icons call_made
1229+
w-button.ma1(bg-color="primary" @click="$refs.myVueperSlides.goToSlide(5)")
1230+
w-icon(lg) material-icons call_made
12331231
| &nbsp; Go to slide 6
1234-
w-button.ma1(bg-color="primary" small @click="$refs.myVueperSlides.next()")
1235-
w-icon material-icons arrow_forward
1232+
w-button.ma1(bg-color="primary" @click="$refs.myVueperSlides.next()")
1233+
w-icon(lg) material-icons arrow_forward
12361234
| &nbsp; Next
12371235
vueper-slides(:slide-ratio="1/5" ref="myVueperSlides")
12381236
vueper-slide(v-for="i in 10" :key="i" :title="i.toString()" :style="'background-color: ' + ['#ff5252', '#42b983'][i % 2]")
@@ -1319,7 +1317,7 @@
13191317
p
13201318
a(href="https://codepen.io/antoniandre/pen/ZEGEydP" target="_blank")
13211319
| Edit this example in Codepen
1322-
w-icon.ml1(small color="primary") material-icons open_in_new
1320+
w-icon.ml1( color="primary") material-icons open_in_new
13231321
vueper-slides(
13241322
ref="vueperslides3"
13251323
:touchable="false"

0 commit comments

Comments
 (0)