move supporter list into environment config

This commit is contained in:
Jesse Plamondon-Willard 2019-12-03 23:06:42 -05:00
parent 2b1f607d41
commit 8ddb60cee6
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
6 changed files with 22 additions and 24 deletions

View File

@ -72,7 +72,7 @@ namespace StardewModdingAPI.Web.Controllers
: null;
// render view
var model = new IndexModel(stableVersionModel, betaVersionModel, this.SiteConfig.BetaBlurb);
var model = new IndexModel(stableVersionModel, betaVersionModel, this.SiteConfig.BetaBlurb, this.SiteConfig.SupporterList);
return this.View(model);
}

View File

@ -11,5 +11,8 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels
/// <summary>A short sentence shown under the beta download button, if any.</summary>
public string BetaBlurb { get; set; }
/// <summary>A list of supports to credit on the main page, in Markdown format.</summary>
public string SupporterList { get; set; }
}
}

View File

@ -15,6 +15,9 @@ namespace StardewModdingAPI.Web.ViewModels
/// <summary>A short sentence shown under the beta download button, if any.</summary>
public string BetaBlurb { get; set; }
/// <summary>A list of supports to credit on the main page, in Markdown format.</summary>
public string SupporterList { get; set; }
/*********
** Public methods
@ -26,11 +29,13 @@ namespace StardewModdingAPI.Web.ViewModels
/// <param name="stableVersion">The latest stable SMAPI version.</param>
/// <param name="betaVersion">The latest prerelease SMAPI version (if newer than <paramref name="stableVersion"/>).</param>
/// <param name="betaBlurb">A short sentence shown under the beta download button, if any.</param>
internal IndexModel(IndexVersionModel stableVersion, IndexVersionModel betaVersion, string betaBlurb)
/// <param name="supporterList">A list of supports to credit on the main page, in Markdown format.</param>
internal IndexModel(IndexVersionModel stableVersion, IndexVersionModel betaVersion, string betaBlurb, string supporterList)
{
this.StableVersion = stableVersion;
this.BetaVersion = betaVersion;
this.BetaBlurb = betaBlurb;
this.SupporterList = supporterList;
}
}
}

View File

@ -1,3 +1,4 @@
@using Markdig
@using Microsoft.Extensions.Options
@using StardewModdingAPI.Web.Framework
@using StardewModdingAPI.Web.Framework.ConfigModels
@ -104,19 +105,12 @@ else
</li>
</ul>
<p>
Special thanks to
<a href="https://www.nexusmods.com/users/65566526?tab=user+files">bwdy</a>,
hawkfalcon,
<a href="https://twitter.com/iKeychain">iKeychain</a>,
jwdred,
<a href="https://www.nexusmods.com/users/12252523">Karmylla</a>,
<a href="https://www.nexusmods.com/stardewvalley/users/51777556">minervamaga</a>,
Pucklynn,
Renorien,
Robby LaFarge,
and a few anonymous users for their ongoing support on Patreon; you're awesome!
</p>
@if (!string.IsNullOrWhiteSpace(Model.SupporterList))
{
@Html.Raw(Markdig.Markdown.ToHtml(
$"Special thanks to {Model.SupporterList}, and a few anonymous users for their ongoing support on Patreon; you're awesome!"
))
}
<h2 id="modcreators">For mod creators</h2>
<ul>

View File

@ -8,11 +8,6 @@
*/
{
"Site": {
"BetaEnabled": false,
"BetaBlurb": null
},
"ApiClients": {
"AmazonAccessKey": null,
"AmazonSecretKey": null,

View File

@ -16,8 +16,9 @@
},
"Site": {
"BetaEnabled": null,
"BetaBlurb": null
"BetaEnabled": false,
"BetaBlurb": null,
"SupporterList": null
},
"ApiClients": {