修复手机只显示60%问题以及最小高度æ充满屏幕
This commit is contained in:
parent
2eddeb2035
commit
b20d8cfac6
|
|
@ -1435,7 +1435,22 @@ api.get('/notes', function(req, res) {
|
|||
}
|
||||
if (params.shareNote) {
|
||||
db.getNote(params.shareNote)
|
||||
.then((data) => res.send(`<body style="margin:0px;height:100%;"><head><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"></head><div style="text-align:center;"><pre style="background-color:RGB(243,244,245); padding:10px; margin:0px; width:60%; display: inline-block;text-align: left; font-size: 15px; font-family:italic arial,sans-serif;word-wrap: break-word;white-space: pre-wrap;">${data}</pre></div></body>`))
|
||||
.then((data) => res.send(`
|
||||
<body style="margin:0px;height:100%;">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
|
||||
<script>
|
||||
if(screen && screen.availWidth <= 1024) {
|
||||
setTimeout(() => {
|
||||
document.getElementById("note").style.width = "100%";
|
||||
}, 100);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<div style="text-align:center;">
|
||||
<pre id="note" style="background-color:RGB(243,244,245); padding:0px 10px 0px 10px; margin:0px; width:60%; min-height:100%;display: inline-block;text-align: left; font-size: 15px; font-family:italic arial,sans-serif;word-wrap: break-word;white-space: pre-wrap;">\n\n${data}</pre>
|
||||
</div>
|
||||
</body>`))
|
||||
.catch((err) => console.log('notes', err));
|
||||
} else {
|
||||
params.user_id = req.session.user.id;
|
||||
|
|
|
|||
Loading…
Reference in New Issue