card-mod-bar_and_box 0.17.0 → 0.18.0
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/set/all/bar.rb +31 -10
- data/set/all/box.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 190d7d4831a2ae497659729cec7e0e2d6b75cde8160b3313474452b5d6ea9c5a
|
4
|
+
data.tar.gz: c5f650e79126ad7b072c2ebdba5450212cd9432444605950c31e7b7c9984e234
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1472daa4fff82f6660d17995383f6861b294b912464ec1aaec8f0f4cd384405ae4e3b1fdfb489b50bb0953bd78835ea63d364283de0d83b2a6731f1a9b14afca
|
7
|
+
data.tar.gz: bef94ea876185503f22cff962615dd308f8193f88881c30a5da6c4b8ad3844f931bacc0ca60281922e431306b424d7d265a5ead97ce7bfd95e39efbb8d68db90
|
@@ -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
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.0
|
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-10-31 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.0
|
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.0
|
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.0
|
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.0
|
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
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
|
-
rubygems_version: 3.5.
|
94
|
+
rubygems_version: 3.5.7
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: bar and box views
|