aboutsummaryrefslogtreecommitdiff
path: root/lib/MasterWebInterface/Util/Layout.pm
diff options
context:
space:
mode:
authorDarkelarious <github@333networks.com>2025-03-08 15:56:30 +0100
committerDarkelarious <github@333networks.com>2025-03-08 15:56:30 +0100
commit6bd235f3e62251d8763a552ab0042d59584de842 (patch)
tree2ff943b6ddb8aa8980a3ed1fb4a1f869fc787d1c /lib/MasterWebInterface/Util/Layout.pm
parent318a5a20a930192df788dbac54b1f9c60e1b98b8 (diff)
downloadWebInterface-Perl-6bd235f3e62251d8763a552ab0042d59584de842.tar.gz
WebInterface-Perl-6bd235f3e62251d8763a552ab0042d59584de842.zip
Metadata and update to hotfix 4.
Display thumbnails / snippets in 3rd party apps (like discord) and add map thumbnails + icons for multiple games. Minor fixes/optimisations.
Diffstat (limited to 'lib/MasterWebInterface/Util/Layout.pm')
-rwxr-xr-xlib/MasterWebInterface/Util/Layout.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/MasterWebInterface/Util/Layout.pm b/lib/MasterWebInterface/Util/Layout.pm
index fe7b5c5..4862f93 100755
--- a/lib/MasterWebInterface/Util/Layout.pm
+++ b/lib/MasterWebInterface/Util/Layout.pm
@@ -18,9 +18,18 @@ sub htmlHeader
title "$o{title} :: $self->{site_name} masterserver";
Link type => 'image/x-icon', rel => 'shortcut icon', href => "/favicon.ico";
Link type => "text/css", rel => 'stylesheet', href => "/style/$self->{style}/style.css", media => "all";
+
+ # metadata for previews
+ meta property => "theme-color", content => ($self->{meta_color} // "#111111");
+ meta property => "og:type", content => "website";
+ meta property => "og:site_name", content => $self->{site_name};
+ meta property => "og:title", content => substr($o{title},0,50);
+ meta property => "og:description", content => ($o{meta_desc} // "");
+ meta property => "og:image", content => ($o{meta_img } // "/map/default/333networks.jpg");
+
if ( $o{noindex} )
{
- meta name => 'robots', content => 'noindex,nofollow,nosnippet,noodp,noarchive,noimageindex';end;
+ meta name => 'robots', content => 'noindex,nofollow,nosnippet,noodp,noarchive,noimageindex';
}
end 'head';