repres-hyper_text 1.0.3 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -2
- data/app/helpers/repres/hyper_text/application_helper.rb +16 -0
- data/lib/repres/hyper_text/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94fe4671dbd67b0e4d54469351b659d232a11745
|
4
|
+
data.tar.gz: b64904d8b56a9065f2738a13672a905a25e3f831
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3ce545631c1b7a9fe8a8ba0ab5548165772617bab6723593e02e23971b8c2116c57ef37004393b2d5f4afd579b8c3882abad9cb32b4022c3eff46ea7cb93dce
|
7
|
+
data.tar.gz: d24a19b6f09fb0031414a8f9af10973e342be60d1ffe630ca57479efd8c95d28bc7461bf5d4bda8a021def72fb739b392459f2a3e0e0d0f940debd02b8b7601c
|
data/README.md
CHANGED
@@ -33,9 +33,20 @@ helper Repres::HyperText::ApplicationHelper
|
|
33
33
|
<html>
|
34
34
|
|
35
35
|
<head>
|
36
|
-
|
37
|
-
<%= render partial: 'repres/hyper_text/
|
36
|
+
|
37
|
+
<%= render partial: 'repres/hyper_text/meta' %>
|
38
|
+
<!-- or the following line works identically -->
|
39
|
+
<%= hyper_text_meta %>
|
40
|
+
|
41
|
+
<%= render partial: 'repres/hyper_text/icon' %>
|
42
|
+
<!-- or the following line works identically -->
|
43
|
+
<%= hyper_text_icon %>
|
44
|
+
|
45
|
+
|
38
46
|
<%= render partial: 'repres/hyper_text/style', locals: { options: { 'font-awesome' => true } } %>
|
47
|
+
<!-- or the following line works identically -->
|
48
|
+
<%= hyper_text_style 'font-awesome' => true %>
|
49
|
+
|
39
50
|
</head>
|
40
51
|
|
41
52
|
<body>
|
@@ -43,7 +54,11 @@ helper Repres::HyperText::ApplicationHelper
|
|
43
54
|
<div id='alpha-dialog'></div>
|
44
55
|
<div id='beta-dialog'></div>
|
45
56
|
<div id='gammar-dialog'></div>
|
57
|
+
|
46
58
|
<%= render partial: 'repres/hyper_text/script', locals: { options: { jquery: true } } %>
|
59
|
+
<!-- or the following line works identically -->
|
60
|
+
<%= hyper_text_script jquery: true %>
|
61
|
+
|
47
62
|
</body>
|
48
63
|
|
49
64
|
</html>
|
@@ -55,6 +70,8 @@ helper Repres::HyperText::ApplicationHelper
|
|
55
70
|
The Meta partial includes the HTML meta tags for HTML 5.
|
56
71
|
```erb
|
57
72
|
<%= render partial: 'repres/hyper_text/meta' %>
|
73
|
+
<!-- or the following line works identically -->
|
74
|
+
<%= hyper_text_meta %>
|
58
75
|
```
|
59
76
|
|
60
77
|
The source codes of the Meta partial:
|
@@ -81,6 +98,8 @@ The Icon partial includes the HTML link tags for Favorite Icons.
|
|
81
98
|
}
|
82
99
|
}
|
83
100
|
%>
|
101
|
+
<!-- or the following line works identically -->
|
102
|
+
<%= hyper_text_icon safari_mask_icon_color: '#5bbad5', microsoft_application_title_color: '#da532c', theme_color: '#ffffff' %>
|
84
103
|
```
|
85
104
|
|
86
105
|
|
@@ -91,16 +110,22 @@ The Script partial includes the HTML script tags. Only the [Boot CDN](http://cdn
|
|
91
110
|
The following code snippet does not load any JavaScript library.
|
92
111
|
```erb
|
93
112
|
<%= render partial: 'repres/hyper_text/script' %>
|
113
|
+
<!-- or the following line works identically -->
|
114
|
+
<%= hyper_text_script %>
|
94
115
|
```
|
95
116
|
|
96
117
|
The following code snippet loads the latest jQuery.
|
97
118
|
```erb
|
98
119
|
<%= render partial: 'repres/hyper_text/script', locals: { options: { jquery: true } } %>
|
120
|
+
<!-- or the following line works identically -->
|
121
|
+
<%= hyper_text_script jquery: true %>
|
99
122
|
```
|
100
123
|
|
101
124
|
The following code snippet loads the jQuery with the given version.
|
102
125
|
```erb
|
103
126
|
<%= render partial: 'repres/hyper_text/script', locals: { options: { jquery: { version: '2.2.0' } } } %>
|
127
|
+
<!-- or the following line works identically -->
|
128
|
+
<%= hyper_text_script jquery: { version: '2.2.0' } %>
|
104
129
|
```
|
105
130
|
|
106
131
|
The following JavaScript libraries are switchable, and the version can be configurable:
|
@@ -115,16 +140,22 @@ The Style partial includes the HTML style tags. Only the [Boot CDN](http://cdn.b
|
|
115
140
|
The following code snippet does not load any CSS library.
|
116
141
|
```erb
|
117
142
|
<%= render partial: 'repres/hyper_text/style' %>
|
143
|
+
<!-- or the following line works identically -->
|
144
|
+
<%= hyper_text_style %>
|
118
145
|
```
|
119
146
|
|
120
147
|
The following code snippet loads the latest Font Awesome.
|
121
148
|
```erb
|
122
149
|
<%= render partial: 'repres/hyper_text/script', locals: { options: { :'font-awesome' => true } } %>
|
150
|
+
<!-- or the following line works identically -->
|
151
|
+
<%= hyper_text_style :'font-awesome' => true %>
|
123
152
|
```
|
124
153
|
|
125
154
|
The following code snippet loads the Font Awesome with the given version.
|
126
155
|
```erb
|
127
156
|
<%= render partial: 'repres/hyper_text/style', locals: { options: { :'font-awesome' => { version: '4.4.0' } } } %>
|
157
|
+
<!-- or the following line works identically -->
|
158
|
+
<%= hyper_text_style :'font-awesome' => { version: '4.4.0' } %>
|
128
159
|
```
|
129
160
|
|
130
161
|
The following CSS libraries are switchable, and the version can be configurable:
|
@@ -8,4 +8,20 @@ module Repres::HyperText::ApplicationHelper
|
|
8
8
|
defined?(options) ? options.try(:[], name).try(:[], :version)||default_version : default_version
|
9
9
|
end
|
10
10
|
|
11
|
+
def hyper_text_icon(options = {})
|
12
|
+
render partial: 'repres/hyper_text/icon', locals: { options: options }
|
13
|
+
end
|
14
|
+
|
15
|
+
def hyper_text_meta(options = {})
|
16
|
+
render partial: 'repres/hyper_text/meta', locals: { options: options }
|
17
|
+
end
|
18
|
+
|
19
|
+
def hyper_text_script(options = {})
|
20
|
+
render partial: 'repres/hyper_text/script', locals: { options: options }
|
21
|
+
end
|
22
|
+
|
23
|
+
def hyper_text_style(options = {})
|
24
|
+
render partial: 'repres/hyper_text/style', locals: { options: options }
|
25
|
+
end
|
26
|
+
|
11
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: repres-hyper_text
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|