From aad64818248953c8f93bd9ada20db2549a7e4ca6 Mon Sep 17 00:00:00 2001 From: Extarys Date: Sun, 24 Jan 2021 23:24:15 -0500 Subject: [PATCH 1/4] formating head --- view/theme/frio/templates/head.tpl | 176 ++++++++++++++++++----------- 1 file changed, 113 insertions(+), 63 deletions(-) diff --git a/view/theme/frio/templates/head.tpl b/view/theme/frio/templates/head.tpl index 65af7692d..a462371e5 100644 --- a/view/theme/frio/templates/head.tpl +++ b/view/theme/frio/templates/head.tpl @@ -1,4 +1,3 @@ - {{* This content will be added to the html page *}} @@ -8,86 +7,137 @@ {{* All needed css files - Note: css must be inserted before js files *}} - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + {{* own css files *}} - - + + {{foreach $stylesheets as $stylesheetUrl => $media}} - + {{/foreach}} - + + + // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat + // Prevents links to switch to Safari in a home screen app - see https://gist.github.com/irae/1042167 + (function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(chref=d.href).replace("{{$baseurl}}/", "").replace(e.href,"").indexOf("#")&&(!/^[a-z\+\.\-]+:/i.test(chref)||chref.indexOf(e.protocol+"//"+e.host)===0)&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone"); + // |license-end + - + -{{* The js files we use *}} - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + -{{* own js files *}} - - -{{if ! $block_public}} - -{{/if}} - + {{* own js files *}} + + + {{if ! $block_public}} + + {{/if}} + -{{* Include the strings which are needed for some js functions (e.g. translation) + {{* Include the strings which are needed for some js functions (e.g. translation) They are loaded into the html so that js functions can use them *}} -{{include file="js_strings.tpl"}} + {{include file="js_strings.tpl"}} From b2d0d9200ef1811f45907f7563dcb51f952cfe75 Mon Sep 17 00:00:00 2001 From: Extarys Date: Sun, 24 Jan 2021 23:47:59 -0500 Subject: [PATCH 2/4] add route for webmanifest --- static/routes.config.php | 1 + 1 file changed, 1 insertion(+) diff --git a/static/routes.config.php b/static/routes.config.php index 4ad122fbf..21ccd14a7 100644 --- a/static/routes.config.php +++ b/static/routes.config.php @@ -301,6 +301,7 @@ return [ '/magic' => [Module\Magic::class, [R::GET]], '/maintenance' => [Module\Maintenance::class, [R::GET]], '/manifest' => [Module\Manifest::class, [R::GET]], + '/friendica.webmanifest' => [Module\Manifest::class, [R::GET]], '/modexp/{nick}' => [Module\PublicRSAKey::class, [R::GET]], '/newmember' => [Module\Welcome::class, [R::GET]], '/nodeinfo/1.0' => [Module\NodeInfo110::class, [R::GET]], From 00e4c012f92b4416e808a8c9bdaa09b96a28ccbe Mon Sep 17 00:00:00 2001 From: Extarys Date: Sun, 24 Jan 2021 23:48:22 -0500 Subject: [PATCH 3/4] frio: change manifest to webmanifest --- view/theme/frio/templates/head.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/theme/frio/templates/head.tpl b/view/theme/frio/templates/head.tpl index a462371e5..7c8123744 100644 --- a/view/theme/frio/templates/head.tpl +++ b/view/theme/frio/templates/head.tpl @@ -64,7 +64,7 @@ - +