This repository was archived by the owner on Feb 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +56
-12
lines changed Expand file tree Collapse file tree 6 files changed +56
-12
lines changed Original file line number Diff line number Diff line change 3737 "dependencies" : {
3838 "@ionic/core" : " 4.0.0-rc.0" ,
3939 "@webcomponents/custom-elements" : " ^1.2.1" ,
40- "deckdeckgo" : " ^1.0.0-beta.22-1 " ,
41- "deckdeckgo-charts" : " ^1.0.0-alpha.3 " ,
42- "deckdeckgo-highlight-code" : " ^1.0.0-alpha.1 " ,
43- "deckdeckgo-qrcode" : " ^1.0.0-alpha.3 " ,
44- "deckdeckgo-remote" : " ^1.0.0-alpha.4 " ,
40+ "deckdeckgo" : " ^1.0.0-beta.25 " ,
41+ "deckdeckgo-charts" : " ^1.0.0-alpha.4 " ,
42+ "deckdeckgo-highlight-code" : " ^1.0.0-alpha.10 " ,
43+ "deckdeckgo-qrcode" : " ^1.0.0-alpha.4 " ,
44+ "deckdeckgo-remote" : " ^1.0.0-alpha.5 " ,
4545 "ionicons" : " ^4.5.1"
4646 },
4747 "keywords" : [
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ deckgo-deck {
44 --pager-text-color : var (--ion-color-primary-shade );
55
66 --pager-margin-bottom : 18px ;
7- --pager-margin-start : calc (10px + var (--ion-safe-area-right , 0px ) + 5px );
87
98 --pager-size : 40px ;
10- }
9+ }
Original file line number Diff line number Diff line change @@ -11,3 +11,7 @@ ion-content {
1111ion-fab {
1212 direction : ltr;
1313}
14+
15+ ion-fab ion-fab-button .hide-on-mobile {
16+ display : var (--deckgo-hide-on-mobile );
17+ }
Original file line number Diff line number Diff line change @@ -211,16 +211,17 @@ <h2 slot="title">Get started now 🔥</h2>
211211 < ion-icon name ="apps "> </ ion-icon >
212212 </ ion-fab-button >
213213 < ion-fab-list side ="start ">
214- < ion-fab-button color ="primary " onclick ="toggleFullScreen() "> < ion-icon name ="expand "> </ ion-icon > </ ion-fab-button >
215- < ion-fab-button color ="primary " onclick ="presentSlidePicker() "> < ion-icon name ="skip-forward "> </ ion-icon > </ ion-fab-button >
214+ < ion-fab-button class =" hide-on-mobile " color ="primary " onclick ="toggleFullScreen() "> < ion-icon name ="expand "> </ ion-icon > </ ion-fab-button >
215+ < ion-fab-button color ="primary " onclick ="presentSlidePicker() "> < ion-icon name ="bookmark "> </ ion-icon > </ ion-fab-button >
216216 < ion-fab-button color ="primary " onclick ="nextSlide() "> < ion-icon name ="arrow-forward "> </ ion-icon > </ ion-fab-button >
217217 < ion-fab-button color ="primary " onclick ="previousSlide() "> < ion-icon name ="arrow-back "> </ ion-icon > </ ion-fab-button >
218218 </ ion-fab-list >
219219 < ion-fab-list side ="top ">
220220 < ion-fab-button color ="primary " onclick ="presentAlert() "> < ion-icon name ="help "> </ ion-icon > </ ion-fab-button >
221- < ion-fab-button color ="primary " onclick ="doPrint() "> < ion-icon name ="print "> </ ion-icon > </ ion-fab-button >
221+ < ion-fab-button id ="buttonSlideNotes " color ="primary " onclick ="displaySlideNotes() "> < ion-icon name ="clipboard "> </ ion-icon > </ ion-fab-button >
222+ < ion-fab-button class ="hide-on-mobile " color ="primary " onclick ="doPrint() "> < ion-icon name ="print "> </ ion-icon > </ ion-fab-button >
222223 < ion-fab-button color ="primary " onclick ="reconnectRemoteControl() "> < ion-icon name ="link "> </ ion-icon > </ ion-fab-button >
223- < ion-fab-button color ="primary " onclick ="window.open('https://github.com/deckgo /deckdeckgo', '_blank'); "> < ion-icon name ="logo-github "> </ ion-icon > </ ion-fab-button >
224+ < ion-fab-button color ="primary " onclick ="window.open('https://github.com/fluster /deckdeckgo', '_blank'); "> < ion-icon name ="logo-github "> </ ion-icon > </ ion-fab-button >
224225 </ ion-fab-list >
225226 </ ion-fab >
226227
Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ import './scripts/loading.js';
1414import './scripts/slider.js' ;
1515import './scripts/sliderJumpTo.js' ;
1616import './scripts/modal.js' ;
17- import './scripts/notesModal.js' ;
1817import './scripts/alert.js' ;
1918import './scripts/remoteControl.js' ;
19+ import './scripts/actions.js' ;
2020
2121import { defineCustomElements as ionicElements } from '@ionic/core/loader' ;
2222ionicElements ( window ) ;
@@ -37,6 +37,7 @@ deckDeckGoElements(window).then(async () => {
3737 await deckDeckGoHighlightCodeElements ( window ) ;
3838
3939 await postLoading ( ) ;
40+ await initActions ( ) ;
4041
4142 deckDeckGoRemoteElements ( window ) . then ( async ( ) => {
4243 await initRemote ( ) ;
Original file line number Diff line number Diff line change 1+ initActions = ( ) => {
2+ return new Promise ( async ( resolve ) => {
3+ const slider = document . getElementById ( 'slider' ) ;
4+
5+ if ( slider ) {
6+ slider . addEventListener ( 'slidesDidLoad' , async ( _slides ) => {
7+ await initActionButtons ( slider )
8+ } ) ;
9+ }
10+
11+ resolve ( ) ;
12+ } ) ;
13+ } ;
14+
15+ function initActionButtons ( slider ) {
16+ return new Promise ( async ( resolve ) => {
17+ const ionFab = document . querySelector ( 'ion-fab' ) ;
18+
19+ if ( ionFab ) {
20+ const mobile = await slider . isMobile ( ) ;
21+
22+ if ( mobile ) {
23+ ionFab . style . setProperty ( '--deckgo-hide-on-mobile' , 'none' ) ;
24+ }
25+
26+ // Workaround: https://github.com/deckgo/deckdeckgo-starter/issues/31
27+ if ( document . dir === 'rtl' ) {
28+ const ionFabList = ionFab . querySelector ( 'ion-fab-list[side="start"]' ) ;
29+ if ( ionFabList ) {
30+ ionFabList . setAttribute ( 'side' , 'end' ) ;
31+ }
32+
33+ ionFab . setAttribute ( 'horizontal' , 'start' ) ;
34+ }
35+ }
36+
37+ resolve ( ) ;
38+ } ) ;
39+ }
You can’t perform that action at this time.
0 commit comments