From d59a448699f2c2dbfc8b2cf35dec5a729b424257 Mon Sep 17 00:00:00 2001 From: Jonathan Speek Date: Mon, 30 Jul 2018 09:09:37 -0600 Subject: [PATCH] Changing theme change buttons to coorelate to color clicked --- docs/index.html | 10 ++++++---- docs/theme/theme.js | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/index.html b/docs/index.html index 7f9c4a8..6c92096 100644 --- a/docs/index.html +++ b/docs/index.html @@ -56,10 +56,10 @@

  • - +
  • - +
@@ -103,7 +103,9 @@

const style = `font-family: Arial; font-size: ${size}px; line-height: 2em; color: #f33525; text-shadow: 0.5em 0 0 #81bc06, 0 0.5em 0 #05a6f0, 0.5em 0.5em 0 #ffba08;`; console.log('%cā–  ', style); - console.log('šŸ‘‹ Hi there! šŸ‘‹\n\nIt seems you like to poke around as much as we do.\n\nhttps://github.com/Microsoft/join-dev-design'); + console.log( + 'šŸ‘‹ Hi there! šŸ‘‹\n\nIt seems you like to poke around as much as we do.\n\nhttps://github.com/Microsoft/join-dev-design' + ); } logLogo(100); @@ -121,4 +123,4 @@

- \ No newline at end of file + diff --git a/docs/theme/theme.js b/docs/theme/theme.js index 9b41a28..46e5511 100644 --- a/docs/theme/theme.js +++ b/docs/theme/theme.js @@ -1,8 +1,8 @@ var $body = document.body; var activeTheme = "dark"; -document.querySelector(".theme").onclick = function(e) { +function themeChange(theme) { $body.classList.remove("js-theme-" + activeTheme); - activeTheme = activeTheme === "dark" ? "light" : "dark"; + activeTheme = theme.value === "dark" ? "dark" : "light"; $body.classList.add("js-theme-" + activeTheme); -}; +}