wip: 🔕 temporary commit

This commit is contained in:
Paramtamtam 2024-06-28 16:55:06 +04:00
parent 2776c41e0d
commit a759504971
No known key found for this signature in database
GPG Key ID: 366371698FAD0A2B
10 changed files with 287 additions and 9 deletions

View File

@ -317,13 +317,18 @@ func (cmd *command) Run(ctx context.Context, log *logger.Logger, cfg *config.Con
// url=https%3A%2F%2Ferror-pages.goatcounter.com%2Fcounter%2F%2Fuse-template%2Flost-in-space.json
// &query=%24.count&label=Used%20times)
go func() {
var tpl = url.QueryEscape(cfg.TemplateName)
req, reqErr := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf(
"https://error-pages.goatcounter.com/count?event=true&p=/use-template/%s", url.QueryEscape(cfg.TemplateName),
// https://www.goatcounter.com/help/pixel
"https://error-pages.goatcounter.com/count?e=true&p=/use-template/%s&t=%s", tpl, tpl,
), http.NoBody)
if reqErr != nil {
return
}
req.Header.Set("User-Agent", "error-pages") // by default, the User-Agent is "Go-http-client/x.x"
resp, respErr := (&http.Client{Timeout: 10 * time.Second}).Do(req) //nolint:mnd // don't care about the response
if respErr != nil {
log.Debug("Cannot send a request to increment the template usage counter", logger.Error(respErr))

View File

@ -500,7 +500,7 @@
</script>
<!-- {{- if l10n_enabled -}} -->
<script> // {{ l10nScript }}</script>
<script>// {{ l10nScript }}</script>
<!-- {{- end -}} -->
</body>
</html>

View File

@ -157,7 +157,7 @@
<!-- {{- end -}} -->
<!-- {{- if l10n_enabled -}} -->
<script> // {{ l10nScript }}</script>
<script>// {{ l10nScript }}</script>
<!-- {{- end -}} -->
</body>
</html>

View File

@ -456,7 +456,7 @@
</script>
<!-- {{- if l10n_enabled -}} -->
<script> // {{ l10nScript }}</script>
<script>// {{ l10nScript }}</script>
<!-- {{- end -}} -->
</body>
</html>

View File

@ -243,7 +243,7 @@
</article>
<!-- {{- if l10n_enabled -}} -->
<script> // {{ l10nScript }}</script>
<script>// {{ l10nScript }}</script>
<!-- {{- end -}} -->
</body>
</html>

View File

@ -180,7 +180,7 @@
</main>
<!-- {{- if l10n_enabled -}} -->
<script> // {{ l10nScript }}</script>
<script>// {{ l10nScript }}</script>
<!-- {{- end -}} -->
</body>
</html>

View File

@ -165,7 +165,7 @@
</main>
<!-- {{- if l10n_enabled -}} -->
<script> // {{ l10nScript }}</script>
<script>// {{ l10nScript }}</script>
<!-- {{- end -}} -->
</body>
</html>

View File

@ -449,7 +449,7 @@
</main>
<!-- {{- if l10n_enabled -}} -->
<script> // {{ l10nScript }}</script>
<script>// {{ l10nScript }}</script>
<!-- {{- end -}} -->
</body>
</html>

273
templates/orient.html Normal file

File diff suppressed because one or more lines are too long

View File

@ -261,7 +261,7 @@
</script>
<!-- {{- if l10n_enabled -}} -->
<script> // {{ l10nScript }}</script>
<script>// {{ l10nScript }}</script>
<!-- {{- end -}} -->
</body>
</html>