Skip to content

Commit 9e00d78

Browse files
committed
デフォルトを黒背景に / CSSの最適化
1 parent e4dbf1f commit 9e00d78

4 files changed

Lines changed: 14 additions & 12 deletions

File tree

html-build/src/scripts/main.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,22 @@ window._gaq = _gaq; // Windowに保存しないと動作しなくなる
9090

9191
function changeTheme(theme) {
9292
switch (theme) {
93+
case "theme-light":
94+
$("body")
95+
.removeClass("theme-dark")
96+
.addClass("theme-light");
97+
$("#btn-theme-dark").attr("aria-checked", false);
98+
$("#btn-theme-light").attr("aria-checked", true);
99+
break;
100+
93101
case "theme-dark":
102+
default:
94103
$("body")
95104
.removeClass("theme-light")
96105
.addClass("theme-dark");
97106

98107
$("#btn-theme-dark").attr("aria-checked", true);
99108
$("#btn-theme-light").attr("aria-checked", false);
100109
break;
101-
case "theme-light":
102-
default:
103-
$("body")
104-
.removeClass("theme-dark")
105-
.addClass("theme-light");
106-
$("#btn-theme-dark").attr("aria-checked", false);
107-
$("#btn-theme-light").attr("aria-checked", true);
108-
break;
109110
}
110111
}

html-build/webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ module.exports = {
4646
url: true,
4747
// ソースマップを有効にする
4848
sourceMap: useSourceMap,
49+
importLoaders: 2
4950
},
5051
},
5152
{

html/js/bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tool-generate-htmls/template-html.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<meta name="date" content="${article-dateModified}T00:00:00+09:00"/>
2727

2828
<link rel="icon" sizes="16x16 32x32 48x48 128x128 256x256" href="https://ics.media/wp-content/themes/icslab/img/favicon.ico"/>
29-
<script src="js/bundle.js?v=2018-02-23_a"></script>
29+
<script src="js/bundle.js?v=2018-02-23_b"></script>
3030
</head>
3131
<body class="tutorial theme-light">
3232

0 commit comments

Comments
 (0)