j1-template 2024.3.14 → 2024.3.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/data/amplitude.html +111 -58
- data/assets/data/cookieconsent.html +8 -8
- data/assets/data/panel.html +4 -3
- data/assets/data/speak2me.html +11 -11
- data/assets/data/translator.html +29 -29
- data/assets/theme/j1/adapter/js/amplitude.js +112 -88
- data/assets/theme/j1/adapter/js/j1.js +4 -4
- data/assets/theme/j1/adapter/js/masonry.js +2 -2
- data/assets/theme/j1/adapter/js/themes.js +42 -4
- data/assets/theme/j1/adapter/js/videojs.js +212 -0
- data/assets/theme/j1/core/css/icon-fonts/mdib.css +24 -4
- data/assets/theme/j1/core/css/icon-fonts/mdib.css.map +1 -1
- data/assets/theme/j1/core/css/icon-fonts/mdib.min.css +1 -1
- data/assets/theme/j1/core/css/icon-fonts/mdib.min.css.map +1 -1
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.css +9 -6
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.css.map +1 -1
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css.map +1 -1
- data/assets/theme/j1/core/js/template.js +262 -275
- data/assets/theme/j1/core/js/template.min.js +7 -7
- data/assets/theme/j1/core/js/template.min.js.map +1 -1
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.css +131 -24
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.min.css +1 -1
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.css +102 -76
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.min.css +1 -1
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.css +109 -78
- data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.min.css +1 -1
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/artist.svg +78 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/mute.svg +52 -20
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/next.svg +20 -39
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/now-playing.svg +24 -38
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-hide.svg +85 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-music.svg +85 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-show.svg +85 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist.svg +85 -0
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/previous.svg +18 -37
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/skip-backward.svg +33 -30
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/skip-forward.svg +33 -29
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/small/next.svg +55 -14
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/small/previous.svg +56 -14
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/volume.svg +38 -21
- data/assets/theme/j1/modules/amplitudejs/js/amplitude.map +20 -20
- data/assets/theme/j1/modules/amplitudejs/js/tech/youtube_example.js +211 -0
- data/assets/theme/j1/modules/gemini/js/gemini.js.map +1 -1
- data/assets/theme/j1/modules/jquery/js/jquery.min.map +1 -1
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +206 -122
- data/assets/theme/j1/modules/videojs/assets/icons/custom-icons/next.svg +82 -0
- data/assets/theme/j1/modules/videojs/css/font/README.md +151 -0
- data/assets/theme/j1/modules/videojs/css/font/VideoJS.svg +150 -0
- data/assets/theme/j1/modules/videojs/css/font/video-js-cdn.css +2012 -0
- data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.0.css +32 -0
- data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.1.css +31 -0
- data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.css +31 -0
- data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.min.css +21 -0
- data/assets/theme/j1/modules/videojs/css/themes/uno.css +14 -3
- data/assets/theme/j1/modules/videojs/css/themes/uno.min.css +1 -1
- data/assets/theme/j1/modules/videojs/css/videojs.css +1 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/LICENSE +13 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/README.md +75 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/autocaption.js +149 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/autocaption.min.js +21 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/README.md +76 -30
- data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/hotkeys.js +64 -53
- data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/hotkeys.min.js +1 -1
- data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/README.md +133 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/skipbuttons.js +137 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/skipbuttons.min.js +21 -0
- data/assets/theme/j1/modules/videojs/js/plugins/controls/zoom/zoom.js +15 -12
- data/assets/theme/j1/modules/videojs/js/plugins/players/dm/dailymotion.js +2 -2
- data/assets/theme/j1/modules/videojs/js/plugins/players/yt/youtube.js +43 -16
- data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.3/fastfilereaderext.so +0 -0
- data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.3/rubyeventmachine.so +0 -0
- data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.4/fastfilereaderext.so +0 -0
- data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.4/rubyeventmachine.so +0 -0
- data/lib/j1/version.rb +1 -1
- data/lib/j1_app/j1_auth_manager/config.rb +0 -4
- data/lib/starter_web/Gemfile +45 -22
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +4 -6
- data/lib/starter_web/_data/modules/amplitude.yml +67 -37
- data/lib/starter_web/_data/modules/defaults/amplitude.yml +1 -0
- data/lib/starter_web/_data/modules/defaults/gallery.yml +42 -0
- data/lib/starter_web/_data/modules/defaults/videojs.yml +107 -0
- data/lib/starter_web/_data/modules/gallery.yml +30 -14
- data/lib/starter_web/_data/modules/lazyLoader.yml +8 -8
- data/lib/starter_web/_data/modules/masonry.yml +15 -0
- data/lib/starter_web/_data/modules/masterslider.yml +6 -6
- data/lib/starter_web/_data/modules/videojs.yml +57 -0
- data/lib/starter_web/_data/resources.yml +9 -26
- data/lib/starter_web/_data/templates/feed.xml +1 -1
- data/lib/starter_web/_includes/tables/jekyll_variables.asciidoc +1 -0
- data/lib/starter_web/_plugins/asciidoctor/carousel-block.rb +2 -1
- data/lib/starter_web/_plugins/asciidoctor/dailymotion-block.rb +4 -1
- data/lib/starter_web/_plugins/asciidoctor/lightbox-block.rb +1 -1
- data/lib/starter_web/_plugins/asciidoctor/masterslider-block.rb +1 -1
- data/lib/starter_web/_plugins/asciidoctor/slick-block.rb +2 -1
- data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +145 -24
- data/lib/starter_web/_plugins/asciidoctor/vimeo-block.rb +4 -1
- data/lib/starter_web/_plugins/asciidoctor/wistia-block.rb +313 -0
- data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +192 -17
- data/lib/starter_web/_plugins/index/lunr.rb +1 -1
- data/lib/starter_web/assets/audio/cover/spontanorama/spontanorama.jpg +0 -0
- data/lib/starter_web/assets/audio/cover/spontanorama/src/spontanorama.png +0 -0
- data/lib/starter_web/assets/audio/cover/spontanorama/src/spontanorama.psd +0 -0
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/amplitude_yt_tester.adoc +20 -7
- data/lib/starter_web/pages/public/manuals/integrations/amplitudejs/amplitudejs-api.adoc +1 -1
- data/lib/starter_web/pages/public/manuals/integrations/videojs/youtube-api.adoc +1638 -0
- data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +5 -6
- data/lib/starter_web/pages/public/tools/previewer/preview_videojs.adoc +203 -0
- data/lib/starter_web/pages/public/tour/asciidoc_extensions.adoc +1 -1
- data/lib/starter_web/pages/public/tour/bootstrap_themes.adoc +1 -1
- data/lib/starter_web/pages/public/tour/highlghter_rouge.adoc +1 -1
- data/lib/starter_web/pages/public/tour/modal_extentions.adoc +1 -1
- data/lib/starter_web/pages/public/tour/play_audio.adoc +30 -29
- data/lib/starter_web/pages/public/tour/play_video.adoc +65 -39
- data/lib/starter_web/pages/public/tour/present_images.adoc +17 -16
- data/lib/starter_web/pages/public/tour/quicksearch.adoc +1 -1
- data/lib/starter_web/pages/public/tour/responsive_tables.adoc +1 -1
- data/lib/starter_web/pages/public/tour/typography.adoc +1 -1
- metadata +37 -20
- data/assets/data/amplitude.28.html +0 -887
- data/assets/data/amplitude.29.html +0 -923
- data/assets/theme/j1/adapter/js/amplitude.23.js +0 -1165
- data/assets/theme/j1/adapter/js/amplitude.24.js +0 -1164
- data/assets/theme/j1/adapter/js/amplitude.25.js +0 -1268
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/_pause.svg +0 -19
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/_play.svg +0 -18
- data/assets/theme/j1/modules/amplitudejs/icons/player/dark/show-playlist.svg +0 -15
- data/assets/theme/j1/modules/jqueryScrollbar/LICENSE +0 -20
- data/assets/theme/j1/modules/jqueryScrollbar/README.md +0 -28
- data/assets/theme/j1/modules/jqueryScrollbar/css/scrollbar.css +0 -939
- data/assets/theme/j1/modules/jqueryScrollbar/css/scrollbar.min.css +0 -20
- data/assets/theme/j1/modules/jqueryScrollbar/js/scrollbar.js +0 -851
- data/assets/theme/j1/modules/jqueryScrollbar/js/scrollbar.min.js +0 -36
- data/assets/theme/j1/modules/jqueryScrollbar/sass/scrollbar.scss +0 -806
- data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.0.js +0 -794
- data/lib/starter_web/_data/modules/lazyLoader.0.yml +0 -118
@@ -87,10 +87,10 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
87
87
|
|
88
88
|
// göobal settings
|
89
89
|
// ---------------------------------------------------------------------------
|
90
|
-
var environment
|
91
|
-
var cookie_names
|
92
|
-
var user_state
|
93
|
-
var state
|
90
|
+
var environment = '{{environment}}';
|
91
|
+
var cookie_names = j1.getCookieNames();
|
92
|
+
var user_state = j1.readCookie(cookie_names.user_state);
|
93
|
+
var state = 'not_started';
|
94
94
|
|
95
95
|
// module settings
|
96
96
|
// ---------------------------------------------------------------------------
|
@@ -156,23 +156,6 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
156
156
|
// ---------------------------------------------------------------------------
|
157
157
|
// var playerWaveformSampleRate = '{{amplitude_defaults.player.waveform_sample_rate}}';
|
158
158
|
|
159
|
-
// ---------------------------------------------------------------------------
|
160
|
-
// YouTube Player Tech (loaded early, runs on Document Ready)
|
161
|
-
// ---------------------------------------------------------------------------
|
162
|
-
//
|
163
|
-
// $(function() {
|
164
|
-
// // Load YTP API code asynchronously and create a player for later use
|
165
|
-
// var techScript;
|
166
|
-
// var tech = document.createElement('script');
|
167
|
-
//
|
168
|
-
// tech.id = 'yt_player_init';
|
169
|
-
// tech.src = "/assets/theme/j1/modules/amplitudejs/js/tech/ytp.js";
|
170
|
-
// techScript = document.getElementsByTagName('script')[0];
|
171
|
-
//
|
172
|
-
// // Append Tech script
|
173
|
-
// techScript.parentNode.insertBefore(tech, techScript);
|
174
|
-
// });
|
175
|
-
|
176
159
|
// ---------------------------------------------------------------------------
|
177
160
|
// helper functions
|
178
161
|
// ---------------------------------------------------------------------------
|
@@ -208,7 +191,6 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
208
191
|
_this = j1.adapter.amplitude;
|
209
192
|
logger = log4javascript.getLogger('j1.adapter.amplitude');
|
210
193
|
|
211
|
-
|
212
194
|
// -----------------------------------------------------------------------
|
213
195
|
// module initializer
|
214
196
|
// -----------------------------------------------------------------------
|
@@ -224,8 +206,6 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
224
206
|
logger.debug('\n' + 'module state: ' + _this.getState());
|
225
207
|
logger.info('\n' + 'module is being initialized');
|
226
208
|
|
227
|
-
// jQuery('.scrollbar-rail').scrollbar();
|
228
|
-
|
229
209
|
// -------------------------------------------------------------------
|
230
210
|
// create global playlist (songs)
|
231
211
|
// -------------------------------------------------------------------
|
@@ -355,7 +335,7 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
355
335
|
);
|
356
336
|
|
357
337
|
// dynamic loader variable to setup the player on ID {{player.id}}
|
358
|
-
dependency
|
338
|
+
dependency = 'dependencies_met_html_loaded_{{player.id}}';
|
359
339
|
load_dependencies[dependency] = '';
|
360
340
|
|
361
341
|
// ---------------------------------------------------------------------
|
@@ -396,7 +376,6 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
396
376
|
// initApi
|
397
377
|
// -------------------------------------------------------------------------
|
398
378
|
initApi: (songlist) => {
|
399
|
-
|
400
379
|
logger.info('\n' + 'initialze API: started');
|
401
380
|
|
402
381
|
{% comment %} collect playlists
|
@@ -456,6 +435,7 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
456
435
|
// See: https://521dimensions.com/open-source/amplitudejs/docs
|
457
436
|
// NOTE: slider VALUE (volume) is set by DEFAULT settings (player)
|
458
437
|
Amplitude.init({
|
438
|
+
|
459
439
|
bindings: {
|
460
440
|
33: 'play_pause',
|
461
441
|
37: 'prev',
|
@@ -530,13 +510,16 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
530
510
|
} // END if pause on next title
|
531
511
|
}
|
532
512
|
}, // END callbacks
|
513
|
+
|
533
514
|
// waveforms: {
|
534
515
|
// sample_rate: playerWaveformSampleRate
|
535
516
|
// },
|
517
|
+
|
536
518
|
continue_next: playerPlayNextTitle,
|
537
519
|
volume: playerVolumeValue,
|
538
520
|
volume_decrement: playerVolumeSliderStep,
|
539
521
|
volume_increment: playerVolumeSliderStep
|
522
|
+
|
540
523
|
}); // END Amplitude init
|
541
524
|
|
542
525
|
}, // END initApi
|
@@ -548,22 +531,25 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
548
531
|
|
549
532
|
var dependencies_met_player_instances_initialized = setInterval (() => {
|
550
533
|
if (apiInitialized.state) {
|
551
|
-
|
534
|
+
var parentContainer = (document.getElementById('{{xhr_container_id}}') !== null) ? true : false;
|
535
|
+
var parentContainerExist = ($('#' + '{{xhr_container_id}}')[0] !== undefined) ? true : false;
|
552
536
|
|
537
|
+
logger.info('\n' + 'initialize player specific UI events: started');
|
538
|
+
|
553
539
|
{% for player in amplitude_options.players %} {% if player.enabled %}
|
554
540
|
{% assign xhr_data_path = amplitude_options.xhr_data_path %}
|
555
541
|
{% capture xhr_container_id %}{{player.id}}_parent{% endcapture %}
|
556
542
|
|
557
|
-
playerID
|
558
|
-
playerType
|
559
|
-
playList
|
560
|
-
playListName
|
561
|
-
playListTitle
|
562
|
-
|
543
|
+
playerID = '{{player.id}}';
|
544
|
+
playerType = '{{player.type}}';
|
545
|
+
playList = '{{player.playlist}}';
|
546
|
+
playListName = '{{player.playlist.name}}'
|
547
|
+
playListTitle = '{{player.playlist.title}}';
|
548
|
+
|
563
549
|
logger.debug('\n' + 'set playlist {{player.playlist}} on id #{{player.id}} with title: ' + playListTitle);
|
564
550
|
|
565
551
|
// dynamic loader variable to setup the player on ID {{player.id}}
|
566
|
-
dependency
|
552
|
+
dependency = 'dependencies_met_player_loaded_{{player.id}}';
|
567
553
|
load_dependencies[dependency] = '';
|
568
554
|
|
569
555
|
// -----------------------------------------------------------------
|
@@ -571,9 +557,10 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
571
557
|
// -----------------------------------------------------------------
|
572
558
|
load_dependencies['dependencies_met_player_loaded_{{player.id}}'] = setInterval (() => {
|
573
559
|
// check if HTML portion of the player is loaded successfully
|
574
|
-
var xhrLoadState
|
560
|
+
var xhrLoadState = j1.xhrDOMState['#' + '{{xhr_container_id}}'];
|
561
|
+
var playerExistsInPage = ($('#' + '{{xhr_container_id}}')[0] !== undefined) ? true : false;
|
575
562
|
|
576
|
-
if (xhrLoadState === 'success') {
|
563
|
+
if (xhrLoadState === 'success' && playerExistsInPage) {
|
577
564
|
|
578
565
|
// set song (title) specific audio info links
|
579
566
|
// -------------------------------------------------------------
|
@@ -625,11 +612,11 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
625
612
|
{% if player.id contains 'compact' %}
|
626
613
|
// ---------------------------------------------------------
|
627
614
|
// START compact player UI events
|
628
|
-
//
|
615
|
+
//
|
629
616
|
if (document.getElementById('{{player.id}}') !== null) {
|
630
617
|
|
631
|
-
// show|hide scrollbar in playlist
|
632
|
-
// -------------------------------------------------------
|
618
|
+
// show|hide scrollbar in playlist (compact player)
|
619
|
+
// -------------------------------------------------------
|
633
620
|
const songsInPlaylist = Amplitude.getSongsInPlaylist(playListName);
|
634
621
|
if (songsInPlaylist.length <= 8) {
|
635
622
|
const titleListCompactPlayer = document.getElementById('compact_player_title_list_' + playListName);
|
@@ -658,7 +645,7 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
658
645
|
playlistScreen.classList.remove('slide-out-top');
|
659
646
|
playlistScreen.classList.add('slide-in-top');
|
660
647
|
playlistScreen.style.display = "block";
|
661
|
-
playlistScreen.style.zIndex = "
|
648
|
+
playlistScreen.style.zIndex = "199";
|
662
649
|
|
663
650
|
// disable scrolling (if window viewport >= BS Medium and above)
|
664
651
|
if (window.innerWidth >= 720) {
|
@@ -669,28 +656,28 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
669
656
|
}
|
670
657
|
}
|
671
658
|
}); // END EventListener 'click' (compact player|show playlist)
|
672
|
-
}
|
659
|
+
} // END if showPlaylist
|
673
660
|
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
661
|
+
// hide playlist
|
662
|
+
var hidePlaylist = document.getElementById("hide_playlist_{{player.id}}");
|
663
|
+
if (hidePlaylist !== null) {
|
664
|
+
hidePlaylist.addEventListener('click', function(event) {
|
665
|
+
var playlistScreen = document.getElementById("playlist_screen_{{player.id}}");
|
679
666
|
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
667
|
+
playlistScreen.classList.remove('slide-in-top');
|
668
|
+
playlistScreen.classList.add('slislide-out-top');
|
669
|
+
playlistScreen.style.display = "none";
|
670
|
+
playlistScreen.style.zIndex = "1";
|
684
671
|
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
672
|
+
// enable scrolling
|
673
|
+
if ($('body').hasClass('stop-scrolling')) {
|
674
|
+
$('body').removeClass('stop-scrolling');
|
675
|
+
}
|
676
|
+
}); // END EventListener 'click' (compact player|show playlist)
|
677
|
+
} // END if hidePlaylist
|
691
678
|
|
692
|
-
|
693
|
-
|
679
|
+
// click on progress bar
|
680
|
+
// -------------------------------------------------------
|
694
681
|
|
695
682
|
// getElementsByClassName returns an Array-like object
|
696
683
|
var progressBars = document.getElementsByClassName("compact-player-progress");
|
@@ -704,7 +691,7 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
704
691
|
Amplitude.setSongPlayedPercentage(
|
705
692
|
(parseFloat(xpos)/parseFloat(this.offsetWidth))*100);
|
706
693
|
}); // END EventListener 'click'
|
707
|
-
}
|
694
|
+
} // END for
|
708
695
|
|
709
696
|
// click on skip forward|backward (compact player)
|
710
697
|
// See: https://github.com/serversideup/amplitudejs/issues/384
|
@@ -722,8 +709,8 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
722
709
|
|
723
710
|
if (currentTime > 0) {
|
724
711
|
Amplitude.setSongPlayedPercentage((targetTime / duration) * 100);
|
725
|
-
}
|
726
|
-
});
|
712
|
+
}
|
713
|
+
}); // END EventListener 'click'
|
727
714
|
} // END if ID
|
728
715
|
} // END for SkipForwardButtons
|
729
716
|
|
@@ -739,8 +726,8 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
739
726
|
|
740
727
|
if (currentTime > 0) {
|
741
728
|
Amplitude.setSongPlayedPercentage((targetTime / duration) * 100);
|
742
|
-
}
|
743
|
-
});
|
729
|
+
}
|
730
|
+
}); // END EventListener 'click'
|
744
731
|
} // END if ID
|
745
732
|
} // END for SkipBackwardButtons
|
746
733
|
|
@@ -749,6 +736,7 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
749
736
|
if (compactPlayerShuffleButton) {
|
750
737
|
compactPlayerShuffleButton.addEventListener('click', function(event) {
|
751
738
|
var shuffleState = (document.getElementById('compact_player_shuffle').className.includes('amplitude-shuffle-on')) ? true : false;
|
739
|
+
|
752
740
|
Amplitude.setShuffle(shuffleState)
|
753
741
|
}); // END EventListener 'click'
|
754
742
|
} // END compactPlayerShuffleButton
|
@@ -758,6 +746,7 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
758
746
|
if (compactPlayerRepeatButton) {
|
759
747
|
compactPlayerRepeatButton.addEventListener('click', function(event) {
|
760
748
|
var repeatState = (document.getElementById('compact_player_repeat').className.includes('amplitude-repeat-on')) ? true : false;
|
749
|
+
|
761
750
|
Amplitude.setRepeat(repeatState)
|
762
751
|
}); // END EventListener 'click'
|
763
752
|
} // END compactPlayerRepeatButton
|
@@ -778,7 +767,7 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
778
767
|
if (largePlayerPreviousButton && largePlayerPreviousButton.getAttribute("data-amplitude-source") === 'youtube') {
|
779
768
|
largePlayerPreviousButton.addEventListener('click', function(event) {
|
780
769
|
var playlist = this.getAttribute("data-amplitude-playlist");
|
781
|
-
var songIndex = ytpSongIndex;
|
770
|
+
var songIndex = ytpSongIndex; // Amplitude.getActiveIndex();
|
782
771
|
|
783
772
|
}); // END EventListener 'click'
|
784
773
|
}
|
@@ -822,7 +811,7 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
822
811
|
if (largePlayerNextButton && largePlayerPlayButton.getAttribute("data-amplitude-source") === 'youtube') {
|
823
812
|
largePlayerNextButton.addEventListener('click', function(event) {
|
824
813
|
var playlist = this.getAttribute("data-amplitude-playlist");
|
825
|
-
var songIndex = ytpSongIndex;
|
814
|
+
var songIndex = ytpSongIndex; // Amplitude.getActiveIndex();
|
826
815
|
}); // END EventListener 'click'
|
827
816
|
}
|
828
817
|
|
@@ -833,8 +822,8 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
833
822
|
largetPlayerSongContainer[i].addEventListener('click', function(event) {
|
834
823
|
var playlist = this.getAttribute("data-amplitude-playlist");
|
835
824
|
var playlistLength = largetPlayerSongContainer.length;
|
836
|
-
ytpSongIndex
|
837
|
-
});
|
825
|
+
ytpSongIndex = this.getAttribute("data-amplitude-song-index");
|
826
|
+
}); // END EventListener 'click'
|
838
827
|
} // END if Attribute
|
839
828
|
} // END for
|
840
829
|
|
@@ -849,7 +838,7 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
849
838
|
Amplitude.setSongPlayedPercentage(
|
850
839
|
(parseFloat(xpos)/parseFloat(this.offsetWidth))*100);
|
851
840
|
}); // END EventListener 'click'
|
852
|
-
}
|
841
|
+
} // END for
|
853
842
|
|
854
843
|
// click on skip forward|backward (large player)
|
855
844
|
// See: https://github.com/serversideup/amplitudejs/issues/384
|
@@ -880,9 +869,8 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
880
869
|
if (currentTime > 0) {
|
881
870
|
Amplitude.setSongPlayedPercentage((targetTime / duration) * 100);
|
882
871
|
}
|
883
|
-
}); // END EventListener 'click
|
884
|
-
}
|
885
|
-
|
872
|
+
}); // END EventListener 'click'
|
873
|
+
} // END else
|
886
874
|
} // END if ID
|
887
875
|
} // END for SkipForwardButtons
|
888
876
|
|
@@ -905,8 +893,7 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
905
893
|
Amplitude.setSongPlayedPercentage((targetTime / duration) * 100);
|
906
894
|
}
|
907
895
|
}); // END EventListener 'click'
|
908
|
-
}
|
909
|
-
|
896
|
+
} // END else
|
910
897
|
} // END if ID
|
911
898
|
} // END for SkipBackwardButtons
|
912
899
|
|
@@ -926,14 +913,14 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
926
913
|
var repeatState = (document.getElementById('large_player_repeat').className.includes('amplitude-repeat-on')) ? true : false;
|
927
914
|
Amplitude.setRepeat(repeatState)
|
928
915
|
}); // END EventListener 'click'
|
929
|
-
} // END largePlayerRepeatButton
|
916
|
+
} // END if largePlayerRepeatButton
|
930
917
|
|
931
|
-
// enable|disable scrolling on playlist
|
918
|
+
// enable|disable scrolling on playlist (large player)
|
932
919
|
// -------------------------------------------------------
|
933
920
|
if (document.getElementById('large_player_right') !== null) {
|
934
921
|
|
935
922
|
// show|hide scrollbar in playlist
|
936
|
-
//
|
923
|
+
// -----------------------------------------------------
|
937
924
|
const songsInPlaylist = Amplitude.getSongsInPlaylist(playListName);
|
938
925
|
|
939
926
|
if (songsInPlaylist.length <= 8) {
|
@@ -943,18 +930,38 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
943
930
|
}
|
944
931
|
}
|
945
932
|
|
946
|
-
// scroll to player top position
|
947
|
-
//
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
933
|
+
// scroll to player top position (large player)
|
934
|
+
//
|
935
|
+
// Bootstrap grid breakpoints
|
936
|
+
// SN: 576px Mobile
|
937
|
+
// MD: 768px Small Desktop|Tablet
|
938
|
+
// LG: 992px Default Desktop
|
939
|
+
// XL: 1200px Large Desktop
|
940
|
+
// XXL: 1400px X Large Desktop
|
941
|
+
// -----------------------------------------------------
|
942
|
+
var largePlayerPlaylistHeader = document.getElementById("playlist_header_{{player.id}}");
|
943
|
+
|
944
|
+
largePlayerPlaylistHeader.addEventListener('click', function(event) {
|
945
|
+
var playerRight = document.getElementById("{{player.id}}");
|
946
|
+
var playlistHeader = document.getElementById("playlist_header_{{player.id}}");
|
947
|
+
var scrollOffset = (window.innerWidth >= 992) ? -130 : -43;
|
948
|
+
|
949
|
+
// scroll player|playlist to top position (large player)
|
950
|
+
//
|
951
|
+
const targetDivPlayerRight = playerRight;
|
952
|
+
const targetDivPositionPlayerRight = targetDivPlayerRight.offsetTop;
|
953
|
+
const targetDivPlaylistHeader = playlistHeader;
|
954
|
+
const targetDivPositionplaylistHeader = targetDivPlaylistHeader.offsetTop;
|
955
|
+
|
956
|
+
// NOTE: depending on WINDOW SIZE the relation changes to TOP POSITION (targetDivPosition)
|
957
|
+
//
|
958
|
+
if (targetDivPositionPlayerRight > targetDivPositionplaylistHeader) {
|
959
|
+
window.scrollTo(0, targetDivPositionPlayerRight + targetDivPlaylistHeader.offsetParent.firstElementChild.clientHeight + scrollOffset);
|
960
|
+
} else {
|
961
|
+
window.scrollTo(0, targetDivPositionplaylistHeader + scrollOffset);
|
962
|
+
}
|
952
963
|
|
953
|
-
|
954
|
-
const targetDiv = document.getElementById("playlist_header_{{player.id}}");
|
955
|
-
const targetDivPosition = targetDiv.offsetTop;
|
956
|
-
window.scrollTo(0, targetDivPosition + scrollOffset);
|
957
|
-
}); // END EventListener 'click'
|
964
|
+
}); // END EventListener largePlayerPlaylistHeader 'click'
|
958
965
|
|
959
966
|
// disable scrolling (if window viewport >= BS Medium and above)
|
960
967
|
document.getElementById('large_player_right').addEventListener('mouseenter', function() {
|
@@ -976,6 +983,23 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
976
983
|
|
977
984
|
} // END enable|disable scrolling on playlist
|
978
985
|
|
986
|
+
// set volume slider presets (for the player when exists|enabled)
|
987
|
+
//
|
988
|
+
var volumeSlider = document.getElementById('volume_slider_{{player.id}}');
|
989
|
+
if (volumeSlider !== null) {
|
990
|
+
const volumeMin = parseInt('{{player.volume_slider.min_value}}');
|
991
|
+
const volumeMax = parseInt('{{player.volume_slider.max_value}}');
|
992
|
+
const volumeValue = parseInt('{{player.volume_slider.preset_value}}');
|
993
|
+
const volumeStep = parseInt('{{player.volume_slider.slider_step}}');
|
994
|
+
|
995
|
+
// if player has NO slider presets, use amplitude defaults
|
996
|
+
//
|
997
|
+
volumeSlider.min = (isNaN(volumeMin)) ? parseInt('{{amplitude_defaults.player.volume_slider.min_value}}') : volumeMin;
|
998
|
+
volumeSlider.max = (isNaN(volumeMax)) ? parseInt('{{amplitude_defaults.player.volume_slider.max_value}}') : volumeMax;
|
999
|
+
volumeSlider.value = (isNaN(volumeValue)) ? parseInt('{{amplitude_defaults.player.volume_slider.preset_value}}') : volumeValue;
|
1000
|
+
volumeSlider.step = (isNaN(volumeStep)) ? parseInt('{{amplitude_defaults.player.volume_slider.slider_step}}') : volumeStep;
|
1001
|
+
} // END volumeSlider exists
|
1002
|
+
|
979
1003
|
} // END large player UI events
|
980
1004
|
{% endif %}
|
981
1005
|
|
@@ -1130,4 +1154,4 @@ j1.adapter.amplitude = ((j1, window) => {
|
|
1130
1154
|
{{ cache|strip_empty_lines }}
|
1131
1155
|
{%- endif -%}
|
1132
1156
|
|
1133
|
-
{%- assign cache = false -%}
|
1157
|
+
{%- assign cache = false -%}
|
@@ -301,10 +301,10 @@ var j1 = ((options) => {
|
|
301
301
|
var user_state = {
|
302
302
|
'writer': 'j1.adapter',
|
303
303
|
'template_version': '{{template_version}}',
|
304
|
-
'theme_name': '
|
305
|
-
'theme_css': '
|
306
|
-
'theme_author': '
|
307
|
-
'theme_version': '
|
304
|
+
'theme_name': '',
|
305
|
+
'theme_css': '',
|
306
|
+
'theme_author': '',
|
307
|
+
'theme_version': '',
|
308
308
|
'session_active': false,
|
309
309
|
'google_translate': 'disabled',
|
310
310
|
'translate_all_pages': true,
|
@@ -141,7 +141,7 @@ j1.adapter.masonry = ((j1, window) => {
|
|
141
141
|
// Load module DEFAULTS|CONFIG
|
142
142
|
masonryDefaults = $.extend({}, {{masonry_defaults | replace: 'nil', 'null' | replace: '=>', ':' }});
|
143
143
|
masonrySettings = $.extend({}, {{masonry_settings | replace: 'nil', 'null' | replace: '=>', ':' }});
|
144
|
-
masonryOptions
|
144
|
+
masonryOptions = $.extend(true, {}, masonryDefaults, masonrySettings);
|
145
145
|
|
146
146
|
// load HTML portion for all grids
|
147
147
|
_this.loadGridHTML(masonryOptions, masonryOptions.grids);
|
@@ -153,7 +153,7 @@ j1.adapter.masonry = ((j1, window) => {
|
|
153
153
|
var pageState = $('#content').css("display");
|
154
154
|
var pageVisible = (pageState === 'block') ? true: false;
|
155
155
|
var j1CoreFinished = (j1.getState() === 'finished') ? true : false;
|
156
|
-
|
156
|
+
// var atticFinished = (j1.adapter.attic.getState() == 'finished') ? true : false;
|
157
157
|
|
158
158
|
if (j1CoreFinished && pageVisible) {
|
159
159
|
startTimeModule = Date.now();
|
@@ -263,9 +263,47 @@ j1.adapter.themes = (function (j1, window) {
|
|
263
263
|
logger.info('\n' + 'hide page until theme is loaded');
|
264
264
|
$('#no_flicker').hide();
|
265
265
|
|
266
|
-
|
267
|
-
|
268
|
-
//
|
266
|
+
logger.info('\n' + 'cookie ' + cookie_names.user_state + ' successfully loaded after: ' + interval_count * 25 + ' ms');
|
267
|
+
|
268
|
+
// load previously selected theme from cookie (preferred)
|
269
|
+
// if (user_state.theme_css !== '') {
|
270
|
+
// user_state.theme_name = default_theme_name;
|
271
|
+
// user_state.theme_css = default_theme_css;
|
272
|
+
// user_state.theme_author = default_theme_author;
|
273
|
+
// user_state.theme_author_url = default_theme_author_url;
|
274
|
+
|
275
|
+
// cookie_written = j1.writeCookie({
|
276
|
+
// name: cookie_names.user_state,
|
277
|
+
// data: user_state,
|
278
|
+
// secure: secure,
|
279
|
+
// expires: 365
|
280
|
+
// });
|
281
|
+
|
282
|
+
// if (!cookie_written) {
|
283
|
+
// logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_consent);
|
284
|
+
// }
|
285
|
+
// } // END load previously selected theme
|
286
|
+
|
287
|
+
// load default theme (j1_config and NO theme given with (user_state) cookie
|
288
|
+
// if (user_state.theme_css === '' && default_theme_css.theme_css !== '') {
|
289
|
+
// user_state.theme_name = default_theme_name;
|
290
|
+
// user_state.theme_css = default_theme_css;
|
291
|
+
// user_state.theme_author = default_theme_author;
|
292
|
+
// user_state.theme_author_url = default_theme_author_url;
|
293
|
+
|
294
|
+
// cookie_written = j1.writeCookie({
|
295
|
+
// name: cookie_names.user_state,
|
296
|
+
// data: user_state,
|
297
|
+
// secure: secure,
|
298
|
+
// expires: 365
|
299
|
+
// });
|
300
|
+
|
301
|
+
// if (!cookie_written) {
|
302
|
+
// logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_consent);
|
303
|
+
// }
|
304
|
+
// } // END load default theme
|
305
|
+
|
306
|
+
// load default theme if NO theme given with (user_state) cookie
|
269
307
|
if (user_state.theme_css === '') {
|
270
308
|
user_state.theme_name = default_theme_name;
|
271
309
|
user_state.theme_css = default_theme_css;
|
@@ -282,7 +320,7 @@ j1.adapter.themes = (function (j1, window) {
|
|
282
320
|
if (!cookie_written) {
|
283
321
|
logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_consent);
|
284
322
|
}
|
285
|
-
} // END
|
323
|
+
} // END oad default theme
|
286
324
|
|
287
325
|
// set the theme switcher state
|
288
326
|
user_state.theme_switcher = themesOptions.enabled;
|