README.md in repres-hyper_text-1.0.3 vs README.md in repres-hyper_text-1.1
- old
+ new
@@ -31,21 +31,36 @@
## Render the Pre-defined Partials
```erb
<html>
<head>
- <%= render partial: 'repres/hyper_text/meta' %>
- <%= render partial: 'repres/hyper_text/icon' %>
+
+ <%= render partial: 'repres/hyper_text/meta' %>
+ <!-- or the following line works identically -->
+ <%= hyper_text_meta %>
+
+ <%= render partial: 'repres/hyper_text/icon' %>
+ <!-- or the following line works identically -->
+ <%= hyper_text_icon %>
+
+
<%= render partial: 'repres/hyper_text/style', locals: { options: { 'font-awesome' => true } } %>
+ <!-- or the following line works identically -->
+ <%= hyper_text_style 'font-awesome' => true %>
+
</head>
<body>
<div id='main'></div>
<div id='alpha-dialog'></div>
<div id='beta-dialog'></div>
<div id='gammar-dialog'></div>
+
<%= render partial: 'repres/hyper_text/script', locals: { options: { jquery: true } } %>
+ <!-- or the following line works identically -->
+ <%= hyper_text_script jquery: true %>
+
</body>
</html>
```
@@ -53,10 +68,12 @@
### Render the Meta
The Meta partial includes the HTML meta tags for HTML 5.
```erb
<%= render partial: 'repres/hyper_text/meta' %>
+<!-- or the following line works identically -->
+<%= hyper_text_meta %>
```
The source codes of the Meta partial:
```html
<meta charset="UTF-8" />
@@ -79,30 +96,38 @@
microsoft_application_title_color: '#da532c',
theme_color: '#ffffff'
}
}
%>
+<!-- or the following line works identically -->
+<%= hyper_text_icon safari_mask_icon_color: '#5bbad5', microsoft_application_title_color: '#da532c', theme_color: '#ffffff' %>
```
### Render the Script
The Script partial includes the HTML script tags. Only the [Boot CDN](http://cdn.bootcss.com/) servers are supported.
The following code snippet does not load any JavaScript library.
```erb
<%= render partial: 'repres/hyper_text/script' %>
+<!-- or the following line works identically -->
+<%= hyper_text_script %>
```
The following code snippet loads the latest jQuery.
```erb
<%= render partial: 'repres/hyper_text/script', locals: { options: { jquery: true } } %>
+<!-- or the following line works identically -->
+<%= hyper_text_script jquery: true %>
```
The following code snippet loads the jQuery with the given version.
```erb
<%= render partial: 'repres/hyper_text/script', locals: { options: { jquery: { version: '2.2.0' } } } %>
+<!-- or the following line works identically -->
+<%= hyper_text_script jquery: { version: '2.2.0' } %>
```
The following JavaScript libraries are switchable, and the version can be configurable:
- :modernizr
- :jquery
@@ -113,19 +138,25 @@
The Style partial includes the HTML style tags. Only the [Boot CDN](http://cdn.bootcss.com/) servers are supported.
The following code snippet does not load any CSS library.
```erb
<%= render partial: 'repres/hyper_text/style' %>
+<!-- or the following line works identically -->
+<%= hyper_text_style %>
```
The following code snippet loads the latest Font Awesome.
```erb
<%= render partial: 'repres/hyper_text/script', locals: { options: { :'font-awesome' => true } } %>
+<!-- or the following line works identically -->
+<%= hyper_text_style :'font-awesome' => true %>
```
The following code snippet loads the Font Awesome with the given version.
```erb
<%= render partial: 'repres/hyper_text/style', locals: { options: { :'font-awesome' => { version: '4.4.0' } } } %>
+<!-- or the following line works identically -->
+<%= hyper_text_style :'font-awesome' => { version: '4.4.0' } %>
```
The following CSS libraries are switchable, and the version can be configurable:
- :'font-awesome'
- :buttons