testing OGP
This commit is contained in:
parent
63d85cc40e
commit
c0b0231b4d
3 changed files with 17 additions and 1 deletions
|
@ -1,11 +1,18 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html scroll-behavior="smooth">
|
<html scroll-behavior="smooth" prefix="og: https://ogp.me/ns#">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="HandheldFriendly" content="true" />
|
<meta name="HandheldFriendly" content="true" />
|
||||||
<meta name="MobileOptimized" content="320" />
|
<meta name="MobileOptimized" content="320" />
|
||||||
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, width=device-width, user-scalable=no" />
|
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, width=device-width, user-scalable=no" />
|
||||||
|
|
||||||
|
<!--OGP suite-->
|
||||||
|
<meta property="og:title" content="Wynnbuilder" />
|
||||||
|
<meta property="og:type" content="image" />
|
||||||
|
<meta property="og:url" id = "ogp-url" content="" />
|
||||||
|
<meta property="og:image" content="https://i.kym-cdn.com/entries/icons/original/000/037/349/Screenshot_14.jpg" />
|
||||||
|
|
||||||
<!-- nunito font, copying wynndata -->
|
<!-- nunito font, copying wynndata -->
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
|
||||||
|
|
|
@ -1076,3 +1076,4 @@ function init2() {
|
||||||
load_ing_init(init);
|
load_ing_init(init);
|
||||||
}
|
}
|
||||||
load_init(init2);
|
load_init(init2);
|
||||||
|
updateOGP();
|
|
@ -3,6 +3,14 @@ const url_base = getUrl.protocol + "//" + getUrl.host + "/" + getUrl.pathname.sp
|
||||||
|
|
||||||
const zip = (a, b) => a.map((k, i) => [k, b[i]]);
|
const zip = (a, b) => a.map((k, i) => [k, b[i]]);
|
||||||
|
|
||||||
|
//updates all the OGP tags for a webpage. Should be called when build changes
|
||||||
|
function updateOGP() {
|
||||||
|
let url_elem = document.getElementById("ogp-url");
|
||||||
|
if (url_elem) {
|
||||||
|
url_elem.content = url_base + getUrl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function clamp(num, low, high){
|
function clamp(num, low, high){
|
||||||
return Math.min(Math.max(num, low), high);
|
return Math.min(Math.max(num, low), high);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue