From 86cafc77f55ee2b42f4602911d322760d8683972 Mon Sep 17 00:00:00 2001 From: Dan Volchek Date: Mon, 23 Apr 2018 01:05:02 -0500 Subject: cool pufferchick on hover --- .../wwwroot/Content/images/pufferchick-cool.png | Bin 0 -> 2921 bytes src/SMAPI.Web/wwwroot/Content/js/index.js | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/SMAPI.Web/wwwroot/Content/images/pufferchick-cool.png create mode 100644 src/SMAPI.Web/wwwroot/Content/js/index.js (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/images/pufferchick-cool.png b/src/SMAPI.Web/wwwroot/Content/images/pufferchick-cool.png new file mode 100644 index 00000000..63eb8970 Binary files /dev/null and b/src/SMAPI.Web/wwwroot/Content/images/pufferchick-cool.png differ diff --git a/src/SMAPI.Web/wwwroot/Content/js/index.js b/src/SMAPI.Web/wwwroot/Content/js/index.js new file mode 100644 index 00000000..54fdf6d9 --- /dev/null +++ b/src/SMAPI.Web/wwwroot/Content/js/index.js @@ -0,0 +1,16 @@ +document.addEventListener('DOMContentLoaded', setupHover, false); + +function setupHover() { + var pufferchick = document.getElementById("pufferchick"); + var downloadLinks = document.getElementsByClassName("download"); + + for (var downloadLink of downloadLinks) { + downloadLink.addEventListener("mouseenter", function () { + pufferchick.src = "Content/images/pufferchick-cool.png"; + }); + + downloadLink.addEventListener("mouseleave", function () { + pufferchick.src = "favicon.ico"; + }); + } +} -- cgit From 2bc9184464261f918abe142de566cd82cf565918 Mon Sep 17 00:00:00 2001 From: Dan Volchek Date: Mon, 23 Apr 2018 01:53:32 -0500 Subject: use jQuery --- src/SMAPI.Web/wwwroot/Content/js/index.js | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/js/index.js b/src/SMAPI.Web/wwwroot/Content/js/index.js index 54fdf6d9..c53592f8 100644 --- a/src/SMAPI.Web/wwwroot/Content/js/index.js +++ b/src/SMAPI.Web/wwwroot/Content/js/index.js @@ -1,16 +1,10 @@ -document.addEventListener('DOMContentLoaded', setupHover, false); - -function setupHover() { - var pufferchick = document.getElementById("pufferchick"); - var downloadLinks = document.getElementsByClassName("download"); - - for (var downloadLink of downloadLinks) { - downloadLink.addEventListener("mouseenter", function () { - pufferchick.src = "Content/images/pufferchick-cool.png"; - }); - - downloadLink.addEventListener("mouseleave", function () { - pufferchick.src = "favicon.ico"; - }); - } -} +$(document).ready(function () { + var pufferchick = $("#pufferchick"); + $(".download").each(function (index, element) { + $(element).hover(function () { + pufferchick.attr("src", "Content/images/pufferchick-cool.png"); + }, function () { + pufferchick.attr("src", "favicon.ico"); + }) + }); +}); -- cgit From 82f418a38baeb44f68601708ebbd3c4af03ef6da Mon Sep 17 00:00:00 2001 From: Dan Volchek Date: Mon, 23 Apr 2018 01:58:18 -0500 Subject: add missing semicolon --- src/SMAPI.Web/wwwroot/Content/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/js/index.js b/src/SMAPI.Web/wwwroot/Content/js/index.js index c53592f8..46f78fbe 100644 --- a/src/SMAPI.Web/wwwroot/Content/js/index.js +++ b/src/SMAPI.Web/wwwroot/Content/js/index.js @@ -5,6 +5,6 @@ $(document).ready(function () { pufferchick.attr("src", "Content/images/pufferchick-cool.png"); }, function () { pufferchick.attr("src", "favicon.ico"); - }) + }); }); }); -- cgit From 371d7fa05317f107f7b97a7b5db93e176039418d Mon Sep 17 00:00:00 2001 From: Dan Volchek Date: Mon, 23 Apr 2018 02:01:14 -0500 Subject: use implicit iteration instead --- src/SMAPI.Web/wwwroot/Content/js/index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/js/index.js b/src/SMAPI.Web/wwwroot/Content/js/index.js index 46f78fbe..ac05df05 100644 --- a/src/SMAPI.Web/wwwroot/Content/js/index.js +++ b/src/SMAPI.Web/wwwroot/Content/js/index.js @@ -1,10 +1,8 @@ $(document).ready(function () { var pufferchick = $("#pufferchick"); - $(".download").each(function (index, element) { - $(element).hover(function () { - pufferchick.attr("src", "Content/images/pufferchick-cool.png"); - }, function () { - pufferchick.attr("src", "favicon.ico"); - }); + $(".download").hover(function () { + pufferchick.attr("src", "Content/images/pufferchick-cool.png"); + }, function () { + pufferchick.attr("src", "favicon.ico"); }); }); -- cgit From cd3dbc47aa6e112d8695bcb9ed81f0b422f21e5c Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 25 Apr 2018 12:11:28 -0400 Subject: update release notes, tweak formatting (#477) --- src/SMAPI.Web/wwwroot/Content/js/index.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/js/index.js b/src/SMAPI.Web/wwwroot/Content/js/index.js index ac05df05..016d5fa4 100644 --- a/src/SMAPI.Web/wwwroot/Content/js/index.js +++ b/src/SMAPI.Web/wwwroot/Content/js/index.js @@ -1,8 +1,11 @@ $(document).ready(function () { var pufferchick = $("#pufferchick"); - $(".download").hover(function () { - pufferchick.attr("src", "Content/images/pufferchick-cool.png"); - }, function () { - pufferchick.attr("src", "favicon.ico"); - }); + $(".download").hover( + function () { + pufferchick.attr("src", "Content/images/pufferchick-cool.png"); + }, + function () { + pufferchick.attr("src", "favicon.ico"); + } + ); }); -- cgit From b474c47a08813eef41db7f558f2efa33f6165d81 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 12 May 2018 15:42:36 -0400 Subject: update log parser for the internal 'critical' log level --- src/SMAPI.Web/wwwroot/Content/css/log-parser.css | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css index 789274e2..25e874ac 100644 --- a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css +++ b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css @@ -200,6 +200,12 @@ table#metadata, table#mods { color: #f00; } +#log .critical { + background-color: #c00; + color: #fff; + font-weight: bold; +} + #log { border-spacing: 0; } -- cgit From a463a05607c89922af7e908b39aa897b8d23bfbf Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 3 Jun 2018 13:54:26 -0400 Subject: redesign log parser upload page This makes the instructions much more clear and prominent, so it should be more intuitive for players. The previous design often confused users because they saw the big textbox and ignored the little instructions above it. --- src/SMAPI.Web/wwwroot/Content/css/log-parser.css | 110 ++++------------------- src/SMAPI.Web/wwwroot/Content/js/log-parser.js | 90 ++++++------------- 2 files changed, 42 insertions(+), 158 deletions(-) (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css index 25e874ac..482fc780 100644 --- a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css +++ b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css @@ -1,14 +1,6 @@ /********* ** Main layout *********/ -input[type="button"] { - font-size: 20px; - border-radius: 5px; - outline: none; - box-shadow: inset 0 0 1px 1px rgba(0, 0, 0, .2); - cursor: pointer; -} - caption { text-align: left; padding-top: 2px; @@ -20,15 +12,6 @@ caption { font-family: monospace; } -input#upload-button { - background: #ccf; - border: 1px solid #000088; -} - -input#upload-button { - background: #eef; -} - table caption { font-weight: bold; } @@ -262,88 +245,19 @@ table#metadata, table#mods { /********* -** Upload popup +** Upload form *********/ -#upload-area .popup, -#upload-area #uploader { - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, .33); - z-index: 2; - display: none; - padding: 5px; -} - -#upload-area #uploader:after { - content: attr(data-text); - display: block; - width: 100px; - height: 24px; - line-height: 25px; - border: 1px solid #000; - background: #fff; - position: absolute; - top: 50%; - left: 50%; - margin: -12px -50px 0 0; - font-size: 18px; - font-weight: bold; - text-align: center; - border-radius: 5px; -} - -#upload-area .popup h1 { - position: absolute; - top: 10%; - left: 50%; - margin-left: -150px; - text-align: center; - width: 300px; - border: 1px solid #008; - border-radius: 5px; - background: #fff; - font-family: sans-serif; - font-size: 40px; - margin-top: -25px; - z-index: 10; - border-bottom: 0; -} - -#upload-area .frame { - margin: auto; - margin-top: 25px; - padding: 2em; - position: absolute; - top: 10%; - left: 10%; - right: 10%; - bottom: 10%; - padding-bottom: 30px; - background: #FFF; - border-radius: 5px; - border: 1px solid #008; -} - -#upload-area #cancel { - border: 1px solid #880000; - background-color: #fcc; +#os-list { + list-style: none; } -#upload-area #submit { - border: 1px solid #008800; - background-color: #cfc; -} - -#upload-area #submit:hover { - background-color: #efe; +div[data-os] { + display: none; } -#upload-area #input { +#input { width: 100%; - height: 30em; + height: 20em; max-height: 70%; margin: auto; box-sizing: border-box; @@ -352,3 +266,13 @@ table#metadata, table#mods { outline: none; box-shadow: inset 0px 0px 1px 1px rgba(0, 0, 192, .2); } + +#submit { + font-size: 1.5em; + border-radius: 5px; + outline: none; + box-shadow: inset 0 0 1px 1px rgba(0, 0, 0, .2); + cursor: pointer; + border: 1px solid #008800; + background-color: #cfc; +} diff --git a/src/SMAPI.Web/wwwroot/Content/js/log-parser.js b/src/SMAPI.Web/wwwroot/Content/js/log-parser.js index c4a35e96..eba6451d 100644 --- a/src/SMAPI.Web/wwwroot/Content/js/log-parser.js +++ b/src/SMAPI.Web/wwwroot/Content/js/log-parser.js @@ -90,27 +90,36 @@ smapi.logParser = function (data, sectionUrl) { /********** ** Upload form *********/ - var error = $("#error"); - - $("#upload-button").on("click", function(e) { - e.preventDefault(); - - $("#input").val(""); - $("#popup-upload").fadeIn(); - }); - - var closeUploadPopUp = function() { - $("#popup-upload").fadeOut(400); - }; + // get elements + var systemOptions = $("input[name='os']"); + var systemInstructions = $("div[data-os]"); + var input = $("#input"); + var submit = $("#submit"); + + // instruction OS chooser + var chooseSystem = function() { + systemInstructions.hide(); + systemInstructions.filter("[data-os='" + $("input[name='os']:checked").val() + "']").show(); + } + systemOptions.on("click", chooseSystem); + chooseSystem(); + + // disable submit if it's empty + var toggleSubmit = function() + { + var hasText = !!input.val().trim(); + submit.prop("disabled", !hasText); + } + input.on("input", toggleSubmit); + toggleSubmit(); - $("#popup-upload").on({ + // drag & drop file + input.on({ 'dragover dragenter': function(e) { e.preventDefault(); e.stopPropagation(); }, 'drop': function(e) { - $("#uploader").attr("data-text", "Reading..."); - $("#uploader").show(); var dataTransfer = e.originalEvent.dataTransfer; if (dataTransfer && dataTransfer.files.length) { e.preventDefault(); @@ -119,59 +128,10 @@ smapi.logParser = function (data, sectionUrl) { var reader = new FileReader(); reader.onload = $.proxy(function(file, $input, event) { $input.val(event.target.result); - $("#uploader").fadeOut(); - $("#submit").click(); + toggleSubmit(); }, this, file, $("#input")); reader.readAsText(file); } - }, - 'click': function(e) { - if (e.target.id === "popup-upload") - closeUploadPopUp(); - } - }); - - $("#submit").on("click", function() { - $("#popup-upload").fadeOut(); - var paste = $("#input").val(); - if (paste) { - //memory = ""; - $("#uploader").attr("data-text", "Saving..."); - $("#uploader").fadeIn(); - $ - .ajax({ - type: "POST", - url: sectionUrl + "/save", - data: JSON.stringify(paste), - contentType: "application/json" // sent to API - }) - .fail(function(xhr, textStatus) { - $("#uploader").fadeOut(); - error.html('

Parsing failed!

Parsing of the log failed, details follow.
 

Stage: Upload

Error: ' + textStatus + ': ' + xhr.responseText + "
" + $("#input").val() + "
"); - }) - .then(function(data) { - $("#uploader").fadeOut(); - if (!data.success) - error.html('

Parsing failed!

Parsing of the log failed, details follow.
 

Stage: Upload

Error: ' + data.error + "
" + $("#input").val() + "
"); - else - location.href = (sectionUrl.replace(/\/$/, "") + "/" + data.id); - }); - } else { - alert("Unable to parse log, the input is empty!"); - $("#uploader").fadeOut(); - } - }); - - $(document).on("keydown", function(e) { - if (e.which === 27) { - if ($("#popup-upload").css("display") !== "none" && $("#popup-upload").css("opacity") === 1) { - closeUploadPopUp(); - } } }); - $("#cancel").on("click", closeUploadPopUp); - - if (data.showPopup) - $("#popup-upload").fadeIn(); - }; -- cgit From 45a2268fc8855162c39205f78b3ef286d74e5224 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 3 Jun 2018 17:39:10 -0400 Subject: add log parser banner margin --- src/SMAPI.Web/wwwroot/Content/css/log-parser.css | 1 + 1 file changed, 1 insertion(+) (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css index 482fc780..5c4f8aea 100644 --- a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css +++ b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css @@ -22,6 +22,7 @@ table caption { .banner { border: 2px solid gray; border-radius: 5px; + margin-top: 1em; padding: 1em; } -- cgit From 94c1be6154223d070e7f5e5bcce80e81a2098048 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 3 Jun 2018 17:40:54 -0400 Subject: fix script error on log result page --- src/SMAPI.Web/wwwroot/Content/js/log-parser.js | 76 +++++++++++++------------- 1 file changed, 39 insertions(+), 37 deletions(-) (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/js/log-parser.js b/src/SMAPI.Web/wwwroot/Content/js/log-parser.js index eba6451d..44c3ad5d 100644 --- a/src/SMAPI.Web/wwwroot/Content/js/log-parser.js +++ b/src/SMAPI.Web/wwwroot/Content/js/log-parser.js @@ -90,48 +90,50 @@ smapi.logParser = function (data, sectionUrl) { /********** ** Upload form *********/ - // get elements - var systemOptions = $("input[name='os']"); - var systemInstructions = $("div[data-os]"); var input = $("#input"); - var submit = $("#submit"); + if (input.length) { + // get elements + var systemOptions = $("input[name='os']"); + var systemInstructions = $("div[data-os]"); + var submit = $("#submit"); - // instruction OS chooser - var chooseSystem = function() { - systemInstructions.hide(); - systemInstructions.filter("[data-os='" + $("input[name='os']:checked").val() + "']").show(); - } - systemOptions.on("click", chooseSystem); - chooseSystem(); + // instruction OS chooser + var chooseSystem = function() { + systemInstructions.hide(); + systemInstructions.filter("[data-os='" + $("input[name='os']:checked").val() + "']").show(); + } + systemOptions.on("click", chooseSystem); + chooseSystem(); - // disable submit if it's empty - var toggleSubmit = function() - { - var hasText = !!input.val().trim(); - submit.prop("disabled", !hasText); - } - input.on("input", toggleSubmit); - toggleSubmit(); + // disable submit if it's empty + var toggleSubmit = function() + { + var hasText = !!input.val().trim(); + submit.prop("disabled", !hasText); + } + input.on("input", toggleSubmit); + toggleSubmit(); - // drag & drop file - input.on({ - 'dragover dragenter': function(e) { - e.preventDefault(); - e.stopPropagation(); - }, - 'drop': function(e) { - var dataTransfer = e.originalEvent.dataTransfer; - if (dataTransfer && dataTransfer.files.length) { + // drag & drop file + input.on({ + 'dragover dragenter': function(e) { e.preventDefault(); e.stopPropagation(); - var file = dataTransfer.files[0]; - var reader = new FileReader(); - reader.onload = $.proxy(function(file, $input, event) { - $input.val(event.target.result); - toggleSubmit(); - }, this, file, $("#input")); - reader.readAsText(file); + }, + 'drop': function(e) { + var dataTransfer = e.originalEvent.dataTransfer; + if (dataTransfer && dataTransfer.files.length) { + e.preventDefault(); + e.stopPropagation(); + var file = dataTransfer.files[0]; + var reader = new FileReader(); + reader.onload = $.proxy(function(file, $input, event) { + $input.val(event.target.result); + toggleSubmit(); + }, this, file, $("#input")); + reader.readAsText(file); + } } - } - }); + }); + } }; -- cgit From 1ae1a2620ea0a9bda730b9b1a92145a9e255f9b3 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 9 Jun 2018 15:02:25 -0400 Subject: make web layout more responsive --- src/SMAPI.Web/wwwroot/Content/css/main.css | 38 ++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/css/main.css b/src/SMAPI.Web/wwwroot/Content/css/main.css index d1fa49e0..57eeee88 100644 --- a/src/SMAPI.Web/wwwroot/Content/css/main.css +++ b/src/SMAPI.Web/wwwroot/Content/css/main.css @@ -28,7 +28,8 @@ h2 { h3 { font-size: 1.2em; border-bottom: 1px solid #AAA; - width: 50%; + width: 55em; + max-width: 100%; } a { @@ -44,6 +45,8 @@ a { #content { min-height: 140px; + width: calc(100% - 2em); + max-width: 60em; padding: 0 1em 1em 1em; border-left: 1px solid #CCC; background: #FFF; @@ -51,7 +54,7 @@ a { } #content p { - max-width: 55em; + max-width: 100%; } .section { @@ -105,3 +108,34 @@ a { #footer a { color: #669; } + +/* mobile fixes */ +@media (min-width: 1020px) and (max-width: 1199px) { + #sidebar { + width: 7em; + background: none; + } + + #content-column { + left: 7em; + } +} + +@media (max-width: 1019px) { + h1 { + margin-top: 0; + } + + #sidebar { + margin-top: 0; + width: auto; + min-height: 0; + background: none; + } + + #content-column { + position: inherit; + top: inherit; + left: inherit; + } +} -- cgit From 6e0dcddeb8dd5bcc51e92a4dead42c6757e543e1 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 9 Jun 2018 15:37:17 -0400 Subject: strip 'noinclude' blocks from release descriptions serverside --- src/SMAPI.Web/wwwroot/Content/css/index.css | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/css/index.css b/src/SMAPI.Web/wwwroot/Content/css/index.css index 06cd6fb4..6340ed87 100644 --- a/src/SMAPI.Web/wwwroot/Content/css/index.css +++ b/src/SMAPI.Web/wwwroot/Content/css/index.css @@ -48,10 +48,6 @@ h1 { padding-left: 1em; } -.github-description .noinclude { - display: none; -} - #support-links li small { display: block; width: 50em; -- cgit From 6c08f774250b252c09b282a663b3947acb3a6741 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 11 Jun 2018 10:56:59 -0400 Subject: fix log parser not using full width for log --- src/SMAPI.Web/wwwroot/Content/css/log-parser.css | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css index 5c4f8aea..09bb97f5 100644 --- a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css +++ b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css @@ -1,6 +1,10 @@ /********* ** Main layout *********/ +#content { + max-width: 100%; +} + caption { text-align: left; padding-top: 2px; -- cgit From c9a6d327110806d20877c477095238846a8d83bf Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 16 Jun 2018 01:11:13 -0400 Subject: update web UI to let players download from new Nexus page (#547) --- src/SMAPI.Web/wwwroot/Content/css/index.css | 55 ++++++++++++++++++++- .../Content/images/direct-download-icon.png | Bin 0 -> 250 bytes .../wwwroot/Content/images/nexus-icon.png | Bin 0 -> 927 bytes src/SMAPI.Web/wwwroot/Content/js/index.js | 25 +++++++++- 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 src/SMAPI.Web/wwwroot/Content/images/direct-download-icon.png create mode 100644 src/SMAPI.Web/wwwroot/Content/images/nexus-icon.png (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/css/index.css b/src/SMAPI.Web/wwwroot/Content/css/index.css index 6340ed87..514e1a5c 100644 --- a/src/SMAPI.Web/wwwroot/Content/css/index.css +++ b/src/SMAPI.Web/wwwroot/Content/css/index.css @@ -18,7 +18,8 @@ h1 { text-align: center; } -#call-to-action a { +#call-to-action a.main-cta, +#call-to-action a.secondary-cta { box-shadow: #caefab 0 1px 0 0 inset; background: linear-gradient(#77d42a 5%, #5cb811 100%) #77d42a; border-radius: 6px; @@ -40,6 +41,58 @@ h1 { text-shadow: #2b665e 0 1px 0; } +.cta-dropdown { + position: relative; + display: inline-block; + margin-bottom: 1em; +} + +.cta-dropdown a.download { + margin-bottom: 0 !important; +} + +.cta-dropdown .dropdown-content { + display: none; + position: absolute; + text-align: left; + box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2); + border: 1px solid #566963; + background: #5cb811; + border-top: 0; + border-radius: 0 0 6px 6px; + margin-top: -6px; + z-index: 1; +} + +.cta-dropdown .dropdown-content a:hover { + background-color: #ddd; +} + +.cta-dropdown .dropdown-content img { + width: 0.85em; + height: 0.85em; +} + +.cta-dropdown.secondary-cta-dropdown .dropdown-content a:hover { + background-color: #566963; +} + +.cta-dropdown.secondary-cta-dropdown .dropdown-content { + background-color: #768d87; + border-color: #566963; +} + +.cta-dropdown.secondary-cta-dropdown .dropdown-content a { + color: #fff; + text-shadow: #2b665e 0 1px 0; +} + +.cta-dropdown .dropdown-content a { + padding: 0.75em 1em; + text-decoration: none; + display: block; +} + /********* ** Subsections *********/ diff --git a/src/SMAPI.Web/wwwroot/Content/images/direct-download-icon.png b/src/SMAPI.Web/wwwroot/Content/images/direct-download-icon.png new file mode 100644 index 00000000..6c30ca36 Binary files /dev/null and b/src/SMAPI.Web/wwwroot/Content/images/direct-download-icon.png differ diff --git a/src/SMAPI.Web/wwwroot/Content/images/nexus-icon.png b/src/SMAPI.Web/wwwroot/Content/images/nexus-icon.png new file mode 100644 index 00000000..10c66712 Binary files /dev/null and b/src/SMAPI.Web/wwwroot/Content/images/nexus-icon.png differ diff --git a/src/SMAPI.Web/wwwroot/Content/js/index.js b/src/SMAPI.Web/wwwroot/Content/js/index.js index 016d5fa4..8fa1c26f 100644 --- a/src/SMAPI.Web/wwwroot/Content/js/index.js +++ b/src/SMAPI.Web/wwwroot/Content/js/index.js @@ -1,6 +1,7 @@ $(document).ready(function () { + /* enable pufferchick */ var pufferchick = $("#pufferchick"); - $(".download").hover( + $(".cta-dropdown").hover( function () { pufferchick.attr("src", "Content/images/pufferchick-cool.png"); }, @@ -8,4 +9,26 @@ $(document).ready(function () { pufferchick.attr("src", "favicon.ico"); } ); + + /* enable download dropdowns */ + $(".cta-dropdown a.download").each(function(i, button) { + button = $(button); + var wrapper = button.parent(".cta-dropdown"); + var button = wrapper.find(".download"); + var dropdownContent = wrapper.find(".dropdown-content"); + + $(window).on("click", function(e) { + var target = $(e.target); + + // toggle dropdown on button click + if (target.is(button) || $.contains(button.get(0), target.get(0))) { + e.preventDefault(); + dropdownContent.toggle(); + } + + // else hide dropdown + else + dropdownContent.hide(); + }); + }); }); -- cgit From f1bdafde238280b771abb1d74ae780b6b86bdc79 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 16 Jun 2018 01:13:39 -0400 Subject: use sharper pufferchick images --- .../wwwroot/Content/images/pufferchick-cool.png | Bin 2921 -> 1099 bytes src/SMAPI.Web/wwwroot/Content/images/pufferchick.png | Bin 0 -> 831 bytes src/SMAPI.Web/wwwroot/Content/js/index.js | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 src/SMAPI.Web/wwwroot/Content/images/pufferchick.png (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/images/pufferchick-cool.png b/src/SMAPI.Web/wwwroot/Content/images/pufferchick-cool.png index 63eb8970..f359146c 100644 Binary files a/src/SMAPI.Web/wwwroot/Content/images/pufferchick-cool.png and b/src/SMAPI.Web/wwwroot/Content/images/pufferchick-cool.png differ diff --git a/src/SMAPI.Web/wwwroot/Content/images/pufferchick.png b/src/SMAPI.Web/wwwroot/Content/images/pufferchick.png new file mode 100644 index 00000000..1de9cf47 Binary files /dev/null and b/src/SMAPI.Web/wwwroot/Content/images/pufferchick.png differ diff --git a/src/SMAPI.Web/wwwroot/Content/js/index.js b/src/SMAPI.Web/wwwroot/Content/js/index.js index 8fa1c26f..d0734b02 100644 --- a/src/SMAPI.Web/wwwroot/Content/js/index.js +++ b/src/SMAPI.Web/wwwroot/Content/js/index.js @@ -6,7 +6,7 @@ $(document).ready(function () { pufferchick.attr("src", "Content/images/pufferchick-cool.png"); }, function () { - pufferchick.attr("src", "favicon.ico"); + pufferchick.attr("src", "Content/images/pufferchick.png"); } ); -- cgit From 3e5c109df1f90904c2dcb177e35b35f003e90fd9 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 27 Jun 2018 09:47:31 -0400 Subject: add log parser option to view raw log --- src/SMAPI.Web/wwwroot/Content/css/log-parser.css | 4 ++++ src/SMAPI.Web/wwwroot/Content/js/log-parser.js | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src/SMAPI.Web/wwwroot/Content') diff --git a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css index 09bb97f5..1fcd1bff 100644 --- a/src/SMAPI.Web/wwwroot/Content/css/log-parser.css +++ b/src/SMAPI.Web/wwwroot/Content/css/log-parser.css @@ -79,6 +79,10 @@ table#metadata, table#mods { cursor: pointer; } +#mods.filters-disabled tr { + cursor: default; +} + #metadata tr, #mods tr { background: #eee diff --git a/src/SMAPI.Web/wwwroot/Content/js/log-parser.js b/src/SMAPI.Web/wwwroot/Content/js/log-parser.js index 44c3ad5d..0c654205 100644 --- a/src/SMAPI.Web/wwwroot/Content/js/log-parser.js +++ b/src/SMAPI.Web/wwwroot/Content/js/log-parser.js @@ -39,11 +39,17 @@ smapi.logParser = function (data, sectionUrl) { } }, methods: { - toggleLevel: function(id) { + toggleLevel: function (id) { + if (!data.enableFilters) + return; + this.showLevels[id] = !this.showLevels[id]; }, toggleMod: function (id) { + if (!data.enableFilters) + return; + var curShown = this.showMods[id]; // first filter: only show this by default @@ -64,6 +70,9 @@ smapi.logParser = function (data, sectionUrl) { }, showAllMods: function () { + if (!data.enableFilters) + return; + for (var key in this.showMods) { if (this.showMods.hasOwnProperty(key)) { this.showMods[key] = true; @@ -73,6 +82,9 @@ smapi.logParser = function (data, sectionUrl) { }, hideAllMods: function () { + if (!data.enableFilters) + return; + for (var key in this.showMods) { if (this.showMods.hasOwnProperty(key)) { this.showMods[key] = false; -- cgit