Documentation ¶
Overview ¶
Req: go 1.16 or later (embed.FS is N/A on Go 1.15 or lower versions)
Index ¶
- Constants
- func GetAppLogo(asPath bool) string
- func GetClientBwLogo(bw string, asPath bool) string
- func GetClientOSLogo(os string, asPath bool) string
- func GetGolangLogo(asPath bool) string
- func GetMaintenanceLogo(asPath bool) string
- func GetOSLogo(asPath bool) string
- func GetProxyLogo(proxyIpPort string, asPath bool) string
- func GetServerLogo(asPath bool) string
- func GetSfLogo(asPath bool) string
- func HtmlStandaloneFaviconTemplate(titleText string, headHtml string, bodyHtml string, favicon string) string
- func HtmlStandaloneTemplate(titleText string, headHtml string, bodyHtml string) string
- func HtmlStatusPage(titleText string, messageText string, displayAuthLogo bool) string
- func ReadWebAsset(path string) string
Constants ¶
View Source
const ( VERSION string = "r.20241031.1532" LAST_MODIFIED_DATE_TIME string = "2024-10-31 14:07:08" // must be UTC time, (string) assets last modified ; UPDATE THIS AFTER EACH TIME THE ASSETS ARE MODIFIED ! CACHED_EXP_TIME_SECONDS uint32 = 8 * 3600 // (int) cache time of assets ; 8h DEBUG bool = false )
View Source
const ( TEXT_CONTENT_HEADER string = "text/plain; charset=" + smart.CHARSET // keep separate, can be used also by HTTP Headers: Content-Type HTML_CONTENT_HEADER string = "text/html; charset=" + smart.CHARSET // keep separate, can be used also by HTTP Headers: Content-Type HTML_META_FAVICON string = `<link rel="icon" href="data:,">` HTML_META_VIEWPORT string = `<meta name="viewport" content="width=device-width, initial-scale=1.0">` HTML_META_CHAREQUIV string = `<meta charset="` + smart.CHARSET + `"><meta http-equiv="Content-Type" content="` + HTML_CONTENT_HEADER + `">` TAG_CSS_START string = `<link rel="stylesheet" type="text/css" href="data:text/css,` TAG_CSS_END string = `">` TAG_JS_START string = `<script src="data:application/javascript,` TAG_JS_END string = `"></script>` HTML_TPL_STATUS string = `<!DOCTYPE html> <!-- TPL.SmartGo.STATUS --> <html> <head> ` + HTML_META_CHAREQUIV + ` ` + HTML_META_FAVICON + ` <title>[###TITLE-TEXT|html###]</title> ` + HTML_META_VIEWPORT + ` <style> * { font-family: 'IBM Plex Sans', 'Noto Sans', arial, sans-serif; font-smooth: always; } hr { height:1px; border:none 0; border-top:1px solid #CCCCCC; } div.message { line-height: 36px; text-align: left; font-size: 1.25rem; font-weight: bold; font-style: normal; padding-left: 16px; padding-right: 16px; padding-top: 12px; padding-bottom: 8px; margin-top: 8px; margin-bottom: 8px; max-width: calc(100% - 10px) !important; min-width: 100px; min-height: 40px; height: auto !important; border-radius: 5px; box-sizing: content-box !important; opacity: 1 !important; background-color: #C62828 !important; color: #FFFFFF !important; } </style> </head> <body> <h1 style="display:inline; font-size:4rem; color:#333333;">[###TITLE-TEXT|html###]</h1> <br> <br> <hr> <div class="message">[###MESSAGE-TEXT|html|nl2br###]</div> <hr> <small id="server-signature"><b>Smart.Framework.Go</b> :: WebApp</small> <div align="right" title="` + smart.COPYRIGHT + `">[###FOOTER-HTML###]</div> <br> </body> </html> <!-- #end TPL --> ` HTML_TPL_DEF string = `<!DOCTYPE html> <!-- TPL.SmartGo.DEF --> <html> <head> ` + HTML_META_CHAREQUIV + ` ` + HTML_META_FAVICON + ` <title>[###TITLE|html###]</title> ` + HTML_META_VIEWPORT + ` [:::HEAD-CSS-JS:::] [###HEAD-HTML###] </head> <body> [###BODY-HTML###] </body> </html> <!-- #end TPL --> ` HTML_TPL_FAVICON_DEF string = `<!DOCTYPE html> <!-- TPL.SmartGo.FAV.DEF --> <html> <head> ` + HTML_META_CHAREQUIV + ` ` + `<link rel="icon" href="[###FAVICON|html###]">` + ` <title>[###TITLE|html###]</title> ` + HTML_META_VIEWPORT + ` [:::HEAD-CSS-JS:::] [###HEAD-HTML###] </head> <body> [###BODY-HTML###] </body> </html> <!-- #end TPL --> ` )
Variables ¶
This section is empty.
Functions ¶
func GetAppLogo ¶
func GetClientBwLogo ¶
func GetClientOSLogo ¶
func GetGolangLogo ¶
func GetMaintenanceLogo ¶
func GetProxyLogo ¶
func GetServerLogo ¶
func HtmlStandaloneTemplate ¶
func HtmlStatusPage ¶
func ReadWebAsset ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.