From 372eb722334b9d0cc463be6fc418081a65d04717 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 5 Jan 2020 23:08:17 -0500 Subject: streamline front page design --- src/SMAPI.Web/Views/Index/Index.cshtml | 157 ++++++++++++++-------------- src/SMAPI.Web/Views/Shared/_Layout.cshtml | 7 +- src/SMAPI.Web/wwwroot/Content/css/index.css | 35 +++++-- 3 files changed, 113 insertions(+), 86 deletions(-) (limited to 'src') diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml index 5d91dc84..778da2d1 100644 --- a/src/SMAPI.Web/Views/Index/Index.cshtml +++ b/src/SMAPI.Web/Views/Index/Index.cshtml @@ -1,4 +1,3 @@ -@using Markdig @using Microsoft.Extensions.Options @using StardewModdingAPI.Web.Framework @using StardewModdingAPI.Web.Framework.ConfigModels @@ -6,18 +5,22 @@ @model StardewModdingAPI.Web.ViewModels.IndexModel @{ ViewData["Title"] = "SMAPI"; + ViewData["ViewTitle"] = string.Empty; } @section Head { - + - + } -

- The mod loader for Stardew Valley. It works fine with GOG and Steam achievements, it's - compatible with Linux/Mac/Windows, you can uninstall it anytime, and there's a friendly - community if you need help. It's a cool pufferchick. -

+

+ SMAPI + +

+
+

The mod loader for Stardew Valley.

+

Compatible with GOG/Steam achievements and Linux/Mac/Windows, uninstall anytime, and there's a friendly community if you need help.

+
@@ -45,80 +48,82 @@

}
Player guide
- -
-

Get help

- - -@if (Model.BetaVersion == null) -{ -

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

-
- @Html.Raw(Markdig.Markdown.ToHtml(Model.StableVersion.Description)) -
-

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

-} -else -{ -

What's new in...

-

SMAPI @Model.StableVersion.Version?

-
- @Html.Raw(Markdig.Markdown.ToHtml(Model.StableVersion.Description)) -
-

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

+
+

Get help

+ +
-

SMAPI @Model.BetaVersion.Version?

-
- @Html.Raw(Markdig.Markdown.ToHtml(Model.BetaVersion.Description)) -
-

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

-} +
+ @if (Model.BetaVersion == null) + { +

What's new

+
+ @Html.Raw(Markdig.Markdown.ToHtml(Model.StableVersion.Description)) +
+

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

+ } + else + { +

What's new in...

+

SMAPI @Model.StableVersion.Version?

+
+ @Html.Raw(Markdig.Markdown.ToHtml(Model.StableVersion.Description)) +
+

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

- -

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

+

SMAPI @Model.BetaVersion.Version?

+
+ @Html.Raw(Markdig.Markdown.ToHtml(Model.BetaVersion.Description)) +
+

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

+ } +
- +
+ +

+ 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. +

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

For mod creators

- +
+ +

For mod creators

+ diff --git a/src/SMAPI.Web/Views/Shared/_Layout.cshtml b/src/SMAPI.Web/Views/Shared/_Layout.cshtml index 17f1f673..2d06ceb1 100644 --- a/src/SMAPI.Web/Views/Shared/_Layout.cshtml +++ b/src/SMAPI.Web/Views/Shared/_Layout.cshtml @@ -29,12 +29,15 @@
-

@(ViewData["ViewTitle"] ?? ViewData["Title"])

+ @if (ViewData["ViewTitle"] != string.Empty) + { +

@(ViewData["ViewTitle"] ?? ViewData["Title"])

+ } @RenderBody()
diff --git a/src/SMAPI.Web/wwwroot/Content/css/index.css b/src/SMAPI.Web/wwwroot/Content/css/index.css index 93a85bed..1cf8d261 100644 --- a/src/SMAPI.Web/wwwroot/Content/css/index.css +++ b/src/SMAPI.Web/wwwroot/Content/css/index.css @@ -21,12 +21,10 @@ h1 { #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; border: 1px solid #268a16; display: inline-block; cursor: pointer; - color: #306108; font-weight: bold; margin-bottom: 1em; padding: 6px 24px; @@ -34,10 +32,16 @@ h1 { text-shadow: #aade7c 0 1px 0; } +#call-to-action a.main-cta { + background: linear-gradient(#77d42a 5%, #5cb811 75%) #77d42a; + font-size: 1.5em; + color: #306108; +} + #call-to-action a.secondary-cta { background: #768d87; border: 1px solid #566963; - color: #ffffff; + color: #eee; text-shadow: #2b665e 0 1px 0; } @@ -101,9 +105,24 @@ h1 { /********* ** Subsections *********/ -.github-description { - border-left: 0.25em solid #dfe2e5; - padding-left: 1em; +.area { + background: rgba(0, 170, 0, 0.2); + padding: 0 1em 1em 1em; + margin-bottom: 1em; +} + +.area > ul, +.area > div, +.area > p { + margin-left: 3em; +} + +.area > ul { + padding-left: 0; +} + +.area > h2 { + border: 0; } #donate-links li { @@ -114,12 +133,12 @@ h1 { #donate-links .donate-button { display: inline-block; min-width: 10em; - background: #2A413B; + background: #2a413b; padding: 6px 12px; font-family: Quicksand, Helvetica, Century Gothic, sans-serif; text-decoration: none; font-weight: 700; - color: #FFF; + color: #fff; border-radius: 8px; } -- cgit