markdown-ui 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog +14 -0
- data/TODO.md +44 -0
- data/components/elements/markdown-ui-button/lib/button/basic.rb +1 -1
- data/components/elements/markdown-ui-button/lib/button/custom.rb +1 -1
- data/components/elements/markdown-ui-button/lib/button/focusable.rb +4 -13
- data/components/elements/markdown-ui-button/lib/button/icon.rb +1 -1
- data/components/elements/markdown-ui-button/lib/button/labeled_icon.rb +1 -1
- data/components/elements/markdown-ui-button/lib/button/standard.rb +1 -1
- data/components/elements/markdown-ui-header/lib/header/header.rb +7 -4
- data/lib/markdown-ui/tag/button_tag.rb +27 -0
- data/lib/markdown-ui/tag/focusable_button_tag.rb +27 -0
- data/lib/markdown-ui/version.rb +1 -1
- data/website/about.html +41 -0
- data/website/about.md +27 -0
- data/website/compile.sh +12 -3
- data/website/{button.html → docs/button.html} +196 -125
- data/website/{button.md → docs/button.md} +163 -77
- data/website/docs/toc.html +75 -0
- data/website/docs/toc.md +46 -0
- data/website/index.html +18 -497
- data/website/index.md +19 -542
- metadata +11 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b89b4b1ab06b68788e0cffe003b7f3abd617bb93
|
4
|
+
data.tar.gz: 36b1423c6791a4abca13f23804444bfbbce08a14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83c17f2ac5650213b6eebe208003976741d7240e4b37f29ac9f269a5890b0cbe6334bdde2a4254e583e790226c7f5c0a676c22df0fd7f8d6c2459826986e6286
|
7
|
+
data.tar.gz: a7b8999ae60324c9c45a464b86681fec5a86cce87930443bfb7a860705866cc3f58c5e14819c6e35ead6947ef791a2d12ad594befca9545cf7e1354e8c7966a4
|
data/Changelog
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
0.1.8 - 08-12-15
|
2
|
+
* <button> tag added
|
3
|
+
* Explicitly use button tag in all button elements except
|
4
|
+
- Animated Buttons
|
5
|
+
- Focusable Button
|
6
|
+
- Buttons
|
7
|
+
* Create a new FocusableButtonTag class to introduce a tabindex="0" in a div tag
|
8
|
+
* Updated unit tests with the new tag changes
|
9
|
+
* Created the following button tests and documentions
|
10
|
+
- Active Button
|
11
|
+
- Disabled Button
|
12
|
+
- Progress Button
|
13
|
+
* Seperate Documents into it's own document files
|
14
|
+
|
1
15
|
0.1.7 - 08-07-15
|
2
16
|
* Parse generated HTML document using Nokogiri;
|
3
17
|
* Support Nokogiri 1.5 to 1.6
|
data/TODO.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# Button
|
2
|
+
* Button
|
3
|
+
√ Button
|
4
|
+
√ Emphasis
|
5
|
+
√ Animated
|
6
|
+
√ Icon
|
7
|
+
√ Labeled Icon
|
8
|
+
√ Basic
|
9
|
+
√ Inverted
|
10
|
+
√ Groups
|
11
|
+
|
12
|
+
* Buttons
|
13
|
+
√ Icon Buttons
|
14
|
+
|
15
|
+
* Content
|
16
|
+
√ Conditionals
|
17
|
+
|
18
|
+
* States
|
19
|
+
√ Active
|
20
|
+
√ Disabled
|
21
|
+
√ Loading
|
22
|
+
|
23
|
+
* Variations
|
24
|
+
Social
|
25
|
+
Size
|
26
|
+
Colored
|
27
|
+
Compact
|
28
|
+
Toggle
|
29
|
+
Positive
|
30
|
+
Negative
|
31
|
+
Fluid
|
32
|
+
Circular
|
33
|
+
Vertically Attached
|
34
|
+
Horizontally Attached
|
35
|
+
|
36
|
+
* Group Variations
|
37
|
+
Vertical Buttons
|
38
|
+
Icon Buttons
|
39
|
+
Labeled Icon Buttons
|
40
|
+
Mixed Group
|
41
|
+
Equal Width
|
42
|
+
Colored Buttons
|
43
|
+
Basic Buttons
|
44
|
+
Group Sizes
|
@@ -4,25 +4,16 @@ module MarkdownUI::Button
|
|
4
4
|
class Focusable
|
5
5
|
def initialize(content, klass = nil, _id = nil)
|
6
6
|
@klass = klass
|
7
|
-
@content = content
|
8
7
|
@id = _id
|
8
|
+
@content = content
|
9
9
|
end
|
10
10
|
|
11
11
|
def render
|
12
|
+
klass = "ui #{@klass} focusable button"
|
12
13
|
content = MarkdownUI::Content::Parser.new(@content).parse
|
13
|
-
|
14
|
-
_id = if @id
|
15
|
-
" id=\"#{@id.split.join('-')}\""
|
16
|
-
end
|
17
|
-
|
18
|
-
output = []
|
19
|
-
output << "<button"
|
20
|
-
output << "#{_id}"
|
21
|
-
output << "#{klass}>"
|
22
|
-
output << content
|
23
|
-
output << "</button>"
|
14
|
+
_id = @id
|
24
15
|
|
25
|
-
|
16
|
+
MarkdownUI::FocusableButtonTag.new(content, klass, _id).render
|
26
17
|
end
|
27
18
|
end
|
28
19
|
end
|
@@ -1,26 +1,29 @@
|
|
1
1
|
module MarkdownUI
|
2
2
|
class Header
|
3
3
|
def initialize(text, level)
|
4
|
-
@text, @klass = text.split(':')
|
4
|
+
@text, @klass, @_id = text.split(':')
|
5
5
|
@level = level
|
6
6
|
end
|
7
7
|
|
8
8
|
def render
|
9
9
|
text = @text.strip
|
10
10
|
klass = MarkdownUI::KlassUtil.new("ui #{@klass} header").klass
|
11
|
+
_id = " id=\"#{@_id}\"" if @_id
|
11
12
|
level = @level
|
12
13
|
|
13
14
|
output = []
|
14
15
|
|
15
16
|
if @level > 0
|
16
|
-
output << "<h#{
|
17
|
+
output << "<h#{level}"
|
18
|
+
output << _id
|
17
19
|
output << klass + ">"
|
18
|
-
output << "#{
|
20
|
+
output << "#{text}"
|
19
21
|
output << "</h#{level}>"
|
20
22
|
else
|
21
23
|
output << "<div"
|
24
|
+
output << _id
|
22
25
|
output << klass + ">"
|
23
|
-
output << "#{
|
26
|
+
output << "#{text}"
|
24
27
|
output << "</div>"
|
25
28
|
end
|
26
29
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module MarkdownUI
|
2
|
+
class ButtonTag
|
3
|
+
def initialize(content, klass = nil, _id = nil, data = nil)
|
4
|
+
@klass = klass
|
5
|
+
@content = content
|
6
|
+
@data = data
|
7
|
+
@id = _id
|
8
|
+
end
|
9
|
+
|
10
|
+
def render
|
11
|
+
content = @content.strip unless @content.nil?
|
12
|
+
klass = MarkdownUI::KlassUtil.new(@klass).klass unless @klass.nil?
|
13
|
+
_id = if @id
|
14
|
+
" id=\"#{@id.split.join('-')}\""
|
15
|
+
end
|
16
|
+
|
17
|
+
data = if @data
|
18
|
+
_data, attribute, value = @data.split(':')
|
19
|
+
" data-#{attribute}=\"#{value}\""
|
20
|
+
else
|
21
|
+
nil
|
22
|
+
end
|
23
|
+
|
24
|
+
"<button#{_id}#{klass}#{data}>#{content}</button>"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module MarkdownUI
|
2
|
+
class FocusableButtonTag
|
3
|
+
def initialize(content, klass = nil, _id = nil, data = nil)
|
4
|
+
@klass = klass
|
5
|
+
@content = content
|
6
|
+
@data = data
|
7
|
+
@id = _id
|
8
|
+
end
|
9
|
+
|
10
|
+
def render
|
11
|
+
content = @content.strip unless @content.nil?
|
12
|
+
klass = MarkdownUI::KlassUtil.new(@klass).klass unless @klass.nil?
|
13
|
+
_id = if @id
|
14
|
+
" id=\"#{@id.split.join('-')}\""
|
15
|
+
end
|
16
|
+
|
17
|
+
data = if @data
|
18
|
+
_data, attribute, value = @data.split(':')
|
19
|
+
" data-#{attribute}=\"#{value}\""
|
20
|
+
else
|
21
|
+
nil
|
22
|
+
end
|
23
|
+
|
24
|
+
"<div#{_id}#{klass}#{data} tabindex=\"0\">#{content}</div>"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/markdown-ui/version.rb
CHANGED
data/website/about.html
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
5
|
+
<meta charset="utf-8" />
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
|
8
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.7/semantic.min.css" />
|
9
|
+
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
|
10
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.7/semantic.min.js"></script>
|
11
|
+
<!--[if lt IE 9]>
|
12
|
+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
13
|
+
<![endif]-->
|
14
|
+
<style>
|
15
|
+
<![CDATA[
|
16
|
+
code { white-space:pre }
|
17
|
+
]]>
|
18
|
+
</style>
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
<div class="ui container">
|
22
|
+
<div class="ui inverted segment">
|
23
|
+
<div class="ui inverted menu">
|
24
|
+
<a class="ui basic item" href="http://jjuliano.github.io/markdown-ui">Markdown UI</a>
|
25
|
+
<div class="ui inverted right menu">
|
26
|
+
<a class="ui item" href="docs/toc.html">Docs</a>
|
27
|
+
<a class="ui active item" href="about.html">About</a>
|
28
|
+
<a class="ui item" href="https://github.com/jjuliano/markdown-ui">Github</a>
|
29
|
+
<a class="ui item" href="index.html#install">Install</a>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
<!-- -->
|
34
|
+
<div class="ui text container">
|
35
|
+
<div class="ui segment"><h2 class="ui header">About</h2><i>It [Markdown-UI] 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! - Joel Bryan Juliano (author of Markdown-UI)</i><br /><h4 class="ui header">Markdown-UI is for…</h4><i class="check icon"></i> creating responsive UI’s for mobile and web <br /><i class="check icon"></i> easily communicating your UI <br /><i class="check icon"></i> rapid prototyping <br /><i class="check icon"></i> being more productive by having less cognitive load <br /><i class="check icon"></i> UI/UX brain-storming sessions via email, whiteboard, text editor, paper, etc. <br /></div>
|
36
|
+
</div>
|
37
|
+
<!-- -->
|
38
|
+
</div>
|
39
|
+
|
40
|
+
</body>
|
41
|
+
</html>
|
data/website/about.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
> Container:
|
2
|
+
> > Inverted Segment:
|
3
|
+
> > > Inverted Menu:
|
4
|
+
> > > [Markdown UI](http://jjuliano.github.io/markdown-ui "basic")
|
5
|
+
> > > > Inverted Right Menu:
|
6
|
+
> > > > [Docs](docs/toc.html)
|
7
|
+
> > > > [About](about.html "active")
|
8
|
+
> > > > [Github](https://github.com/jjuliano/markdown-ui)
|
9
|
+
> > > > [Install](index.html#install)
|
10
|
+
>
|
11
|
+
> <!-- -->
|
12
|
+
>
|
13
|
+
> > Text Container:
|
14
|
+
> > > Segment:
|
15
|
+
> > > ## About
|
16
|
+
> > > <i>It [Markdown-UI] 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! - Joel Bryan Juliano (author of Markdown-UI)</i>
|
17
|
+
> > > <br />
|
18
|
+
> > > #### Markdown-UI is for...
|
19
|
+
> > > _Check Icon_ creating responsive UI's for mobile and web <br />
|
20
|
+
> > > _Check Icon_ easily communicating your UI <br />
|
21
|
+
> > > _Check Icon_ rapid prototyping <br />
|
22
|
+
> > > _Check Icon_ being more productive by having less cognitive load <br />
|
23
|
+
> > > _Check Icon_ UI/UX brain-storming sessions via email, whiteboard, text editor, paper, etc. <br />
|
24
|
+
>
|
25
|
+
> <!-- -->
|
26
|
+
>
|
27
|
+
|
data/website/compile.sh
CHANGED
@@ -1,10 +1,19 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
for i in *.md; do
|
4
|
+
echo "PROCESSING FILE: $i"
|
4
5
|
name="$(basename $i .md)"
|
5
6
|
../exe/markdown-ui $name.md > $name.html
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
sed -ie 's/:/:/g' $name.html 2> /dev/null
|
9
|
+
rm -rf $name.htmle
|
10
|
+
done
|
11
|
+
|
12
|
+
for i in docs/*.md; do
|
13
|
+
echo "PROCESSING FILE: $i"
|
14
|
+
name="$(basename $i .md)"
|
15
|
+
../exe/markdown-ui $i > docs/$name.html
|
16
|
+
|
17
|
+
sed -ie 's/:/:/g' docs/$name.html 2> /dev/null
|
18
|
+
rm -rf docs/$name.htmle
|
10
19
|
done
|