mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-10-01 01:26:10 -04:00
#1392: use dvh instead of javascript
This commit is contained in:
parent
d8fcad2dfd
commit
167b015e80
@ -178,8 +178,7 @@ html[dir="rtl"] #deletelink, html[dir="rtl"] #qrcodemodalClose {
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
min-height: calc(var(--vh, 1vh) * 100);
|
||||
min-height: 100dvh;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
@ -87,8 +87,7 @@ html[dir="rtl"] #deletelink, html[dir="rtl"] #qrcodemodalClose {
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
min-height: calc(var(--vh, 1vh) * 100);
|
||||
min-height: 100dvh;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
@ -1743,43 +1743,6 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
||||
return me;
|
||||
})();
|
||||
|
||||
/**
|
||||
* Calculate css variables
|
||||
*
|
||||
* @class
|
||||
*/
|
||||
const CssVariables = (function () {
|
||||
const me = {};
|
||||
|
||||
/**
|
||||
* Calculate 1/100 viewport height on each page resize event
|
||||
*
|
||||
* @name CssVariables.viewportHeight
|
||||
* @private
|
||||
* @function
|
||||
*/
|
||||
function viewportHeight()
|
||||
{
|
||||
window.addEventListener('resize', function () {
|
||||
const vh = window.innerHeight * 0.01;
|
||||
document.documentElement.style.setProperty('--vh', `${vh}px`);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Init css variables calculation
|
||||
*
|
||||
* @name CssVariables.init
|
||||
* @function
|
||||
*/
|
||||
me.init = function()
|
||||
{
|
||||
viewportHeight();
|
||||
};
|
||||
|
||||
return me;
|
||||
})();
|
||||
|
||||
/**
|
||||
* Alert/error manager
|
||||
*
|
||||
@ -5649,7 +5612,6 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
||||
Prompt.init();
|
||||
TopNav.init();
|
||||
UiHelper.init();
|
||||
CssVariables.init();
|
||||
|
||||
// check for legacy browsers before going any further
|
||||
if (!Legacy.Check.getInit()) {
|
||||
@ -5695,7 +5657,6 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
||||
CryptTool: CryptTool,
|
||||
Model: Model,
|
||||
UiHelper: UiHelper,
|
||||
CssVariables: CssVariables,
|
||||
Alert: Alert,
|
||||
PasteStatus: PasteStatus,
|
||||
Prompt: Prompt,
|
||||
|
@ -108,7 +108,7 @@ class Configuration
|
||||
'js/kjua-0.9.0.js' => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==',
|
||||
'js/legacy.js' => 'sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==',
|
||||
'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==',
|
||||
'js/privatebin.js' => 'sha512-y4pE1SxEjiwdUMi+TmIPb3oEELmdrA00SJ4B3Og7pH0UO8l6hNqLrXzlTjMJ6/RCyYlirSwJzLf5MpknQpQ1zA==',
|
||||
'js/privatebin.js' => 'sha512-cbmXvtZ/5gZPFjQDzP3IEhUAIhFPAoM31gw2kRYCT5xOh8wv9gXeDqI/t798luRW1xdC4gaYodjEFCzrsZR4mA==',
|
||||
'js/purify-3.1.6.js' => 'sha512-SDwfsqHZFhbcBo/6AN7Te4KoUkWHHw7TzyZCuRkkpl0o8oV4owT/lprznWWe9+qFtigb6MrF81K4CQRLN6be+A==',
|
||||
'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==',
|
||||
'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==',
|
||||
|
Loading…
Reference in New Issue
Block a user