70 lines
3.0 KiB
Plaintext
70 lines
3.0 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/.
|
|
*
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*}
|
|
{{ block leftMenu(menu) }}
|
|
<div class="mb-2 mt-2">
|
|
{{ if menu.Title != "" }}
|
|
<div class="font-bold mb-1">{{ menu.Title }}</div>
|
|
{{ end }}
|
|
{{ range _, it := menu.Items }}
|
|
{{ if it.Show(.) }}
|
|
{{ if it.Image != "" }}
|
|
{{ if it.Link != "" && !it.Disabled }}
|
|
<div class="mb-1"><a href="{{ it.Link }}"><img src="{{ it.Image }}" alt="{{ it.Text }}"></a></div>
|
|
{{ else }}
|
|
<div class="mb-1"><img src="{{ it.Image }}" alt="{{ it.Text }}"></div>
|
|
{{ end }}
|
|
{{ else }}
|
|
{{ if it.Disabled }}
|
|
<div class="text-gray-500 mb-1">{{ it.Text }}</div>
|
|
{{ else if it.Link != "" }}
|
|
<div class="mb-1"><a href="{{ it.Link }}" class="text-blue-700 hover:text-blue-900">{{ it.Text }}</a></div>
|
|
{{ else }}
|
|
<div class="mb-1">{{ it.Text }}</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
{{ block leftCommunityMenu(menu) }}
|
|
{{ __comm := .CurrentCommunity() }}
|
|
<div class="mb-2 mt-2">
|
|
<div class="mb-1">
|
|
<img src="{{ ExtractCommunityLogo(__comm, .) }}" alt="{{ __comm.Name }}" class="w-28 h-16 rounded">
|
|
</div>
|
|
{{ if menu.Title != "" }}
|
|
<div class="font-bold mb-1">{{ menu.Title }}</div>
|
|
{{ end }}
|
|
{{ range _, it := menu.Items }}
|
|
{{ if it.Show(.) }}
|
|
{{ if it.Image != "" }}
|
|
{{ if it.Link != "" && !it.Disabled }}
|
|
<div class="mb-1"><a href="{{ it.Link }}"><img src="{{ it.Image }}" alt="{{ it.Text }}"></a></div>
|
|
{{ else }}
|
|
<div class="mb-1"><img src="{{ it.Image }}" alt="{{ it.Text }}"></div>
|
|
{{ end }}
|
|
{{ else }}
|
|
{{ if it.Disabled }}
|
|
<div class="text-gray-500 mb-1">{{ it.Text }}</div>
|
|
{{ else if it.Link != "" }}
|
|
<div class="mb-1"><a href="{{ it.Link }}" class="text-blue-700 hover:text-blue-900">{{ it.Text }}</a></div>
|
|
{{ else }}
|
|
<div class="mb-1">{{ it.Text }}</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ if .IsMember() && !.IsMemberLocked() }}
|
|
<div class="mt-4 mb-1"><a href="/comm/{{ __comm.Alias }}/unjoin" class="text-red-700 hover:text-red-900">⚠️ Unjoin</a></div>
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|