j1-template 2021.0.5 → 2021.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/procedures/global/attributes_loader.proc +2 -2
- data/assets/data/menu.html +4 -4
- data/assets/themes/j1/adapter/js/fam.js +59 -27
- data/assets/themes/j1/adapter/js/j1.js +3 -2
- data/assets/themes/j1/adapter/js/themer.js +2 -1
- data/assets/themes/j1/adapter/js/toccer.js +97 -18
- data/assets/themes/j1/core/css/icon-fonts/fontawesome.css +299 -12
- data/assets/themes/j1/core/css/icon-fonts/fontawesome.min.css +1 -1
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.css +92 -81
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/eot/fa-brands-400.eot +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/eot/fa-regular-400.eot +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/eot/fa-solid-900.eot +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/fa-brands-400.woff +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/fa-brands-400.woff2 +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/fa-regular-400.woff +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/fa-regular-400.woff2 +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/fa-solid-900.woff +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/fa-solid-900.woff2 +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/svg/fa-brands-400.svg +855 -597
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/svg/fa-regular-400.svg +94 -96
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/svg/fa-solid-900.svg +1272 -771
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/ttf/fa-brands-400.ttf +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/ttf/fa-regular-400.ttf +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/ttf/fa-solid-900.ttf +0 -0
- data/assets/themes/j1/modules/justifiedGallery/LICENSE +1 -1
- data/assets/themes/j1/modules/justifiedGallery/README.md +5 -3
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/{jquery.justifiedGallery.js → justifiedGallery.js} +145 -145
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/{jquery.justifiedGallery.min.js → justifiedGallery.min.js} +1 -2
- data/assets/themes/j1/modules/justifiedGallery/js/justifiedGallery.js +69 -53
- data/assets/themes/j1/modules/justifiedGallery/js/justifiedGallery.min.js +2 -2
- data/lib/j1/commands/generate.rb +4 -3
- data/lib/j1/version.rb +1 -1
- data/lib/j1_app/j1_auth_manager/auth_manager.rb +15 -0
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +7 -5
- data/lib/starter_web/_data/apps/justified_gallery.yml +41 -13
- data/lib/starter_web/_data/asciidoc2pdf/themes/j1-theme.yml +225 -188
- data/lib/starter_web/_data/blocks/banner.yml +2 -2
- data/lib/starter_web/_data/blocks/panel.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/navigator.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/toccer.yml +3 -3
- data/lib/starter_web/_data/modules/navigator_menu.yml +28 -10
- data/lib/starter_web/_includes/attributes.asciidoc +35 -13
- data/lib/starter_web/_plugins/asciidoctor-extensions/fab-icon-inline.rb +1 -1
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/assets/images/collections/blog/featured/markus-spiske-2.jpg +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/staticgen.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/florian-olivo-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/nicola-styles-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/{runner-1920x1200-bw.jpg → runner-1920x1200.jpg} +0 -0
- data/lib/starter_web/assets/images/modules/attics/{the-place-1920x1280-bw.jpg → the-place-1920x1280.jpg} +0 -0
- data/lib/starter_web/assets/images/modules/gallery/old_times/colored/image_01.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/old_times/image_01.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/old_times/image_02.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/old_times/image_03.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/old_times/image_04.jpg +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/scalable/d1.svg +1 -1
- data/lib/starter_web/assets/images/pages/panels/florian-olivo-1920x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/panels/responsive-text-1920x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/skeleton/annie-spratt-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/skeleton/antonino-visalli-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/skeleton/humble-lamb-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/skeleton/library-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/skeleton/romain-vignes-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/skeleton/sigmund-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/1280px-PDCA_Process.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/annie-spratt-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/deming-cycle.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/humble-lamb-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/john-schnobrich-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/sigmund-1920x1280.jpg +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/{0000-00-00-welcome-to-j1-template.adoc.erb → 0000-00-00-welcome-to-j1.adoc.erb} +29 -13
- data/lib/starter_web/collections/posts/public/featured/_posts/{2020-05-01-top-open-source-static-site-generators.adoc → 2020-05-01-top-site-generators.adoc} +10 -15
- data/lib/starter_web/collections/posts/public/featured/_posts/2020-06-01-about-cookies.adoc +54 -53
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-01-01-welcome-to-j1.adoc +167 -0
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +1 -1
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +1 -1
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +1 -1
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +1 -1
- data/lib/starter_web/index.html +10 -12
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/about/about_site.adoc +14 -1809
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/blindtext.asciidoc +11 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/font_icons.asciidoc +23 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/gallery.asciidoc +5 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/lightbox.asciidoc +7 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/documents/chapter_document.asciidoc +9 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/documents/entry_document.asciidoc +3 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/images/image.asciidoc +6 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_2_column.asciidoc +12 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_2_column_options.asciidoc +30 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_3_column.asciidoc +16 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_4_column.asciidoc +25 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/000_intro.adoc +61 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/100_chapter.adoc +58 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/200_chapter.adoc +59 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/900_references.adoc +68 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/attributes.asciidoc +68 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/000_intro.asciidoc +33 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/100_chapter.asciidoc +7 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/100_chapter/100_chapter_document.asciidoc +21 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/100_chapter/110_chapter_document.asciidoc +36 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/200_chapter.asciidoc +5 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/200_chapter/200_chapter_document.asciidoc +53 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references.asciidoc +23 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/000_intro.asciidoc +23 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/100_chapter_document.asciidoc +33 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/200_chapter_document.asciidoc +26 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/900_sources.asciidoc +81 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/tables/110_material_design_icons.asciidoc +102 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/a2p.bat +28 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/a2p.sh +26 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.a2p +114 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.adoc +128 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.pdf +5440 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/100_chapter.asciidoc +60 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/200_chapter.asciidoc +59 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/attributes.asciidoc +63 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/100_chapter.asciidoc +53 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/200_chapter.asciidoc +53 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/tables/110_material_design_icons.asciidoc +102 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +84 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +236 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +5 -6
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +1 -269
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +163 -81
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +5 -8
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +4 -5
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +1 -54
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +47 -39
- data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +17 -1
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/attributes.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/{410_table_3_column.asciidoc → 410_table_bs_modal_examples.asciidoc} +0 -0
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/tables/bs_modal_examples.asciidoc +47 -0
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +35 -50
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +67 -36
- data/lib/starter_web/pages/public/previewer/_includes/tables/rouge/200_rouge_attributes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +15 -15
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/rouge.adoc +33 -24
- data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +74 -31
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/justifiedGallery.min.zip +0 -0
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/justifiedGallery.zip +0 -0
- data/assets/themes/j1/modules/justifiedGallery/_versions/v4.0.0/css/justifiedGallery.css +0 -110
- data/assets/themes/j1/modules/justifiedGallery/_versions/v4.0.0/css/justifiedGallery.min.css +0 -110
- data/assets/themes/j1/modules/justifiedGallery/_versions/v4.0.0/css/theme/uno.css +0 -23
- data/assets/themes/j1/modules/justifiedGallery/_versions/v4.0.0/js/jquery.justifiedGallery.js +0 -1229
- data/assets/themes/j1/modules/justifiedGallery/_versions/v4.0.0/js/jquery.justifiedGallery.min.js +0 -8
- data/assets/themes/j1/modules/twemoji/js/LICENSE +0 -21
- data/lib/starter_web/collections/posts/public/featured/_posts/2020-04-01-confusion-about-base-url.adoc +0 -118
- data/lib/starter_web/pages/public/about/become_a_patron.adoc +0 -71
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/100_meet_and_greet_jekyll.adoc +0 -79
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/200_preparations.adoc +0 -77
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/300_first_awesome_web.adoc +0 -75
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/attributes.asciidoc +0 -176
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/documents/100_meet_and_greet_jekyll.asciidoc +0 -31
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/documents/200_preparations.asciidoc +0 -14
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/documents/300_first_awesome_web.asciidoc +0 -11
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/parts.asciidoc +0 -193
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/tables/debug_variables.asciidoc +0 -47
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/tables/readme +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/610_fam.adoc +0 -294
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/tables/readme +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
bla
|
@@ -1,294 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: Floating Action Menu
|
3
|
-
tagline: using fam buttons
|
4
|
-
date: 2020-11-08 00:00:00
|
5
|
-
description: >
|
6
|
-
A floating action button (FAB) represents the primary action/s
|
7
|
-
of a page. Multiple actions can be configured as a FAM, the
|
8
|
-
floating action menu. See FAM buttons and menus in action
|
9
|
-
|
10
|
-
tags: [ Roundtrip, Introduction, FAM ]
|
11
|
-
categories: [ Module ]
|
12
|
-
|
13
|
-
toc: true
|
14
|
-
advertising: false
|
15
|
-
scrollbar: false
|
16
|
-
|
17
|
-
image: /assets/images/modules/attics/cookies-1920x1200-bw.jpg
|
18
|
-
permalink: /pages/public/learn/roundtrip/fam/
|
19
|
-
regenerate: false
|
20
|
-
|
21
|
-
resources: [ lightbox, rouge, clipboard, fam ]
|
22
|
-
resource_options:
|
23
|
-
- attic:
|
24
|
-
padding_top: 400
|
25
|
-
padding_bottom: 50
|
26
|
-
opacity: 0.5
|
27
|
-
slides:
|
28
|
-
- url: /assets/images/modules/attics/cookies-1920x1200-bw.jpg
|
29
|
-
alt: jekyll.1200x600-bw.jpg
|
30
|
-
---
|
31
|
-
|
32
|
-
// Page Initializer
|
33
|
-
// =============================================================================
|
34
|
-
// Enable the Liquid Preprocessor
|
35
|
-
:page-liquid:
|
36
|
-
|
37
|
-
// Set page (local) attributes here
|
38
|
-
// -----------------------------------------------------------------------------
|
39
|
-
// :page--attr: <attr-value>
|
40
|
-
// :debug:
|
41
|
-
|
42
|
-
// Load Liquid procedures
|
43
|
-
// -----------------------------------------------------------------------------
|
44
|
-
{% capture load_attributes %}themes/{{site.template.name}}/procedures/global/attributes_loader.proc{%endcapture%}
|
45
|
-
|
46
|
-
// Load page attributes
|
47
|
-
// -----------------------------------------------------------------------------
|
48
|
-
{% include {{load_attributes}} scope="none" %}
|
49
|
-
|
50
|
-
|
51
|
-
// Page content
|
52
|
-
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
53
|
-
// See: https://material.io/components/buttons-floating-action-button
|
54
|
-
|
55
|
-
A floating action button (FAB) represents the primary action/s
|
56
|
-
of a page. Multiple actions can be configured as a FAM, the
|
57
|
-
floating action menu. See FAM buttons and menus in action
|
58
|
-
|
59
|
-
== Floating Action Menu (FAM)
|
60
|
-
|
61
|
-
If you want a fixed floating action button, you can add multiple actions
|
62
|
-
that will appear on hover. Our demo is in the bottom righthand corner of
|
63
|
-
the page.
|
64
|
-
|
65
|
-
[source, html]
|
66
|
-
----
|
67
|
-
<div class="fam-btn">
|
68
|
-
<a class="btn-fab-floating btn-large red">
|
69
|
-
<i class="large material-icons">mode_edit</i>
|
70
|
-
</a>
|
71
|
-
<ul>
|
72
|
-
<li><a class="btn-fab-floating red"><i class="material-icons">insert_chart</i></a></li>
|
73
|
-
<li><a class="btn-fab-floating yellow darken-1"><i class="material-icons">format_quote</i></a></li>
|
74
|
-
<li><a class="btn-fab-floating green"><i class="material-icons">publish</i></a></li>
|
75
|
-
<li><a class="btn-fab-floating blue"><i class="material-icons">attach_file</i></a></li>
|
76
|
-
</ul>
|
77
|
-
</div>
|
78
|
-
----
|
79
|
-
|
80
|
-
== Initialization
|
81
|
-
|
82
|
-
[source, javascript]
|
83
|
-
----
|
84
|
-
document.addEventListener('DOMContentLoaded', function() {
|
85
|
-
var elems = document.querySelectorAll('.fam-btn');
|
86
|
-
var instances = j1.fam.init(elems, options);
|
87
|
-
});
|
88
|
-
----
|
89
|
-
|
90
|
-
or using *jQuery*
|
91
|
-
|
92
|
-
[source, javascript]
|
93
|
-
----
|
94
|
-
$(document).ready(function(){
|
95
|
-
$('.fam-btn').j1.fam();
|
96
|
-
});
|
97
|
-
----
|
98
|
-
|
99
|
-
=== Options
|
100
|
-
|
101
|
-
[cols=",,,", options="header", ]
|
102
|
-
|===============================================================================
|
103
|
-
|Name |Type |Default |Description
|
104
|
-
|
105
|
-
|`direction`
|
106
|
-
|String
|
107
|
-
|`top`
|
108
|
-
|Direction FAM menu opens. Can be `top`, `right`, `buttom`, or `left`
|
109
|
-
|
110
|
-
|`hoverEnabled`
|
111
|
-
|Boolean
|
112
|
-
|`true`
|
113
|
-
|If `true`, FAM menu will open on hover instead of click
|
114
|
-
|
115
|
-
|`toolbarEnabled`
|
116
|
-
|Boolean
|
117
|
-
|`false`
|
118
|
-
|Enable transit the FAM into a toolbar on click
|
119
|
-
|
120
|
-
|===============================================================================
|
121
|
-
|
122
|
-
== Methods
|
123
|
-
|
124
|
-
Because jQuery is no longer a dependency, all the methods are called on
|
125
|
-
the plugin instance. You can get the plugin instance like this:
|
126
|
-
|
127
|
-
[source, javascript]
|
128
|
-
----
|
129
|
-
var instance = j1.fam.getInstance(elem);
|
130
|
-
----
|
131
|
-
|
132
|
-
or using *jQuery*
|
133
|
-
|
134
|
-
[source, javascript]
|
135
|
-
----
|
136
|
-
$('.fam-btn').fam('methodName');
|
137
|
-
$('.fam-btn').fam('methodName', paramName);
|
138
|
-
----
|
139
|
-
|
140
|
-
WARNING: You can still use the old jQuery plugin method calls.
|
141
|
-
But you won't be able to access instance properties.
|
142
|
-
|
143
|
-
=== `open()`
|
144
|
-
|
145
|
-
Opens a FAM.
|
146
|
-
|
147
|
-
[source, javascript]
|
148
|
-
----
|
149
|
-
instance.open();
|
150
|
-
----
|
151
|
-
|
152
|
-
=== `close()`
|
153
|
-
|
154
|
-
Closes a FAM.
|
155
|
-
|
156
|
-
[source, javascript]
|
157
|
-
----
|
158
|
-
instance.close();
|
159
|
-
----
|
160
|
-
|
161
|
-
=== `destroy()`
|
162
|
-
|
163
|
-
Destroy plugin instance and teardown
|
164
|
-
|
165
|
-
[source, javascript]
|
166
|
-
----
|
167
|
-
instance.destroy();
|
168
|
-
----
|
169
|
-
|
170
|
-
=== Properties
|
171
|
-
|
172
|
-
[cols=",,", options="header", ]
|
173
|
-
|===============================================================================
|
174
|
-
|Name |Type |Description
|
175
|
-
|
176
|
-
|`el`
|
177
|
-
|Element
|
178
|
-
|The DOM element the plugin was initialized with.
|
179
|
-
|
180
|
-
|`options`
|
181
|
-
|Object
|
182
|
-
|The options the instance was initialized with.
|
183
|
-
|
184
|
-
|`isOpen`
|
185
|
-
|Boolean
|
186
|
-
|Describes open/close state of the FAM.
|
187
|
-
|
188
|
-
|===============================================================================
|
189
|
-
|
190
|
-
== Horizontal FAM
|
191
|
-
|
192
|
-
Creating a horizontal FAM is easy! Just set the direction option.
|
193
|
-
|
194
|
-
[source, javascript]
|
195
|
-
----
|
196
|
-
document.addEventListener('DOMContentLoaded', function() {
|
197
|
-
var elems = document.querySelectorAll('.fam-btn');
|
198
|
-
var instances = j1.fam.init(elems, {
|
199
|
-
direction: 'left'
|
200
|
-
});
|
201
|
-
});
|
202
|
-
----
|
203
|
-
|
204
|
-
== Click-only FAM
|
205
|
-
|
206
|
-
If you want to disable the hover behaviour, and instead toggle the FAM
|
207
|
-
menu when the user clicks on the large button (works great on mobile!),
|
208
|
-
just add the `click-to-toggle` class to the FAM.
|
209
|
-
|
210
|
-
[source, javascript]
|
211
|
-
----
|
212
|
-
document.addEventListener('DOMContentLoaded', function() {
|
213
|
-
var elems = document.querySelectorAll('.fam-btn');
|
214
|
-
var instances = j1.fam.init(elems, {
|
215
|
-
direction: 'left',
|
216
|
-
hoverEnabled: false
|
217
|
-
});
|
218
|
-
});
|
219
|
-
----
|
220
|
-
|
221
|
-
/////
|
222
|
-
== FAM to Toolbar
|
223
|
-
|
224
|
-
Instead of displaying individual button options, you can transition your
|
225
|
-
FAM into a toolbar on click. Just add the `toolbar` class to the FAM.
|
226
|
-
|
227
|
-
[source, javascript]
|
228
|
-
----
|
229
|
-
document.addEventListener('DOMContentLoaded', function() {
|
230
|
-
var elems = document.querySelectorAll('.fam-btn');
|
231
|
-
var instances = j1.fam.init(elems, {
|
232
|
-
toolbarEnabled: true
|
233
|
-
});
|
234
|
-
});
|
235
|
-
----
|
236
|
-
|
237
|
-
Or using jQuery
|
238
|
-
|
239
|
-
[source, javascript]
|
240
|
-
----
|
241
|
-
$('.fam-btn').fam({
|
242
|
-
toolbarEnabled: true
|
243
|
-
});
|
244
|
-
----
|
245
|
-
/////
|
246
|
-
|
247
|
-
/////
|
248
|
-
++++
|
249
|
-
<div class="fam-btn">
|
250
|
-
<a id="page_ctrl_button" class="btn-fab-floating btn-large btn-md-red raised-z5"><i class="mdi mdi-chevron-down"></i></a>
|
251
|
-
<ul id="page_ctrl_items">
|
252
|
-
<li><a id="fam_reload_page" class="btn-fab-floating btn-md-red raised-z5"><i class="mdi mdi-reload"></i></a></li>
|
253
|
-
<li><a id="open_mmenu_toc" class="btn-fab-floating btn-md-blue raised-z5"><i class="mdi mdi-wrap"></i></a></li>
|
254
|
-
<li><a id="fam_scroll_to_top" class="btn-fab-floating btn-md-green raised-z5"><i class="mdi mdi-step-backward-2 mdi-rotate-90"></i></a></li>
|
255
|
-
<li><a id="fam_next_section" class="btn-fab-floating btn-md-green raised-z5"><i class="mdi mdi-step-forward mdi-rotate-90"></i></a></li>
|
256
|
-
<li><a id="fam_previous_section" class="btn-fab-floating btn-md-green raised-z5"><i class="mdi mdi-step-backward mdi-rotate-90"></i></a></li>
|
257
|
-
<!--
|
258
|
-
<li><a id="ssm_scroll_to_bottom" class="btn-fab-floating btn-md-green raised-z5"><i class="mdi mdi-step-forward-2 mdi-rotate-90"></i></a></li>
|
259
|
-
-->
|
260
|
-
</ul>
|
261
|
-
</div>
|
262
|
-
++++
|
263
|
-
|
264
|
-
|
265
|
-
++++
|
266
|
-
<script>
|
267
|
-
$(document).ready(function() {
|
268
|
-
var FloatingActionOptions = { direction: 'top',
|
269
|
-
hoverEnabled: true,
|
270
|
-
toolbarEnabled: false };
|
271
|
-
|
272
|
-
var elems = document.querySelectorAll('.fam-btn');
|
273
|
-
var instances = j1.fam.init(elems, FloatingActionOptions);
|
274
|
-
// var $instances = $('.fam-btn').j1.fam(FloatingActionOptions);
|
275
|
-
var $ActionButton = $('#page_ctrl_button');
|
276
|
-
|
277
|
-
if (FloatingActionOptions.hoverEnabled) {
|
278
|
-
$ActionButton.hover(
|
279
|
-
function() {
|
280
|
-
$('.mdi').toggleClass('mdi-chevron-down mdi-chevron-up');
|
281
|
-
}, function() {
|
282
|
-
$('.mdi').toggleClass('mdi-chevron-down mdi-chevron-up');
|
283
|
-
}
|
284
|
-
);
|
285
|
-
} else {
|
286
|
-
$ActionButton.on('click', function (e) {
|
287
|
-
$('.mdi').toggleClass('mdi-chevron-down mdi-chevron-up');
|
288
|
-
});
|
289
|
-
}
|
290
|
-
|
291
|
-
});
|
292
|
-
</script>
|
293
|
-
++++
|
294
|
-
/////
|
File without changes
|