@hibi_10000/grunt-webfont 2.0.1

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.
@@ -0,0 +1,56 @@
1
+ /* Generated by grunt-webfont */
2
+
3
+ <% if (fontfaceStyles) { %>
4
+ <% if (fontPathVariables && stylesheet !== 'css') { %>
5
+ <%= fontPathVariable %>
6
+ <% } %>
7
+ <% if (fontSrc1 && embed.length) { %>
8
+ @font-face {
9
+ font-family:"<%= fontFamilyName %>";
10
+ src:<%= fontSrc1 %>;
11
+ font-weight:normal;
12
+ font-style:normal;
13
+ }
14
+ <% } %>@font-face {
15
+ font-family:"<%= fontFamilyName %>";<% if (fontSrc1) { %>
16
+ src:<%= fontSrc1 %>;<% }%>
17
+ src:<%= fontSrc2 %>;
18
+ font-weight:normal;
19
+ font-style:normal;
20
+ }
21
+ <% } %>
22
+ <% if (baseStyles) { %>.<%= baseClass %><% if (addLigatures) { %>,
23
+ .ligature-icons<% } %> {
24
+ <% if (stylesheet === 'less') { %>&:before {<% } %>
25
+ font-family:"<%= fontFamilyName %>";
26
+ <% if (stylesheet === 'less') { %>}<% } %>
27
+ display:inline-block;
28
+ line-height:1;
29
+ font-weight:normal;
30
+ font-style:normal;
31
+ speak:none;
32
+ text-decoration:inherit;
33
+ text-transform:none;
34
+ text-rendering:auto;
35
+ -webkit-font-smoothing:antialiased;
36
+ -moz-osx-font-smoothing:grayscale;
37
+ }
38
+ <% } %>
39
+
40
+ <% if (iconsStyles) { %>/* Icons */<% for (var glyphIdx = 0; glyphIdx < glyphs.length; glyphIdx++) { %>
41
+ <% if (stylesheet === 'less') { %>
42
+ .<%= classPrefix %><%= glyphs[glyphIdx] %> {
43
+ &:before {
44
+ content:"<% if (addLigatures) { %><%= glyphs[glyphIdx] %><% } else { %>\<%= codepoints[glyphIdx] %><% } %>";
45
+ }<% if (ie7) {%>
46
+ *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x<%= codepoints[glyphIdx] %>;');
47
+ <% } %>
48
+ }
49
+ <% } else { %>
50
+ <% if (ie7) {%>.<%= classPrefix %><%= glyphs[glyphIdx] %> {
51
+ *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x<%= codepoints[glyphIdx] %>;');
52
+ }
53
+ <% } %>
54
+ .<%= classPrefix %><%= glyphs[glyphIdx] %>:before {
55
+ content:"<% if (addLigatures) { %><%= glyphs[glyphIdx] %><% } else { %>\<%= codepoints[glyphIdx] %><% } %>";
56
+ }<% } } } %>
@@ -0,0 +1,4 @@
1
+ {
2
+ "baseClass": "icon",
3
+ "classPrefix": "icon_"
4
+ }
@@ -0,0 +1,114 @@
1
+ /* Generated by grunt-webfont */
2
+ /* Based on https://github.com/endtwist/fontcustom/blob/master/lib/fontcustom/templates/fontcustom.css */
3
+
4
+ <% if (fontfaceStyles) { %>
5
+ <% if (fontPathVariables && stylesheet !== 'css') { %>
6
+ <%= fontPathVariable %>
7
+ <% } %>
8
+ <% if (fontSrc1 && embed.length) { %>
9
+ @font-face {
10
+ font-family:"<%= fontFamilyName %>";
11
+ src:<%= fontSrc1 %>;
12
+ font-weight:normal;
13
+ font-style:normal;
14
+ }
15
+ <% } %>@font-face {
16
+ font-family:"<%= fontFamilyName %>";<% if (fontSrc1) { %>
17
+ src:<%= fontSrc1 %>;<% }%>
18
+ src:<%= fontSrc2 %>;
19
+ font-weight:normal;
20
+ font-style:normal;
21
+ }
22
+ <% } %>
23
+ <% if (baseStyles) { %>
24
+ /* Bootstrap Overrides */
25
+ [class^="<%= classPrefix %>"]:before,
26
+ [class*=" <%= classPrefix %>"]:before<% if (ie7) {%>,
27
+ [class^="<%= classPrefix %>"],
28
+ [class*=" <%= classPrefix %>"]<% } %><% if (addLigatures) { %>,
29
+ .ligature-icons<% } %> {
30
+ font-family:"<%= fontFamilyName %>";
31
+ display:inline-block;
32
+ line-height:1;
33
+ font-weight:normal;
34
+ font-style:normal;
35
+ speak:none;
36
+ text-decoration:inherit;
37
+ text-transform:none;
38
+ text-rendering:auto;
39
+ -webkit-font-smoothing:antialiased;
40
+ -moz-osx-font-smoothing:grayscale;
41
+ }<% } %>
42
+ <% if (iconsStyles && stylesheet === 'less') { %>
43
+ /* Mixins */
44
+ <% for (var glyphIdx = 0; glyphIdx < glyphs.length; glyphIdx++) { %>
45
+ .<%= classPrefix %><%= glyphs[glyphIdx] %><% if(glyphIdx === glyphs.length-1) { %> { <% } else { %>, <% } } %>
46
+ &:before {
47
+ font-family:"<%= fontFamilyName %>";
48
+ display:inline-block;
49
+ font-weight:normal;
50
+ font-style:normal;
51
+ text-decoration:inherit;
52
+ }
53
+ }<% } %>
54
+ <% if (extraStyles) { %>
55
+ a [class^="<%= classPrefix %>"],
56
+ a [class*=" <%= classPrefix %>"] {
57
+ display:inline-block;
58
+ text-decoration:inherit;
59
+ }
60
+ /* Makes the font 33% larger relative to the icon container */
61
+ .<%= classPrefix %>large:before {
62
+ vertical-align:top;
63
+ font-size:1.333em;
64
+ }
65
+ /* Keeps button heights with and without icons the same */
66
+ .btn [class^="<%= classPrefix %>"],
67
+ .btn [class*=" <%= classPrefix %>"] {
68
+ line-height:0.9em;
69
+ }
70
+ li [class^="<%= classPrefix %>"],
71
+ li [class*=" <%= classPrefix %>"] {
72
+ display:inline-block;
73
+ width:1.25em;
74
+ text-align:center;
75
+ }
76
+ /* 1.5 increased font size for <%= classPrefix %>large * 1.25 width */
77
+ li .<%= classPrefix %>large[class^="<%= classPrefix %>"],
78
+ li .<%= classPrefix %>large[class*=" <%= classPrefix %>"] {
79
+ width:1.875em;
80
+ }
81
+ li[class^="<%= classPrefix %>"],
82
+ li[class*=" <%= classPrefix %>"] {
83
+ margin-left:0;
84
+ list-style-type:none;
85
+ }
86
+ li[class^="<%= classPrefix %>"]:before,
87
+ li[class*=" <%= classPrefix %>"]:before {
88
+ text-indent:-2em;
89
+ text-align:center;
90
+ }
91
+ li[class^="<%= classPrefix %>"].<%= classPrefix %>large:before,
92
+ li[class*=" <%= classPrefix %>"].<%= classPrefix %>large:before {
93
+ text-indent:-1.333em;
94
+ }
95
+ <% } %>
96
+
97
+ <% if (iconsStyles) { %>/* Icons */<% for (var glyphIdx = 0; glyphIdx < glyphs.length; glyphIdx++) { %>
98
+ <% if (stylesheet === 'less') { %>
99
+ .<%= classPrefix %><%= glyphs[glyphIdx] %> {
100
+ &:before {
101
+ content:"<% if (addLigatures) { %><%= glyphs[glyphIdx] %><% } else { %>\<%= codepoints[glyphIdx] %><% } %>";
102
+ }
103
+ <% if (ie7) {%>
104
+ *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x<%= codepoints[glyphIdx] %>;');
105
+ <% } %>
106
+ }<% } else { %>
107
+ <% if (ie7) {%>.<%= classPrefix %><%= glyphs[glyphIdx] %> {
108
+ *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x<%= codepoints[glyphIdx] %>;');
109
+ }
110
+ <% } %>
111
+ .<%= classPrefix %><%= glyphs[glyphIdx] %>:before {
112
+ content:"<% if (addLigatures) { %><%= glyphs[glyphIdx] %><% } else { %>\<%= codepoints[glyphIdx] %><% } %>";
113
+ }<% } %>
114
+ <% } } %>
@@ -0,0 +1,4 @@
1
+ {
2
+ "baseClass": "",
3
+ "classPrefix": "icon-"
4
+ }
@@ -0,0 +1,97 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title><%= fontFamilyName %></title>
6
+ <style>
7
+ body {
8
+ margin:0;
9
+ padding:10px 20px;
10
+ background:#fff;
11
+ color:#222;
12
+ }
13
+ h1, div, footer {
14
+ font-family:"Helvetica Neue", Arial, sans-serif;
15
+ }
16
+ h1 {
17
+ margin:0 0 20px;
18
+ font-size:32px;
19
+ font-weight:normal;
20
+ }
21
+ h1 small {
22
+ font-size: 0.8em;
23
+ padding-left: 2em;
24
+ }
25
+ .icons {
26
+ margin-bottom:40px;
27
+ -webkit-column-count:5;
28
+ -moz-column-count:5;
29
+ column-count:5;
30
+ -webkit-column-gap:20px;
31
+ -moz-column-gap:20px;
32
+ column-gap:20px;
33
+ }
34
+ .icons__item,
35
+ .icons__item i {
36
+ line-height:2em;
37
+ cursor:pointer;
38
+ overflow:hidden;
39
+ }
40
+ .icons__item:hover {
41
+ color:#3c90be;
42
+ }
43
+ .icons__item i {
44
+ display:inline-block;
45
+ width:32px;
46
+ text-align:center;
47
+ }
48
+ .icons__item:hover i {
49
+ -webkit-transform:scale(1.5);
50
+ transform:scale(1.5);
51
+ }
52
+ footer {
53
+ margin-top:40px;
54
+ font-size:14px;
55
+ color:#999;
56
+ }
57
+
58
+ <%= styles %>
59
+ </style>
60
+ </head>
61
+ <body>
62
+ <h1><%= fontFamilyName %><% if (version) { %><small>version <%= version %></small><% } %></h1>
63
+
64
+ <div class="icons" id="icons">
65
+ <% for (var glyphIdx = 0; glyphIdx < glyphs.length; glyphIdx++) { var glyph = glyphs[glyphIdx] %>
66
+ <div class="icons__item" data-name="<%= glyph %>"><i class="<%= baseClass %> <%= classPrefix %><%= glyph %>"></i> <%= classPrefix %><%= glyph %></div>
67
+ <% } %>
68
+ </div>
69
+
70
+ <% if (addLigatures) { %>
71
+ <div class="ligature-icons" style="display:none">
72
+ <% for (var glyphIdx = 0; glyphIdx < glyphs.length; glyphIdx++) { var glyph = glyphs[glyphIdx]; %>
73
+ <%= glyph %>
74
+ <% } %>
75
+ </div>
76
+ <% } %>
77
+
78
+ <h1>Usage</h1>
79
+ <pre><code>&lt;i class=&quot;<%= baseClass ? baseClass + ' ' : '' %><%= classPrefix %><span id="name">name</span>&quot;&gt;&lt;/i&gt;</code></pre>
80
+ <% if (addLigatures) { %>
81
+ <pre><code>&lt;i class=&quot;ligature-icons&quot;&gt;<span id="name2">name</span>&lt;/i&gt;</code></pre>
82
+ <% } %>
83
+
84
+ <footer>Generated by <a href="https://github.com/sapegin/grunt-webfont">grunt-webfont</a>.</footer>
85
+
86
+ <script>
87
+ (function() {
88
+ document.getElementById('icons').onclick = function(e) {
89
+ e = e || window.event;
90
+ var name = e.target.getAttribute('data-name') || e.target.parentNode.getAttribute('data-name');
91
+ document.getElementById('name').innerHTML = name;
92
+ <% if (addLigatures) { %>document.getElementById('name2').innerHTML = name;<% } %>
93
+ }
94
+ })();
95
+ </script>
96
+ </body>
97
+ </html>
package/tsconfig.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "typeAcquisition": {
3
+ "enable": true,
4
+ },
5
+ "compilerOptions": {
6
+ "module": "ESNext",
7
+ "moduleResolution": "bundler",
8
+ "target": "ESNext",
9
+ "lib": ["ESNext"],
10
+ "noEmit": true,
11
+ "allowJs": true,
12
+ "checkJs": true,
13
+ "strict": true,
14
+ "strictNullChecks": false,
15
+ "strictFunctionTypes": false,
16
+ "useUnknownInCatchVariables": false,
17
+ "resolveJsonModule": true,
18
+ "esModuleInterop": true,
19
+ "allowImportingTsExtensions": true,
20
+ "allowSyntheticDefaultImports": true,
21
+ "erasableSyntaxOnly": true,
22
+ "verbatimModuleSyntax": true,
23
+ //"declaration": true,
24
+ //"isolatedDeclarations": true,
25
+ //"skipLibCheck": true,
26
+ },
27
+ "exclude": [
28
+ "dist",
29
+ "node_modules",
30
+ ],
31
+ }