markdown-ui 0.1.3 → 0.1.4

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.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +48 -0
  3. data/.travis.yml +3 -0
  4. data/Changelog +5 -0
  5. data/README.md +9 -3
  6. data/exe/markdown-ui +1 -1
  7. data/lib/markdown-ui.rb +8 -8
  8. data/lib/markdown-ui/button/animated.rb +2 -2
  9. data/lib/markdown-ui/button/basic.rb +1 -1
  10. data/lib/markdown-ui/button/custom.rb +1 -1
  11. data/lib/markdown-ui/button/element.rb +3 -3
  12. data/lib/markdown-ui/button/focusable.rb +2 -2
  13. data/lib/markdown-ui/button/group/buttons/custom.rb +1 -1
  14. data/lib/markdown-ui/button/group/buttons/element.rb +1 -1
  15. data/lib/markdown-ui/button/group/buttons/icon.rb +1 -1
  16. data/lib/markdown-ui/button/group/buttons/standard.rb +1 -1
  17. data/lib/markdown-ui/button/icon.rb +1 -1
  18. data/lib/markdown-ui/button/labeled_icon.rb +1 -1
  19. data/lib/markdown-ui/button/standard.rb +1 -1
  20. data/lib/markdown-ui/container/alignment/center.rb +1 -1
  21. data/lib/markdown-ui/container/alignment/left.rb +1 -1
  22. data/lib/markdown-ui/container/alignment/right.rb +1 -1
  23. data/lib/markdown-ui/container/custom.rb +1 -1
  24. data/lib/markdown-ui/container/element.rb +1 -1
  25. data/lib/markdown-ui/container/standard.rb +1 -1
  26. data/lib/markdown-ui/container/text.rb +1 -1
  27. data/lib/markdown-ui/content/custom.rb +1 -1
  28. data/lib/markdown-ui/content/header.rb +1 -1
  29. data/lib/markdown-ui/content/icon.rb +1 -1
  30. data/lib/markdown-ui/content/item.rb +1 -1
  31. data/lib/markdown-ui/content/list.rb +1 -1
  32. data/lib/markdown-ui/content/parser.rb +4 -4
  33. data/lib/markdown-ui/content/text.rb +1 -1
  34. data/lib/markdown-ui/grid/column/column.rb +1 -1
  35. data/lib/markdown-ui/grid/grid.rb +1 -1
  36. data/lib/markdown-ui/grid/row/row.rb +1 -1
  37. data/lib/markdown-ui/header/header.rb +2 -2
  38. data/lib/markdown-ui/label/custom.rb +1 -1
  39. data/lib/markdown-ui/label/element.rb +3 -3
  40. data/lib/markdown-ui/menu/custom.rb +1 -1
  41. data/lib/markdown-ui/menu/element.rb +3 -3
  42. data/lib/markdown-ui/menu/pagination.rb +1 -1
  43. data/lib/markdown-ui/menu/pointing.rb +1 -1
  44. data/lib/markdown-ui/menu/secondary.rb +1 -1
  45. data/lib/markdown-ui/menu/standard.rb +1 -1
  46. data/lib/markdown-ui/menu/tabular.rb +1 -1
  47. data/lib/markdown-ui/menu/text.rb +1 -1
  48. data/lib/markdown-ui/menu/vertical.rb +1 -1
  49. data/lib/markdown-ui/message/custom_message.rb +1 -1
  50. data/lib/markdown-ui/message/list_message.rb +1 -1
  51. data/lib/markdown-ui/message/message.rb +2 -2
  52. data/lib/markdown-ui/message/standard_message.rb +1 -1
  53. data/lib/markdown-ui/segment/custom_segment.rb +1 -1
  54. data/lib/markdown-ui/segment/horizontal_segment.rb +1 -1
  55. data/lib/markdown-ui/segment/padded_segment.rb +1 -1
  56. data/lib/markdown-ui/segment/piled_segment.rb +1 -1
  57. data/lib/markdown-ui/segment/segment.rb +1 -1
  58. data/lib/markdown-ui/segment/stacked_segment.rb +1 -1
  59. data/lib/markdown-ui/segment/standard_segment.rb +1 -1
  60. data/lib/markdown-ui/segment/vertical_segment.rb +1 -1
  61. data/lib/markdown-ui/tag/custom_tag.rb +2 -2
  62. data/lib/markdown-ui/tag/item_tag.rb +3 -3
  63. data/lib/markdown-ui/tag/list_tag.rb +3 -3
  64. data/lib/markdown-ui/tag/span_tag.rb +3 -3
  65. data/lib/markdown-ui/tag/standard_tag.rb +3 -3
  66. data/lib/markdown-ui/tag/tag.rb +1 -1
  67. data/lib/markdown-ui/utils/klass_util.rb +3 -3
  68. data/lib/markdown-ui/version.rb +1 -1
  69. data/markdown-ui.gemspec +1 -0
  70. data/website/index.html +100 -14
  71. data/website/index.md +93 -36
  72. metadata +17 -2
