Browse Source

show font awesome icons in the iconset debug page

damien 11 years ago
parent
commit
e270c5bfb4
1 changed files with 37 additions and 7 deletions
  1. 37 7
      pboard/pboard/templates/debug/iconset.mak

+ 37 - 7
pboard/pboard/templates/debug/iconset.mak View File

@@ -14,7 +14,24 @@
14 14
     </style>
15 15
 
16 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 35
       <div id="icon_grid">
19 36
         <ul class="inline">
20 37
         </ul>
@@ -22,7 +39,6 @@
22 39
     </div>
23 40
 
24 41
 
25
-    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
26 42
     <script>
27 43
       $(document).ready(function() {
28 44
         function matchStyle(className) {
@@ -45,12 +61,26 @@
45 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 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 85
       });</script>
56 86