asbru 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/asbru.rb +4 -1
- data/lib/asbru/cml.rb +30 -8
- data/lib/asbru/form_builder.rb +2 -2
- data/lib/asbru/links.rb +3 -1
- data/lib/asbru/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc32cdd060fac8c7239f01e479aaab3f20133ce63127c39253731e034b8d0b89
|
4
|
+
data.tar.gz: 51a9bdfce5c395d16f3221c27f406665b711bf95cf59672e3dfc39e87b80a680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c71bde33b206e9af7aa6d2e2eb0db00da604cbdf592f8a282489b55a7336dd179e4b8297c2237f042e4e5ac2696602ea65d4b1b8f142767eaa1bebe097c2e407
|
7
|
+
data.tar.gz: 3fde55dacd880bcd701777f5c5723e98bb929bddba43e632e8caa139f68ed10b03b8c221eedc00493321c2df05da3b21f51e924c01d461904e08c14d7f6eb3bc
|
data/lib/asbru.rb
CHANGED
data/lib/asbru/cml.rb
CHANGED
@@ -18,35 +18,51 @@ module Asbru
|
|
18
18
|
# I think I prefer 1 even though the syntax of Sage is nicer imo.
|
19
19
|
class << self
|
20
20
|
def p text, **opts
|
21
|
-
C.
|
21
|
+
C.send "#{component_prefix}_content",
|
22
|
+
text: text,
|
23
|
+
**opts
|
22
24
|
end
|
23
25
|
|
24
26
|
def h1 text, **opts
|
25
|
-
C.
|
27
|
+
C.send "#{component_prefix}_title",
|
28
|
+
size: 'h1',
|
29
|
+
text: text
|
26
30
|
end
|
27
31
|
|
28
32
|
def h2 text, **opts
|
29
|
-
C.
|
33
|
+
C.send "#{component_prefix}_title",
|
34
|
+
size: 'h2',
|
35
|
+
text: text
|
30
36
|
end
|
31
37
|
|
32
38
|
def h3 text, **opts
|
33
|
-
C.
|
39
|
+
C.send "#{component_prefix}_title",
|
40
|
+
size: 'h3',
|
41
|
+
text: text
|
34
42
|
end
|
35
43
|
|
36
44
|
def h4 text, **opts
|
37
|
-
C.
|
45
|
+
C.send "#{component_prefix}_title",
|
46
|
+
size: 'h4',
|
47
|
+
text: text
|
38
48
|
end
|
39
49
|
|
40
50
|
def h5 text, **opts
|
41
|
-
C.
|
51
|
+
C.send "#{component_prefix}_title",
|
52
|
+
size: 'h5',
|
53
|
+
text: text
|
42
54
|
end
|
43
55
|
|
44
56
|
def hr color: 'stable-500'
|
45
|
-
C.
|
57
|
+
C.send ("#{component_prefix}_divider",
|
58
|
+
color: color,
|
59
|
+
height: 1
|
46
60
|
end
|
47
61
|
|
48
62
|
def vertical_spacer height
|
49
|
-
C.
|
63
|
+
C.send ("#{component_prefix}_divider",
|
64
|
+
color: :transparent,
|
65
|
+
height: height
|
50
66
|
end
|
51
67
|
|
52
68
|
def table_row(*cells)
|
@@ -62,6 +78,12 @@ module Asbru
|
|
62
78
|
cell[:customData]['data-confirm'] = confirm if confirm.present?
|
63
79
|
cell
|
64
80
|
end
|
81
|
+
|
82
|
+
private
|
83
|
+
|
84
|
+
def component_prefix
|
85
|
+
Asbru.config.component_prefix
|
86
|
+
end
|
65
87
|
end
|
66
88
|
end
|
67
89
|
end
|
data/lib/asbru/form_builder.rb
CHANGED
data/lib/asbru/links.rb
CHANGED
@@ -18,7 +18,9 @@ module Asbru
|
|
18
18
|
options[:customData][:'data-method'] = method if method.present?
|
19
19
|
options[:customData][:'data-confirm'] = confirm if confirm.present?
|
20
20
|
options[:customData].merge(options[:custom_data]) if options[:custom_data]
|
21
|
-
Asbru::Components::Savage.
|
21
|
+
Asbru::Components::Savage.send "#{Asbru.config.form_builder_prefix}_button",
|
22
|
+
**options
|
23
|
+
component_prefix
|
22
24
|
end
|
23
25
|
|
24
26
|
def asbru_link_to(text, url, **options)
|
data/lib/asbru/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asbru
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stev-0
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: dry-configurable
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: Creating component based webpages with short hand syntax.
|
42
56
|
email:
|
43
57
|
- skemp@adflow.io
|