website

Code for the bare sturcture of concealed.world.
git clone git://git.concealed.world/website
Log | Files | Refs | README | LICENSE

commit 328e36b4ce43a6ac2d60cdbb27861b2f740cc7a5
parent cde85c0b075da0b3137f0f5dd02e431deaa57292
Author: Nixx <nixx@firemail.cc>
Date:   Tue, 26 Jan 2021 23:15:43 +0000

Add og:image

Diffstat:
Mincludes/start.php | 18+++++++++++++++++-
Mstyles/default.css | 5+++++
2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/includes/start.php b/includes/start.php @@ -1,5 +1,5 @@ <?php - require $root."includes/start-meta.php"; + include $root."includes/start-meta.php"; echo '<link rel="stylesheet" href="'.$root.'styles/default.css" />'; $usragent=$_SERVER['HTTP_USER_AGENT']; if (!strpos($usragent, 'PaleMoon') !== false && $_COOKIE['scrollbar'] !== "true") { @@ -9,5 +9,21 @@ } echo '<link rel="stylesheet" href="'.$root.'styles/fonts.css" />'; echo '<link rel="stylesheet" href="'.$root.'styles/cursor.css" />'; + echo '<meta property="og:url" content="'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http")."://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'" />'; + if ($_GET['post']) { + $ogtype = 'article'; + $ogtitle = file_get_contents('./'.$_GET['post']); + $ogtitle = explode('<h1>', $ogtitle)[1]; + $ogtitle = explode('</h1', $ogtitle)[0]; + } else { + $ogtype = 'website'; + $ogtitle = $title; + } + echo '<meta property="og:type" content="'.$ogtype.'" />'; + echo '<meta property="og:title" content="'.$ogtitle.'" />'; + echo '<meta property="og:image" content="/images/banner.gif" />'; + echo '<meta property="og:image:type" content="image/gif" />'; + echo '<meta property="og:image:width" content="240" />'; + echo '<meta property="og:image:height" content="60" />'; echo '</head>'; ?> diff --git a/styles/default.css b/styles/default.css @@ -79,6 +79,11 @@ input[type="submit" i] { width: 240px; } +.bannerlarge { + border: none; + max-width: 100%; +} + .aside, .article, .section, .mobilemenu { background: var(--bg-col); padding: 10px;