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 --- src/SMAPI.Web/Views/Index/Index.cshtml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/SMAPI.Web/Views/Index') diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index 4efb9f8a..c13c94a5 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -4,6 +4,7 @@ @model StardewModdingAPI.Web.ViewModels.IndexModel @section Head { + }

@@ -13,14 +14,14 @@

- Download SMAPI @Model.StableVersion.Version
+ Download SMAPI @Model.StableVersion.Version
@if (Model.BetaVersion != null) { - Download SMAPI @Model.BetaVersion.Version
for Stardew Valley 1.3 beta

+ Download SMAPI @Model.BetaVersion.Version
for Stardew Valley 1.3 beta

} Install guide
FAQs
- +

Get help

-- 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/Views/Index/Index.cshtml | 1 + src/SMAPI.Web/wwwroot/Content/js/index.js | 26 ++++++++++---------------- 2 files changed, 11 insertions(+), 16 deletions(-) (limited to 'src/SMAPI.Web/Views/Index') diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index c13c94a5..8ae23a45 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -4,6 +4,7 @@ @model StardewModdingAPI.Web.ViewModels.IndexModel @section Head { + } 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 6257fdf57def0f07a7970f9fb232879ed4c524f6 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 28 Apr 2018 22:39:29 -0400 Subject: update wiki links --- docs/README.md | 2 +- docs/release-notes.md | 8 ++++---- docs/technical-docs.md | 2 +- src/SMAPI.Installer/readme.txt | 10 ++-------- src/SMAPI.Web/Views/Index/Index.cshtml | 3 +-- src/SMAPI.Web/Views/LogParser/Index.cshtml | 2 +- 6 files changed, 10 insertions(+), 17 deletions(-) (limited to 'src/SMAPI.Web/Views/Index') diff --git a/docs/README.md b/docs/README.md index bdfc5c9d..3112c023 100644 --- a/docs/README.md +++ b/docs/README.md @@ -34,7 +34,7 @@ Have questions? Come [chat on Discord](https://discord.gg/KCJHWhX) with SMAPI de modders! ### For players -* [Modding guides](https://stardewvalleywiki.com/Modding:Index#For_players) +* [Player guide](https://stardewvalleywiki.com/Modding:Player_Guide) ### For modders * [Modding documentation](https://stardewvalleywiki.com/Modding:Index) diff --git a/docs/release-notes.md b/docs/release-notes.md index 93855ba9..8064a34e 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -354,8 +354,8 @@ For players: * Updated mod compatibility list. For modders: -* Added `SDate` utility for in-game date calculations (see [API reference](http://stardewvalleywiki.com/Modding:SMAPI_APIs#Dates)). -* Added support for minimum dependency versions in `manifest.json` (see [API reference](http://stardewvalleywiki.com/Modding:SMAPI_APIs#Manifest)). +* Added `SDate` utility for in-game date calculations (see [API reference](https://stardewvalleywiki.com/Modding:SMAPI_APIs#Dates)). +* Added support for minimum dependency versions in `manifest.json` (see [API reference](https://stardewvalleywiki.com/Modding:SMAPI_APIs#Manifest)). * Added more useful logging when loading mods. * Added a `ModID` property to all mod helpers for extension methods. * Changed `manifest.MinimumApiVersion` from string to `ISemanticVersion`. This shouldn't affect mods unless they referenced that field in code. @@ -387,8 +387,8 @@ For players: * Updated mod compatibility list. For modders: -* You can now add dependencies to `manifest.json` (see [API reference](http://stardewvalleywiki.com/Modding:SMAPI_APIs#Manifest)). -* You can now translate your mod (see [API reference](http://stardewvalleywiki.com/Modding:SMAPI_APIs#Translation)). +* You can now add dependencies to `manifest.json` (see [API reference](https://stardewvalleywiki.com/Modding:SMAPI_APIs#Manifest)). +* You can now translate your mod (see [API reference](https://stardewvalleywiki.com/Modding:SMAPI_APIs#Translation)). * You can now load unpacked `.tbin` files from your mod folder through the content API. * SMAPI now automatically fixes tilesheet references for maps loaded from the mod folder. _When loading a map from the mod folder, SMAPI will automatically use tilesheets relative to the map file if they exists. Otherwise it will default to tilesheets in the game content._ diff --git a/docs/technical-docs.md b/docs/technical-docs.md index 9e1a49e7..52c3f96d 100644 --- a/docs/technical-docs.md +++ b/docs/technical-docs.md @@ -44,7 +44,7 @@ executed. This doesn't work in MonoDevelop on Linux, unfortunately. ### Preparing a release To prepare a crossplatform SMAPI release, you'll need to compile it on two platforms. See -[crossplatforming info](http://stardewvalleywiki.com/Modding:Creating_a_SMAPI_mod#Test_on_all_platforms) +[crossplatforming info](https://stardewvalleywiki.com/Modding:Creating_a_SMAPI_mod#Test_on_all_platforms) on the wiki for the first-time setup. 1. Update the version number in `GlobalAssemblyInfo.cs` and `Constants::Version`. Make sure you use a diff --git a/src/SMAPI.Installer/readme.txt b/src/SMAPI.Installer/readme.txt index a03ad6a4..12053a8c 100644 --- a/src/SMAPI.Installer/readme.txt +++ b/src/SMAPI.Installer/readme.txt @@ -14,15 +14,9 @@ SMAPI lets you run Stardew Valley with mods. Don't forget to download mods separately. -Install guide +Player's guide -------------------------------- -See http://stardewvalleywiki.com/Modding:Installing_SMAPI. - - -Need help? --------------------------------- -- FAQs: http://stardewvalleywiki.com/Modding:Player_FAQs -- Ask for help: https://discord.gg/kH55QXP +See https://stardewvalleywiki.com/Modding:Player_Guide. Manual install diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index 8ae23a45..a5ceb8aa 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -20,8 +20,7 @@ { Download SMAPI @Model.BetaVersion.Version
for Stardew Valley 1.3 beta

} - Install guide
- FAQs
+ Player guide
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 2d1c1b44..d051026f 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -177,7 +177,7 @@ else if (Model.ParsedLog?.IsValid == false)

