浏览代码

Merge pull request #462 from clemdesign/master

Manage cookie icon
Amauri CHAMPEAUX 4 年之前
父节点
当前提交
48ed45ba1c
共有 3 个文件被更改,包括 49 次插入1 次删除
  1. 3 0
      README.md
  2. 41 1
      css/tarteaucitron.css
  3. 5 0
      tarteaucitron.js

+ 3 - 0
README.md

@@ -39,6 +39,9 @@ tarteaucitron.init({
     "orientation": "middle", /* Banner position (top - bottom) */
     "showAlertSmall": true, /* Show the small banner on bottom right */
     "cookieslist": true, /* Show the cookie list */
+    
+    "showIcon": true, /* Show cookie icon to manage cookies */
+    "iconPosition": "BottomRight", /* Position of the icon between BottomRight, BottomLeft, TopRight and TopLeft */
 
     "adblocker": false, /* Show a Warning if an adblocker is detected */
     "DenyAllCta" : true, /* Show the deny all button */

+ 41 - 1
css/tarteaucitron.css

@@ -495,7 +495,7 @@ div#tarteaucitronServices {
     text-align: center;
     padding: 10px 0 10px 0;
     margin: auto;
-    width: 100%;
+    width: calc(100% - 20px);  /* 100 % - padding-right - padding-left */
 }
 
 #tarteaucitronAlertBig #tarteaucitronPrivacyUrl,
@@ -556,6 +556,46 @@ div#tarteaucitronServices {
     z-index: 2147483644;
 }
 
+/***
+ * Icon
+ */
+.tarteaucitronIconBottomRight {
+    bottom: 0;
+    right: 0;
+}
+.tarteaucitronIconBottomLeft {
+    bottom: 0;
+    left: 0;
+}
+.tarteaucitronIconTopRight {
+    top: 0;
+    right: 0;
+}
+.tarteaucitronIconTopLeft {
+    top: 0;
+    left: 0;
+}
+
+#tarteaucitronIcon {
+    background: transparent;
+    position: fixed;
+    display: none;
+    width: auto;
+    z-index: 2147483646;
+}
+#tarteaucitronIcon #tarteaucitronManager {
+    color: transparent;
+    cursor: pointer;
+    display: inline-block;
+    font-size: 11px !important;
+    padding: 8px 10px 8px;
+    border: none;
+}
+#tarteaucitronIcon #tarteaucitronManager img {
+    width: 50px;
+    height: 50px;
+}
+
 /***
  * Small alert
  */

文件差异内容过多而无法显示
+ 5 - 0
tarteaucitron.js


部分文件因为文件数量过多而无法显示