card-mod-bar_and_box 0.17.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/script/bar_and_box.js.coffee +6 -1
- data/assets/style/bar.scss +10 -4
- data/assets/style/box.scss +11 -5
- data/config/admin.yml +1 -2
- data/data/files/mod_bar_and_box_script_asset_output/file.js +1 -1
- data/set/all/bar.rb +31 -10
- data/set/all/box.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9061f51aff47bab5b93fa42c029d676283a5d2dcfae7aa903b1ac2cd18d7c5a9
|
4
|
+
data.tar.gz: 7d318eef6b4c1a4460a18f8c294930e9238b4431e1515871d515b4e6570a2717
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff529c26b006992e7509be97fbe8ec4db1ce09a5ff04afde11cc8fe12a0dc036be8bb3043e70de53b91bc93aa4100dfaef065454364de9d237502df73b756c5f
|
7
|
+
data.tar.gz: 75bc73dfdb936c257bea2a43ab2e5b5c4d71aec186679fc80e3fc7f62aa761c1d3f5181ed48e75ba5034c4e05a7052a07c3944b8456474db6c537161210fe096
|
@@ -1,4 +1,4 @@
|
|
1
|
-
$
|
1
|
+
$ ->
|
2
2
|
# $("body").on "click", ".bar-menu", (e) ->
|
3
3
|
# e.stopImmediatePropagation()
|
4
4
|
|
@@ -13,6 +13,11 @@ $(window).ready ->
|
|
13
13
|
else
|
14
14
|
window.location = cardLinkPath(cl)
|
15
15
|
|
16
|
+
$("body").on "shown.bs.collapse", ".bar > .collapse", (_event) ->
|
17
|
+
s = $(this).find "> .d0-card-body > .card-slot-stub"
|
18
|
+
s.slotReload s.data("stubUrl")
|
19
|
+
s.removeClass "card-slot-stub"
|
20
|
+
|
16
21
|
openInNewTab = (event) -> event.metaKey
|
17
22
|
cardLinkPath = (cl) -> decko.path(cl.data("cardLinkUrl") || cl.data("cardLinkName"))
|
18
23
|
|
data/assets/style/bar.scss
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
$bar_stripe_color: $dark !default;
|
2
|
+
$bar-body-hover-color: rgba($gray-100, 0.5) !default;
|
3
|
+
$bar-transition: $accordion-transition !default;
|
4
|
+
|
2
5
|
|
3
6
|
._card-link {
|
4
7
|
cursor: pointer;
|
@@ -6,13 +9,16 @@ $bar_stripe_color: $dark !default;
|
|
6
9
|
|
7
10
|
.bar {
|
8
11
|
border: 1px solid $border-color;
|
9
|
-
|
12
|
+
> .bar-body, > .bar-menu, > .accordion-header > .accordion-button {
|
13
|
+
@include transition($bar-transition);
|
14
|
+
}
|
15
|
+
&:hover:not(.no-bar-hover) {
|
10
16
|
cursor: pointer;
|
11
|
-
> .bar-body, > .bar-menu, > .accordion-header
|
12
|
-
background-color: $
|
17
|
+
> .bar-body, > .bar-menu, > .accordion-header > .accordion-button {
|
18
|
+
background-color: $bar-body-hover-color;
|
13
19
|
}
|
14
20
|
}
|
15
|
-
&.accordion-item {
|
21
|
+
&.accordion-item > .accordion-header {
|
16
22
|
.bar-left, .bar-right {
|
17
23
|
padding: 0;
|
18
24
|
}
|
data/assets/style/box.scss
CHANGED
@@ -8,7 +8,6 @@ $box_stripe_color: $secondary !default;
|
|
8
8
|
cursor: pointer
|
9
9
|
}
|
10
10
|
border-top: 3px solid $box_stripe_color;
|
11
|
-
width: 320px;
|
12
11
|
}
|
13
12
|
|
14
13
|
.box-top {
|
@@ -55,12 +54,19 @@ $box_stripe_color: $secondary !default;
|
|
55
54
|
.card-list-box {
|
56
55
|
display: flex;
|
57
56
|
flex-wrap: wrap;
|
58
|
-
justify-content:
|
57
|
+
justify-content: space-around;
|
59
58
|
}
|
60
59
|
|
61
60
|
// wrapper around box in list context
|
62
61
|
.item-box {
|
63
|
-
display:
|
64
|
-
padding:
|
62
|
+
display: flex;
|
63
|
+
padding: 1rem 0;
|
65
64
|
vertical-align: top;
|
66
|
-
|
65
|
+
justify-content: center;
|
66
|
+
}
|
67
|
+
|
68
|
+
.box, .item-box {
|
69
|
+
min-width: 320px;
|
70
|
+
max-width: 400px;
|
71
|
+
width: 100%
|
72
|
+
}
|
data/config/admin.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
// bar_and_box.js.coffee
|
2
|
-
(function(){var n
|
2
|
+
(function(){var a,n;$(function(){return $(document).on("click","._card-link",function(t){var r;return"on"===(r=$(this)).data("skip")?r.data("skip",null):n(t)?window.open(a(r),"_tab_"+Math.floor(1e3*Math.random())):r.closest("._card-link-modal")[0]?r.find("._modal-page-link").trigger("click"):window.location=a(r)}),$("body").on("shown.bs.collapse",".bar > .collapse",function(){var a;return(a=$(this).find("> .d0-card-body > .card-slot-stub")).slotReload(a.data("stubUrl")),a.removeClass("card-slot-stub")})}),n=function(a){return a.metaKey},a=function(a){return decko.path(a.data("cardLinkUrl")||a.data("cardLinkName"))},decko.slot.ready(function(a){return a.find("._card-link a, ._card-link ._card-link-clickable").on("click",function(a){var n;return(n=$(this)).hasClass("_over-card-link")||n.closest("._over-card-link")[0]?n.closest("._card-link").data("skip","on"):a.preventDefault()})})}).call(this);
|
3
3
|
// click_select.js.coffee
|
4
4
|
(function(){$(window).ready(function(){return $("body").on("click","._click-multiselect-editor ._select-item",function(e){return $(this).closest("._select-item").toggleClass("selected"),e.stopPropagation()}),$("body").on("click","._click-select-editor ._select-item",function(e){return $(this).closest("._click-select-editor").find(".selected").removeClass("selected"),$(this).closest("._select-item").addClass("selected"),e.stopPropagation()})})}).call(this);
|
data/set/all/bar.rb
CHANGED
@@ -5,17 +5,24 @@ format :html do
|
|
5
5
|
bar_cols 9, 3
|
6
6
|
mini_bar_cols 9, 3
|
7
7
|
|
8
|
-
|
8
|
+
# drops bar-middle in small viewports
|
9
|
+
view :bar, unknown: :mini_bar, cache: :yes do
|
9
10
|
cols = bar_cols.size == 3 ? [mini_bar_cols, bar_cols] : [bar_cols]
|
10
11
|
prepare_bar(*cols)
|
11
12
|
build_bar
|
12
13
|
end
|
13
14
|
|
14
|
-
view :mini_bar, unknown: true do
|
15
|
+
view :mini_bar, cache: :yes, unknown: true do
|
15
16
|
prepare_bar mini_bar_cols
|
16
17
|
build_bar
|
17
18
|
end
|
18
19
|
|
20
|
+
view :full_bar, unknown: :mini_bar, cache: :yes do
|
21
|
+
class_up "bar", full_page_card.safe_set_keys
|
22
|
+
class_up_cols %w[bar-left bar-middle bar-right], bar_cols
|
23
|
+
build_bar
|
24
|
+
end
|
25
|
+
|
19
26
|
view(:bar_left, unknown: true) { render_title }
|
20
27
|
view(:bar_middle, unknown: :blank) { "" }
|
21
28
|
view(:bar_right, unknown: :blank) { "" }
|
@@ -28,17 +35,17 @@ format :html do
|
|
28
35
|
view :bar_menu, unknown: true, template: :haml
|
29
36
|
view :bar_body, unknown: true, template: :haml
|
30
37
|
|
31
|
-
view :
|
38
|
+
view :closed, unknown: :mini_bar, cache: :yes do
|
32
39
|
build_accordion_bar
|
33
40
|
end
|
34
|
-
view :closed_bar, :
|
35
|
-
view :
|
41
|
+
view :closed_bar, :closed
|
42
|
+
view :accordion_bar, :closed
|
36
43
|
|
37
|
-
view :
|
44
|
+
view :open, cache: :yes do
|
38
45
|
build_accordion_bar open: true
|
39
46
|
end
|
40
|
-
view :
|
41
|
-
view :
|
47
|
+
view :open_bar, :open
|
48
|
+
view :expanded_bar, :open
|
42
49
|
|
43
50
|
def build_accordion_bar open: false
|
44
51
|
prepare_bar mini_bar_cols
|
@@ -46,9 +53,9 @@ format :html do
|
|
46
53
|
wrap do
|
47
54
|
accordion_item render_bar_body,
|
48
55
|
subheader: render_menu,
|
49
|
-
body:
|
56
|
+
body: bar_bottom(open: open),
|
50
57
|
open: open,
|
51
|
-
context: :
|
58
|
+
context: :closed
|
52
59
|
end
|
53
60
|
end
|
54
61
|
|
@@ -86,4 +93,18 @@ format :html do
|
|
86
93
|
def bar_wrap_data
|
87
94
|
full_page_card == card ? wrap_data : full_page_card.format.wrap_data
|
88
95
|
end
|
96
|
+
|
97
|
+
# TODO: make card_stubs work
|
98
|
+
def bar_bottom open: false
|
99
|
+
open ? render_bar_bottom : card_stub(view: :bar_bottom)
|
100
|
+
end
|
101
|
+
|
102
|
+
# TODO: move to a more general accessible place (or its own abstract module)
|
103
|
+
def card_stub path_args
|
104
|
+
wrap_with :div,
|
105
|
+
class: "card-slot card-slot-stub",
|
106
|
+
data: { "stub-url": path(path_args) } do
|
107
|
+
""
|
108
|
+
end
|
109
|
+
end
|
89
110
|
end
|
data/set/all/box.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-bar_and_box
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-11-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.108.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.
|
28
|
+
version: 1.108.1
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: card-mod-style
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.
|
35
|
+
version: 0.18.1
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.
|
42
|
+
version: 0.18.1
|
43
43
|
description: ''
|
44
44
|
email:
|
45
45
|
- info@decko.org
|
@@ -67,7 +67,7 @@ files:
|
|
67
67
|
- set/type/image.rb
|
68
68
|
homepage: https://decko.org
|
69
69
|
licenses:
|
70
|
-
- GPL-3.0
|
70
|
+
- GPL-3.0-or-later
|
71
71
|
metadata:
|
72
72
|
source_code_uri: https://github.com/decko-commons/decko
|
73
73
|
homepage_uri: https://decko.org
|