mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
147 lines
2.3 KiB
Stylus
147 lines
2.3 KiB
Stylus
mobile-smallest() {
|
|
@media (max-width: 413px) {
|
|
{block};
|
|
}
|
|
}
|
|
|
|
mobile-small() {
|
|
@media (max-width: 567px) {
|
|
{block};
|
|
}
|
|
}
|
|
|
|
mobile() {
|
|
@media (max-width: 767px) {
|
|
{block};
|
|
}
|
|
}
|
|
|
|
tablet-mobile() {
|
|
@media (max-width: 991px) {
|
|
{block};
|
|
}
|
|
}
|
|
|
|
tablet-desktop() {
|
|
@media (min-width: 768px) {
|
|
{block};
|
|
}
|
|
}
|
|
|
|
tablet() {
|
|
@media (min-width: 768px) and (max-width: 991px) {
|
|
{block};
|
|
}
|
|
}
|
|
|
|
desktop() {
|
|
@media (min-width: 992px) {
|
|
{block};
|
|
}
|
|
}
|
|
|
|
desktop-large() {
|
|
@media (min-width: 1200px) {
|
|
{block};
|
|
}
|
|
}
|
|
|
|
desktop-largest() {
|
|
@media (min-width: 1600px) {
|
|
{block};
|
|
}
|
|
}
|
|
|
|
random-color($min, $max) {
|
|
return floor(math(0, 'random') * ($max - $min + 1) + $min);
|
|
}
|
|
|
|
word-wrap() {
|
|
overflow-wrap: break-word;
|
|
}
|
|
|
|
disable-user-select() {
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
sidebar-inline-links-item() {
|
|
margin: 5px 0 0;
|
|
|
|
a, span.exturl {
|
|
box-sizing: border-box;
|
|
display: inline-block;
|
|
margin-bottom: 0;
|
|
margin-right: 0;
|
|
max-width: 216px;
|
|
overflow: hidden;
|
|
padding: 0 5px;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
flex-column() {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
|
|
font-family-icons($icon = '') {
|
|
if ($icon) {
|
|
content: $icon;
|
|
}
|
|
font-family: 'Font Awesome 5 Free';
|
|
font-weight: 900;
|
|
}
|
|
|
|
main-container() {
|
|
margin: 0 auto;
|
|
width: $content-desktop;
|
|
|
|
+desktop-large() {
|
|
width: $content-desktop-large;
|
|
}
|
|
|
|
+desktop-largest() {
|
|
width: $content-desktop-largest;
|
|
}
|
|
}
|
|
|
|
sidebar-toggle-position($reverse = false) {
|
|
$condition = hexo-config('sidebar.position') == 'right';
|
|
if (($scheme == 'Muse') || ($scheme == 'Mist')) {
|
|
$condition = $condition == $reverse;
|
|
}
|
|
if ($condition) {
|
|
left: $b2t-position-right;
|
|
+tablet-mobile() {
|
|
left: $b2t-position-right-mobile;
|
|
}
|
|
} else {
|
|
right: $b2t-position-right;
|
|
+tablet-mobile() {
|
|
right: $b2t-position-right-mobile;
|
|
}
|
|
}
|
|
}
|
|
|
|
sidebar-toggle() {
|
|
background: $b2t-bg-color;
|
|
cursor: pointer;
|
|
opacity: $b2t-opacity;
|
|
position: fixed;
|
|
z-index: $zindex-3;
|
|
sidebar-toggle-position();
|
|
|
|
&:hover {
|
|
opacity: $b2t-opacity-hover;
|
|
}
|
|
|
|
+tablet-mobile() {
|
|
opacity: $b2t-opacity-hover;
|
|
}
|
|
}
|