-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from Bravoyk/master
新增手动修改白天/黑夜模式 Co-authored-by: Bravoyk <[email protected]>
- Loading branch information
Showing
3 changed files
with
230 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
.idea | ||
/data | ||
/dist | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,11 @@ | |
|
||
<!-- Styles --> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/semantic.min.css"> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.1/css/all.min.css"> | ||
<link rel="stylesheet" type="text/css" href="/static/semantic-ui-alerts.min.css"> | ||
<link rel="stylesheet" href="/static/theme-hotaru/css/core.css?v202012121912" type="text/css"> | ||
<link rel="stylesheet" href="/static/theme-hotaru/css/main.css?v202101171153" type="text/css"> | ||
<link rel="stylesheet" href="/static/theme-hotaru/css/darkmode.css?v202012121912" type="text/css"> | ||
<link rel="stylesheet" href="/static/theme-hotaru/css/darkmode.css?v202103021121" type="text/css"> | ||
{{if ts .CustomCode}} | ||
{{.CustomCode|safe}} | ||
{{end}} | ||
|
@@ -132,6 +133,12 @@ <h3 class="h4"><img | |
</div> | ||
</div> | ||
</div> | ||
<div class="sidebar-container"> | ||
<ul> | ||
<li id='sun'><i class="fas fa-sun" title="白昼模式"></i><span>白昼模式</span></li> | ||
<li id='moon'><i class="fas fa-moon" title="暗黑模式"></i><span>暗黑模式</span></li> | ||
</ul> | ||
</div> | ||
<footer> | ||
<p style="text-align:center;padding: 15px;">Powered by <a href="https://github.com/naiba/nezha">哪吒监控</a> build · | ||
{{.Version}} | ||
|
@@ -226,6 +233,17 @@ <h3 class="h4"><img | |
} | ||
} | ||
}) | ||
|
||
|
||
$(function(){ | ||
$('#sun').click(function(){ | ||
$('body').removeClass('dark'); | ||
}); | ||
$('#moon').click(function(){ | ||
$('body').addClass('dark'); | ||
}) | ||
}) | ||
|
||
const wsProtocol = window.location.protocol == "https:" ? "wss" : "ws" | ||
const ws = new WebSocket(wsProtocol + '://' + window.location.host + '/ws'); | ||
ws.onopen = function (evt) { | ||
|