mirror of
https://github.com/tarampampam/error-pages.git
synced 2024-08-30 18:22:40 +00:00
wip: 🔕 temporary commit
This commit is contained in:
parent
2776c41e0d
commit
a759504971
@ -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))
|
||||
|
@ -500,7 +500,7 @@
|
||||
</script>
|
||||
|
||||
<!-- {{- if l10n_enabled -}} -->
|
||||
<script> // {{ l10nScript }}</script>
|
||||
<script>// {{ l10nScript }}</script>
|
||||
<!-- {{- end -}} -->
|
||||
</body>
|
||||
</html>
|
||||
|
@ -157,7 +157,7 @@
|
||||
<!-- {{- end -}} -->
|
||||
|
||||
<!-- {{- if l10n_enabled -}} -->
|
||||
<script> // {{ l10nScript }}</script>
|
||||
<script>// {{ l10nScript }}</script>
|
||||
<!-- {{- end -}} -->
|
||||
</body>
|
||||
</html>
|
||||
|
@ -456,7 +456,7 @@
|
||||
</script>
|
||||
|
||||
<!-- {{- if l10n_enabled -}} -->
|
||||
<script> // {{ l10nScript }}</script>
|
||||
<script>// {{ l10nScript }}</script>
|
||||
<!-- {{- end -}} -->
|
||||
</body>
|
||||
</html>
|
||||
|
@ -243,7 +243,7 @@
|
||||
</article>
|
||||
|
||||
<!-- {{- if l10n_enabled -}} -->
|
||||
<script> // {{ l10nScript }}</script>
|
||||
<script>// {{ l10nScript }}</script>
|
||||
<!-- {{- end -}} -->
|
||||
</body>
|
||||
</html>
|
||||
|
@ -180,7 +180,7 @@
|
||||
</main>
|
||||
|
||||
<!-- {{- if l10n_enabled -}} -->
|
||||
<script> // {{ l10nScript }}</script>
|
||||
<script>// {{ l10nScript }}</script>
|
||||
<!-- {{- end -}} -->
|
||||
</body>
|
||||
</html>
|
||||
|
@ -165,7 +165,7 @@
|
||||
</main>
|
||||
|
||||
<!-- {{- if l10n_enabled -}} -->
|
||||
<script> // {{ l10nScript }}</script>
|
||||
<script>// {{ l10nScript }}</script>
|
||||
<!-- {{- end -}} -->
|
||||
</body>
|
||||
</html>
|
||||
|
@ -449,7 +449,7 @@
|
||||
</main>
|
||||
|
||||
<!-- {{- if l10n_enabled -}} -->
|
||||
<script> // {{ l10nScript }}</script>
|
||||
<script>// {{ l10nScript }}</script>
|
||||
<!-- {{- end -}} -->
|
||||
</body>
|
||||
</html>
|
||||
|
273
templates/orient.html
Normal file
273
templates/orient.html
Normal file
File diff suppressed because one or more lines are too long
@ -261,7 +261,7 @@
|
||||
</script>
|
||||
|
||||
<!-- {{- if l10n_enabled -}} -->
|
||||
<script> // {{ l10nScript }}</script>
|
||||
<script>// {{ l10nScript }}</script>
|
||||
<!-- {{- end -}} -->
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user