提交 21518300 编写于 作者: H HFO4

定义移动端导航栏主题色

上级 99759b5a
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="keywords" content="{$options.siteKeywords}"/> <meta name="keywords" content="{$options.siteKeywords}"/>
<meta name="description" content="{$options.siteDes}"/> <meta name="description" content="{$options.siteDes}"/>
<meta name="theme-color" content="#4e64d9"/>
<title>{$options.siteName} - {$options.siteTitle}</title> <title>{$options.siteName} - {$options.siteTitle}</title>
<!-- Font Awesome --> <!-- Font Awesome -->
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<head> <head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="theme-color" content="#4e64d9"/>
<title>{block name="title"}{/block}</title> <title>{block name="title"}{/block}</title>
<script src="/static/js/jquery.min.js"></script> <script src="/static/js/jquery.min.js"></script>
<link rel="stylesheet" href="/static/css/bootstrap.min.css" /> <link rel="stylesheet" href="/static/css/bootstrap.min.css" />
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<head> <head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="theme-color" content="#4e64d9"/>
<title>{block name="title"}{/block}</title> <title>{block name="title"}{/block}</title>
<!-- third party --> <!-- third party -->
<script src="/static/js/jquery.min.js"></script> <script src="/static/js/jquery.min.js"></script>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<head> <head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="theme-color" content="#4e64d9"/>
<title>我的文件 - {$options.siteName}</title> <title>我的文件 - {$options.siteName}</title>
<script src="/static/js/angular.min.js"></script> <script src="/static/js/angular.min.js"></script>
<script src="/static/js/angular-translate.min.js"></script> <script src="/static/js/angular-translate.min.js"></script>
......
...@@ -26,8 +26,13 @@ changeColor("#4e64d9","#3f51b5"); ...@@ -26,8 +26,13 @@ changeColor("#4e64d9","#3f51b5");
$(".captcha_img").click(function() { $(".captcha_img").click(function() {
$("[alt='captcha']:visible").attr('src', "/captcha"); $("[alt='captcha']:visible").attr('src', "/captcha");
}) })
function updateMetaThemeColor(themeColor) {
$('meta[name=theme-color]').remove();
$('head').append('<meta name="theme-color" content="'+themeColor+'">');
}
function switchToReg(){ function switchToReg(){
changeColor("#46adff","#2196F3"); changeColor("#46adff","#2196F3");
updateMetaThemeColor("#2196F3");
$("#logForm").hide(); $("#logForm").hide();
$("#regForm").show(); $("#regForm").show();
$("[alt='captcha']:visible").attr('src', "/captcha"); $("[alt='captcha']:visible").attr('src', "/captcha");
...@@ -36,6 +41,7 @@ function switchToReg(){ ...@@ -36,6 +41,7 @@ function switchToReg(){
} }
function switchToLog(){ function switchToLog(){
changeColor("#4e64d9","#3f51b5"); changeColor("#4e64d9","#3f51b5");
updateMetaThemeColor("#3f51b5");
$("#regForm").hide(); $("#regForm").hide();
$("#forgetForm").hide(); $("#forgetForm").hide();
$("#logForm").show(); $("#logForm").show();
...@@ -45,6 +51,7 @@ function switchToLog(){ ...@@ -45,6 +51,7 @@ function switchToLog(){
} }
function switchToEmail(){ function switchToEmail(){
changeColor("#009688","#4CAF50"); changeColor("#009688","#4CAF50");
updateMetaThemeColor("#4CAF50");
$("#regForm").hide(); $("#regForm").hide();
$("#emailCheck").show(); $("#emailCheck").show();
$("#emailCheck").removeClass("animated zoomIn"); $("#emailCheck").removeClass("animated zoomIn");
...@@ -52,6 +59,7 @@ function switchToEmail(){ ...@@ -52,6 +59,7 @@ function switchToEmail(){
} }
function switchToForget(){ function switchToForget(){
changeColor("#FF9800","#F44336"); changeColor("#FF9800","#F44336");
updateMetaThemeColor("#F44336");
$("#regForm").hide(); $("#regForm").hide();
$("#logForm").hide(); $("#logForm").hide();
$("#forgetForm").show(); $("#forgetForm").show();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册