portfolio categories
This commit is contained in:
parent
d4bcd0d466
commit
68bf4f12e8
236 changed files with 46 additions and 11 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package html
|
||||
|
||||
import "fmt"
|
||||
import "strings"
|
||||
|
||||
templ layout(activePage string) {
|
||||
<!DOCTYPE html>
|
||||
|
|
@ -211,12 +212,19 @@ templ wyrobyHeader(activePage string) {
|
|||
}
|
||||
}
|
||||
|
||||
templ portfolioHeader(activePage string) {
|
||||
func to_url(input string) string {
|
||||
lower_case := strings.ToLower(input)
|
||||
return "portfolio_" + strings.NewReplacer(" ", "_", "ł", "l", "ó", "o").Replace(lower_case)
|
||||
}
|
||||
|
||||
templ portfolioHeader(activePage string, pages []string) {
|
||||
@subnavHeader("Nasze Słodkie Realizacje", "Galeria pasji uwieczniona w kremie i dekoracjach. Zobacz wybrane projekty, które uświetniły wyjątkowe chwile naszych klientów – od bajkowych tortów dla dzieci po eleganckie torty weselne.") {
|
||||
@GreenLink(activePage, "portfolio_ciasta", "Ciasta")
|
||||
@GreenLink(activePage, "portfolio_deserki", "Deserki")
|
||||
@GreenLink(activePage, "portfolio_torty", "Torty")
|
||||
@GreenLink(activePage, "portfolio_slodkie_stoly", "Słodkie stoły")
|
||||
@GreenLink(activePage, "portfolio_lody", "Lody")
|
||||
for i, name := range pages {
|
||||
if i == 0 {
|
||||
@GreenLink(activePage, "portfolio", name)
|
||||
} else {
|
||||
@GreenLink(activePage, to_url(name), name)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue