shipyard-framework 0.4.8 → 0.4.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 833bddc5b03a094ec726d279cbd3618071ef7c29
4
- data.tar.gz: c95f7201597bf11eb156704c18107c1638597396
3
+ metadata.gz: 1e59c5563374fc7313cf537453ffad9671bcace4
4
+ data.tar.gz: 5722d536bc665e1d0a84ddad0de047e5404010f3
5
5
  SHA512:
6
- metadata.gz: 060c88c505e77de4895c1ce79b8bf415d750682d5006291bda9be1e7e3335b1edb345ed4f79e1c6cced4d4518941a5131af0b65517c3a41e24eeb918bf4be72f
7
- data.tar.gz: fd7257f0b5004711c2c4850d17e7e3d9b0f81a04509d23d826e1609520b8d8a2e653aa3c7fe5506bd3301dbaf7d092583e60f402f2449e75bf07be1a3c879a34
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
- svg_html = icon('x', class: 'alert-close-icon icon-outline-inverse center')
32
- else
33
- svg_html = 'x'
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::Tag
5
+ class Alert < Liquid::Block
6
6
  include Shipyard::AlertHelper
7
7
 
8
- def initialize(tag_name, params, options)
8
+ def initialize(tag_name, type, options)
9
9
  super
10
- @params = params.split(',')
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, @text
14
+ flash_alert @type, super
17
15
  end
18
16
  end
19
17
  end
@@ -1,3 +1,3 @@
1
1
  module Shipyard
2
- VERSION = '0.4.8'
2
+ VERSION = '0.4.9'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- shipyard-framework (0.4.8)
4
+ shipyard-framework (0.4.9)
5
5
  actionview (~> 5.0)
6
6
 
7
7
  GEM
@@ -6,27 +6,22 @@ title: Shipyard Alerts
6
6
 
7
7
  ---
8
8
 
9
- <div class="alert alert-info">
10
- <p class="alert-txt">
11
- Ten other people are also viewing tickets for this flight.
12
- Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
13
- </p>
14
- </div>
15
- <div class="alert alert-success">
16
- <p class="alert-txt">
17
- Pack your bags! You'll be on the next flight to Hawaii.
18
- Use the code <code class="code-inline">Travel_Light_2017</code> on your next flight.
19
- </p>
20
- </div>
21
- <div class="alert alert-warning">
22
- <p class="alert-txt">
23
- There are only 2 seats left on this flight! We recommend to book your tickets as soon as possible.
24
- Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
25
- </p>
26
- </div>
27
- <div class="alert alert-error">
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
- <div class="alert alert-info">
27
- <p class="alert-txt">
28
- Ten other people are also viewing tickets for this flight.
29
- Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
30
- </p>
31
- </div>
32
- <div class="alert alert-success">
33
- <p class="alert-txt">
34
- Pack your bags! You'll be on the next flight to Hawaii.
35
- Use the code <code class="code-inline">Travel_Light_2017</code> on your next flight.
36
- </p>
37
- </div>
38
- <div class="alert alert-warning">
39
- <p class="alert-txt">
40
- There are only 2 seats left on this flight! We recommend to book your tickets as soon as possible.
41
- Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
42
- </p>
43
- </div>
44
- <div class="alert alert-error">
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 %}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shipyard-framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shipyard