Add favicon and og metadata

master
Knah Tsaeb 3 years ago
parent 0b0e23d0da
commit 640419ff02

3
.gitignore vendored

@ -1,4 +1,5 @@
composer.lock
vendor/
content/*
!content/default.md
!content/default.md
.vscode

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

@ -3,12 +3,13 @@
/**
* Améliore la sortie print
*
* @author Tatane http://www.tatane.info/index.php/print_rn
* @author http://www.blog.cactuscrew.com/77-print_rn.html
* @param $data (array) tableau ou variable à examiner
* @param $name (string) nom a afficher
* @return false affiche les clef valeur du tableau $data
* @example n_print($array, 'Tableau de valeur');
* @author Tatane http://www.tatane.info/index.php/print_rn
* @author http://www.blog.cactuscrew.com/77-print_rn.html
* @author Knah Tsaeb <Knah-Tsaeb_mynovi@knah-tsaeb.org>
* @global
* @param mixed $data
* @param string $name Default: ''
* @return void
*/
function n_print($data, $name = '')
{
@ -20,24 +21,54 @@ function n_print($data, $name = '')
echo '</fieldset><br />';
}
/**
* Return list dir of content
*
* @author Knah Tsaeb <Knah-Tsaeb_mynovi@knah-tsaeb.org>
* @global
* @return array
*/
function listDir()
{
$dirList = array();
foreach (glob("content/*", GLOB_ONLYDIR) as $dir) {
$dirList[basename($dir)] = listFile($dir);
}
if (empty($dirList)) {
$dirList = array();
}
return $dirList;
}
/**
* Return list file in dir
*
* @author Knah Tsaeb <Knah-Tsaeb_mynovi@knah-tsaeb.org>
* @global
* @param mixed $dir
* @return mixed
*/
function listFile($dir)
{
$fileList = array();
foreach (glob($dir . "/*.md") as $dir) {
$fileList[] = str_replace('.md', '', basename($dir));
}
if (empty($fileList)) {
$fileList = array();
}
return $fileList;
}
/**
* Gen navigation menu
*
* @author Knah Tsaeb <Knah-Tsaeb_mynovi@knah-tsaeb.org>
* @global
* @param string $getDir Default: null
* @return string
*/
function makeMenu($getDir = null)
{
$dirList = listDir();
@ -63,6 +94,13 @@ function makeMenu($getDir = null)
return $menu;
}
/**
* Add lazy loading attribute for img
*
* @author Knah Tsaeb <Knah-Tsaeb_mynovi@knah-tsaeb.org>
* @see ParsedownToc
* @global
*/
class ExtendParsedownToc extends ParsedownToc
{
public function inlineImage($Excerpt)

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

@ -33,12 +33,12 @@ Put your markdown file in 'content' dir via FTP OR SSH.
That's all.
You can personalize the default page by creating file **content/index.md**.
You can personalize the default start page by creating file **content/index.md**.
### Advanced usage
Use synchronisation tools like NextCloud. Sync 'content' dir with your desktop.
Now just edit your local file and when you save file, after synchro your file is online.
Now just edit your local file and when you save file, after synchro, your file is online.
---

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -1,5 +1,4 @@
/* TEAM */
Chef:Juanjo Bernabeu
Contact: Knah-Tsaeb_mynovi [at] knah-tsaeb.org

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1 @@
<svg version="1" xmlns="http://www.w3.org/2000/svg" width="300" height="300" viewBox="0 0 225.000000 225.000000"><path d="M47.2 4.9c-6.4 2.2-11.7 7-14.5 13.1-1.7 3.6-2.2 7.1-2.5 17.7L29.8 49h-8.4c-7.1 0-8.7.3-10.4 2-2.6 2.6-2.5 4.6.5 7.5C13.7 60.7 14.7 61 22 61h8v25h-8.5c-7.2 0-8.8.3-10.5 2-2.6 2.6-2.5 4.6.5 7.5C13.7 97.7 14.7 98 22 98h8v27h-8.5c-7.2 0-8.8.3-10.5 2-2.6 2.6-2.5 4.6.5 7.5 2.2 2.2 3.2 2.5 10.5 2.5h8v28h-7.9c-4.4 0-8.7.3-9.6.6-2.5 1-3.7 5.1-2.4 7.7 1.8 3.4 2.8 3.7 11.7 3.7H30v10.5c0 5.7.5 12.7 1.1 15.5 1.4 6.6 6.2 12.8 12.4 16.2l5 2.8h74.3c73.6 0 74.3 0 78.7-2.1 2.5-1.2 6.1-4 8.1-6.2 6.7-7.9 6.5-4.7 6.2-103.3l-.3-88.9-2.2-4.1c-1.2-2.2-4-5.7-6.2-7.7-7.5-6.8-6.3-6.7-84.5-6.7-65.4.1-70.5.2-75.4 1.9zM77 112.5V210H64.7c-19.9 0-22.7-2.7-22.7-22.2V176h8.4c7.6 0 8.6-.2 10-2.2 2.3-3.2 2-5.4-1-7.7-2.2-1.7-4.1-2.1-10-2.1H42v-28h8.2c8.8 0 11.8-1.4 11.8-5.3 0-4.4-2.7-5.7-11.7-5.7H42V97h8.2C59 97 62 95.6 62 91.7c0-4.4-2.7-5.7-11.7-5.7H42V60h8.2C59 60 62 58.6 62 54.7c0-4.4-2.7-5.7-11.7-5.7H42V37.2C42 24 43.2 20.7 49.2 17c2.8-1.7 5.1-2 15.6-2H77v97.5zM196.8 17c1.8 1.1 4.1 3.4 5.2 5.2 1.9 3.2 2 5.3 2 90.3 0 82.4-.1 87.2-1.8 90.4-1 1.9-3.4 4.3-5.3 5.3-3.1 1.7-6.9 1.8-55.6 1.8H89V15h52.3c50.3 0 52.3.1 55.5 2z"/><path d="M171 59.9c-2 2.1-4.6 5.2-5.8 6.8l-2.1 3 11 8.4c6 4.6 11.3 8.5 11.7 8.6 1 .3 8.1-9.2 9.3-12.4 1.7-4.6-.6-8.9-7.3-13.9-8-5.8-11.6-6-16.8-.5zM138.9 100.7c-10.6 13.6-22.3 28.7-26.1 33.5l-6.7 8.7 11 8.6c6.1 4.7 11.4 8.5 11.9 8.3 1.1-.4 52-65.8 52-66.7-.1-.7-20.5-16.4-21.9-16.9-.5-.2-9.6 10.9-20.2 24.5zM101 154.8c0 2.7-.3 8.3-.6 12.5l-.7 7.6 11.4-3.9c6.3-2.2 11.8-4.1 12.2-4.3 1-.3-19.9-16.7-21.3-16.7-.6 0-1 2.2-1 4.8z"/></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,14 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

@ -11,6 +11,21 @@
<link rel="author" href="humans.txt" />
<link rel="stylesheet" href="/css/light.css" />
<link rel="stylesheet" href="/css/main.css" />
<link rel="icon" href="/images/favicon.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<meta property="og:image" content="https://mynovi.knah-tsaeb.org/android-chrome-192x192.png" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="192" />
<meta property="og:image:height" content="192" />
<meta property="og:image:alt" content="Logo" />
</head>
<body>
Loading…
Cancel
Save