完成手机兼容

This commit is contained in:
cxykevin 2024-09-05 22:44:46 +08:00
parent 00d25a5f80
commit 78ecd798c8
4 changed files with 32 additions and 14 deletions

View File

@ -58,9 +58,14 @@
</mdui-layout-main>
</mdui-layout>
<script>
if (window.innerWidth > 800) {
document.getElementById("cards").style.transform = "translateY(-50%)"
document.getElementById("toc-drawer").setAttribute('open', true);
if (window.innerHeight > window.innerWidth) {
var size = window.innerHeight / window.innerWidth
document.body.style.zoom = size
} else {
if (window.innerWidth > 800) {
document.getElementById("cards").style.transform = "translateY(-50%)"
document.getElementById("toc-drawer").setAttribute('open', true);
}
}
function logins() {
document.getElementById("loginbtn").setAttribute('loading', "");

View File

@ -58,10 +58,14 @@
</mdui-layout-main>
</mdui-layout>
<script>
console.log(window.innerWidth)
if (window.innerWidth > 800) {
document.getElementById("cards").style.transform = "translateY(-50%)"
document.getElementById("toc-drawer").setAttribute('open', true);
if (window.innerHeight > window.innerWidth) {
var size = window.innerHeight / window.innerWidth
document.body.style.zoom = size
} else {
if (window.innerWidth > 800) {
document.getElementById("cards").style.transform = "translateY(-50%)"
document.getElementById("toc-drawer").setAttribute('open', true);
}
}
function change_passwd() {
if (document.getElementById("passwd").value === document.getElementById("check_passwd").value) {

View File

@ -52,9 +52,14 @@
</mdui-layout-main>
</mdui-layout>
<script>
if (window.innerWidth > 800) {
document.getElementById("cards").style.transform = "translateY(-50%)"
document.getElementById("toc-drawer").setAttribute('open', true);
if (window.innerHeight > window.innerWidth) {
var size = window.innerHeight / window.innerWidth
document.body.style.zoom = size
} else {
if (window.innerWidth > 800) {
document.getElementById("cards").style.transform = "translateY(-50%)"
document.getElementById("toc-drawer").setAttribute('open', true);
}
}
function logins() {
document.getElementById("loginbtn").setAttribute('loading', "");

View File

@ -59,10 +59,14 @@
</mdui-layout-main>
</mdui-layout>
<script>
console.log(window.innerWidth)
if (window.innerWidth > 800) {
document.getElementById("cards").style.transform = "translateY(-50%)"
document.getElementById("toc-drawer").setAttribute('open', true);
if (window.innerHeight > window.innerWidth) {
var size = window.innerHeight / window.innerWidth
document.body.style.zoom = size
} else {
if (window.innerWidth > 800) {
document.getElementById("cards").style.transform = "translateY(-50%)"
document.getElementById("toc-drawer").setAttribute('open', true);
}
}
function signup() {
if (document.getElementById("passwd").value === document.getElementById("check_passwd").value) {