Просмотр исходного кода

Refactor in Data-Attributes file

@soyjavi 14 лет назад
Родитель
Сommit
aef8e1d675
1 измененных файлов с 27 добавлено и 22 удалено
  1. 27 22
      src/attributes/Lungo.Attributes.Data.js

+ 27 - 22
src/attributes/Lungo.Attributes.Data.js

@@ -1,6 +1,6 @@
-/** 
+/**
  * Object with data-attributes (HTML5) with a special <markup>
- * 
+ *
  * @namespace LUNGO.Attributes
  * @class Data
  *
@@ -9,24 +9,29 @@
  */
 
 LUNGO.Attributes.Data = {
-     search: {
-         tag: 'search',
-         selector: '.list',
-         html: '<li class="search {{value}}"><input type="search" placeholder="Search..."><a href="#" class="button" data-icon="search"></a></li>'
-     },
-     icon: {
-         tag: 'icon',
-         selector: '*',
-         html: '<span class="icon {{value}}"></span>'
-     },
-     title: {
-         tag: 'title',
-         selector: 'header, footer',
-         html: '<h1 class="title">{{value}}</h1>'
-     },
-     back: {
-         tag: 'back',
-         selector: 'header, footer',
-         html: '<a href="#back" data-target="section" class="back onleft button icon {{value}}"></a>'
-     }
+    search: {
+        tag: 'search',
+        selector: '.list',
+        html: '<li class="search {{value}}"><input type="search" placeholder="Search..."><a href="#" class="button" data-icon="search"></a></li>'
+    },
+    icon: {
+        tag: 'icon',
+        selector: '*',
+        html: '<span class="icon {{value}}"></span>'
+    },
+    image: {
+        tag: 'image',
+        selector: '*',
+        html: '<img src="{{value}}" class="icon" />'
+    },
+    title: {
+        tag: 'title',
+        selector: 'header, footer',
+        html: '<h1 class="title">{{value}}</h1>'
+    },
+    back: {
+        tag: 'back',
+        selector: 'header, footer',
+        html: '<a href="#back" data-target="section" class="back onleft button icon {{value}}"></a>'
+    }
 };