Files
amsterdam/ui/views/menu_left_comm.jet
T

31 lines
1.2 KiB
Plaintext

{*
* Amsterdam Web Communities System
* Copyright (c) 2025 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/.
*}
{{ menu := .GetScratch("__menu") }}
{{ comm := .CurrentCommunity() }}
<div class="mb-2 mt-2">
<div class="mb-1">
<img src="/img/builtin/default-community.jpg"
alt="{{ comm.Name }}" class="w-28 h-16 rounded">
</div>
<div class="font-bold mb-1">{{ menu.Title }}</div>
{{ ctxt := . }}
{{ range menu.Items }}
{{ if .Show(ctxt) }}
{{ if .Disabled }}
<div class="text-gray-500 mb-1">{{ .Text }}</div>
{{ else }}
<div class="mb-1"><a href="{{ .Link }}" class="text-blue-700 hover:text-blue-900">{{ .Text }}</a></div>
{{ end }}
{{ end }}
{{ end }}
{{ if .IsMember() && !.IsMemberLocked() }}
<div class="mb-1"><a href="/TODO/comm/{{ comm.Alias }}/unjoin" class="text-red-700 hover:text-red-900">⚠️ Unjoin</a></div>
{{ end }}
</div>