Some css change for mobile devices
This commit is contained in:
parent
47f54f6034
commit
ac7ca2af47
|
|
@ -416,8 +416,8 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
padding: 4px 10px;
|
padding: 0px 10px;
|
||||||
vertical-align: bottom;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tarteaucitronAlertSmall #tarteaucitronCookiesNumber:hover {
|
#tarteaucitronAlertSmall #tarteaucitronCookiesNumber:hover {
|
||||||
|
|
@ -450,7 +450,7 @@
|
||||||
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesTitle {
|
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesTitle {
|
||||||
background: #333;
|
background: #333;
|
||||||
margin-top: 21px;
|
margin-top: 21px;
|
||||||
padding: 13px 0 7px 13px;
|
padding: 13px 0 9px 13px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ var scripts = document.getElementsByTagName('script'),
|
||||||
tarteaucitronNoAdBlocker = false;
|
tarteaucitronNoAdBlocker = false;
|
||||||
|
|
||||||
var tarteaucitron = {
|
var tarteaucitron = {
|
||||||
"version": 202.01,
|
"version": 202.8,
|
||||||
"cdn": cdn,
|
"cdn": cdn,
|
||||||
"user": {},
|
"user": {},
|
||||||
"lang": {},
|
"lang": {},
|
||||||
|
|
@ -259,9 +259,7 @@ var tarteaucitron = {
|
||||||
html += ' </div>';
|
html += ' </div>';
|
||||||
if (defaults.cookieslist === true) {
|
if (defaults.cookieslist === true) {
|
||||||
html += ' </div><!-- @whitespace';
|
html += ' </div><!-- @whitespace';
|
||||||
html += ' --><div id="tarteaucitronCookiesNumber" onclick="tarteaucitron.userInterface.toggleCookiesList();">';
|
html += ' --><div id="tarteaucitronCookiesNumber" onclick="tarteaucitron.userInterface.toggleCookiesList();">0</div>';
|
||||||
html += ' 0';
|
|
||||||
html += ' </div>';
|
|
||||||
html += ' <div id="tarteaucitronCookiesListContainer">';
|
html += ' <div id="tarteaucitronCookiesListContainer">';
|
||||||
html += ' <div id="tarteaucitronClosePanelCookie" onclick="tarteaucitron.userInterface.closePanel();">';
|
html += ' <div id="tarteaucitronClosePanelCookie" onclick="tarteaucitron.userInterface.closePanel();">';
|
||||||
html += ' ' + tarteaucitron.lang.close;
|
html += ' ' + tarteaucitron.lang.close;
|
||||||
|
|
@ -612,6 +610,7 @@ var tarteaucitron = {
|
||||||
var c = 'tarteaucitron';
|
var c = 'tarteaucitron';
|
||||||
tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block');
|
tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block');
|
||||||
tarteaucitron.userInterface.css(c + 'AlertBig', 'display', 'none');
|
tarteaucitron.userInterface.css(c + 'AlertBig', 'display', 'none');
|
||||||
|
tarteaucitron.userInterface.jsSizing('box');
|
||||||
},
|
},
|
||||||
"toggleCookiesList": function () {
|
"toggleCookiesList": function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
@ -691,9 +690,19 @@ var tarteaucitron = {
|
||||||
headerHeight,
|
headerHeight,
|
||||||
cookiesListHeight,
|
cookiesListHeight,
|
||||||
cookiesCloseHeight,
|
cookiesCloseHeight,
|
||||||
cookiesTitleHeight;
|
cookiesTitleHeight,
|
||||||
|
paddingBox,
|
||||||
|
alertSmallHeight,
|
||||||
|
cookiesNumberHeight;
|
||||||
|
|
||||||
if (type === 'main') {
|
if (type === 'box') {
|
||||||
|
if (document.getElementById('tarteaucitronAlertSmall') !== null && document.getElementById('tarteaucitronCookiesNumber') !== null) {
|
||||||
|
alertSmallHeight = document.getElementById('tarteaucitronAlertSmall').offsetHeight;
|
||||||
|
cookiesNumberHeight = document.getElementById('tarteaucitronCookiesNumber').offsetHeight;
|
||||||
|
paddingBox = (alertSmallHeight - cookiesNumberHeight) / 2;
|
||||||
|
tarteaucitron.userInterface.css('tarteaucitronCookiesNumber', 'padding', paddingBox + 'px 10px');
|
||||||
|
}
|
||||||
|
} else if (type === 'main') {
|
||||||
|
|
||||||
// get the real window width for media query
|
// get the real window width for media query
|
||||||
if (window.innerWidth === undefined) {
|
if (window.innerWidth === undefined) {
|
||||||
|
|
@ -762,7 +771,7 @@ var tarteaucitron = {
|
||||||
|
|
||||||
// put cookies list at bottom
|
// put cookies list at bottom
|
||||||
if (document.getElementById('tarteaucitronAlertSmall') !== null) {
|
if (document.getElementById('tarteaucitronAlertSmall') !== null) {
|
||||||
tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (document.getElementById('tarteaucitronAlertSmall').offsetHeight + 10) + 'px');
|
tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (document.getElementById('tarteaucitronAlertSmall').offsetHeight) + 'px');
|
||||||
}
|
}
|
||||||
|
|
||||||
// height of cookies list
|
// height of cookies list
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue