shipyard-framework 0.4.8 → 0.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/shipyard/alert_helper.rb +6 -7
- data/lib/shipyard-framework/jekyll/alert_tag.rb +4 -6
- data/lib/shipyard-framework/version.rb +1 -1
- data/styleguide/Gemfile.lock +1 -1
- data/styleguide/components/alerts.md +19 -24
- data/styleguide/components/code.html +19 -24
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e59c5563374fc7313cf537453ffad9671bcace4
|
4
|
+
data.tar.gz: 5722d536bc665e1d0a84ddad0de047e5404010f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47d6703a49855d7bfb25af458c451b058cb68a0e61d2613e17d66c383819c1888dd94055a1cfabc5d96ed88527838d24001ccc223f7b7d40d4c08770d42d3d61
|
7
|
+
data.tar.gz: b81263634628232f399496f0362b67d8372da0d2d7bee106598bcdcc725335edcaec173593a51dc98d1bcde82fbbabb3da0aa9c8fa3171428a8450f5d6c4fc3b
|
@@ -28,14 +28,13 @@ module Shipyard
|
|
28
28
|
content_tag :div, options do
|
29
29
|
concat content_tag(:p, raw(alert_txt), class: 'alert-txt')
|
30
30
|
if defined? icon
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
concat content_tag(
|
32
|
+
icon('x', class: 'alert-close-icon icon-outline-inverse center'),
|
33
|
+
svg_html,
|
34
|
+
class: 'alert-close v-center',
|
35
|
+
'@click': 'close'
|
36
|
+
)
|
34
37
|
end
|
35
|
-
concat content_tag(:button,
|
36
|
-
svg_html,
|
37
|
-
class: 'alert-close v-center',
|
38
|
-
'@click': 'close')
|
39
38
|
end
|
40
39
|
end
|
41
40
|
|
@@ -2,18 +2,16 @@ require_relative '../../../app/helpers/shipyard/alert_helper'
|
|
2
2
|
|
3
3
|
module Shipyard
|
4
4
|
module Jekyll
|
5
|
-
class Alert < Liquid::
|
5
|
+
class Alert < Liquid::Block
|
6
6
|
include Shipyard::AlertHelper
|
7
7
|
|
8
|
-
def initialize(tag_name,
|
8
|
+
def initialize(tag_name, type, options)
|
9
9
|
super
|
10
|
-
@
|
11
|
-
@type = @params[0].tr(':','').to_sym
|
12
|
-
@text = @params[1]
|
10
|
+
@type = type.tr(':','').to_sym
|
13
11
|
end
|
14
12
|
|
15
13
|
def render(context)
|
16
|
-
flash_alert @type,
|
14
|
+
flash_alert @type, super
|
17
15
|
end
|
18
16
|
end
|
19
17
|
end
|
data/styleguide/Gemfile.lock
CHANGED
@@ -6,27 +6,22 @@ title: Shipyard Alerts
|
|
6
6
|
|
7
7
|
---
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
</
|
27
|
-
|
28
|
-
<p class="alert-txt">
|
29
|
-
This flight is now sold out. Let's get you on the next flight to Kauai.
|
30
|
-
We hope the code <code class="code-inline">Travel_Light_2017</code> will be useful for your next flight.
|
31
|
-
</p>
|
32
|
-
</div>
|
9
|
+
{% alert :info %}
|
10
|
+
Ten other people are also viewing tickets for this flight.
|
11
|
+
Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
|
12
|
+
{% endalert %}
|
13
|
+
|
14
|
+
{% alert :success %}
|
15
|
+
Pack your bags! You'll be on the next flight to Hawaii.
|
16
|
+
Use the code <code class="code-inline">Travel_Light_2017</code> on your next flight.
|
17
|
+
{% endalert %}
|
18
|
+
|
19
|
+
{% alert :warning %}
|
20
|
+
There are only 2 seats left on this flight! We recommend to book your tickets as soon as possible.
|
21
|
+
Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
|
22
|
+
{% endalert %}
|
23
|
+
|
24
|
+
{% alert :error %}
|
25
|
+
This flight is now sold out. Let's get you on the next flight to Kauai.
|
26
|
+
We hope the code <code class="code-inline">Travel_Light_2017</code> will be useful for your next flight.
|
27
|
+
{% endalert %}
|
@@ -23,27 +23,22 @@ end</code></pre>
|
|
23
23
|
<hr />
|
24
24
|
|
25
25
|
<h2 class="margin-bottom-sm">Code Alert Examples</h2>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
<
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
<
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
</
|
44
|
-
|
45
|
-
<p class="alert-txt">
|
46
|
-
This flight is now sold out. Let's get you on the next flight to Kauai.
|
47
|
-
We hope the code <code class="code-inline">Travel_Light_2017</code> will be useful for your next flight.
|
48
|
-
</p>
|
49
|
-
</div>
|
26
|
+
{% alert :info %}
|
27
|
+
Ten other people are also viewing tickets for this flight.
|
28
|
+
Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
|
29
|
+
{% endalert %}
|
30
|
+
|
31
|
+
{% alert :success %}
|
32
|
+
Pack your bags! You'll be on the next flight to Hawaii.
|
33
|
+
Use the code <code class="code-inline">Travel_Light_2017</code> on your next flight.
|
34
|
+
{% endalert %}
|
35
|
+
|
36
|
+
{% alert :warning %}
|
37
|
+
There are only 2 seats left on this flight! We recommend to book your tickets as soon as possible.
|
38
|
+
Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
|
39
|
+
{% endalert %}
|
40
|
+
|
41
|
+
{% alert :error %}
|
42
|
+
This flight is now sold out. Let's get you on the next flight to Kauai.
|
43
|
+
We hope the code <code class="code-inline">Travel_Light_2017</code> will be useful for your next flight.
|
44
|
+
{% endalert %}
|