added static file handling for a custom stylesheet that puts the highlights on links in Amsterdam posts
This commit is contained in:
@@ -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/.
|
||||
*/
|
||||
|
||||
// Package ui holds the support for the Amsterdam user interface, wrapping Echo and Jet templates.
|
||||
package ui
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
//go:embed static/*
|
||||
var static_data embed.FS
|
||||
|
||||
// AmStaticFileHandler returns a handler for the files in the static embedded filesystem.
|
||||
func AmStaticFileHandler() echo.HandlerFunc {
|
||||
fsys, err := fs.Sub(static_data, "static")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return echo.WrapHandler(http.StripPrefix("/static/", http.FileServer(http.FS(fsys))))
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* 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/.
|
||||
*/
|
||||
pre.amsPost a {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(29 78 216 / var(--tw-text-opacity, 1));
|
||||
text-decoration: underline;
|
||||
}
|
||||
@@ -18,6 +18,7 @@
|
||||
<meta http-equiv="refresh" content="{{ GlobalConfig.Site.TopRefresh }}">
|
||||
{{ end }}
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link rel="stylesheet" href="/static/css/ams_style.css" />
|
||||
</head>
|
||||
|
||||
<body class="bg-blue-400 font-sans">
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<!-- Preview Display -->
|
||||
<div class="bg-white border-2 border-blue-300 rounded-lg p-6 mb-6">
|
||||
<pre class="font-mono text-sm whitespace-pre-wrap break-words">{{ previewPb | raw }}</pre>
|
||||
<pre class="amsPost font-mono text-sm whitespace-pre-wrap break-words">{{ previewPb | raw }}</pre>
|
||||
</div>
|
||||
|
||||
<hr class="border-gray-400 mb-6">
|
||||
|
||||
Reference in New Issue
Block a user