StatiCSharp.Theme.Foundation 0.2.0

Additional Details

Bug! The font used in the theme is loaded over the Google Fonts API. Make this clear to your website visitors (data privacy). The new version, 0.2.1, provides the font directly from your host, just like it was meant to be in this version.

There is a newer version of this package available.
See the version list below for details.
dotnet add package StatiCSharp.Theme.Foundation --version 0.2.0                
NuGet\Install-Package StatiCSharp.Theme.Foundation -Version 0.2.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="StatiCSharp.Theme.Foundation" Version="0.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add StatiCSharp.Theme.Foundation --version 0.2.0                
#r "nuget: StatiCSharp.Theme.Foundation, 0.2.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install StatiCSharp.Theme.Foundation as a Cake Addin
#addin nuget:?package=StatiCSharp.Theme.Foundation&version=0.2.0

// Install StatiCSharp.Theme.Foundation as a Cake Tool
#tool nuget:?package=StatiCSharp.Theme.Foundation&version=0.2.0                

Foundation

A theme for StatiC#, a static webside generator written in C#.
Supports light and dark mode.

Installation

Add Foundation to your StatiC# project as a package reference in the .csproj file:

<ItemGroup>
    <PackageReference Include="StatiCSharp.Theme.Foundation" Version="0.2.0" />
</ItemGroup>

Build your project to restore packages.
You can then import Foundation at the top of your Program.cs and inject the theme to StatiC#'s website generating process by initializing a new FoundationHtmlFactory:

using StatiCSharp;
using Foundation;

var myAwesomeWebsite = new Website(
    url: "https://yourdomain.com",
    name: "My Awesome Website",
    description: @"Description of your website",
    language: "en-US",
    sections: "posts, about"
);

var theme = new FoundationHtmlFactory(website: myAwesomeWebsite);
// Set up social icon here if needed.

var manager = new WebsiteManager(
    website: myAwesomeWebsite,
    htmlFactory: theme,                 // Here Foundation is injected to the generating process.
    source: @"/path/to/your/project"
);

await manager.Make();

To set the portrait image on the index page, provide a me.jpg image in the root of your Resources directory.

Advanced settings

You can configure Foundation after initializing FoundationHtmlFactory to show social icons on the top right corner of your website. Set the property to the target page of your social networks.

theme.Email = "mailto:mail@yourdomain.com";
theme.Facebook = "https://facebook.com/yourName";

Foundation currently supports social icons for E-Mail, LinkedIn, GitHub, Facebook, Twitter, Instagram, YouTube and Teams.

To set legal notice and/or privacy links in the footer use:

theme.LegalNotice = "/your/logalNoticePage";
theme.Privacy = "/your/privacyPage";
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 2,878 12/3/2023
1.0.0 707 1/16/2023
0.3.0 789 12/24/2022
0.2.1 807 10/15/2022
0.2.0 844 10/9/2022 0.2.0 is deprecated.
0.1.0 849 8/14/2022 0.1.0 is deprecated because it is no longer maintained.

Foundation is now completely compatible with StatiC# 0.2.
A social icon for Twitter was added.