Finished copy button, Improved opengraph, Updated scripts
Update sidebar.php, composer.php, and 13 more files...
This commit is contained in:
@@ -35,15 +35,11 @@ function printSidebarEntry($url, $title, $icon, $activeId) {
|
|||||||
?>
|
?>
|
||||||
<hr class="subtle">
|
<hr class="subtle">
|
||||||
<?php
|
<?php
|
||||||
printSidebarEntry(l10n_url_abs('/content/'), localize("sidebar.text.projects"), "fad fa-briefcase", "content");
|
//printSidebarEntry(l10n_url_abs('/content/'), localize("sidebar.text.projects"), "fad fa-briefcase", "content");
|
||||||
|
printSidebarEntry(l10n_url_abs('/content/?tags=application;web'), localize("sidebar.text.applications"), "fad fa-browser", "application");
|
||||||
|
printSidebarEntry(l10n_url_abs('/content/?tags=library'), localize("sidebar.text.libraries"), "fad fa-puzzle-piece", "library");
|
||||||
|
//printSidebarEntry(l10n_url_abs('/content/?tags=electronic'), localize("sidebar.text.electronics"), "fad fa-microchip", "electronic");
|
||||||
?>
|
?>
|
||||||
<div class="ml-m">
|
|
||||||
<?php
|
|
||||||
printSidebarEntry(l10n_url_abs('/content/?tags=application'), localize("sidebar.text.applications"), "fad fa-browser", "application");
|
|
||||||
printSidebarEntry(l10n_url_abs('/content/?tags=library'), localize("sidebar.text.libraries"), "fad fa-puzzle-piece", "library");
|
|
||||||
printSidebarEntry(l10n_url_abs('/content/?tags=electronic'), localize("sidebar.text.electronics"), "fad fa-microchip", "electronic");
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
<?php
|
<?php
|
||||||
//<hr class="subtle">
|
//<hr class="subtle">
|
||||||
//printSidebarEntry(l10n_url_abs('/tools/'), localize("sidebar.text.tools"), "fad fa-tools", "tools");
|
//printSidebarEntry(l10n_url_abs('/tools/'), localize("sidebar.text.tools"), "fad fa-tools", "tools");
|
||||||
@@ -51,14 +47,10 @@ function printSidebarEntry($url, $title, $icon, $activeId) {
|
|||||||
<hr class="subtle">
|
<hr class="subtle">
|
||||||
<?php
|
<?php
|
||||||
printSidebarEntry(l10n_url_abs('/links/'), localize("sidebar.text.links"), "fad fa-link", "links");
|
printSidebarEntry(l10n_url_abs('/links/'), localize("sidebar.text.links"), "fad fa-link", "links");
|
||||||
|
printSidebarEntry("https://files.nibblepoker.lu/", localize("sidebar.text.downloads"), "fad fa-download", "");
|
||||||
|
//printSidebarEntry("https://git.nibblepoker.lu/", localize("sidebar.text.gitea"), "fad fa-code", "");
|
||||||
|
//printSidebarEntry("https://wiki.nibblepoker.lu/", localize("sidebar.text.wiki"), "fad fa-books", "");
|
||||||
?>
|
?>
|
||||||
<div class="ml-m">
|
|
||||||
<?php
|
|
||||||
printSidebarEntry("https://files.nibblepoker.lu/", localize("sidebar.text.downloads"), "fad fa-download", "");
|
|
||||||
//printSidebarEntry("https://git.nibblepoker.lu/", localize("sidebar.text.gitea"), "fad fa-code", "");
|
|
||||||
//printSidebarEntry("https://wiki.nibblepoker.lu/", localize("sidebar.text.wiki"), "fad fa-books", "");
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
<hr class="subtle">
|
<hr class="subtle">
|
||||||
<?php
|
<?php
|
||||||
printSidebarEntry(l10n_url_abs('/about/'), localize("sidebar.text.about"), "fad fa-user", "about");
|
printSidebarEntry(l10n_url_abs('/about/'), localize("sidebar.text.about"), "fad fa-user", "about");
|
||||||
|
@@ -777,8 +777,11 @@ class ComposerElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($this->codeCopyable) {
|
if($this->codeCopyable) {
|
||||||
$htmlCode .= '<div class="wedge wedge-tr primary js-code-copy border border-t-0 border-r-0 rbl-m rtr-s p-xxxs px-xs wedge-shadow" hidden>';
|
//border-t-0 border-r-0
|
||||||
$htmlCode .= '<i class="fad fa-copy"></i> ' . localize("common.action.copy");
|
$htmlCode .= '<div class="wedge wedge-tr primary js-code-copy border rbl-m rtr-s p-xxxs px-xs" hidden>';
|
||||||
|
$htmlCode .= '<i class="fad fa-copy"></i> ';
|
||||||
|
$htmlCode .= '<span>' . localize("common.action.copy") . '</span>';
|
||||||
|
$htmlCode .= '<span hidden>' . localize("common.action.copied") . '</span>';
|
||||||
$htmlCode .= '</div>';
|
$htmlCode .= '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
"common.action.copy": "Copy"
|
"common.action.copy": "Copy",
|
||||||
|
"common.action.copied": "Copied"
|
||||||
}
|
}
|
@@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
"common.action.copy": "Copier"
|
"common.action.copy": "Copier",
|
||||||
|
"common.action.copied": "Copié"
|
||||||
}
|
}
|
@@ -46,6 +46,9 @@ if($contentManager->hasError) {
|
|||||||
// Remark: The 'glider' and 'highlight.js' stylesheets are included here.
|
// Remark: The 'glider' and 'highlight.js' stylesheets are included here.
|
||||||
include 'commons/DOM/head.php';
|
include 'commons/DOM/head.php';
|
||||||
|
|
||||||
|
$content_head_image = $host_uri . "/resources/NibblePoker/images/logos/v2_opengraph.png";
|
||||||
|
$content_head_image_type = "image/png";
|
||||||
|
|
||||||
// Preparing values for the head's tags.
|
// Preparing values for the head's tags.
|
||||||
if ($contentManager->hasError) {
|
if ($contentManager->hasError) {
|
||||||
$content_head_title = localize("content.error.head.title");
|
$content_head_title = localize("content.error.head.title");
|
||||||
@@ -63,6 +66,36 @@ if($contentManager->hasError) {
|
|||||||
$content->get_head_title() .
|
$content->get_head_title() .
|
||||||
localize("content.item.og.title.suffix");
|
localize("content.item.og.title.suffix");
|
||||||
$content_head_og_description = $content->get_head_description();
|
$content_head_og_description = $content->get_head_description();
|
||||||
|
|
||||||
|
if(!is_null($content->metadata->opengraph->image)) {
|
||||||
|
$content_head_image = $host_uri . $content->metadata->opengraph->image;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!is_null($content->metadata->opengraph->image_type)) {
|
||||||
|
$content_head_image_type = $content->metadata->opengraph->image_type;
|
||||||
|
} else {
|
||||||
|
switch(pathinfo($content_head_image, PATHINFO_EXTENSION)) {
|
||||||
|
case "png":
|
||||||
|
$content_head_image_type = "image/png";
|
||||||
|
break;
|
||||||
|
case "jpg":
|
||||||
|
case "jpeg":
|
||||||
|
$content_head_image_type = "image/jpeg";
|
||||||
|
break;
|
||||||
|
case "gif":
|
||||||
|
$content_head_image_type = "image/gif";
|
||||||
|
break;
|
||||||
|
case "svg":
|
||||||
|
$content_head_image_type = "image/svg+xml";
|
||||||
|
break;
|
||||||
|
case "webp":
|
||||||
|
$content_head_image_type = "image/webp";
|
||||||
|
break;
|
||||||
|
case "apng":
|
||||||
|
$content_head_image_type = "image/apng";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
} elseif($contentManager->displayType == ContentDisplayType::SEARCH) {
|
} elseif($contentManager->displayType == ContentDisplayType::SEARCH) {
|
||||||
$content_head_title = localize("content.search.head.title");
|
$content_head_title = localize("content.search.head.title");
|
||||||
$content_head_description = localize("content.search.head.description");
|
$content_head_description = localize("content.search.head.description");
|
||||||
@@ -77,8 +110,8 @@ if($contentManager->hasError) {
|
|||||||
<meta property="og:title" content="<?php echo($content_head_og_title); ?>"/>
|
<meta property="og:title" content="<?php echo($content_head_og_title); ?>"/>
|
||||||
<meta property="og:type" content="website"/>
|
<meta property="og:type" content="website"/>
|
||||||
<meta property="og:url" content="<?php echo($host_uri . l10n_url_abs('/')); ?>"/>
|
<meta property="og:url" content="<?php echo($host_uri . l10n_url_abs('/')); ?>"/>
|
||||||
<meta property="og:image" content="<?php echo($host_uri); ?>/resources/NibblePoker/images/logos/v2_opengraph.png"/>
|
<meta property="og:image" content="<?php echo($content_head_image); ?>"/>
|
||||||
<meta property="og:image:type" content="image/png"/>
|
<meta property="og:image:type" content="<?php echo($content_head_image_type); ?>"/>
|
||||||
<meta property="og:description" content="<?php echo($content_head_og_description); ?>"/>
|
<meta property="og:description" content="<?php echo($content_head_og_description); ?>"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@@ -92,7 +92,7 @@
|
|||||||
"description": "meta.description",
|
"description": "meta.description",
|
||||||
"type": null,
|
"type": null,
|
||||||
"url": null,
|
"url": null,
|
||||||
"image": null,
|
"image": "/resources/NibblePoker/images/content/circuitpython-ebyte-e32/main.png",
|
||||||
"image_type": null
|
"image_type": null
|
||||||
},
|
},
|
||||||
"article": {
|
"article": {
|
||||||
|
@@ -44,7 +44,7 @@
|
|||||||
"description": "meta.description",
|
"description": "meta.description",
|
||||||
"type": null,
|
"type": null,
|
||||||
"url": null,
|
"url": null,
|
||||||
"image": null,
|
"image": "/resources/NibblePoker/images/content/dotnet-arguments/main.png",
|
||||||
"image_type": null
|
"image_type": null
|
||||||
},
|
},
|
||||||
"article": {
|
"article": {
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
"description": "meta.description",
|
"description": "meta.description",
|
||||||
"type": null,
|
"type": null,
|
||||||
"url": null,
|
"url": null,
|
||||||
"image": null,
|
"image": "/resources/NibblePoker/images/content/excel-password-remover/excel-password-remover.png",
|
||||||
"image_type": null
|
"image_type": null
|
||||||
},
|
},
|
||||||
"article": {
|
"article": {
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
"improvements.title": "Improvements over PB-ListComPort",
|
"improvements.title": "Improvements over PB-ListComPort",
|
||||||
"improvements.1": "Switched from PureBasic to .NET 6.0.",
|
"improvements.1": "Switched from PureBasic to .NET 6.0.",
|
||||||
"improvements.2": "Improved a lot of the program's logic.",
|
"improvements.2": "Improved a lot of the program's logic.",
|
||||||
"improvements.3": "Added the <code>-h/--short-help</code>.",
|
"improvements.3": "Added the <code>-H/--short-help</code>.",
|
||||||
"improvements.4": "Added support for Windows ARM & ARM64.",
|
"improvements.4": "Added support for Windows ARM & ARM64.",
|
||||||
"improvements.5": "Support for running without a console.",
|
"improvements.5": "Support for running without a console.",
|
||||||
"usage.title": "Usage",
|
"usage.title": "Usage",
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
"improvements.title": "Améliorations",
|
"improvements.title": "Améliorations",
|
||||||
"improvements.1": "Changement de PureBasic vers .NET 6.0.",
|
"improvements.1": "Changement de PureBasic vers .NET 6.0.",
|
||||||
"improvements.2": "Amélioration de la logique interne du programme.",
|
"improvements.2": "Amélioration de la logique interne du programme.",
|
||||||
"improvements.3": "Ajout de l'option <code>-h/--short-help</code>.",
|
"improvements.3": "Ajout de l'option <code>-H/--short-help</code>.",
|
||||||
"improvements.4": "Support pour Windows ARM et ARM64.",
|
"improvements.4": "Support pour Windows ARM et ARM64.",
|
||||||
"improvements.5": "Support pour le lancement sans invité de commande.",
|
"improvements.5": "Support pour le lancement sans invité de commande.",
|
||||||
"usage.title": "Utilisation",
|
"usage.title": "Utilisation",
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
"description": "meta.description",
|
"description": "meta.description",
|
||||||
"type": null,
|
"type": null,
|
||||||
"url": null,
|
"url": null,
|
||||||
"image": null,
|
"image": "/resources/NibblePoker/images/content/lscom/lscom-v2-text-01-bkgd-cli.png",
|
||||||
"image_type": null
|
"image_type": null
|
||||||
},
|
},
|
||||||
"article": {
|
"article": {
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
"description": "meta.description",
|
"description": "meta.description",
|
||||||
"type": null,
|
"type": null,
|
||||||
"url": null,
|
"url": null,
|
||||||
"image": null,
|
"image": "/resources/NibblePoker/images/content/lscom/lscom-legacy-simple.png",
|
||||||
"image_type": null
|
"image_type": null
|
||||||
},
|
},
|
||||||
"article": {
|
"article": {
|
||||||
|
@@ -62,7 +62,7 @@
|
|||||||
"description": "meta.description",
|
"description": "meta.description",
|
||||||
"type": null,
|
"type": null,
|
||||||
"url": null,
|
"url": null,
|
||||||
"image": null,
|
"image": "/resources/NibblePoker/images/content/mc-expanded-iron-bundles/item-icon.png",
|
||||||
"image_type": null
|
"image_type": null
|
||||||
},
|
},
|
||||||
"article": {
|
"article": {
|
||||||
|
@@ -66,7 +66,7 @@
|
|||||||
"description": "meta.description",
|
"description": "meta.description",
|
||||||
"type": null,
|
"type": null,
|
||||||
"url": null,
|
"url": null,
|
||||||
"image": null,
|
"image": "/resources/NibblePoker/images/content/yaa/icon-final.png",
|
||||||
"image_type": null
|
"image_type": null
|
||||||
},
|
},
|
||||||
"article": {
|
"article": {
|
||||||
|
@@ -42,7 +42,24 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
eCodeCopyButton.onclick = function() {
|
eCodeCopyButton.onclick = function() {
|
||||||
|
const eCodeCopySpans = eCodeCopyButton.querySelectorAll("span");
|
||||||
|
|
||||||
navigator.clipboard.writeText(code);
|
navigator.clipboard.writeText(code);
|
||||||
|
|
||||||
|
if(eCodeCopySpans.length < 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const eSpanCopy = eCodeCopySpans[0];
|
||||||
|
const eSpanCopied = eCodeCopySpans[1];
|
||||||
|
|
||||||
|
eSpanCopy.hidden = true;
|
||||||
|
eSpanCopied.hidden = false;
|
||||||
|
|
||||||
|
fadeOut(eSpanCopied, 600).then(r => {
|
||||||
|
eSpanCopy.hidden = false;
|
||||||
|
eSpanCopied.hidden = true;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
eCodeCopyButton.hidden = false;
|
eCodeCopyButton.hidden = false;
|
||||||
|
@@ -45,6 +45,7 @@
|
|||||||
audioPurr.volume = 0.075;
|
audioPurr.volume = 0.075;
|
||||||
try {
|
try {
|
||||||
audioPurr.load();
|
audioPurr.load();
|
||||||
|
audioPurr.loop = true;
|
||||||
audioPurr.play();
|
audioPurr.play();
|
||||||
} catch(DOMException) {
|
} catch(DOMException) {
|
||||||
}
|
}
|
||||||
|
@@ -14,6 +14,5 @@ window.addEventListener('load', function() {
|
|||||||
}).mount();
|
}).mount();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log("Unable to setup Splide !");
|
console.log("Unable to setup Splide !");
|
||||||
console.log(err);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user