@require "common/variables.styl"; @require "./common/animated.styl"; // 组件间隔 $component-interspace = 30px; .page-template { padding-top: $header-height; position: relative; .page-top { position: fixed; top: 0; width: 100%; height: $header-height; z-index: $z-index-5; box-sizing: border-box; transition(); } .page-middle { width: 100%; display: flex; justify-content: center; padding: $component-interspace 0; .main-content { width: $main-content-width; height: 100%; position: relative; box-sizing: border-box; if (hexo-config('magic.enable') && hexo-config('magic.sidebar.enable') == true) { padding-right: $sidebar-width + $component-interspace; .main-content-right { position: absolute; right: 0; width: $sidebar-width; box-sizing: border-box; } } .main-content-left { position: relative; float: left; width: 100%; box-sizing: border-box; } } .sidebar-tools { position: fixed; top: $header-height + $component-interspace; left: ((100% - $main-content-width) / 4); transition(); } .scroll-to-top { display: none; position: fixed; right: ((100% - $main-content-width) / 4); bottom: $component-interspace; border-radius: 2px; padding: 2px 6px; color: var(--frist-text-color); background: var(--border-color); cursor: pointer; button { color: var(--frist-text-color); i { font-size: 1.2em; } } } } .page-bottom { width: 100%; } } .page-top-shrink { padding-top: $header-shrink-height; .page-top { height: $header-shrink-height; } .sidebar-tools { top: $header-shrink-height + $component-interspace !important; } .sidebar-toc { top: $header-shrink-height + $component-interspace !important; } } @media screen and (max-width: $media-max-width) { .main-content { width: $main-content-width * 1.2 !important; } .sidebar-tools { left: 2% !important; transform-origin: right top; transform: scale(0.8); } //.sidebar-toc { // right: 2% !important; //} //.scroll-to-top { // right: 2% !important; //} }