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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package html
|
||||
|
||||
templ Portfolio(images []string) {
|
||||
templ Portfolio(images []string, activePage string, pages []string) {
|
||||
@layout("portfolio") {
|
||||
<main>
|
||||
@portfolioHeader("portfolio")
|
||||
@portfolioHeader(activePage, pages)
|
||||
<section>
|
||||
<div id="portfolio-grid">
|
||||
for _, img := range images {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue