forked from Nixius/authelia
1
0
Fork 0

Include remaining template and route changes

Made-with: Cursor
This commit is contained in:
Leopere 2026-03-03 18:11:38 -05:00
parent bbc828fa35
commit bd84b0a578
Signed by: colin
SSH Key Fingerprint: SHA256:nRPCQTeMFLdGytxRQmPVK9VXY3/ePKQ5lGRyJhT5DY8
6 changed files with 31 additions and 1 deletions

View File

@ -25,7 +25,8 @@ type App struct {
func NewRouter(cfg *config.Config, sc *ssstripe.Client, lc *ldap.Client, sw *swarm.Client) http.Handler { func NewRouter(cfg *config.Config, sc *ssstripe.Client, lc *ldap.Client, sw *swarm.Client) http.Handler {
tmplPattern := filepath.Join(cfg.TemplatePath, "pages", "*.html") tmplPattern := filepath.Join(cfg.TemplatePath, "pages", "*.html")
tmpl := template.Must(template.ParseGlob(tmplPattern)) partialsPattern := filepath.Join(cfg.TemplatePath, "partials", "*.html")
tmpl := template.Must(template.Must(template.ParseGlob(partialsPattern)).ParseGlob(tmplPattern))
app := &App{ app := &App{
cfg: cfg, cfg: cfg,

View File

@ -61,6 +61,7 @@
display: block; display: block;
} }
</style> </style>
{{template "analytics"}}
</head> </head>
<body> <body>
<div class="container"> <div class="container">

View File

@ -127,6 +127,7 @@
user-select: all; user-select: all;
} }
</style> </style>
{{template "analytics"}}
</head> </head>
<body> <body>
<div class="header"> <div class="header">

View File

@ -90,6 +90,7 @@
user-select: all; user-select: all;
} }
</style> </style>
{{template "analytics"}}
</head> </head>
<body> <body>
<div class="container"> <div class="container">

View File

@ -143,6 +143,7 @@
cursor: not-allowed; cursor: not-allowed;
} }
</style> </style>
{{template "analytics"}}
</head> </head>
<body> <body>
<div class="container"> <div class="container">

View File

@ -0,0 +1,25 @@
{{define "analytics"}}
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//metrics.nixc.us/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '12']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo -->
<!-- PostHog -->
<script>
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init capture register register_once register_for_session unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group identify setPersonProperties setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroups onFeatureFlags addFeatureFlagsHandler onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey getNextSurveyStep".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
posthog.init('phc_VP3GGVVmRQx2j1PjOvmiznCLuW7YHp1Hvk218FXPsgR', {
api_host: 'https://eu.i.posthog.com',
defaults: '2026-01-30'
})
</script>
<!-- End PostHog -->
{{end}}