Upload log file

    -
  1. Find your SMAPI log file (not the console text).
  2. +
  3. Find your SMAPI log file (not the console text).
  4. Drag the file onto the textbox below (or paste the text in).
  5. Click Parse.
-- cgit From 72941d977f684182eaee868ca037c9bdd5d1a0ff Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 4 May 2018 12:02:31 -0400 Subject: update supporters list --- src/SMAPI.Web/Views/Index/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI.Web/Views/Index') diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index a5ceb8aa..01b8955c 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -77,7 +77,7 @@ else acerbicon, ChefRude, jwdred, - OfficialPiAddict, + Kono Tyran, Robby LaFarge, and a few anonymous users for their ongoing support; you're awesome! 🏅

-- cgit From efe94c26536ff4a346685da5d11252a9a9a5a0eb Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 5 May 2018 22:19:31 -0400 Subject: update supporters list --- src/SMAPI.Web/Views/Index/Index.cshtml | 1 + 1 file changed, 1 insertion(+) (limited to 'src/SMAPI.Web/Views/Index') diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index 01b8955c..347eebc7 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -77,6 +77,7 @@ else acerbicon, ChefRude, jwdred, + KNakamura, Kono Tyran, Robby LaFarge, and a few anonymous users for their ongoing support; you're awesome! 🏅 -- cgit From 4eebd813f239267d659f3cbf4fa6cf5d47d99c26 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 17 May 2018 19:26:53 -0400 Subject: add beta for-developers download to smapi.io --- src/SMAPI.Internal/SemanticVersionImpl.cs | 2 +- src/SMAPI.Web/Controllers/IndexController.cs | 144 ++++++++++++++++----------- src/SMAPI.Web/Views/Index/Index.cshtml | 4 + 3 files changed, 90 insertions(+), 60 deletions(-) (limited to 'src/SMAPI.Web/Views/Index') diff --git a/src/SMAPI.Internal/SemanticVersionImpl.cs b/src/SMAPI.Internal/SemanticVersionImpl.cs index 6da16336..7ae34f07 100644 --- a/src/SMAPI.Internal/SemanticVersionImpl.cs +++ b/src/SMAPI.Internal/SemanticVersionImpl.cs @@ -5,7 +5,7 @@ namespace StardewModdingAPI.Internal { /// A low-level implementation of a semantic version with an optional release tag. /// The implementation is defined by Semantic Version 2.0 (http://semver.org/). - internal class SemanticVersionImpl + internal class SemanticVersionImpl : IComparable { /********* ** Accessors diff --git a/src/SMAPI.Web/Controllers/IndexController.cs b/src/SMAPI.Web/Controllers/IndexController.cs index 92b4f2c0..08b7363a 100644 --- a/src/SMAPI.Web/Controllers/IndexController.cs +++ b/src/SMAPI.Web/Controllers/IndexController.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Generic; +using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; @@ -46,24 +48,23 @@ namespace StardewModdingAPI.Web.Controllers [HttpGet] public async Task Index() { - // fetch SMAPI releases - IndexVersionModel stableVersion = await this.Cache.GetOrCreateAsync("stable-version", async entry => - { - entry.AbsoluteExpiration = DateTimeOffset.UtcNow.Add(this.CacheTime); - GitRelease release = await this.GitHub.GetLatestReleaseAsync(this.RepositoryName, includePrerelease: false); - return new IndexVersionModel(release.Name, release.Body, this.GetMainDownloadUrl(release), this.GetDevDownloadUrl(release)); - }); - IndexVersionModel betaVersion = await this.Cache.GetOrCreateAsync("beta-version", async entry => - { - entry.AbsoluteExpiration = DateTimeOffset.UtcNow.Add(this.CacheTime); - GitRelease release = await this.GitHub.GetLatestReleaseAsync(this.RepositoryName, includePrerelease: true); - return release.IsPrerelease - ? this.GetBetaDownload(release) - : null; - }); + // choose versions + ReleaseVersion[] versions = await this.GetReleaseVersionsAsync(); + ReleaseVersion stableVersion = versions.LastOrDefault(version => !version.IsBeta && !version.IsForDevs); + ReleaseVersion stableVersionForDevs = versions.LastOrDefault(version => !version.IsBeta && version.IsForDevs); + ReleaseVersion betaVersion = versions.LastOrDefault(version => version.IsBeta && !version.IsForDevs); + ReleaseVersion betaVersionForDevs = versions.LastOrDefault(version => version.IsBeta && version.IsForDevs); // render view - var model = new IndexModel(stableVersion, betaVersion); + IndexVersionModel stableVersionModel = stableVersion != null + ? new IndexVersionModel(stableVersion.Version.ToString(), stableVersion.Release.Body, stableVersion.Asset.DownloadUrl, stableVersionForDevs?.Asset.DownloadUrl) + : new IndexVersionModel("unknown", "", "https://github.com/Pathoschild/SMAPI/releases", null); // just in case something goes wrong) + IndexVersionModel betaVersionModel = betaVersion != null + ? new IndexVersionModel(betaVersion.Version.ToString(), betaVersion.Release.Body, betaVersion.Asset.DownloadUrl, betaVersionForDevs?.Asset.DownloadUrl) + : null; + + // render view + var model = new IndexModel(stableVersionModel, betaVersionModel); return this.View(model); } @@ -71,62 +72,87 @@ namespace StardewModdingAPI.Web.Controllers /********* ** Private methods *********/ - /// Get the main download URL for a SMAPI release. - /// The SMAPI release. - private string GetMainDownloadUrl(GitRelease release) + /// Get a sorted, parsed list of SMAPI downloads for the latest releases. + private async Task GetReleaseVersionsAsync() { - // get main download URL - foreach (GitAsset asset in release.Assets ?? new GitAsset[0]) + return await this.Cache.GetOrCreateAsync("available-versions", async entry => { - if (Regex.IsMatch(asset.FileName, @"SMAPI-[\d\.]+-installer.zip")) - return asset.DownloadUrl; - } + entry.AbsoluteExpiration = DateTimeOffset.UtcNow.Add(this.CacheTime); - // fallback just in case - return "https://github.com/pathoschild/SMAPI/releases"; + // get releases + GitRelease stableRelease = await this.GitHub.GetLatestReleaseAsync(this.RepositoryName, includePrerelease: false); + GitRelease betaRelease = await this.GitHub.GetLatestReleaseAsync(this.RepositoryName, includePrerelease: true); + if (stableRelease.Tag == betaRelease.Tag) + betaRelease = null; + + // get versions + ReleaseVersion[] stableVersions = this.ParseReleaseVersions(stableRelease).ToArray(); + ReleaseVersion[] betaVersions = this.ParseReleaseVersions(betaRelease).ToArray(); + return stableVersions + .Concat(betaVersions) + .OrderBy(p => p.Version) + .ToArray(); + }); } - /// Get the for-developers download URL for a SMAPI release. - /// The SMAPI release. - private string GetDevDownloadUrl(GitRelease release) + /// Get a parsed list of SMAPI downloads for a release. + /// The GitHub release. + private IEnumerable ParseReleaseVersions(GitRelease release) { - // get dev download URL - foreach (GitAsset asset in release.Assets ?? new GitAsset[0]) + if (release?.Assets == null) + yield break; + + foreach (GitAsset asset in release.Assets) { - if (Regex.IsMatch(asset.FileName, @"SMAPI-[\d\.]+-installer-for-developers.zip")) - return asset.DownloadUrl; - } + Match match = Regex.Match(asset.FileName, @"SMAPI-(?[\d\.]+(?:-.+)?)-installer(?-for-developers)?.zip"); + if (!match.Success || !SemanticVersionImpl.TryParse(match.Groups["version"].Value, out SemanticVersionImpl version)) + continue; + bool isBeta = version.Tag != null; + bool isForDevs = match.Groups["forDevs"].Success; - // fallback just in case - return "https://github.com/pathoschild/SMAPI/releases"; + yield return new ReleaseVersion(release, asset, version, isBeta, isForDevs); + } } - /// Get the latest beta download for a SMAPI release. - /// The SMAPI release. - private IndexVersionModel GetBetaDownload(GitRelease release) + /// A parsed release download. + private class ReleaseVersion { - // get download with the latest version - SemanticVersionImpl latestVersion = null; - string latestUrl = null; - foreach (GitAsset asset in release.Assets ?? new GitAsset[0]) + /********* + ** Accessors + *********/ + /// The underlying GitHub release. + public GitRelease Release { get; } + + /// The underlying download asset. + public GitAsset Asset { get; } + + /// The SMAPI version. + public SemanticVersionImpl Version { get; } + + /// Whether this is a beta download. + public bool IsBeta { get; } + + /// Whether this is a 'for developers' download. + public bool IsForDevs { get; } + + + /********* + ** Public methods + *********/ + /// Construct an instance. + /// The underlying GitHub release. + /// The underlying download asset. + /// The SMAPI version. + /// Whether this is a beta download. + /// Whether this is a 'for developers' download. + public ReleaseVersion(GitRelease release, GitAsset asset, SemanticVersionImpl version, bool isBeta, bool isForDevs) { - // parse version - Match versionMatch = Regex.Match(asset.FileName, @"SMAPI-([\d\.]+(?:-.+)?)-installer.zip"); - if (!versionMatch.Success || !SemanticVersionImpl.TryParse(versionMatch.Groups[1].Value, out SemanticVersionImpl version)) - continue; - - // save latest version - if (latestVersion == null || latestVersion.CompareTo(version) < 0) - { - latestVersion = version; - latestUrl = asset.DownloadUrl; - } + this.Release = release; + this.Asset = asset; + this.Version = version; + this.IsBeta = isBeta; + this.IsForDevs = isForDevs; } - - // return if prerelease - return latestVersion?.Tag != null - ? new IndexVersionModel(latestVersion.ToString(), release.Body, latestUrl, null) - : null; } } } diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index 347eebc7..91cdc793 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -86,6 +86,10 @@ else

