Merge pull request #477 from danvolchek/webpuffer

Make pufferchick cool when user hovers over the download button
This commit is contained in:
Jesse Plamondon-Willard 2018-04-25 12:08:18 -04:00 committed by GitHub
commit 379bc7bcc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View File

@ -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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -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");
});
});