community profile and left menu implementation done, not quite working yet

This commit is contained in:
2025-10-16 23:05:34 -06:00
parent 681b30272d
commit 65c739dc57
17 changed files with 412 additions and 72 deletions
+11 -5
View File
@@ -81,11 +81,17 @@
<div class="flex">
<!-- LEFT SIDEBAR -->
<div class="w-48 bg-blue-400 p-2">
{{ .SetScratch("__menu", AmMenu("top")) }}
{{ .SubRender("menu_left.jet") | raw }}
<div class="mb-2 mt-2">&nbsp;</div>
{{ .SetScratch("__menu", AmMenu("fixed")) }}
{{ .SubRender("menu_left.jet") | raw }}
{{ range i, m := amsterdam_leftMenus }}
{{ if i > 0 }}
<div class="mb-2 mt-2">&nbsp;</div>
{{ end }}
{{ .SetScratch("__menu", m) }}
{{ if m.Tag == "community" }}
{{ .SubRender("menu_left_comm.jet") | raw }}
{{ else }}
{{ .SubRender("menu_left.jet") | raw }}
{{ end }}
{{ end }}
</div>
<!-- MAIN CONTENT -->
+31
View File
@@ -0,0 +1,31 @@
{*
* 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 }}
<a href="{{ .Link }}" class="text-blue-700 hover:text-blue-900">{{ .Text }}</a>
{{ end }}
{{ end }}
{{ end }}
{{ if .IsMember() }}
<div class="mb-1">&nbsp;</div>
<div class="mb-1"><a href="/TODO/comm/{{ comm.Alias }}/unjoin">Unjoin</a></div>
{{ end }}
</div>