Go to file
jordi fita mas e128680e9a Split templates and handlers into admin and public
I need to check that the user is an employee (or admin) in
administration handlers, but i do not want to do it for each handler,
because i am bound to forget it.  Thus, i added the /admin sub-path for
these resources.

The public-facing web is the rest of the resources outside /admin, but
for now there is only home, to test whether it works as expected or not.

The public-facing web can not relay on the user’s language settings, as
the guest user has no way to set that.  I would be happy to just use the
Accept-Language header for that, but apparently Google does not use that
header[0], and they give four alternatives: a country-specific domain,
a subdomain with a generic top-level domain (gTLD), subdirectories with
a gTLD, or URL parameters (e.g., site.com?loc=de).

Of the four, Google does not recommend URL parameters, and the customer
is already using subdirectories with the current site, therefor that’s
what i have chosen.

Google also tells me that it is a very good idea to have links between
localized version of the same resources, either with <link> elements,
Link HTTP response headers, or a sitemap file[1]; they are all
equivalent in the eyes of Google.

I have choosen the Link response headers way, because for that i can
simply “augment” ResponseHeader to automatically add these headers when
the response status is 2xx, otherwise i would need to pass down the
original URL path until it reaches the template.

Even though Camper is supposed to be a “generic”, multi-company
application, i think i will stick to the easiest route and write the
templates for just the “first” customer.

[0]: https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites
[1]: https://developers.google.com/search/docs/specialty/international/localized-versions
2023-08-05 03:42:37 +02:00
cmd/camper Allow users to update their profile images 2023-07-28 20:15:09 +02:00
debian Add correct dependencies for camper-sqitch 2023-07-31 16:20:13 +02:00
deploy Add add_campsite_type function and call it from Go with a proper form 2023-08-04 19:59:58 +02:00
pkg Split templates and handlers into admin and public 2023-08-05 03:42:37 +02:00
po Split templates and handlers into admin and public 2023-08-05 03:42:37 +02:00
revert Add add_campsite_type function and call it from Go with a proper form 2023-08-04 19:59:58 +02:00
test Add add_campsite_type function and call it from Go with a proper form 2023-08-04 19:59:58 +02:00
verify Add add_campsite_type function and call it from Go with a proper form 2023-08-04 19:59:58 +02:00
web Split templates and handlers into admin and public 2023-08-05 03:42:37 +02:00
.gitignore Add the skeleton of the web application 2023-07-23 00:11:00 +02:00
Makefile Add Debian package 2023-07-27 20:00:08 +02:00
demo.sql Use HTTP Host to establish the request’s company 2023-08-03 20:21:21 +02:00
go.mod Add the skeleton of the web application 2023-07-23 00:11:00 +02:00
go.sum Add the skeleton of the web application 2023-07-23 00:11:00 +02:00
sqitch.conf Add empty Sqitch configuration anq plan files 2023-07-20 23:43:23 +02:00
sqitch.plan Add add_campsite_type function and call it from Go with a proper form 2023-08-04 19:59:58 +02:00