73 lines
3.1 KiB
Plaintext
73 lines
3.1 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
|
|
*}
|
|
<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">{{ GlobalConfig.Site.WelcomeTitle | raw }}</h1>
|
|
<hr class="border-2 border-gray-400 w-4/5 mb-4">
|
|
<p class="text-black text-sm mb-4">{{ GlobalConfig.Site.WelcomeMessage | raw }}</p>
|
|
</div>
|
|
{{ end }}
|
|
|
|
<!-- Front Page Posts Section -->
|
|
<div>
|
|
<h2 class="text-blue-800 text-4xl font-bold mb-2">{{ GlobalConfig.Site.TopPostsTitle | raw }}</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 _, s := sideboxes }}
|
|
<div class="mb-4">
|
|
<div class="bg-blue-600 px-2 py-1 rounded-t">
|
|
<h3 class="text-white font-bold text-base">{{ if .CurrentUser().IsAnon }}{{ s.TitleAnon }}{{ else }}{{ s.Title }}{{ end }}:</h3>
|
|
</div>
|
|
<div class="bg-blue-400 px-2 py-2 rounded-b">
|
|
{{ include s.TemplateName }}
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
{{ if !.CurrentUser().IsAnon }}
|
|
<div class="text-center">
|
|
<a href="/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> |