Files
amsterdam/ui/views/frame.jet
T

126 lines
5.2 KiB
Plaintext

{*
* Amsterdam Web Communities System
* Copyright (c) 2025-2026 Erbosoft Metaverse Design Solutions, All Rights Reserved
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*}
{{ import "block_leftmenus.jet" }}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ .FrameTitle() | raw }} - {{ GlobalConfig.Site.Title }}</title>
<link rel="icon" href="{{ GlobalConfig.Site.SiteIcon.Path }}" type="{{ GlobalConfig.Site.SiteIcon.Type }}" />
<link rel="shortcut icon" href="{{ GlobalConfig.Site.SiteShortcutIcon }}" />
{{ range k, v := .FrameMetadata(0) }}
<meta http-equiv="{{ k }}" content="{{ v }}">
{{ end }}
{{ if __debugMode }}
<script src="https://cdn.tailwindcss.com"></script>
{{ else }}
{* TODO - replace with reference to generated Tailwind CSS file *}
<script src="https://cdn.tailwindcss.com"></script>
{{ end }}
<link rel="stylesheet" href="/static/css/ams_style.css" />
</head>
<body class="bg-blue-400 font-sans">
<!-- PAGE HEADER -->
<div class="bg-blue-600 w-full">
<div class="flex items-center justify-between px-2 py-2">
<!-- Site Logo -->
<div class="w-1/5">
<a href="/"><img src="{{ GlobalConfig.Site.SiteLogo }}" alt="{{ GlobalConfig.Site.Title }}" class="w-35 h-20 mx-2 my-2"></a>
</div>
<!-- Navigation Links -->
<div class="w-2/5 text-center">
<div class="text-white font-bold text-base mb-2">
<a href="/" class="text-yellow-300 hover:text-yellow-400">Front Page</a>
</div>
<div class="text-white font-bold text-base">
<a href="/TODO/help" class="text-yellow-300 hover:text-yellow-400">Help</a>
<span class="mx-2">|</span>
<a href="/find" class="text-yellow-300 hover:text-yellow-400">Find</a>
</div>
</div>
<!-- Banner Ad -->
<div class="w-2/5 flex justify-end">
{{ p := __bannerad.ResolvePath() }}
{{ if p != "" }}
{{ if isset(__bannerad.LinkURL) }}
<a href="{{ __bannerad.LinkURL }}"><img src="{{ p }}" {{ if isset(__bannerad.Caption) }}alt="{{ __bannerad.Caption }}"{{ end }} class="w-96 h-15 mx-2 my-2"></a>
{{ else }}
<img src="{{ p }}" {{ if isset(__bannerad.Caption) }}alt="{{ __bannerad.Caption }}"{{ end }} class="w-96 h-15 mx-2 my-2">
{{ end }}
{{ else }}
&nbsp;
{{ end }}
</div>
</div>
<!-- Login Section -->
<div class="bg-blue-600 text-center py-2">
<span class="text-white text-base">
{{ if .CurrentUser().IsAnon }}
You are not logged in
{{ if !isset(__suppressLogin) }}
<span class="mx-2">-</span>
<a href="/login" class="text-yellow-300 hover:text-yellow-400">Log In</a>
<span class="mx-2">|</span>
<a href="/newacct" class="text-yellow-300 hover:text-yellow-400">Create Account</a>
{{ end }}
{{ else }}
You are logged in as <b>{{ .CurrentUser().Username }}</b>
{{ if !isset(__suppressLogin) }}
<span class="mx-2">-</span>
<a href="/logout" class="text-yellow-300 hover:text-yellow-400">Log Out</a>
{{ if !.CurrentUser().VerifyEMail }}
<span class="mx-2">|</span>
<a href="/verify" class="text-yellow-300 hover:text-yellow-400">Verify E-Mail</a>
{{ end }}
<span class="mx-2">|</span>
<a href="/profile" class="text-yellow-300 hover:text-yellow-400">Profile</a>
{{ end }}
{{ end }}
</span>
</div>
</div>
<!-- MAIN CONTENT AREA -->
<div class="flex">
<!-- LEFT SIDEBAR -->
<div class="w-48 bg-blue-400 p-2">
{{ range i, m := __leftMenus }}
{{ if i > 0 }}
<div class="mb-2 mt-2">&nbsp;</div>
{{ end }}
{{ if m.Tag == "community" }}
{{ yield leftCommunityMenu(menu=m) }}
{{ else }}
{{ yield leftMenu(menu=m) }}
{{ end }}
{{ end }}
</div>
<!-- MAIN CONTENT -->
<div class="flex-1 bg-white">
{{ include __innerPage }}
</div>
</div>
<!-- FOOTER -->
<div class="flex">
<div class="w-48 bg-blue-400">&nbsp;</div>
<div class="flex-1 bg-white p-4">
<hr class="border-gray-400 w-4/5 mx-auto mb-4">
{{ include GlobalConfig.Site.FooterTemplate }}
</div>
</div>
</body>
</html>