For mod creators

-- cgit From 3c06a496a0255106076b4f6ade3ed9019dbda4f3 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 5 Jun 2018 21:49:59 -0400 Subject: update supporters list --- src/SMAPI.Web/Views/Index/Index.cshtml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/SMAPI.Web/Views/Index') diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index 91cdc793..6dc0a338 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -76,6 +76,8 @@ else Special thanks to acerbicon, ChefRude, + cheesysteak, + hawkfalcon, jwdred, KNakamura, Kono Tyran, -- 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/Views/Index/Index.cshtml | 2 +- src/SMAPI.Web/Views/LogParser/Index.cshtml | 4 ++-- src/SMAPI.Web/wwwroot/Content/css/log-parser.css | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/SMAPI.Web/Views/Index') diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index 6dc0a338..0f056ada 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -3,7 +3,7 @@ } @model StardewModdingAPI.Web.ViewModels.IndexModel @section Head { - + } diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 7307817c..4d95901e 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -12,10 +12,10 @@ { } - + - + - + }

@@ -15,10 +15,23 @@

- Download SMAPI @Model.StableVersion.Version
+
+ @if (Model.BetaVersion != null) { - Download SMAPI @Model.BetaVersion.Version
for Stardew Valley 1.3 beta

+
} Player guide
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 --- src/SMAPI.Web/Views/Index/Index.cshtml | 2 +- .../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 +- 4 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 src/SMAPI.Web/wwwroot/Content/images/pufferchick.png (limited to 'src/SMAPI.Web/Views/Index') diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index fbfc2239..8145d354 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -34,7 +34,7 @@

} Player guide
- +