@@ -9,7 +9,7 @@ module MarkdownUI::Label
9
9
  end
10
10
 
11
11
  def render
12
- element = @element.join(" ").strip
12
+ element = @element.join(' ').strip
13
13
  content = MarkdownUI::Content::Parser.new(@content).parse
14
14
  klass = "ui #{element} #{@klass} label"
15
15
 
@@ -10,13 +10,13 @@ module MarkdownUI::Label
10
10
  element = if @element.is_a? Array
11
11
  @element
12
12
  else
13
- @element.split(" ")
13
+ @element.split(' ')
14
14
  end
15
15
 
16
16
  content = @content
17
17
 
18
18
  klass = if @klass.nil?
19
- element.join(" ").strip
19
+ element.join(' ').strip
20
20
  else
21
21
  @klass
22
22
  end
@@ -31,4 +31,4 @@ module MarkdownUI::Label
31
31
  end
32
32
 
33
33
  end
34
- end
34
+ end
@@ -9,7 +9,7 @@ module MarkdownUI::Menu
9
9
  end
10
10
 
11
11
  def render
12
- element = @element.join(" ").strip
12
+ element = @element.join(' ').strip
13
13
  content = MarkdownUI::Content::Parser.new(@content).parse
14
14
  klass = "ui #{element} #{@klass} menu"
15
15
 
@@ -10,13 +10,13 @@ module MarkdownUI::Menu
10
10
  element = if @element.is_a? Array
11
11
  @element
12
12
  else
13
- @element.split(" ")
13
+ @element.split(' ')
14
14
  end
15
15
 
16
16
  content = @content
17
17
 
18
18
  klass = if @klass.nil?
19
- element.join(" ").strip
19
+ element.join(' ').strip
20
20
  else
21
21
  @klass
22
22
  end
@@ -59,4 +59,4 @@ module MarkdownUI::Menu
59
59
  end
60
60
 
61
61
  end
62
- end
62
+ end
@@ -14,4 +14,4 @@ module MarkdownUI::Menu
14
14
  MarkdownUI::StandardTag.new(content, klass).render
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -14,4 +14,4 @@ module MarkdownUI::Menu
14
14
  MarkdownUI::StandardTag.new(content, klass).render
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -14,4 +14,4 @@ module MarkdownUI::Menu
14
14
  MarkdownUI::StandardTag.new(content, klass).render
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -14,4 +14,4 @@ module MarkdownUI::Menu
14
14
  MarkdownUI::StandardTag.new(content, klass).render
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -14,4 +14,4 @@ module MarkdownUI::Menu
14
14
  MarkdownUI::StandardTag.new(content, klass).render
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -14,4 +14,4 @@ module MarkdownUI::Menu
14
14
  MarkdownUI::StandardTag.new(content, klass).render
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -14,4 +14,4 @@ module MarkdownUI::Menu
14
14
  MarkdownUI::StandardTag.new(content, klass).render
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -9,7 +9,7 @@ module MarkdownUI
9
9
  end
10
10
 
11
11
  def render
12
- element = @element.join(" ").strip
12
+ element = @element.join(' ').strip
13
13
  content = MarkdownUI::Content::Parser.new(@content).parse
14
14
  klass = "ui #{element} #{@klass} message"
15
15
 
@@ -14,4 +14,4 @@ module MarkdownUI
14
14
  MarkdownUI::StandardTag.new(content, klass).render
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -10,7 +10,7 @@ module MarkdownUI
10
10
  element = if @element.is_a? Array
