Files
amsterdam/ui/views/top.jet
T

68 lines
2.8 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/.
*}
<div class="flex">
<!-- Content Area -->
<div class="flex-1 p-4">
{{ if .CurrentUser().IsAnon }}
<!-- Welcome Section -->
<div class="mb-8">
<h1 class="text-blue-800 text-4xl font-bold mb-2">Welcome to Amsterdam</h1>
<hr class="border-2 border-gray-400 w-4/5 mb-4">
<p class="text-black text-sm mb-4">
Welcome to the <strong>Amsterdam Web Communities System</strong>. To get the most out of this site, you should log in or create an account, using one of the links above.
</p>
</div>
{{ end }}
<!-- Front Page Posts Section -->
<div>
<h2 class="text-blue-800 text-4xl font-bold mb-2">Latest from the Conferences</h2>
<hr class="border-2 border-gray-400 w-4/5 mb-4">
{{ user := "" }}
{{ text := "" }}
{{ topic := nil }}
{{ link := "" }}
{{ range i, p := posts }}
{{ user = post_getUserName(p, .) }}
{{ text = post_getText(p, .) }}
{{ topic = post_topic(p, .) }}
{{ link = post_topicLink(topic, .) }}
<div class="text-black text-sm">
<div class="mb-2">
<strong>{{ p.Pseud | raw }}</strong>
(<em>
<a href="/user/{{ user }}" target="_blank" class="text-blue-700 hover:text-blue-900">{{ user }}</a>,
{{ DisplayDateTime(p.Posted, .) }}</em>)
</em>)
</div>
<pre class="mb-4 amsPost whitespace-pre-wrap">{{ text | postRewrite | raw }}</pre>
<div class="text-xs mb-8 italic">
(From the topic: <a href="/go/{{ link }}" class="text-blue-700 hover:text-blue-900">{{ topic.Name | raw }}</a>)
</div>
</div>
{{ end }}
</div>
</div>
<!-- RIGHT SIDEBAR -->
<div class="w-80 p-4">
{{ range i, s := sideboxes }}
{{ .SetScratch("__sidebox", s) }}
{{ include s.TemplateName }}
{{ end }}
{{ if !.CurrentUser().IsAnon }}
<div class="text-center">
<a href="/TODO/config-sideboxes"
class="bg-gray-600 hover:bg-gray-700 text-white px-4 py-2 rounded text-sm font-medium transition-colors inline-block">Configure</a>
</div>
{{ end }}
</div>
</div>