move supporter list into environment config
This commit is contained in:
parent
2b1f607d41
commit
8ddb60cee6
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
@using Markdig
|
||||
@using Microsoft.Extensions.Options
|
||||
@using StardewModdingAPI.Web.Framework
|
||||
@using StardewModdingAPI.Web.Framework.ConfigModels
|
||||
|
@ -94,29 +95,22 @@ else
|
|||
</li>
|
||||
<li>
|
||||
<a href="https://ko-fi.com/pathoschild" class="donate-button">
|
||||
<img src="Content/images/ko-fi.png"/> Buy me a coffee
|
||||
<img src="Content/images/ko-fi.png" /> Buy me a coffee
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.paypal.me/pathoschild" class="donate-button">
|
||||
<img src="Content/images/paypal.png"/> Donate via PayPal
|
||||
<img src="Content/images/paypal.png" /> Donate via PayPal
|
||||
</a>
|
||||
</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>
|
||||
|
|
|
@ -8,11 +8,6 @@
|
|||
|
||||
*/
|
||||
{
|
||||
"Site": {
|
||||
"BetaEnabled": false,
|
||||
"BetaBlurb": null
|
||||
},
|
||||
|
||||
"ApiClients": {
|
||||
"AmazonAccessKey": null,
|
||||
"AmazonSecretKey": null,
|
||||
|
|
|
@ -16,8 +16,9 @@
|
|||
},
|
||||
|
||||
"Site": {
|
||||
"BetaEnabled": null,
|
||||
"BetaBlurb": null
|
||||
"BetaEnabled": false,
|
||||
"BetaBlurb": null,
|
||||
"SupporterList": null
|
||||
},
|
||||
|
||||
"ApiClients": {
|
||||
|
|
Loading…
Reference in New Issue