ui: optimize page container style

This commit is contained in:
XPoet 2021-10-19 23:21:32 +08:00
parent 10b69a83bf
commit 8dbd709571
3 changed files with 9 additions and 3 deletions

View File

@ -36,6 +36,9 @@
// html, body
// ======================================================================
html, body {
position: relative;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
color: var(--default-text-color);

View File

@ -1,8 +1,12 @@
$temp-width = hexo-config('style.left_side_width');
$page-aside-width = $temp-width ? convert($temp-width):260px;
$page-aside-width = $temp-width ? convert($temp-width) : 260px;
.page-container {
position: relative;
box-sizing: border-box;
width: 100%;
height: auto;
background: var(--background-color);
transition-t("padding-left", "0", "0.3", "ease-out");
@ -85,7 +89,6 @@ $page-aside-width = $temp-width ? convert($temp-width):260px;
display: flex;
justify-content: center;
padding: $component-spacing-value 0;
background: var(--background-color);
+keep-tablet() {
padding: $component-spacing-value * 0.8 0;

View File

@ -197,7 +197,7 @@ KEEP.initUtils = () => {
const innerHeight = window.innerHeight;
const pb_dom = document.querySelector('.page-main-content-bottom');
if (allDomHeight < innerHeight) {
pb_dom.style.marginTop = (innerHeight - allDomHeight) + 'px';
pb_dom.style.marginTop = Math.floor(innerHeight - allDomHeight) + 'px';
}
},