浏览代码

show font awesome icons in the iconset debug page

damien 11 年前
父节点
当前提交
e270c5bfb4
共有 1 个文件被更改,包括 37 次插入7 次删除
  1. 37 7
      pboard/pboard/templates/debug/iconset.mak

+ 37 - 7
pboard/pboard/templates/debug/iconset.mak 查看文件

14
     </style>
14
     </style>
15
 
15
 
16
     <div class="container">
16
     <div class="container">
17
-      <h1>List of icons</h1>
17
+      <h1>icon set</h1>
18
+      <h2>Sizes</h2>
19
+      <div>
20
+        normal <i class="fa fa-bullseye"></i>
21
+        fa-2x <i class="fa fa-2x fa-picture-o"></i>
22
+        fa-3x <i class="fa fa-3x fa-picture-o"></i>
23
+        fa-4x <i class="fa fa-4x fa-picture-o"></i>
24
+        fa-5x <i class="fa fa-5x fa-picture-o"></i>
25
+      </div>
26
+      <h2>Orientation</h2>
27
+      <div>
28
+        normal <i class="fa fa-picture-o"></i>
29
+        90° <i class="fa fa-rotate-90 fa-picture-o"></i>
30
+        180° <i class="fa fa-rotate-180 fa-picture-o"></i>
31
+        270° <i class="fa fa-rotate-270 fa-picture-o"></i>
32
+        spin <i class="fa fa-spin fa-picture-o"></i>
33
+      </div>
34
+      <h2>Icons</h2>
18
       <div id="icon_grid">
35
       <div id="icon_grid">
19
         <ul class="inline">
36
         <ul class="inline">
20
         </ul>
37
         </ul>
22
     </div>
39
     </div>
23
 
40
 
24
 
41
 
25
-    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
26
     <script>
42
     <script>
27
       $(document).ready(function() {
43
       $(document).ready(function() {
28
         function matchStyle(className) {
44
         function matchStyle(className) {
45
           return result;
61
           return result;
46
         }
62
         }
47
 
63
 
48
-        var $iconList = matchStyle('.icon-g-');
49
-        var $grid = $('#icon_grid ul');
64
+        // var $iconList = matchStyle('.icon-g-');
65
+        var $iconList = matchStyle('.fa-');
66
+        var $completeIconList = new Array();
50
         for (var key in $iconList) {
67
         for (var key in $iconList) {
51
-          var icon = $iconList[key];
52
-          icon = icon.replace('.', '');
53
-          $grid.append($('<li>').append($('<i>').addClass(icon)).append(" " + icon));
68
+          styleExploded = $iconList[key].trim().split(', ')
69
+          for (var subkey in styleExploded) {
70
+            var $currentStyle = styleExploded[subkey];
71
+            console.log("Found style "+$currentStyle)
72
+            $currentStyle.trim()
73
+            $completeIconList.push($currentStyle)
74
+          
75
+          }
76
+        }
77
+        $completeIconList.sort()
78
+        
79
+        var $grid = $('#icon_grid ul');
80
+        for (var key in $completeIconList) {
81
+          var icon = $completeIconList[key];
82
+          icon = icon.replace('.', '').replace(':before', '');
83
+          $grid.append($('<li>').append($('<i>').addClass("fa fa-1x "+icon)).append(" " + icon));
54
         }
84
         }
55
       });</script>
85
       });</script>
56
 
86