From c7bce42b8b51fc379899beb07cd568185f75117d Mon Sep 17 00:00:00 2001 From: Rael Monge Date: Tue, 11 Jun 2024 19:01:35 -0600 Subject: [PATCH] Adding the pricing page --- core/routes.go | 12 + core/templates.go | 1 + static/css/style.css | 6 + templates/base.html | 9 + templates/pricing_list.html | 758 ++++++++++++++++++++++++++++++++++++ 5 files changed, 786 insertions(+) create mode 100644 templates/pricing_list.html diff --git a/core/routes.go b/core/routes.go index d3a2e65..f846d3d 100644 --- a/core/routes.go +++ b/core/routes.go @@ -64,6 +64,7 @@ func (s *Service) RegisterRoutes() { s.eg.GET("/member/confirm", s.OrgMemberConfirmation).Name = s.RouteName("org_member_confirmation") s.eg.GET("/q/:hash", s.QRRedirect).Name = s.RouteName("qr_redirect") s.eg.GET("/tour", s.FeatureTour).Name = s.RouteName("feature_tour") + s.eg.GET("/pricing", s.PricingList).Name = s.RouteName("pricing_list") s.eg.GET("/note/:hash", s.NoteDetail).Name = s.RouteName("note_detail") s.eg.GET("/link/:hash", s.OrgLinkDetail).Name = s.RouteName("link_detail") s.eg.GET("/click/:hash", s.OrgLinkRedirect).Name = s.RouteName("link_redirect") @@ -332,6 +333,17 @@ func (s *Service) Homepage(c echo.Context) error { } +func (s *Service) PricingList(c echo.Context) error { + lt := localizer.GetSessionLocalizer(c) + pd := localizer.NewPageData(lt.Translate("Pricing List")) + pd.Data["organizations"] = lt.Translate("Organizations") + + gmap := gobwebs.Map{ + "pd": pd, + } + return links.Render(c, http.StatusOK, "pricing_list.html", gmap) +} + func (s *Service) FeatureTour(c echo.Context) error { lt := localizer.GetSessionLocalizer(c) pd := localizer.NewPageData(lt.Translate("Explore Features")) diff --git a/core/templates.go b/core/templates.go index 6e54dd2..df31f27 100644 --- a/core/templates.go +++ b/core/templates.go @@ -28,6 +28,7 @@ func AddGlobalTmpl(c echo.Context) gobwebs.Map { lt := localizer.GetSessionLocalizer(c) pd.Data["store_dashboard"] = lt.Translate("Store Dashboard") pd.Data["tour"] = lt.Translate("Tour") + pd.Data["pricing"] = lt.Translate("Pricing") pd.Data["bookmarks"] = lt.Translate("Bookmarks") pd.Data["recent"] = lt.Translate("Recent") pd.Data["popular"] = lt.Translate("Popular") diff --git a/static/css/style.css b/static/css/style.css index d9eefa0..2d223f4 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -856,3 +856,9 @@ a.bullet-link:before { max-width: 95%; max-height: 95%; } + +#price_table > thead th { + position: sticky; + top: 0; + background-color: white; +} diff --git a/templates/base.html b/templates/base.html index d54e980..1101790 100644 --- a/templates/base.html +++ b/templates/base.html @@ -54,6 +54,14 @@ {{.base_pd.Data.tour}} +
  • + + + + + {{.base_pd.Data.pricing}} + +
  • @@ -223,6 +231,7 @@