Skip to content

Commit

Permalink
优化页面
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxi committed May 19, 2024
1 parent 9291676 commit 59cfbb0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions xiaomusic/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@ <h2>小爱音箱操控面板<span id="version">(版本未知)</span></h2>
<div class="container">
<div id="playering-music" class="text"></div>
</div>

<footer>
<p>Powered by <a href="https://github.com/hanxi/xiaomusic" target="_blank">xiaomusic</a></p>
</footer>
</body>
</html>
4 changes: 4 additions & 0 deletions xiaomusic/static/setting.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@ <h2>小爱音箱设置面板<span id="version">(版本未知)</span></h2>
<hr>
<button onclick="location.href='/';">返回首页</button>
<button id="save">保存</button>

<footer>
<p>Powered by <a href="https://github.com/hanxi/xiaomusic" target="_blank">xiaomusic</a></p>
</footer>
</body>
</html>
6 changes: 6 additions & 0 deletions xiaomusic/static/setting.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
$(function(){
// 拉取版本
$.get("/getversion", function(data, status) {
console.log(data, status, data["version"]);
$("#version").text(`(${data.version})`);
});

// 拉取现有配置
$.get("/getsetting", function(data, status) {
console.log(data, status);
Expand Down
8 changes: 7 additions & 1 deletion xiaomusic/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,10 @@ input,select {
margin-right: 20px;
}


footer {
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
padding: 10px 0;
}

0 comments on commit 59cfbb0

Please sign in to comment.