11
11
  @element
12
12
  else
13
- @element.split(" ")
13
+ @element.split(' ')
14
14
  end
15
15
 
16
16
  content = @content
@@ -37,4 +37,4 @@ module MarkdownUI
37
37
  !mode.list? && !mode.icon? && !mode.dismissable?
38
38
  end
39
39
  end
40
- end
40
+ end
@@ -14,4 +14,4 @@ module MarkdownUI
14
14
  MarkdownUI::StandardTag.new(content, klass).render
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -15,4 +15,4 @@ module MarkdownUI
15
15
  MarkdownUI::StandardTag.new(content, klass).render
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -13,4 +13,4 @@ module MarkdownUI
13
13
  MarkdownUI::StandardTag.new(content, klass).render
14
14
  end
15
15
  end
16
- end
16
+ end
@@ -13,4 +13,4 @@ module MarkdownUI
13
13
  MarkdownUI::StandardTag.new(content, klass).render
14
14
  end
15
15
  end
16
- end
16
+ end
@@ -13,4 +13,4 @@ module MarkdownUI
13
13
  MarkdownUI::StandardTag.new(content, klass).render
14
14
  end
15
15
  end
16
- end
16
+ end
@@ -31,4 +31,4 @@ module MarkdownUI
31
31
  end
32
32
 
33
33
  end
34
- end
34
+ end
@@ -13,4 +13,4 @@ module MarkdownUI
13
13
  MarkdownUI::StandardTag.new(content, klass).render
14
14
  end
15
15
  end
16
- end
16
+ end
@@ -13,4 +13,4 @@ module MarkdownUI
13
13
  MarkdownUI::StandardTag.new(content, klass).render
14
14
  end
15
15
  end
16
- end
16
+ end
@@ -13,4 +13,4 @@ module MarkdownUI
13
13
  MarkdownUI::StandardTag.new(content, klass).render
14
14
  end
15
15
  end
16
- end
16
+ end
@@ -19,7 +19,7 @@ module MarkdownUI
19
19
  output << content
20
20
  output << "</#{tag}>"
21
21
 
22
- output.join(" ")
22
+ output.join(' ')
23
23
  end
24
24
  end
25
- end
25
+ end
@@ -7,12 +7,12 @@ module MarkdownUI
7
7
  end
8
8
 
9
9
  def render
10
- content, @data = @content.split(";")
10
+ content, @data = @content.split(';')
11
11
  klass = MarkdownUI::KlassUtil.new(@klass).klass
12
12
  link = " href=\"#{@link.strip}\""
13
13
 
14
14
  data = if @data
15
- _data, attribute, value = @data.split(":")
15
+ _data, attribute, value = @data.split(':')
16
16
  " data-#{attribute}=\"#{value}\""
17
17
  else
18
18
  nil
@@ -21,4 +21,4 @@ module MarkdownUI
21
21
  "<a#{klass}#{data}#{link}>#{content}</a>"
22
22
  end
23
23
  end
24
- end
24
+ end
@@ -8,11 +8,11 @@ module MarkdownUI
8
8
  end
9
9
 
10
10
  def render
11
- content = @content.split(";")
11
+ content = @content.split(';')
12
12
  klass = MarkdownUI::KlassUtil.new(@klass).klass
13
13
 
14
14
  data = if @data
15
- _data, attribute, value = @data.split(":")
15
+ _data, attribute, value = @data.split(':')
16
16
  " data-#{attribute}=\"#{value}\""
17
17
  else
18
18
  nil
@@ -37,4 +37,4 @@ module MarkdownUI
37
37
  end
38
38
  end
39
39
  end
40
- end
40
+ end
@@ -6,9 +6,9 @@ module MarkdownUI
6
6
  end
7
7
 
8
8
  def render
9
- klass = "#{@klass}".downcase.split(" ").uniq
9
+ klass = "#{@klass}".downcase.split(' ').uniq
10
10
 
11
- "<span class=\"#{klass.join(" ").strip}\">#{@content}</span>"
11
+ "<span class=\"#{klass.join(' ').strip}\">#{@content}</span>"
12
12
  end
13
13
  end
14
- end
14
+ end
@@ -11,11 +11,11 @@ module MarkdownUI
11
11
  content = @content.strip unless @content.nil?