Get help

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 dc27247b28097a992694fcb7a72133ae4e56e27b Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 16 Jun 2018 01:32:52 -0400 Subject: add section anchors for links from Nexus (#547) --- src/SMAPI.Web/Views/Index/Index.cshtml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/SMAPI.Web/Views/Index') diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index 8145d354..411448fa 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -37,7 +37,7 @@ -

Get help

+

Get help

  • Mod compatibility list
  • Get help on Discord or in the forums
  • @@ -45,7 +45,7 @@ @if (Model.BetaVersion == null) { -

    What's new in SMAPI @Model.StableVersion.Version?

    +

    What's new in SMAPI @Model.StableVersion.Version?

    @Html.Raw(Markdig.Markdown.ToHtml(Model.StableVersion.Description))
    @@ -53,7 +53,7 @@ } else { -

    What's new in...

    +

    What's new in...

    SMAPI @Model.StableVersion.Version?

    @Html.Raw(Markdig.Markdown.ToHtml(Model.StableVersion.Description)) @@ -67,7 +67,7 @@ else

    See the release notes and mod compatibility list for more info.

    } -

    Donate to support SMAPI ♥

    +

    SMAPI is an open-source project by Pathoschild. It will always be free, but donations are much appreciated to help pay for development, server hosting, domain fees, coffee, etc. @@ -98,7 +98,7 @@ else and a few anonymous users for their ongoing support; you're awesome! 🏅

    -

    For mod creators

    +

    For mod creators

    • SMAPI @Model.StableVersion.Version for developers (includes intellisense and full console output)
    • @if (Model.BetaVersion != null) -- cgit From 7e46cc24630d810f4e2396346124780160cb7aa3 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 8 Jul 2018 18:54:34 -0400 Subject: update Patreon list --- src/SMAPI.Web/Views/Index/Index.cshtml | 1 + 1 file changed, 1 insertion(+) (limited to 'src/SMAPI.Web/Views/Index') diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index 411448fa..361d01de 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -94,6 +94,7 @@ else jwdred, KNakamura, Kono Tyran, + Pucklynn, Robby LaFarge, and a few anonymous users for their ongoing support; you're awesome! 🏅

      -- cgit