markdown-ui 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.travis.yml +3 -0
  4. data/CODE_OF_CONDUCT.md +13 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +19 -0
  8. data/Rakefile +10 -0
  9. data/bin/console +14 -0
  10. data/bin/setup +7 -0
  11. data/exe/markdown-ui +37 -0
  12. data/lib/markdown-ui.rb +130 -0
  13. data/lib/markdown-ui/button/animated.rb +22 -0
  14. data/lib/markdown-ui/button/basic.rb +17 -0
  15. data/lib/markdown-ui/button/custom.rb +20 -0
  16. data/lib/markdown-ui/button/element.rb +59 -0
  17. data/lib/markdown-ui/button/focusable.rb +23 -0
  18. data/lib/markdown-ui/button/group/buttons/custom.rb +21 -0
  19. data/lib/markdown-ui/button/group/buttons/element.rb +28 -0
  20. data/lib/markdown-ui/button/group/buttons/icon.rb +19 -0
  21. data/lib/markdown-ui/button/group/buttons/standard.rb +19 -0
  22. data/lib/markdown-ui/button/icon.rb +17 -0
  23. data/lib/markdown-ui/button/labeled_icon.rb +23 -0
  24. data/lib/markdown-ui/button/standard.rb +17 -0
  25. data/lib/markdown-ui/container/alignment/center.rb +19 -0
  26. data/lib/markdown-ui/container/alignment/left.rb +19 -0
  27. data/lib/markdown-ui/container/alignment/right.rb +19 -0
  28. data/lib/markdown-ui/container/custom.rb +17 -0
  29. data/lib/markdown-ui/container/element.rb +38 -0
  30. data/lib/markdown-ui/container/standard.rb +17 -0
  31. data/lib/markdown-ui/container/text.rb +17 -0
  32. data/lib/markdown-ui/content/custom.rb +16 -0
  33. data/lib/markdown-ui/content/header.rb +19 -0
  34. data/lib/markdown-ui/content/icon.rb +24 -0
  35. data/lib/markdown-ui/content/item.rb +21 -0
  36. data/lib/markdown-ui/content/list.rb +23 -0
  37. data/lib/markdown-ui/content/parser.rb +66 -0
  38. data/lib/markdown-ui/content/text.rb +24 -0
  39. data/lib/markdown-ui/divider/element.rb +0 -0
  40. data/lib/markdown-ui/divider/hidden.rb +0 -0
  41. data/lib/markdown-ui/divider/standard.rb +0 -0
  42. data/lib/markdown-ui/grid/column/column.rb +18 -0
  43. data/lib/markdown-ui/grid/grid.rb +18 -0
  44. data/lib/markdown-ui/grid/row/row.rb +18 -0
  45. data/lib/markdown-ui/header/header.rb +30 -0
  46. data/lib/markdown-ui/label/custom.rb +20 -0
  47. data/lib/markdown-ui/label/element.rb +34 -0
  48. data/lib/markdown-ui/menu/custom.rb +20 -0
  49. data/lib/markdown-ui/menu/element.rb +62 -0
  50. data/lib/markdown-ui/menu/pagination.rb +17 -0
  51. data/lib/markdown-ui/menu/pointing.rb +17 -0
  52. data/lib/markdown-ui/menu/secondary.rb +17 -0
  53. data/lib/markdown-ui/menu/standard.rb +17 -0
  54. data/lib/markdown-ui/menu/tabular.rb +17 -0
  55. data/lib/markdown-ui/menu/text.rb +17 -0
  56. data/lib/markdown-ui/menu/vertical.rb +17 -0
  57. data/lib/markdown-ui/message/custom_message.rb +20 -0
  58. data/lib/markdown-ui/message/list_message.rb +17 -0
  59. data/lib/markdown-ui/message/message.rb +40 -0
  60. data/lib/markdown-ui/message/standard_message.rb +17 -0
  61. data/lib/markdown-ui/segment/custom_segment.rb +18 -0
  62. data/lib/markdown-ui/segment/horizontal_segment.rb +16 -0
  63. data/lib/markdown-ui/segment/padded_segment.rb +16 -0
  64. data/lib/markdown-ui/segment/piled_segment.rb +16 -0
  65. data/lib/markdown-ui/segment/segment.rb +34 -0
  66. data/lib/markdown-ui/segment/stacked_segment.rb +16 -0
  67. data/lib/markdown-ui/segment/standard_segment.rb +16 -0
  68. data/lib/markdown-ui/segment/vertical_segment.rb +16 -0
  69. data/lib/markdown-ui/tag/custom_tag.rb +25 -0
  70. data/lib/markdown-ui/tag/item_tag.rb +24 -0
  71. data/lib/markdown-ui/tag/list_tag.rb +40 -0
  72. data/lib/markdown-ui/tag/span_tag.rb +14 -0
  73. data/lib/markdown-ui/tag/standard_tag.rb +23 -0
  74. data/lib/markdown-ui/tag/tag.rb +37 -0
  75. data/lib/markdown-ui/utils/klass_util.rb +11 -0
  76. data/lib/markdown-ui/version.rb +3 -0
  77. data/markdown-ui.gemspec +36 -0
  78. data/website/index.html +369 -0
  79. data/website/index.md +389 -0
  80. metadata +208 -0
