From a866af906013713ba4537e985c6704b079abdb0b Mon Sep 17 00:00:00 2001 From: Max Nullov Date: Thu, 27 Feb 2025 13:54:37 +0300 Subject: [PATCH] Adding new information about gitea --- web/static/styling/basic-styling.templ | 2 + web/static/styling/basic-styling_templ.go | 2 + web/templates/blog.templ | 2 + web/templates/blog_templ.go | 12 +++--- web/templates/index.templ | 8 +++- web/templates/index_templ.go | 46 ++++++++++++++++++++++- 6 files changed, 64 insertions(+), 8 deletions(-) diff --git a/web/static/styling/basic-styling.templ b/web/static/styling/basic-styling.templ index ec1ca35..8672427 100644 --- a/web/static/styling/basic-styling.templ +++ b/web/static/styling/basic-styling.templ @@ -130,5 +130,7 @@ css BlogHeadingRight() { css BubbleContainer() { background-color: {bgVariation}; + padding: 5px; + margin: 5px; border-radius: 10px; } \ No newline at end of file diff --git a/web/static/styling/basic-styling_templ.go b/web/static/styling/basic-styling_templ.go index e72a335..18f9d25 100644 --- a/web/static/styling/basic-styling_templ.go +++ b/web/static/styling/basic-styling_templ.go @@ -228,6 +228,8 @@ func BlogHeadingRight() templ.CSSClass { func BubbleContainer() templ.CSSClass { templ_7745c5c3_CSSBuilder := templruntime.GetBuilder() templ_7745c5c3_CSSBuilder.WriteString(string(templ.SanitizeCSS(`background-color`, bgVariation))) + templ_7745c5c3_CSSBuilder.WriteString(`padding:5px;`) + templ_7745c5c3_CSSBuilder.WriteString(`margin:5px;`) templ_7745c5c3_CSSBuilder.WriteString(`border-radius:10px;`) templ_7745c5c3_CSSID := templ.CSSID(`BubbleContainer`, templ_7745c5c3_CSSBuilder.String()) return templ.ComponentCSSClass{ diff --git a/web/templates/blog.templ b/web/templates/blog.templ index 152db98..304071d 100644 --- a/web/templates/blog.templ +++ b/web/templates/blog.templ @@ -84,6 +84,7 @@ templ postBlockSeo(post repositories.Post) { + {post.Header} @@ -108,6 +109,7 @@ templ blogBlockSeo() { + nullmax17's blog diff --git a/web/templates/blog_templ.go b/web/templates/blog_templ.go index b14c548..690e018 100644 --- a/web/templates/blog_templ.go +++ b/web/templates/blog_templ.go @@ -319,14 +319,14 @@ func postBlockSeo(post repositories.Post) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\"><meta property=\"og:type\" content=\"website\"><title>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var19 string templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(post.Header) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/blog.templ`, Line: 88, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/blog.templ`, Line: 89, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19)) if templ_7745c5c3_Err != nil { @@ -369,7 +369,7 @@ func blogBlockSeo() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "<meta name=\"description\" content=\"Блог nullmax17\"><meta http-equiv=\"Content-Language\" content=\"ru\"><meta name=\"robots\" content=\"index, follow\"><meta property=\"og:title\" content=\"Персональный блог nullmax17\"><meta property=\"og:description\" content=\"Блог какого-то программиста в котором он делится своими знаниями.\"><meta property=\"og:url\" content=\"https://dixxe.top/blog\"><title>nullmax17's blog") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "nullmax17's blog") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -435,7 +435,7 @@ func ShowPost(post repositories.Post) templ.Component { var templ_7745c5c3_Var24 string templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(post.Header) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/blog.templ`, Line: 123, Col: 20} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/blog.templ`, Line: 125, Col: 20} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24)) if templ_7745c5c3_Err != nil { @@ -574,7 +574,7 @@ func ShowBlogPage(posts []repositories.Post) templ.Component { var templ_7745c5c3_Var34 string templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(posts[i].Header) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/blog.templ`, Line: 144, Col: 32} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/blog.templ`, Line: 146, Col: 32} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) if templ_7745c5c3_Err != nil { @@ -597,7 +597,7 @@ func ShowBlogPage(posts []repositories.Post) templ.Component { var templ_7745c5c3_Var35 string templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(shortStr, " ")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/blog.templ`, Line: 156, Col: 62} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/blog.templ`, Line: 158, Col: 62} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35)) if templ_7745c5c3_Err != nil { diff --git a/web/templates/index.templ b/web/templates/index.templ index ab9fb48..8113ae0 100644 --- a/web/templates/index.templ +++ b/web/templates/index.templ @@ -72,7 +72,13 @@ templ IndexPage() {

More stuff from me

- Personal blog + + +
diff --git a/web/templates/index_templ.go b/web/templates/index_templ.go index 10f75a0..c7703f2 100644 --- a/web/templates/index_templ.go +++ b/web/templates/index_templ.go @@ -306,7 +306,51 @@ func IndexPage() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" style=\"font-family: Disket-Mono;\">More stuff from mePersonal blog") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" style=\"font-family: Disket-Mono;\">More stuff from me") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var26 = []any{styling.BubbleContainer()} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var26...) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "
Personal Blog
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var28 = []any{styling.BubbleContainer()} + templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var28...) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "
Self-hosted public gitea instance
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }