mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-15 15:30:26 +00:00
This is hopefully the final part of PR #4767, rebased and squashed. More thorough federation tests are at https://code.forgejo.org/forgejo/end-to-end/pulls/1276 but the mock has been extended to hopefully cover a good chunk as well. Co-authored-by: Gergely Nagy <forgejo@gergo.csillger.hu> Co-authored-by: Michael Jerger <michael.jerger@meissa-gmbh.de> Co-authored-by: zam <mirco.zachmann@meissa.de> Co-authored-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10380 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: famfo <famfo@famfo.xyz> Co-committed-by: famfo <famfo@famfo.xyz>
50 lines
2.3 KiB
Go HTML Template
50 lines
2.3 KiB
Go HTML Template
<!DOCTYPE html>
|
|
<html lang="{{ctx.Locale.Lang}}" data-theme="{{ThemeName .SignedUser}}">
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
{{/* Display `- .Repository.FullName` only if `.Title` does not already start with that. */}}
|
|
<title>{{if .Title}}{{.Title}} - {{end}}{{if and (.Repository.Name) (not (StringUtils.HasPrefix .Title .Repository.FullName))}}{{.Repository.FullName}} - {{end}}{{AppDisplayName}}</title>
|
|
<link rel="manifest" href="/manifest.json">
|
|
<meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}">
|
|
<meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}">
|
|
<meta name="keywords" content="{{MetaKeywords}}">
|
|
<meta name="referrer" content="strict-origin">
|
|
{{if .GoGetImport}}
|
|
<meta name="go-import" content="{{.GoGetImport}} git {{.RepoCloneLink.HTTPS}}">
|
|
<meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
|
|
{{end}}
|
|
{{if and .EnableFeed .FeedURL}}
|
|
<link rel="alternate" type="application/atom+xml" title="" href="{{.FeedURL}}.atom">
|
|
<link rel="alternate" type="application/rss+xml" title="" href="{{.FeedURL}}.rss">
|
|
{{end}}
|
|
<link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.svg" type="image/svg+xml">
|
|
<link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png">
|
|
{{if and FederationEnabled .PageIsUserProfile .ContextUser .ContextUser.IsIndividual}}
|
|
<link rel="alternate" type="application/activity+json" href="{{.ContextUser.APActorID}}">
|
|
{{end}}
|
|
{{template "base/head_script" .}}
|
|
{{template "shared/user/mention_highlight" .}}
|
|
{{template "base/head_opengraph" .}}
|
|
{{template "base/head_style" .}}
|
|
{{template "custom/header" .}}
|
|
</head>
|
|
<body class="no-js" hx-swap="outerHTML" hx-ext="morph" hx-push-url="false">
|
|
{{template "custom/body_outer_pre" .}}
|
|
|
|
<div class="full height">
|
|
<noscript>
|
|
<div class="tw-ml-2 tw-mr-2 tw-text-center tw-text-text-light-2">{{ctx.Locale.Tr "enable_javascript"}}</div>
|
|
</noscript>
|
|
|
|
{{template "custom/body_inner_pre" .}}
|
|
|
|
{{if not .PageIsInstall}}
|
|
{{template "base/head_navbar" .}}
|
|
{{end}}
|
|
|
|
{{if false}}
|
|
{{/* to make html structure "likely" complete to prevent IDE warnings */}}
|
|
</div>
|
|
</body>
|
|
</html>
|
|
{{end}}
|