laget.Templates
1.1.49
Prefix Reserved
See the version list below for details.
dotnet add package laget.Templates --version 1.1.49
NuGet\Install-Package laget.Templates -Version 1.1.49
<PackageReference Include="laget.Templates" Version="1.1.49" />
paket add laget.Templates --version 1.1.49
#r "nuget: laget.Templates, 1.1.49"
// Install laget.Templates as a Cake Addin #addin nuget:?package=laget.Templates&version=1.1.49 // Install laget.Templates as a Cake Tool #tool nuget:?package=laget.Templates&version=1.1.49
laget.Templates
A simple template framework utilizing Handlebars.Net...
Usage
Templates
- Default
Properties
Club
Provides branding information about the club and is mandatory.
Id
club id.Badge
club emblem.Color
club primary and secondary colors.Name
club name.
Hero
The hero is the header section that provides the emblem and the name of the club as well as a title and a massage.
Title (optional)
Message (optional)
Constructor properties
{
Margin = "0px",
Padding = "30px"
}
Style
Provides the ability to configure the styling of the block, not all
blocks
,teasers
andelements
support all style properties.
public class Style
{
[JsonProperty("background-color")]
public string BackgroundColor { get; set; }
[JsonProperty("border-radius")]
public string BorderRadius { get; set; } = "0px";
public string Color { get; set; } = "#ffffff";
[JsonProperty("font-family")]
public string FontFamily { get; set; } = "Helvetica, Verdana, sans-serif";
[JsonProperty("font-size")]
public string FontSize { get; set; } = "14px";
public string Height { get; set; }
[JsonProperty("line-height")]
public string LineHeight { get; set; } = "100%";
public string Margin { get; set; } = "0 0 0 0";
[JsonProperty("max-height")]
public string MaxHeight { get; set; } = "auto";
[JsonProperty("max-width")]
public string MaxWidth { get; set; } = "auto";
[JsonProperty("min-width")]
public string MinWidth { get; set; } = "auto";
[JsonProperty("min-height")]
public string MinHeight { get; set; } = "auto";
public string Padding { get; set; }
[JsonProperty("text-align")]
public string TextAlign { get; set; } = "initial";
[JsonProperty("text-decoration")]
public string TextDecoration { get; set; } = "none";
public string Width { get; set; }
}
Blocks
Button
A simple button with a solid background.
Message
Url
Constructor properties
{
BackgroundColor = "#000000",
BorderRadius = "0px",
Color = "#ffffff",
FontSize = "14px",
LineHeight = "150%",
MinWidth = "145px",
Padding = "10px",
TextAlign = "center",
Width = "280px"
}
Link
A simple link.
Message
Url
Constructor properties
{
Color = "#0099ff",
Margin = "initial",
Padding = "initial",
TextAlign = "initial",
TextDecoration = "none"
}
Separator
Height
Simple
A simple block containing a title and a message.
Title
Message
Constructor properties
{
Margin = "0px",
Padding = "0px"
}
Teasers
Applications
This provides a teaser that show links to our mobile applications for Google Android and Apple iOS.
Example
var club = new Club
{
Id = 67347,
Badge = "https://az729104.cdn.laget.se/emblem_8378582.png?w=160&h=40&mode=max&scale=both&anchor=middlecenter",
Color = new Color
{
Primary = "#1c252b",
Secondary = "#ff6a00"
},
Name = "FC GonAce"
};
var data = new Template(club)
{
Hero = new Hero
{
Title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
Message = "Donec a risus augue. Cras ac blandit nibh. Donec fermentum erat massa, ut porta mauris scelerisque ut. Nullam in mauris nulla. Pellentesque gravida nulla vel luctus consequat."
},
Blocks = new List<Block>
{
new Simple
{
Title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
Message = "Donec a risus augue. Cras ac blandit nibh. Donec fermentum erat massa, ut porta mauris scelerisque ut. Nullam in mauris nulla. Pellentesque gravida nulla vel luctus consequat."
},
new Separator(height: 25),
new Simple
{
Title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
Message = "Donec a risus augue. Cras ac blandit nibh. Donec fermentum erat massa, ut porta mauris scelerisque ut. Nullam in mauris nulla. Pellentesque gravida nulla vel luctus consequat."
},
new Separator(height: 25),
new Button(background: "#ff6a00", padding: "15px 20px", width: "auto")
{
Text = "Gå till insamlingen: Insamling till FC GonAce",
Url = "https://insamling.laget.se/FCGonAce/2"
}
},
Teasers = new List<Teaser>
{
new Applications()
},
Footer = new List<Link>
{
new Link
{
Text = "Support",
Url = "https://www.laget.se"
},
new Link
{
Text = "Inställningar",
Url = "https://www.laget.se"
}
}
};
var factory = new Factory()
.WithTemplate(Enums.Template.Default);
var html = factory.Compile(_data);
Result
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. 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 is compatible. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Handlebars.Net (>= 2.1.4)
- Handlebars.Net.Helpers (>= 2.4.1.4)
- Newtonsoft.Json (>= 13.0.3)
-
.NETStandard 2.1
- Handlebars.Net (>= 2.1.4)
- Handlebars.Net.Helpers (>= 2.4.1.4)
- Newtonsoft.Json (>= 13.0.3)
-
net6.0
- Handlebars.Net (>= 2.1.4)
- Handlebars.Net.Helpers (>= 2.4.1.4)
- Newtonsoft.Json (>= 13.0.3)
-
net8.0
- Handlebars.Net (>= 2.1.4)
- Handlebars.Net.Helpers (>= 2.4.1.4)
- Newtonsoft.Json (>= 13.0.3)
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.54 | 66 | 10/22/2024 |
1.1.53 | 109 | 9/3/2024 |
1.1.52 | 126 | 6/3/2024 |
1.1.51 | 616 | 5/6/2024 |
1.1.50 | 126 | 4/5/2024 |
1.1.49 | 1,583 | 1/20/2024 |
1.1.47 | 1,576 | 11/22/2023 |
1.1.45 | 171 | 9/4/2023 |
1.1.44 | 154 | 7/3/2023 |
1.1.42 | 241 | 4/3/2023 |
1.1.41 | 257 | 3/10/2023 |
1.0.40 | 238 | 3/6/2023 |
1.0.38 | 254 | 2/6/2023 |
1.0.37 | 306 | 1/2/2023 |
1.0.36 | 324 | 12/12/2022 |
1.0.35 | 292 | 12/5/2022 |
1.0.34 | 331 | 11/7/2022 |
1.0.29 | 441 | 5/2/2022 |
1.0.28 | 475 | 4/4/2022 |
1.0.27 | 438 | 4/4/2022 |
1.0.26 | 445 | 3/16/2022 |
1.0.25 | 426 | 3/7/2022 |
1.0.23 | 433 | 2/7/2022 |
1.0.21 | 421 | 1/17/2022 |
1.0.20 | 402 | 1/17/2022 |
1.0.19 | 422 | 1/14/2022 |
1.0.18 | 291 | 1/3/2022 |
1.0.17 | 287 | 12/13/2021 |
1.0.14 | 730 | 8/16/2021 |
1.0.13 | 334 | 8/13/2021 |
1.0.12 | 1,276 | 7/1/2021 |
1.0.8 | 403 | 6/30/2021 |
1.0.7 | 471 | 6/24/2021 |
1.0.6 | 342 | 6/23/2021 |
1.0.5 | 349 | 6/21/2021 |
1.0.3 | 348 | 6/21/2021 |
1.0.1 | 362 | 6/21/2021 |