diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f936f3..f3fcf1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # v0.21.0 * Removed "style-disabled" property and GetDisabledStyle function +* Added GoogleFonts field to AppParams # v0.20.0 diff --git a/application.go b/application.go index dca8c8d..a4907f2 100644 --- a/application.go +++ b/application.go @@ -59,6 +59,11 @@ type AppParams struct { // The countdown begins after the OnPause event arrives. // If the value of this property is less than or equal to 0 then the socket is not closed. SocketAutoClose int + + // GoogleFonts - url of Google fonts included in the application. For example, adding two fonts: "Open Sans" and "Roboto" + // + // GoogleFonts : "https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" + GoogleFonts string } func getStartPage(buffer *strings.Builder, params AppParams) { @@ -83,7 +88,18 @@ func getStartPage(buffer *strings.Builder, params AppParams) { buffer.WriteString(` - + `) + + if params.GoogleFonts != "" { + buffer.WriteString(` + + + `) + } + + buffer.WriteString(`