summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-04-25 12:08:18 -0400
committerGitHub <noreply@github.com>2018-04-25 12:08:18 -0400
commit379bc7bcc2db5debf4fe305204d55041d6e463a8 (patch)
tree9b9de16726a61569a51d4aa959a314f8eb2c831b
parentf8ffdef321f6818d9ff6e2a763501f92e4a05c8b (diff)
parent371d7fa05317f107f7b97a7b5db93e176039418d (diff)
downloadSMAPI-379bc7bcc2db5debf4fe305204d55041d6e463a8.tar.gz
SMAPI-379bc7bcc2db5debf4fe305204d55041d6e463a8.tar.bz2
SMAPI-379bc7bcc2db5debf4fe305204d55041d6e463a8.zip
Merge pull request #477 from danvolchek/webpuffer
Make pufferchick cool when user hovers over the download button
-rw-r--r--src/SMAPI.Web/Views/Index/Index.cshtml8
-rw-r--r--src/SMAPI.Web/wwwroot/Content/images/pufferchick-cool.pngbin0 -> 2921 bytes
-rw-r--r--src/SMAPI.Web/wwwroot/Content/js/index.js8
3 files changed, 13 insertions, 3 deletions
diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml
index 4efb9f8a..8ae23a45 100644
--- a/src/SMAPI.Web/Views/Index/Index.cshtml
+++ b/src/SMAPI.Web/Views/Index/Index.cshtml
@@ -4,6 +4,8 @@
@model StardewModdingAPI.Web.ViewModels.IndexModel
@section Head {
<link rel="stylesheet" href="~/Content/css/index.css" />
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" crossorigin="anonymous"></script>
+ <script src="~/Content/js/index.js"></script>
}
<p id="blurb">
@@ -13,14 +15,14 @@
</p>
<div id="call-to-action">
- <a href="@Model.StableVersion.DownloadUrl" class="main-cta">Download SMAPI @Model.StableVersion.Version</a><br />
+ <a href="@Model.StableVersion.DownloadUrl" class="main-cta download">Download SMAPI @Model.StableVersion.Version</a><br />
@if (Model.BetaVersion != null)
{
- <a href="@Model.BetaVersion.DownloadUrl" class="secondary-cta">Download SMAPI @Model.BetaVersion.Version<br /><small>for Stardew Valley 1.3 beta</small></a><br />
+ <a href="@Model.BetaVersion.DownloadUrl" class="secondary-cta download">Download SMAPI @Model.BetaVersion.Version<br /><small>for Stardew Valley 1.3 beta</small></a><br />
}
<a href="https://stardewvalleywiki.com/Modding:Installing_SMAPI" class="secondary-cta">Install guide</a><br />
<a href="https://stardewvalleywiki.com/Modding:Player_FAQs" class="secondary-cta">FAQs</a><br />
- <img src="favicon.ico" />
+ <img id="pufferchick" src="favicon.ico" />
</div>
<h2>Get help</h2>
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
--- /dev/null
+++ b/src/SMAPI.Web/wwwroot/Content/images/pufferchick-cool.png
Binary files 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..ac05df05
--- /dev/null
+++ b/src/SMAPI.Web/wwwroot/Content/js/index.js
@@ -0,0 +1,8 @@
+$(document).ready(function () {
+ var pufferchick = $("#pufferchick");
+ $(".download").hover(function () {
+ pufferchick.attr("src", "Content/images/pufferchick-cool.png");
+ }, function () {
+ pufferchick.attr("src", "favicon.ico");
+ });
+});