semantic-rails-ui 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 197ef016fd30e9f3e42e554713119ba630d4698a
4
- data.tar.gz: a8caa5a8ff0a0a55bf9c2e2d2af5b6449cd5e710
3
+ metadata.gz: 1ed527fde8e50ef39933b95d93e57bcf57d5537b
4
+ data.tar.gz: 8aa85e0a817ce4facd48388d0ad39adc8b8e0157
5
5
  SHA512:
6
- metadata.gz: c16b4cc006f231cb7b914584dad4170f57464f09dd1aab57c362c29de6f23bbef1301ea6803715ecb7c542204c3741e51b764176dd0c795ed9496da48dade406
7
- data.tar.gz: 824c32c55f275b0a5cc4df0b705e7fef492f138a557ffe56d600bbe7abe949a33c018d386b5ab3f4a102e1233696775587358d2556b7278e9b71fccd4d0e0f72
6
+ metadata.gz: 34550655adf62de7bbdd4f7063d18e248eaf28e65afa2330fd647c715c94b5d3428c187af16bc743a9a19ec18951fd54d9477d8fdebcef9764137227bab87b7f
7
+ data.tar.gz: f314513e88fc01980268044689f9c1cd96345f09a3aaa73be6f4f4f9b88632de4cf3bea8d13daaf3e0701e4bc69273128af3d05892b71cc32c0beac9f62496fa
data/README.md CHANGED
@@ -13,7 +13,10 @@
13
13
  [coveralls]: https://coveralls.io/r/igorj/semantic-rails-ui
14
14
 
15
15
 
16
- TODO Description of SemanticRailsUi
16
+ - Integration with semantic-ui (with semantic-ui-sass gem) and simple_form.
17
+ - The gem also includes coffee-rails, sass-rails, jquery-rails, uglifier and turbolinks, so you don't have to include them in your rails application
18
+ - Adds following view helpers: `ui_flash_messages`, `ui_icon`, `ui_icon_header`, `ui_delete_link`
19
+ - Modifies the default rails scaffolding templates so that you get nice semantic-ui scaffolds out of the box
17
20
 
18
21
  ## Installation
19
22
 
@@ -33,7 +36,34 @@ Or install it yourself as:
33
36
 
34
37
  ## Usage
35
38
 
36
- TODO Describe how to use this gem
39
+ Add semantic-rails-ui to your assets:
40
+
41
+ application.js
42
+ ```
43
+ //= require semantic-rails-ui
44
+ ```
45
+
46
+ application.sass:
47
+ ```
48
+ @import "semantic-rails-ui"
49
+ ```
50
+
51
+ Now you can generate a scaffold and enjoy the semanic-ui look & feel.
52
+
53
+ You can also use the provided helpers:
54
+
55
+ ```
56
+ <%= ui_icon_header "Welcome home", "home" %>
57
+ ```
58
+
59
+ ```
60
+ <%= ui_delete_link 'Destroy', article, 'Are you sure?' %>
61
+ ```
62
+
63
+ ```
64
+ <%= ui_flash_messages %>
65
+ ```
66
+
37
67
 
38
68
  ## Development
39
69
 
@@ -10,6 +10,8 @@ module SemanticRailsUi
10
10
  end
11
11
  end
12
12
 
13
+ # supported flash message types: :error, :success, :warning, :info
14
+ # todo: add support for :alert and :notice
13
15
  def ui_flash_messages(options = {})
14
16
  merged_options = { id: "messages", class: "messages" }.merge(options)
15
17
  content_tag :div, merged_options do
@@ -26,10 +28,12 @@ module SemanticRailsUi
26
28
  end
27
29
  end
28
30
 
31
+ # renders a semantic-ui icon
29
32
  def ui_icon(icon_name)
30
33
  content_tag(:i, '', class: "#{icon_name} icon")
31
34
  end
32
35
 
36
+ # renders a delete link with semantic-ui confirmation dialog instead of default js confirmation
33
37
  def ui_delete_link(button_text, url, message)
34
38
  link_to url, class: "ui red tiny compact basic button", method: :delete,
35
39
  data: { confirm: message, 'confirm-title' => button_text } do
@@ -1,3 +1,3 @@
1
1
  module SemanticRailsUi
2
- VERSION = '0.0.18'
2
+ VERSION = '0.0.19'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semantic-rails-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Jancev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2016-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -250,7 +250,6 @@ files:
250
250
  - LICENCE.txt
251
251
  - README.md
252
252
  - Rakefile
253
- - app/assets/images/semantic-rails-ui/.keep
254
253
  - app/assets/javascripts/semantic-rails-ui.js
255
254
  - app/assets/javascripts/semantic-rails-ui/confirm.coffee
256
255
  - app/assets/javascripts/semantic-rails-ui/menu.coffee
File without changes