#1392: use dvh instead of javascript

This commit is contained in:
Ribas160 2024-09-13 20:14:28 +03:00
parent d8fcad2dfd
commit 167b015e80
4 changed files with 3 additions and 44 deletions

View File

@ -178,8 +178,7 @@ html[dir="rtl"] #deletelink, html[dir="rtl"] #qrcodemodalClose {
.wrapper { .wrapper {
display: flex; display: flex;
min-height: 100vh; min-height: 100dvh;
min-height: calc(var(--vh, 1vh) * 100);
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
} }

View File

@ -87,8 +87,7 @@ html[dir="rtl"] #deletelink, html[dir="rtl"] #qrcodemodalClose {
.wrapper { .wrapper {
display: flex; display: flex;
min-height: 100vh; min-height: 100dvh;
min-height: calc(var(--vh, 1vh) * 100);
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
} }

View File

@ -1743,43 +1743,6 @@ jQuery.PrivateBin = (function($, RawDeflate) {
return me; 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 * Alert/error manager
* *
@ -5649,7 +5612,6 @@ jQuery.PrivateBin = (function($, RawDeflate) {
Prompt.init(); Prompt.init();
TopNav.init(); TopNav.init();
UiHelper.init(); UiHelper.init();
CssVariables.init();
// check for legacy browsers before going any further // check for legacy browsers before going any further
if (!Legacy.Check.getInit()) { if (!Legacy.Check.getInit()) {
@ -5695,7 +5657,6 @@ jQuery.PrivateBin = (function($, RawDeflate) {
CryptTool: CryptTool, CryptTool: CryptTool,
Model: Model, Model: Model,
UiHelper: UiHelper, UiHelper: UiHelper,
CssVariables: CssVariables,
Alert: Alert, Alert: Alert,
PasteStatus: PasteStatus, PasteStatus: PasteStatus,
Prompt: Prompt, Prompt: Prompt,

View File

@ -108,7 +108,7 @@ class Configuration
'js/kjua-0.9.0.js' => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==', 'js/kjua-0.9.0.js' => 'sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==',
'js/legacy.js' => 'sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==', 'js/legacy.js' => 'sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==',
'js/prettify.js' => 'sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==', '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/purify-3.1.6.js' => 'sha512-SDwfsqHZFhbcBo/6AN7Te4KoUkWHHw7TzyZCuRkkpl0o8oV4owT/lprznWWe9+qFtigb6MrF81K4CQRLN6be+A==',
'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==', 'js/rawinflate-0.3.js' => 'sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==',
'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==', 'js/showdown-2.1.0.js' => 'sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==',