@@ -0,0 +1,17 @@
1
+ # coding: UTF-8
2
+
3
+ module MarkdownUI
4
+ class StandardMessage
5
+ def initialize(content, klass = nil)
6
+ @klass = klass
7
+ @content = content
8
+ end
9
+
10
+ def render
11
+ klass = "ui #{@klass} message"
12
+ content = MarkdownUI::Content::Parser.new(@content).parse
13
+
14
+ MarkdownUI::StandardTag.new(content, klass).render
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,18 @@
1
+ # coding: UTF-8
2
+
3
+ module MarkdownUI
4
+ class CustomSegment
5
+ def initialize(element, content)
6
+ @element = element
7
+ @content = content
8
+ end
9
+
10
+ def render
11
+ element = @element.strip
12
+ content = @content.strip
13
+ klass = "ui #{element} segment"
14
+
15
+ MarkdownUI::StandardTag.new(content, klass).render
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ module MarkdownUI
2
+ class HorizontalSegment
3
+ def initialize(element, content)
4
+ @element = element
5
+ @content = content
6
+ end
7
+
8
+ def render
9
+ element = @element.strip
10
+ content = @content.strip
11
+ klass = "ui #{element} horizontal segment"
12
+
13
+ MarkdownUI::StandardTag.new(content, klass).render
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ module MarkdownUI
2
+ class PaddedSegment
3
+ def initialize(element, content)
4
+ @element = element
5
+ @content = content
6
+ end
7
+
8
+ def render
9
+ element = @element.strip
10
+ content = @content.strip
11
+ klass = "ui #{element} padded segment"
12
+
13
+ MarkdownUI::StandardTag.new(content, klass).render
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ module MarkdownUI
2
+ class PiledSegment
3
+ def initialize(element, content)
4
+ @element = element
5
+ @content = content
6
+ end
7
+
8
+ def render
9
+ element = @element.strip
10
+ content = @content.strip
11
+ klass = "ui #{element} piled segment"
12
+
13
+ MarkdownUI::StandardTag.new(content, klass).render
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,34 @@
1
+ module MarkdownUI
2
+ class Segment
3
+ def initialize(element, content)
4
+ @mode = OpenStruct.new(
5
+ :horizontal? => !(element =~ /horizontal/i).nil?,
6
+ :vertical? => !(element =~ /vertical/i).nil?,
7
+ :stacked? => !(element =~ /stacked/i).nil?,
8
+ :piled? => !(element =~ /piled/i).nil?,
9
+ :padded? => !(element =~ /padded/i).nil?
10
+ )
11
+ @element = element
12
+ @content = content
13
+ end
14
+
15
+ def render
16
+ if @element.length == "segment".length
17
+ MarkdownUI::StandardSegment.new(@element, @content).render
18
+ elsif @mode.horizontal?
19
+ MarkdownUI::HorizontalSegment.new(@element, @content).render
20
+ elsif @mode.vertical?
21
+ MarkdownUI::VerticalSegment.new(@element, @content).render
22
+ elsif @mode.stacked?
23
+ MarkdownUI::StackedSegment.new(@element, @content).render
24
+ elsif @mode.piled?
25
+ MarkdownUI::PiledSegment.new(@element, @content).render
26
+ elsif @mode.padded?
27
+ MarkdownUI::PaddedSegment.new(@element, @content).render
28
+ else
29
+ MarkdownUI::CustomSegment.new(@element, @content).render
30
+ end
31
+ end
32
+
33
+ end
34
+ end
@@ -0,0 +1,16 @@
1
+ module MarkdownUI
2
+ class StackedSegment
3
+ def initialize(element, content)
4
+ @element = element
5
+ @content = content
6
+ end
7
+
8
+ def render
9
+ element = @element.strip
10
+ content = @content.strip
11
+ klass = "ui #{element} stacked segment"
12
+
13
+ MarkdownUI::StandardTag.new(content, klass).render
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ module MarkdownUI
2
+ class StandardSegment
3
+ def initialize(element, content)
4
+ @element = element
5
+ @content = content
6
+ end
7
+
8
+ def render
9
+ element = @element.strip
10
+ content = @content.strip
11
+ klass = "ui #{element} segment"
12
+
13
+ MarkdownUI::StandardTag.new(content, klass).render
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ module MarkdownUI
2
+ class VerticalSegment
3
+ def initialize(element, content)
4
+ @element = element
5
+ @content = content
6
+ end
7
+
8
+ def render
9
+ element = @element.strip
10
+ content = @content.strip
11
+ klass = "ui #{element} vertical segment"
12
+
13
+ MarkdownUI::StandardTag.new(content, klass).render
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,25 @@
1
+ # coding: UTF-8
2
+
3
+ module MarkdownUI
4
+ class CustomTag
5
+ def initialize(tag, content, klass = nil)
6
+ @tag = tag
7
+ @klass = klass
8
+ @content = content
9
+ end
10
+
11
+ def render
12
+ klass = MarkdownUI::KlassUtil.new("#{@klass}").klass
13
+ tag = @tag.downcase.strip
14
+ content = MarkdownUI::Content::Parser.new(@content).parse
15
+
16
+ output = []
17
+ output << "<#{tag}"
18
+ output << "#{klass}>"
19
+ output << content
20
+ output << "</#{tag}>"
21
+
22
+ output.join(" ")
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,24 @@
1
+ module MarkdownUI
2
+ class ItemTag
3
+ def initialize(content, klass = nil, link = nil)
4
+ @klass = klass
5
+ @content = content
6
+ @link = link
7
+ end
8
+
9
+ def render
10
+ content, @data = @content.split(";")
11
+ klass = MarkdownUI::KlassUtil.new(@klass).klass
12
+ link = " href=\"#{@link.strip}\""
13
+
14
+ data = if @data
15
+ _data, attribute, value = @data.split(":")
16
+ " data-#{attribute}=\"#{value}\""
17
+ else
18
+ nil
19
+ end
20
+
21
+ "<a#{klass}#{data}#{link}>#{content}</a>"
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,40 @@
1
+ module MarkdownUI
2
+ class ListTag
3
+ def initialize(content, klass = nil, type = nil, data = nil)
4
+ @klass = klass
5
+ @content = content
6
+ @type = type
7
+ @data = data
8
+ end
9
+
10
+ def render
11
+ content = @content.split(";")
12
+ klass = MarkdownUI::KlassUtil.new(@klass).klass
13
+
14
+ data = if @data
15
+ _data, attribute, value = @data.split(":")
16
+ " data-#{attribute}=\"#{value}\""
17
+ else
18
+ nil
19
+ end
20
+
21
+ list = ""
22
+ if !content.grep(/^\<li\>.*/).empty?
23
+ list = content.join
24
+ else
25
+ content.each do |c|
26
+ list += "<li>#{c}</li>"
27
+ end
28
+ end
29
+
30
+ @type = :unordered if @type.nil?
31
+
32
+ case @type
33
+ when :ordered
34
+ "<ol#{klass}#{data}>#{list}</ol>"
35
+ when :unordered
36
+ "<ul#{klass}#{data}>#{list}</ul>"
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,14 @@
1
+ module MarkdownUI
2
+ class SpanTag
3
+ def initialize(content, klass = nil)
4
+ @klass = klass
5
+ @content = content
6
+ end
7
+
8
+ def render
9
+ klass = "#{@klass}".downcase.split(" ").uniq
10
+
11
+ "<span class=\"#{klass.join(" ").strip}\">#{@content}</span>"
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ module MarkdownUI
2
+ class StandardTag
3
+ def initialize(content, klass = nil, data = nil)
4
+ @klass = klass
5
+ @content = content
6
+ @data = data
7
+ end
8
+
9
+ def render
10
+ content = @content.strip unless @content.nil?
11
+ klass = MarkdownUI::KlassUtil.new(@klass).klass
12
+
13
+ data = if @data
14
+ _data, attribute, value = @data.split(":")
15
+ " data-#{attribute}=\"#{value}\""
16
+ else
17
+ nil
18
+ end
19
+
20
+ "<div#{klass}#{data}>#{content}</div>"
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,37 @@
1
+ module MarkdownUI
2
+ class Tag
3
+ def initialize(tag, content, klass = nil, data = nil)
4
+ @mode = OpenStruct.new(
5
+ :div? => !(tag =~ /div/i).nil?,
6
+ :span? => !(tag =~ /span/i).nil?,
7
+ :article? => !(tag =~ /article/i).nil?,
8
+ :section? => !(tag =~ /section/i).nil?,
9
+ :header? => !(tag =~ /header/i).nil?,
10
+ :footer? => !(tag =~ /footer/i).nil?
11
+ )
12
+ @tag = tag
13
+ @content = content
14
+ @klass = klass
15
+ @data = data
16
+ end
17
+
18
+ def render
19
+ # if @mode.div?
20
+ MarkdownUI::StandardTag.new(@content, @klass, @data).render
21
+ # elsif @mode.span
22
+ # MarkdownUI::SpanTag.new(@content, @klass).render
23
+ # elsif @mode.article
24
+ # MarkdownUI::ArticleTag.new(@content, @klass).render
25
+ # elsif @mode.section
26
+ # MarkdownUI::SectionTag.new(@content, @klass).render
27
+ # elsif @mode.header
28
+ # MarkdownUI::HeaderTag.new(@content, @klass).render
29
+ # elsif @mode.footer
30
+ # MarkdownUI::FooterTag.new(@content, @klass).render
31
+ # else
32
+ # MarkdownUI::CustomTag.new(@tag, @content, @klass).render
33
+ # end
34
+ end
35
+
36
+ end
37
+ end
@@ -0,0 +1,11 @@
1
+ module MarkdownUI
2
+ class KlassUtil
3
+ def initialize(text)
4
+ @text = text.downcase.split(" ").uniq
5
+ end
6
+
7
+ def klass
8
+ " class=\"#{@text.join(" ").strip}\""
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ module MarkdownUI
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,36 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'markdown-ui/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "markdown-ui"
8
+ spec.version = MarkdownUI::VERSION
9
+ spec.authors = ["Joel Bryan Juliano"]
10
+ spec.email = ["joelbryan.juliano@gmail.com"]
11
+
12
+ spec.summary = %q{Responsive User Interfaces in Markdown}
13
+ spec.description = %q{Create responsive UI/UX for mobile and web using Markdown Syntax}
14
+ spec.homepage = "https://github.com/jjuliano/markdown-ui"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
+ # delete this section to allow pushing this gem to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
21
+ else
22
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
+ end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_development_dependency "bundler", "~> 1.9"
31
+ spec.add_development_dependency "rake", "~> 10.0"
32
+ spec.add_dependency "redcarpet", "~> 3.2"
33
+ spec.add_dependency "nokogiri", "~> 1.6"
34
+ spec.add_development_dependency "test-unit", "~> 3.0"
35
+ spec.add_development_dependency "simplecov", "~> 0.10"
36
+ end
@@ -0,0 +1,369 @@
1
+ <!doctype html>
2
+
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="utf-8">
6
+
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.1/semantic.min.css">
8
+ <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
9
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.1/semantic.min.js"></script>
10
+
11
+ <!--[if lt IE 9]>
12
+ <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
14
+ <style>
15
+ code { white-space:pre }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <div class="ui inverted blue segment">
21
+ <div class="ui inverted blue menu">
22
+ <a class="ui basic item" href="#home">Markdown UI</a>
23
+ <div class="ui inverted blue right menu">
24
+ <a class="ui item" href="#docs">Docs</a>
25
+ <a class="ui item" href="#about">About</a>
26
+ <a class="ui item" href="#github">Github</a>
27
+ <a class="ui item" href="#install">Install</a>
28
+ </div>
29
+ </div>
30
+ </div>
31
+
32
+ <!-- -->
33
+ <div class="ui container">
34
+ <!-- -->
35
+ <div class="ui inverted attached blue very padded segment">
36
+ <h1 class="ui header">Markdown UI</h1>
37
+ <h3 class="ui header">Responsive User Interfaces in Markdown</h3>
38
+ </div>
39
+ <!-- -->
40
+ <div class="ui attached segment">
41
+ <!-- -->
42
+ <div class="ui equal width grid">
43
+ <div class="ui column">
44
+ <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>
45
+ <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>
46
+ </div>
47
+ <!-- -->
48
+ <div class="ui column">
49
+ <div class="ui inverted segment">
50
+ <code>&gt; Pointing Menu&#xFF1A;</code>
51
+ <br />
52
+ <code>&gt; [Home](#home "active")</code>
53
+ <br />
54
+ <code>&gt; [Messages](#messages)</code>
55
+ <br />
56
+ <code>&gt; [Friends](#friends)</code>
57
+ <br />
58
+ <code>&gt; &gt; Right Menu&#xFF1A;</code>
59
+ <br />
60
+ <code>&gt; &gt; [Logout](#logout)</code>
61
+ <br />
62
+ <br />
63
+ <code>__Button|Add Friend__</code>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ <!-- -->
69
+ <div class="ui attached segment"><h2 class="ui header">Installation</h2><code>gem install markdown-ui</code><h2 class="ui header">Usage</h2><code>markdown-ui index.md &gt; index.html</code><h2 class="ui header">Github</h2>
70
+ github.com/jjuliano/markdown-ui</div>
71
+ <!-- -->
72
+ <div class="ui segment">
73
+ <h1 class="ui center aligned header">Buttons</h1>
74
+ </div>
75
+ <!-- -->
76
+ <div class="ui segment">
77
+ <h3 class="ui header">Button</h3>
78
+ <p>Standard Button</p>
79
+ </div>
80
+ <!-- -->
81
+ <div class="ui divided segment grid">
82
+ <div class="ui html top attached segment">
83
+ <div class="ui top attached label">Standard Button</div>
84
+ </div>
85
+ <!-- -->
86
+ <div class="ui center aligned six wide column">
87
+ <h5 class="ui header">Preview</h5>
88
+ <div class="ui button">Follow</div>
89
+ </div>
90
+ <!-- -->
91
+ <div class="ui left aligned ten wide column">
92
+ <h5 class="ui header">Markdown Syntax</h5>
93
+ <div class="ui inverted segment">
94
+ <code>
95
+ __Button|Follow__
96
+ </code>
97
+ </div>
98
+ </div>
99
+ <!-- -->
100
+ </div>
101
+ <!-- -->
102
+ <div class="ui divided segment grid">
103
+ <div class="ui html top attached segment">
104
+ <div class="ui top attached label">Standard Button with Custom Class</div>
105
+ </div>
106
+ <!-- -->
107
+ <div class="ui center aligned six wide column">
108
+ <h5 class="ui header">Preview</h5>
109
+ <div class="ui follow-button button">Follow</div>
110
+ </div>
111
+ <!-- -->
112
+ <div class="ui left aligned ten wide column">
113
+ <h5 class="ui header">Markdown Syntax</h5>
114
+ <div class="ui inverted segment"><code>__Follow-Button Button|Follow__</code><br />or<br /><code>__Button|Follow|Follow-Button__</code></div>
115
+ </div>
116
+ <!-- -->
117
+ </div>
118
+ <!-- -->
119
+ <div class="ui divided segment grid">
120
+ <div class="ui html top attached segment">
121
+ <div class="ui top attached label">Focusable Button</div>
122
+ </div>
123
+ <!-- -->
124
+ <div class="ui center aligned six wide column">
125
+ <h5 class="ui header">Preview</h5>
126
+ <button class="ui focusable button">Follow</button>
127
+ </div>
128
+ <!-- -->
129
+ <div class="ui left aligned ten wide column">
130
+ <h5 class="ui header">Markdown Syntax</h5>
131
+ <div class="ui inverted segment">
132
+ <code>
133
+ __Focusable Button|Follow__
134
+ </code>
135
+ </div>
136
+ </div>
137
+ <!-- -->
138
+ </div>
139
+ <!-- -->
140
+ <div class="ui attached segment">
141
+ <h3 class="ui header">Emphasis</h3>
142
+ <p>A button can be formatted to show different levels of emphasis</p>
143
+ </div>
144
+ <!-- -->
145
+ <div class="ui divided segment grid">
146
+ <div class="ui html top attached segment">
147
+ <div class="ui top attached label">Emphasis</div>
148
+ </div>
149
+ <!-- -->
150
+ <div class="ui center aligned six wide column">
151
+ <h5 class="ui header">Preview</h5>
152
+ <div class="ui primary button">Save</div>
153
+ <div class="ui button">Discard</div>
154
+ <p></p>
155
+ <div class="ui secondary button">Save</div>
156
+ <div class="ui button">Discard</div>
157
+ </div>
158
+ <!-- -->
159
+ <div class="ui left aligned ten wide column">
160
+ <h5 class="ui header">Markdown Syntax</h5>
161
+ <div class="ui inverted segment">
162
+ <code>
163
+ __Button|Save|Primary__
164
+ __Button|Discard__
165
+ __Button|Save|Secondary__
166
+ __Button|Discard__
167
+ </code>
168
+ </div>
169
+ </div>
170
+ <!-- -->
171
+ </div>
172
+ <!-- -->
173
+ <div class="ui attached segment">
174
+ <h3 class="ui header">Animated</h3>
175
+ <p>A button can animate to show hidden content</p>
176
+ </div>
177
+ <!-- -->
178
+ <div class="ui divided segment grid">
179
+ <div class="ui html top attached segment">
180
+ <div class="ui top attached label">Animated</div>
181
+ </div>
182
+ <!-- -->
183
+ <div class="ui center aligned six wide column">
184
+ <h5 class="ui header">Preview</h5>
185
+ <div class="ui animated button">
186
+ <div class="visible content">Next</div>
187
+ <div class="hidden content">
188
+ <i class="right arrow icon"></i>
189
+ </div>
190
+ </div>
191
+ </div>
192
+ <!-- -->
193
+ <div class="ui left aligned ten wide column">
194
+ <h5 class="ui header">Markdown Syntax</h5>
195
+ <div class="ui inverted segment">
196
+ <code>
197
+ __Animated Button|Text&#xFF1A;Next;Icon&#xFF1A;Right Arrow__
198
+ </code>
199
+ </div>
200
+ </div>
201
+ <!-- -->
202
+ </div>
203
+ <!-- -->
204
+ <div class="ui divided segment grid">
205
+ <div class="ui html top attached segment">
206
+ <div class="ui top attached label">Vertical Animated</div>
207
+ </div>
208
+ <!-- -->
209
+ <div class="ui center aligned six wide column">
210
+ <h5 class="ui header">Preview</h5>
211
+ <div class="ui vertical animated button">
212
+ <div class="visible content">
213
+ <i class="shop icon"></i>
214
+ </div>
215
+ <div class="hidden content">Shop</div>
216
+ </div>
217
+ </div>
218
+ <!-- -->
219
+ <div class="ui left aligned ten wide column">
220
+ <h5 class="ui header">Markdown Syntax</h5>
221
+ <div class="ui inverted segment">
222
+ <code>
223
+ __Vertical Animated Button|Icon&#xFF1A;Shop;Text&#xFF1A;Shop__
224
+ </code>
225
+ </div>
226
+ </div>
227
+ <!-- -->
228
+ </div>
229
+ <!-- -->
230
+ <div class="ui divided segment grid">
231
+ <div class="ui html top attached segment">
232
+ <div class="ui top attached label">Fade Animated</div>
233
+ </div>
234
+ <!-- -->
235
+ <div class="ui center aligned six wide column">
236
+ <h5 class="ui header">Preview</h5>
237
+ <div class="ui fade animated button">
238
+ <div class="visible content">Sign-up for a Pro account</div>
239
+ <div class="hidden content">$12.99 a month</div>
240
+ </div>
241
+ </div>
242
+ <!-- -->
243
+ <div class="ui left aligned ten wide column">
244
+ <h5 class="ui header">Markdown Syntax</h5>
245
+ <div class="ui inverted segment"><code>__Fade Animated Button|Text&#xFF1A;Sign-up for a Pro account;Text&#xFF1A;$12.99 a month__</code><br /> or <br />
246
+ <code>__Fade Animated Button|Sign-up for a Pro account;$12.99 a month__</code></div>
247
+ </div>
248
+ <!-- -->
249
+ </div>
250
+ <!-- -->
251
+ <div class="ui attached segment">
252
+ <h3 class="ui header">Icon</h3>
253
+ <p>A button can have only an icon</p>
254
+ </div>
255
+ <!-- -->
256
+ <div class="ui divided segment grid">
257
+ <div class="ui html top attached segment">
258
+ <div class="ui top attached label">Icon Button</div>
259
+ </div>
260
+ <!-- -->
261
+ <div class="ui center aligned six wide column">
262
+ <h5 class="ui header">Preview</h5>
263
+ <div class="ui icon button">
264
+ <i class="cloud icon"></i>
265
+ </div>
266
+ </div>
267
+ <!-- -->
268
+ <div class="ui left aligned ten wide column">
269
+ <h5 class="ui header">Markdown Syntax</h5>
270
+ <div class="ui inverted segment">
271
+ <code>
272
+ __Icon Button|Icon&#xFF1A;Cloud__
273
+ </code>
274
+ </div>
275
+ </div>
276
+ <!-- -->
277
+ </div>
278
+ <!-- -->
279
+ <div class="ui attached segment">
280
+ <h3 class="ui header">Labeled Icon</h3>
281
+ <p>A button can have an icon and a label</p>
282
+ </div>
283
+ <!-- -->
284
+ <div class="ui divided segment grid">
285
+ <div class="ui html top attached segment">
286
+ <div class="ui top attached label">Labeled Icon</div>
287
+ </div>
288
+ <!-- -->
289
+ <div class="ui center aligned six wide column">
290
+ <h5 class="ui header">Preview</h5>
291
+ <div class="ui labeled icon button"><i class="pause icon"></i>Pause</div>
292
+ </div>
293
+ <!-- -->
294
+ <div class="ui left aligned ten wide column">
295
+ <h5 class="ui header">Markdown Syntax</h5>
296
+ <div class="ui inverted segment">
297
+ <code>
298
+ __Labeled Icon Button|Icon&#xFF1A;Pause,Text&#xFF1A;Pause__
299
+ </code>
300
+ </div>
301
+ </div>
302
+ <!-- -->
303
+ </div>
304
+ <!-- -->
305
+ <div class="ui attached segment">
306
+ <h3 class="ui header">Basic Button</h3>
307
+ <p>A basic button is less pronounced</p>
308
+ </div>
309
+ <!-- -->
310
+ <div class="ui divided segment grid">
311
+ <div class="ui html top attached segment">
312
+ <div class="ui top attached label">Basic Button</div>
313
+ </div>
314
+ <!-- -->
315
+ <div class="ui center aligned six wide column">
316
+ <h5 class="ui header">Preview</h5>
317
+ <div class="ui basic button"><i class="user icon"></i>Add Friend</div>
318
+ </div>
319
+ <!-- -->
320
+ <div class="ui left aligned ten wide column">
321
+ <h5 class="ui header">Markdown Syntax</h5>
322
+ <div class="ui inverted segment">
323
+ <code>
324
+ __Basic Button|Icon&#xFF1A;User,Text&#xFF1A;Add Friend__
325
+ </code>
326
+ </div>
327
+ </div>
328
+ <!-- -->
329
+ </div>
330
+ <!-- -->
331
+ <div class="ui divided segment grid">
332
+ <div class="ui html top attached segment">
333
+ <div class="ui top attached label">Basic Button</div>
334
+ </div>
335
+ <!-- -->
336
+ <div class="ui center aligned six wide column">
337
+ <h5 class="ui header">Preview</h5>
338
+ <div class="ui basic black button">Black</div>
339
+ <div class="ui basic yellow button">Yellow</div>
340
+ <div class="ui basic green button">Green</div>
341
+ <div class="ui basic blue button">Blue</div>
342
+ <div class="ui basic orange button">Orange</div>
343
+ <div class="ui basic purple button">Purple</div>
344
+ <div class="ui basic pink button">Pink</div>
345
+ <div class="ui basic red button">Red</div>
346
+ <div class="ui basic teal button">Teal</div>
347
+ </div>
348
+ <!-- -->
349
+ <div class="ui left aligned ten wide column">
350
+ <h5 class="ui header">Markdown Syntax</h5>
351
+ <div class="ui inverted segment">
352
+ <code>
353
+ __Button|Text&#xFF1A;Black|Basic Black__
354
+ __Button|Text&#xFF1A;Yellow|Basic Yellow__
355
+ __Button|Text&#xFF1A;Green|Basic Green__
356
+ __Button|Text&#xFF1A;Blue|Basic Blue__
357
+ __Button|Text&#xFF1A;Orange|Basic Orange__
358
+ __Button|Text&#xFF1A;Purple|Basic Purple__
359
+ __Button|Text&#xFF1A;Pink|Basic Pink__
360
+ __Button|Text&#xFF1A;Red|Basic Red__
361
+ __Button|Text&#xFF1A;Teal|Basic Teal__
362
+ </code>
363
+ </div>
364
+ </div>
365
+ <!-- -->
366
+ </div>
367
+ </div>
368
+ </body>
369
+ </html>