theme: update color style (#93)

* change the colors

* no message
This commit is contained in:
Bo Yuan 2018-12-15 13:12:47 +08:00 committed by PeratX
parent c4a54b5c8f
commit 8d2853c53e
5 changed files with 112 additions and 130 deletions

View File

@ -7,27 +7,9 @@
body { body {
text-align: center; text-align: center;
} }
a {
a:link {
color: #FF4081;
text-decoration:none; text-decoration:none;
} }
a:visited {
color: #FF4081;
text-decoration: none;
}
a:hover {
color: #FF4081;
text-decoration: none;
}
a:active {
color: #FF4081;
text-decoration: none;
}
</style> </style>
</head> </head>
@ -37,10 +19,16 @@
document.getElementById("build_time").innerHTML = "Build time: " + time; document.getElementById("build_time").innerHTML = "Build time: " + time;
document.getElementById("git_commit").innerHTML = "Git commit: " + gitCommit; document.getElementById("git_commit").innerHTML = "Git commit: " + gitCommit;
} }
function changeColor(color){
var aList = document.getElementsByTagName("a");
for(var i = 0; i < aList.length;i++){
aList[i].style.color = color;
}
}
</script> </script>
<body> <body>
<br> <div style="padding:40px 0;">
<img width="100" height="100" src="itxtech.png"/><br> <img width="100" height="100" src="itxtech.png"/><br>
<div style="font-size:25px"><a href="https://itxtech.org">iTX Technologies</a></div> <div style="font-size:25px"><a href="https://itxtech.org">iTX Technologies</a></div>
<br> <br>
@ -86,5 +74,6 @@
<a href="https://github.com/shadowsocks/shadowsocks-android">Shadowsocks</a>: <a <a href="https://github.com/shadowsocks/shadowsocks-android">Shadowsocks</a>: <a
href="https://github.com/shadowsocks/shadowsocks-android/blob/master/LICENSE">GPLv3</a> href="https://github.com/shadowsocks/shadowsocks-android/blob/master/LICENSE">GPLv3</a>
</div> </div>
</div>
</body> </body>
</html> </html>

View File

@ -7,27 +7,9 @@
body { body {
text-align: center; text-align: center;
} }
a {
a:link {
color: #FF4081;
text-decoration:none; text-decoration:none;
} }
a:visited {
color: #FF4081;
text-decoration: none;
}
a:hover {
color: #FF4081;
text-decoration: none;
}
a:active {
color: #FF4081;
text-decoration: none;
}
</style> </style>
</head> </head>
@ -37,10 +19,17 @@
document.getElementById("build_time").innerHTML = "构建时间:" + time; document.getElementById("build_time").innerHTML = "构建时间:" + time;
document.getElementById("git_commit").innerHTML = "Git commit" + gitCommit; document.getElementById("git_commit").innerHTML = "Git commit" + gitCommit;
} }
function changeColor(color){
var aList = document.getElementsByTagName("a");
for(var i = 0; i < aList.length;i++){
aList[i].style.color = color;
}
}
</script> </script>
<body> <body>
<br>
<div style="padding: 40px 0;">
<img width="100" height="100" src="itxtech.png"/><br> <img width="100" height="100" src="itxtech.png"/><br>
<div style="font-size:25px"><a href="https://itxtech.org">iTX Technologies</a></div> <div style="font-size:25px"><a href="https://itxtech.org">iTX Technologies</a></div>
<br> <br>
@ -86,5 +75,6 @@
<a href="https://github.com/shadowsocks/shadowsocks-android">Shadowsocks</a>: <a <a href="https://github.com/shadowsocks/shadowsocks-android">Shadowsocks</a>: <a
href="https://github.com/shadowsocks/shadowsocks-android/blob/master/LICENSE">GPLv3</a> href="https://github.com/shadowsocks/shadowsocks-android/blob/master/LICENSE">GPLv3</a>
</div> </div>
</div>
</body> </body>
</html> </html>

View File

@ -61,6 +61,7 @@ public class AboutFragment extends ToolbarFragment {
public void onPageFinished(WebView view, String url) { public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url); super.onPageFinished(view, url);
try { try {
mWebView.loadUrl("javascript:changeColor('"+(Daedalus.isDarkTheme() ? "#FFFFFF" : "#000000")+"')");
mWebView.loadUrl("javascript:changeVersionInfo('" + Daedalus.getInstance().getPackageManager().getPackageInfo(Daedalus.getInstance().getPackageName(), 0).versionName + "', '" + BuildConfig.BUILD_TIME + "', '" + BuildConfig.GIT_COMMIT + "')"); mWebView.loadUrl("javascript:changeVersionInfo('" + Daedalus.getInstance().getPackageManager().getPackageInfo(Daedalus.getInstance().getPackageName(), 0).versionName + "', '" + BuildConfig.BUILD_TIME + "', '" + BuildConfig.GIT_COMMIT + "')");
} catch (Exception e) { } catch (Exception e) {
Log.e("DAboutActivity", e.toString()); Log.e("DAboutActivity", e.toString());

View File

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="colorPrimary">#3F51B5</color> <color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color> <color name="colorPrimaryDark">#2f42b5</color>
<color name="colorAccent">#FF4081</color> <color name="colorPrimaryLight">#3F81f1</color>
<color name="colorAccent">#3F51B5</color>
<color name="colorAccentMark">#f2f2f2</color>
</resources> </resources>

View File

@ -8,9 +8,9 @@
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
</style> </style>
<style name="AppTheme.Dark" parent="Theme.AppCompat.NoActionBar"> <style name="AppTheme.Dark" parent="Theme.AppCompat.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimaryLight</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorPrimaryLight</item>
</style> </style>
<style name="AppTheme.NoActionBar"> <style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>