提交 977011a1 编写于 作者: H hjdhnx

更新灰度

上级 998dfe99
var global_grey = {
'-webkit-filter':'grayscale(1)',
'-moz-filter':'grayscale(1)',
'-ms-filter':'grayscale(1)',
'-o-filter':'grayscale(1)',
'filter':'grayscale(1)',
};
function autoGreyByTime(){
let now = new Date();
let now_hours = now.getHours();
// console.log(now_hours,typeof now_hours);
if(now_hours >= 23 || now_hours < 8){
$('html').css(global_grey);
}
}
autoGreyByTime();
function darkModeHandler() {
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
if (mediaQuery.matches) {
let color = '#1b1b1b';
$('body').css({"background": color });
}
}
darkModeHandler();
\ No newline at end of file
......@@ -8,10 +8,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- <link rel="stylesheet" media="screen" href="/static/css/admin.css">-->
<link rel="stylesheet" media="screen" href="/static/css/admin.css">
<link rel="stylesheet" media="screen" href="/static/css/grey.css">
<link rel="icon" href="/static/img/logo.png" type="image/x-icon">
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/common.js"></script>
<script src="/static/js/grey.js"></script>
</head>
<body>
<script>
......
......@@ -10,7 +10,8 @@
<title>dr_py首页</title>
<script src="/static/js/jquery.min.js"></script>
<link rel="stylesheet" media="screen" href="/static/css/home.css">
<link rel="stylesheet" media="screen" href="/static/css/grey.css">
<script src="/static/js/grey.js"></script>
<!-- <link rel="stylesheet" media="screen" href="/static/css/grey.css">-->
</head>
......@@ -19,14 +20,6 @@
<div class="image">
<script>
function darkModeHandler() {
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
if (mediaQuery.matches) {
let color = '#1b1b1b';
$('body').css({"background": color });
}
}
darkModeHandler();
$(document).ready(function () {
$("#gen_config").click(function () {
// let rule = this.innerText.trim();
......
......@@ -5,8 +5,9 @@
<title>解析管理</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="/static/plugin/layui/css/layui.css">
<link rel="stylesheet" media="screen" href="/static/css/grey.css">
<link rel="stylesheet" href="/static/plugin/layui/ext/soulTable/soulTable.css" media="all"/>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/grey.js"></script>
</head>
<body>
<table id="myTable" lay-filter="myTable"></table>
......
......@@ -9,9 +9,10 @@
<meta name="author" content="道长"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="icon" href="/static/img/logo.png" type="image/x-icon">
<script src="/static/plugin/layui/layui.js"></script>
<link rel="stylesheet" href="/static/plugin/layui/css/layui.css">
<link rel="stylesheet" media="screen" href="/static/css/grey.css">
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/grey.js"></script>
<script src="/static/plugin/layui/layui.js"></script>
</head>
<body>
......
......@@ -43,6 +43,7 @@
<script src="/static/js/particles.js"></script>
<script src="/static/js/app.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/grey.js"></script>
<link rel="stylesheet" type="text/css" href="/static/sweetalert/sweetalert.css">
<script type="text/javascript" src="/static/sweetalert/sweetalert-dev.js"></script>
......
......@@ -9,6 +9,7 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>tvbox实时日志</title>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/grey.js"></script>
<link href="/static/css/jquery-confirm.min.css" rel="stylesheet">
<script src="/static/js/jquery-confirm.min.js"></script>
<!-- <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.min.js"></script>-->
......
......@@ -9,6 +9,7 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>删除已缓存规则列表-{{rules.count}}</title>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/grey.js"></script>
</head>
<style>
.red {
......
......@@ -9,6 +9,7 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>查看已缓存规则列表-{{rules.count}}</title>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/grey.js"></script>
</head>
<style>
.red {
......
......@@ -11,8 +11,8 @@
<link rel="icon" href="/static/img/logo.png" type="image/x-icon">
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/common.js"></script>
<script src="/static/js/grey.js"></script>
<link rel="stylesheet" href="/static/plugin/layui/css/layui.css">
<link rel="stylesheet" media="screen" href="/static/css/grey.css">
<script src="/static/plugin/layui/layui.js"></script>
</head>
<body>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册