1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-02-02 04:16:59 +01:00

Slide effect for "Block Google Fonts" added

This commit is contained in:
nobody 2020-07-04 07:41:28 +02:00
parent 3f5738fb3b
commit 0ddcf6ac14
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
3 changed files with 34 additions and 12 deletions

View File

@ -269,6 +269,24 @@ body {
#block-google-fonts {
padding-left: 1.8rem;
padding-bottom: 0px;
}
.bgf-slideup, .bgf-slidedown {
height: 0px;
overflow-y: hidden;
-webkit-transition: height 0.8s ease-in-out;
-moz-transition: height 0.8s ease-in-out;
-o-transition: height 0.8s ease-in-out;
transition: height 0.8s ease-in-out;
}
.bgf-slidedown {
padding-top: .5rem;
height: 60px;
}
.no-padding-bottom {
padding-bottom: 0px;
}
/**

View File

@ -37,7 +37,7 @@
</div>
<div class="description-option" data-i18n-content="showIconBadgeDescription"></div>
</section>
<section class="option">
<section id="block-missing" class="option">
<div class="title-option">
<label class="b-contain">
<input data-option="blockMissing" type="checkbox">
@ -47,16 +47,16 @@
<span class="badge badge-warning" data-i18n-content="advancedLabel"></span>
</div>
<div class="description-option" data-i18n-content="blockMissingDescription"></div>
</section>
<section id="block-google-fonts" class="option">
<div class="title-option">
<label class="b-contain">
<input data-option="blockGoogleFonts" type="checkbox">
<span data-i18n-content="blockGoogleFontsTitle">Block Google Fonts</span>
<div class="b-input"></div>
</label>
<div id="block-google-fonts" class="option bgf-slideup">
<div class="title-option">
<label class="b-contain">
<input data-option="blockGoogleFonts" type="checkbox">
<span data-i18n-content="blockGoogleFontsTitle">Block Google Fonts</span>
<div class="b-input"></div>
</label>
</div>
<div class="description-option" data-i18n-content="blockGoogleFontsDescription">If you use the rules of the rule generator, requests to "fonts.googleapis.com" are allowed to substitute "Google Material Icons" automatically. If you want to block the other requests, enable this option.</div>
</div>
<div class="description-option" data-i18n-content="blockGoogleFontsDescription">If you use the rules of the rule generator, requests to "fonts.googleapis.com" are allowed to substitute "Google Material Icons" automatically. If you want to block the other requests, enable this option.</div>
</section>
<section class="option">
<div class="title-option">

View File

@ -370,9 +370,13 @@ options._updatesDomainLists = function(changes) {
options._displayBlockGoogleFonts = function(value) {
if (value === true) {
document.getElementById('block-google-fonts').style.display = "none";
document.getElementById('block-google-fonts').classList.add('bgf-slideup');
document.getElementById('block-missing').classList.remove('no-padding-bottom');
document.getElementById('block-google-fonts').classList.remove('bgf-slidedown');
} else {
document.getElementById('block-google-fonts').style.display = "block";
document.getElementById('block-google-fonts').classList.add('bgf-slidedown');
document.getElementById('block-missing').classList.add('no-padding-bottom');
document.getElementById('block-google-fonts').classList.remove('bgf-slideup');
}
};