@ -462,7 +462,7 @@ func listCoursesLearning(containers []CategoryContainer) templ.Component {
return templ_7745c5c3_Err
}
for _ , subcategory := range container . Subcategories {
templ_7745c5c3_Err = listCoursesThematicRow ( subcategory ) . Render ( ctx , templ_7745c5c3_Buffer )
templ_7745c5c3_Err = listCoursesThematicRow ( container . ID , subcategory) . Render ( ctx , templ_7745c5c3_Buffer )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -479,7 +479,7 @@ func listCoursesLearning(containers []CategoryContainer) templ.Component {
} )
}
func listCoursesThematicRow ( subcategory SubcategoryContainer ) templ . Component {
func listCoursesThematicRow ( categoryID string , subcategory SubcategoryContainer ) templ . Component {
return templ . ComponentFunc ( func ( ctx context . Context , templ_7745c5c3_W io . Writer ) ( templ_7745c5c3_Err error ) {
templ_7745c5c3_Buffer , templ_7745c5c3_IsBuffer := templ_7745c5c3_W . ( * bytes . Buffer )
if ! templ_7745c5c3_IsBuffer {
@ -492,34 +492,43 @@ func listCoursesThematicRow(subcategory SubcategoryContainer) templ.Component {
templ_7745c5c3_Var20 = templ . NopComponent
}
ctx = templ . ClearChildren ( ctx )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "<div class=\"block second-class-group\"><h2 class=\"title\">" )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "<div class=\"block second-class-group\"><h2 class=\"title\"><a href=\" " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21 , templ_7745c5c3_Err = templ . JoinStringErrs ( subcategory . Name )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` internal/kurious/ports/http/bootstrap/list.templ ` , Line : 126 , Col : 38 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var21 ) )
var templ_7745c5c3_Var21 templ . SafeURL = templ . SafeURL ( "/courses/" + categoryID + "/" + subcategory . ID )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( string ( templ_7745c5c3_Var21 ) ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "</h2><p >" )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "\" class=\"text-decoration-none\" >" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Var22 := ` В категогрии `
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . Write String ( templ_7745c5c3_Var22 )
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22 , templ_7745c5c3_Err = templ. Join StringErrs ( subcategory . Name )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` internal/kurious/ports/http/bootstrap/list.templ ` , Line : 128 , Col : 22 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var22 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23 , templ_7745c5c3_Err = templ . JoinStringErrs ( subcategory . Name )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( " <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-arrow-up-right-square\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"M15 2a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1zM0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm5.854 8.803a.5.5 0 1 1-.708-.707L9.243 6H6.475a.5.5 0 1 1 0-1h3.975a.5.5 0 0 1 .5.5v3.975a.5.5 0 1 1-1 0V6.707z\"></path></svg></a></h2><p class=\"visually-hidden\">" )
if templ_7745c5c3_Err != nil {
return templ. Error { Err : templ_7745c5c3_Err , FileName : ` internal/kurious/ports/http/bootstrap/list.templ ` , Line : 127 , Col : 47 }
return templ_7745c5c3_Err
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var23 ) )
templ_7745c5c3_Var23 := ` В категогрии `
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ_7745c5c3_Var23 )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24 , templ_7745c5c3_Err = templ . JoinStringErrs ( subcategory . Name )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` internal/kurious/ports/http/bootstrap/list.templ ` , Line : 134 , Col : 71 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var24 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -527,17 +536,17 @@ func listCoursesThematicRow(subcategory SubcategoryContainer) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Var24 := ` собраны `
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ_7745c5c3_Var24 )
templ_7745c5c3_Var25 := ` собраны `
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ_7745c5c3_Var25 )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25 , templ_7745c5c3_Err = templ . JoinStringErrs ( strconv . Itoa ( subcategory . Count ) )
var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26 , templ_7745c5c3_Err = templ . JoinStringErrs ( strconv . Itoa ( subcategory . Count ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` internal/kurious/ports/http/bootstrap/list.templ ` , Line : 127 , Col : 98 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` internal/kurious/ports/http/bootstrap/list.templ ` , Line : 134 , Col : 122 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var25 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var26 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -545,8 +554,8 @@ func listCoursesThematicRow(subcategory SubcategoryContainer) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Var26 := ` курсов. Раз в неделю мы обновляем информацию о всех курсах. `
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ_7745c5c3_Var26 )
templ_7745c5c3_Var27 := ` курсов. Раз в неделю мы обновляем информацию о всех курсах. `
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ_7745c5c3_Var27 )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -600,17 +609,17 @@ func listCoursesCard(info CourseInfo) templ.Component {
defer templ . ReleaseBuffer ( templ_7745c5c3_Buffer )
}
ctx = templ . InitializeContext ( ctx )
templ_7745c5c3_Var27 := templ . GetChildren ( ctx )
if templ_7745c5c3_Var27 == nil {
templ_7745c5c3_Var27 = templ . NopComponent
templ_7745c5c3_Var28 := templ . GetChildren ( ctx )
if templ_7745c5c3_Var28 == nil {
templ_7745c5c3_Var28 = templ . NopComponent
}
ctx = templ . ClearChildren ( ctx )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( "<div class=\"col\"><div class=\"card h-100\">" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var28 = [ ] any { "card-img-top" }
templ_7745c5c3_Err = templ . RenderCSSItems ( ctx , templ_7745c5c3_Buffer , templ_7745c5c3_Var28 ... )
var templ_7745c5c3_Var29 = [ ] any { "card-img-top" }
templ_7745c5c3_Err = templ . RenderCSSItems ( ctx , templ_7745c5c3_Buffer , templ_7745c5c3_Var29 ... )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -626,7 +635,7 @@ func listCoursesCard(info CourseInfo) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ . CSSClasses ( templ_7745c5c3_Var28 ) . String ( ) ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ . CSSClasses ( templ_7745c5c3_Var29 ) . String ( ) ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -634,8 +643,8 @@ func listCoursesCard(info CourseInfo) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var29 = [ ] any { "card-body" , cardTextSize ( ) , "row" }
templ_7745c5c3_Err = templ . RenderCSSItems ( ctx , templ_7745c5c3_Buffer , templ_7745c5c3_Var29 ... )
var templ_7745c5c3_Var30 = [ ] any { "card-body" , cardTextSize ( ) , "row" }
templ_7745c5c3_Err = templ . RenderCSSItems ( ctx , templ_7745c5c3_Buffer , templ_7745c5c3_Var30 ... )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -643,7 +652,7 @@ func listCoursesCard(info CourseInfo) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ . CSSClasses ( templ_7745c5c3_Var29 ) . String ( ) ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ . CSSClasses ( templ_7745c5c3_Var30 ) . String ( ) ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -651,12 +660,12 @@ func listCoursesCard(info CourseInfo) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var30 string
templ_7745c5c3_Var30 , templ_7745c5c3_Err = templ . JoinStringErrs ( info . Name )
var templ_7745c5c3_Var31 string
templ_7745c5c3_Var31 , templ_7745c5c3_Err = templ . JoinStringErrs ( info . Name )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` internal/kurious/ports/http/bootstrap/list.templ ` , Line : 151 , Col : 38 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` internal/kurious/ports/http/bootstrap/list.templ ` , Line : 158 , Col : 38 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var30 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var31 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -664,8 +673,8 @@ func listCoursesCard(info CourseInfo) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var31 templ . SafeURL = templ . URL ( info . OriginLink )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( string ( templ_7745c5c3_Var31 ) ) )
var templ_7745c5c3_Var32 templ . SafeURL = templ . URL ( info . OriginLink )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( string ( templ_7745c5c3_Var32 ) ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -673,8 +682,8 @@ func listCoursesCard(info CourseInfo) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Var32 := ` Go! `
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ_7745c5c3_Var32 )
templ_7745c5c3_Var33 := ` Go! `
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ_7745c5c3_Var33 )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -682,12 +691,12 @@ func listCoursesCard(info CourseInfo) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var33 string
templ_7745c5c3_Var33 , templ_7745c5c3_Err = templ . JoinStringErrs ( strconv . Itoa ( info . FullPrice ) )
var templ_7745c5c3_Var34 string
templ_7745c5c3_Var34 , templ_7745c5c3_Err = templ . JoinStringErrs ( strconv . Itoa ( info . FullPrice ) )
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` internal/kurious/ports/http/bootstrap/list.templ ` , Line : 158 , Col : 36 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` internal/kurious/ports/http/bootstrap/list.templ ` , Line : 16 5 , Col : 36 }
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var33 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var34 ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -695,8 +704,8 @@ func listCoursesCard(info CourseInfo) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Var34 := ` rub. `
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ_7745c5c3_Var34 )
templ_7745c5c3_Var35 := ` rub. `
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ_7745c5c3_Var35 )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@ -719,12 +728,12 @@ func ListCourses(pageType PageKind, s stats, params ListCoursesParams) templ.Com
defer templ . ReleaseBuffer ( templ_7745c5c3_Buffer )
}
ctx = templ . InitializeContext ( ctx )
templ_7745c5c3_Var35 := templ . GetChildren ( ctx )
if templ_7745c5c3_Var35 == nil {
templ_7745c5c3_Var35 = templ . NopComponent
templ_7745c5c3_Var36 := templ . GetChildren ( ctx )
if templ_7745c5c3_Var36 == nil {
templ_7745c5c3_Var36 = templ . NopComponent
}
ctx = templ . ClearChildren ( ctx )
templ_7745c5c3_Var36 := templ . ComponentFunc ( func ( ctx context . Context , templ_7745c5c3_W io . Writer ) ( templ_7745c5c3_Err error ) {
templ_7745c5c3_Var37 := templ . ComponentFunc ( func ( ctx context . Context , templ_7745c5c3_W io . Writer ) ( templ_7745c5c3_Err error ) {
templ_7745c5c3_Buffer , templ_7745c5c3_IsBuffer := templ_7745c5c3_W . ( * bytes . Buffer )
if ! templ_7745c5c3_IsBuffer {
templ_7745c5c3_Buffer = templ . GetBuffer ( )
@ -763,7 +772,7 @@ func ListCourses(pageType PageKind, s stats, params ListCoursesParams) templ.Com
}
return templ_7745c5c3_Err
} )
templ_7745c5c3_Err = root ( pageType , s ) . Render ( templ . WithChildren ( ctx , templ_7745c5c3_Var36 ) , templ_7745c5c3_Buffer )
templ_7745c5c3_Err = root ( pageType , s ) . Render ( templ . WithChildren ( ctx , templ_7745c5c3_Var37 ) , templ_7745c5c3_Buffer )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}