12
12
  klass = MarkdownUI::KlassUtil.new(@klass).klass unless @klass.nil?
13
13
  _id = if @id
14
- " id=\"#{@id.split.join("-")}\""
14
+ " id=\"#{@id.split.join('-')}\""
15
15
  end
16
16
 
17
17
  data = if @data
18
- _data, attribute, value = @data.split(":")
18
+ _data, attribute, value = @data.split(':')
19
19
  " data-#{attribute}=\"#{value}\""
20
20
  else
21
21
  nil
@@ -24,4 +24,4 @@ module MarkdownUI
24
24
  "<div#{_id}#{klass}#{data}>#{content}</div>"
25
25
  end
26
26
  end
27
- end
27
+ end
@@ -34,4 +34,4 @@ module MarkdownUI
34
34
  end
35
35
 
36
36
  end
37
- end
37
+ end
@@ -1,11 +1,11 @@
1
1
  module MarkdownUI
2
2
  class KlassUtil
3
3
  def initialize(text)
4
- @text = text.downcase.split(" ").uniq
4
+ @text = text.downcase.split(' ').uniq
5
5
  end
6
6
 
7
7
  def klass
8
- " class=\"#{@text.join(" ").strip}\""
8
+ " class=\"#{@text.join(' ').strip}\""
9
9
  end
10
10
  end
11
- end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module MarkdownUI
2
- VERSION = "0.1.3"
2
+ VERSION = '0.1.4'
3
3
  end
@@ -33,4 +33,5 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency "rake", "~> 10.0"
34
34
  spec.add_development_dependency "test-unit", "~> 3.0"
35
35
  spec.add_development_dependency "simplecov", "~> 0.10"
36
+ spec.add_development_dependency "codeclimate-test-reporter", "~> 0.4"
36
37
  end
@@ -22,10 +22,10 @@
22
22
 
23
23
  <body>
24
24
  <div class="ui center aligned container">
25
- <div class="ui inverted blue segment container">
26
- <div class="ui inverted blue menu">
25
+ <div class="ui inverted segment container">
26
+ <div class="ui inverted menu">
27
27
  <a class="ui basic item" href="http://jjuliano.github.io/markdown-ui">Markdown UI</a>
28
- <div class="ui inverted blue right menu">
28
+ <div class="ui inverted right menu">
29
29
  <a class="ui disabled item" href="#docs">Docs</a>
30
30
  <a class="ui disabled item" href="#about">About</a>
31
31
  <a class="ui item" href="https://github.com/jjuliano/markdown-ui">Github</a>
@@ -36,18 +36,19 @@
36
36
  <!-- -->
37
37
  <div class="ui left aligned container">
38
38
  <!-- -->
39
- <div class="ui inverted attached blue very padded segment">
39
+ <div class="ui inverted attached teal very padded segment">
40
40
  <h1 class="ui header">Markdown UI</h1>
41
- <h3 class="ui header">Responsive User Interfaces in Markdown</h3>
41
+ <h3 class="ui header">Responsive UI in Markdown</h3>
42
42
  </div>
43
43
  <!-- -->
44
44
  <div class="ui attached segment">
45
45
  <!-- -->
46
46
  <div class="ui equal width grid">
47
- <div class="ui column">
48
- <p>A framework for creating responsive UI&rsquo;s for mobile and web using Markdown Syntax. It is a tool for Rapid Prototyping UI&rsquo;s for Single-page and Multiple-page apps, and allows to write UI&rsquo;s only once and then translate it to Semantic UI 2.0, BootStrap 3 (coming soon), Foundation (coming soon), etc.</p>
49
- <p>It helps the developer to focus on the big picture on paper or text-editors, and with few details it lessen the cognitive load which means having meaningful productivity which equates to happiness!</p>
50
- </div>
47
+ <div class="ui column"><h2 class="ui header">Installation</h2><code>gem install markdown-ui</code><h2 class="ui header">Usage</h2><code>markdown-ui index.mdui &gt; index.html</code><h2 class="ui header">Credits</h2>
48
+ Markdown-UI uses <a class="ui item" href="http://www.semantic-ui.com">Semantic-UI http://www.semantic-ui.com</a>
49
+ syntax and framework, and ruby <code>redcarpet</code> library.
50
+ Credit goes to the people behind these wonderful framework and libraries.<h2 class="ui header">Issues/Bugs</h2>
51
+ <ul class="ui list"><li>Ongoing support for 80% of Semantic-UI elements/modules/components</li><li>The Colon (:) character will be parsed when used inside a text, needs post-processing to dislay correctly (for URLs)</li><li>Code is not DRY, needs refactoring / rewriting</li><li>Implimentation is subject to change</li></ul></div>
51
52
  <!-- -->
52
53
  <div class="ui column">
53
54
  <div class="ui inverted very padded segment">
@@ -70,11 +71,96 @@
70
71
  </div>
71
72
  </div>
72
73
  <!-- -->
73
- <div class="ui attached segment">
74
- <h2 class="ui header">Installation</h2>
75
- <code>gem install markdown-ui</code>
76
- <h2 class="ui header">Usage</h2>
77
- <code>markdown-ui index.md &gt; index.html</code>
74
+ <h2 class="ui center aligned header">Cheat Sheet</h2>
75
+ <div class="ui equal width grid">
76
+ <div class="ui column">
77
+ <div class="ui basic segment">
78
+ <h5 class="ui header">Button</h5>
79
+ <div class="ui info message">
80
+ <code>__Button|Button Text__</code>
81
+ </div>
82
+ <!-- -->
83
+ <h5 class="ui header">Container</h5>
84
+ <div class="ui info message">
85
+ <code>&gt; Container:</code>
86
+ <br />
87
+ <code>&gt;</code>
88
+ <br />
89
+ </div>
90
+ <!-- -->
91
+ <h5 class="ui header">Icon</h5>
92
+ <div class="ui info message">
93
+ <code>_Icon &lt;Name&gt;_</code>
94
+ <br />
95
+ </div>
96
+ <!-- -->
97
+ <h5 class="ui header">Segment</h5>
98
+ <div class="ui info message">
99
+ <code>&gt; Segment:</code>
100
+ <br />
101
+ <code>&gt;</code>
102
+ <br />
103
+ </div>
104
+ <!-- -->
105
+ <h5 class="ui header">Menu</h5>
106
+ <div class="ui info message">
107
+ <code>&gt; Menu:</code>
108
+ <br />
109
+ <code>&gt; [Menu Item]</code>
110
+ <br />
111
+ </div>
112
+ <!-- -->
113
+ </div>
114
+ </div>
115
+ <!-- -->
116
+ <div class="ui column">
117
+ <div class="ui basic segment">
118
+ <h5 class="ui header">Item</h5>
119
+ <div class="ui info message">
120
+ <code>[Item](#URL_ID "class")</code>
121
+ <br />
122
+ </div>
123
+ <!-- -->
124
+ <h5 class="ui header">Message</h5>
125
+ <div class="ui info message">
126
+ <code>__Message|Header:Message Header,Text:Message Text__</code>
127
+ <br />
128
+ </div>
129
+ <!-- -->
130
+ <h5 class="ui header">Header</h5>
131
+ <div class="ui info message">
132
+ <code># H1, ## H2, ### H3, #### H4 ...</code>
133
+ <br />
134
+ </div>
135
+ <!-- -->
136
+ <h5 class="ui header">Column / Grid / Row / Segment / Container</h5>
137
+ <div class="ui info message">
138
+ <code>&gt; Grid:</code>
139
+ <br />
140
+ <code>&gt;</code>
141
+ <br />
142
+ <code>&gt; &lt;!-- --&gt;</code>
143
+ <br />
144
+ <code>&gt;</code>
145
+ <br />
146
+ <code>&gt; &gt; Column:</code>
147
+ <br />
148
+ <code>&gt; &gt; Column 1</code>
149
+ <br />
150
+ <code>&gt;</code>
151
+ <br />
152
+ <code>&gt; &lt;!-- --&gt;</code>
153
+ <br />
154
+ <code>&gt;</code>
155
+ <br />
156
+ <code>&gt; &gt; Column:</code>
157
+ <br />
158
+ <code>&gt; &gt; Column 2</code>
159
+ <br />
160
+ </div>
161
+ <!-- -->
162
+ </div>
163
+ </div>
78
164
  </div>
79
165
  <!-- -->
80
166
  <div class="ui segment">