Skip to content

Commit c298d7c

Browse files
authored
Merge pull request #321 from djyotta/favicon-manifest
Add favicon and manifest properties to shell.handlebars
2 parents 52ebdfa + a28290c commit c298d7c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

examples/official-site/sqlpage/migrations/01_documentation.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,10 @@ and `shell.json` would be placed at the website''s root and contain the followin
739739
INSERT INTO component(name, icon, description) VALUES
740740
('shell', 'layout-navbar', 'Personalize the "shell" surrounding your page contents. Used to set properties for the entire page.');
741741

742+
INSERT INTO parameter(component, name, description_md, type, top_level, optional) SELECT 'shell', * FROM (VALUES
743+
('favicon', 'The URL of the icon the web browser should display in bookmarks and tabs. This property is particularly useful if multiple sites are hosted on the same domain with different [``site_prefix``](https://github.com/lovasoa/SQLpage/blob/main/configuration.md#configuring-sqlpage).', 'URL', TRUE, TRUE),
744+
('manifest', 'The location of the [manifest.json](https://developer.mozilla.org/en-US/docs/Web/Manifest) if the site is a [PWA](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps). Among other features, serving a manifest enables your site to be "installed" as an app on most mobile devices.', 'URL', TRUE, TRUE)
745+
) x;
742746
INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'shell', * FROM (VALUES
743747
-- top level
744748
('title', 'The title of your page. Will be shown in a top bar above the page contents. Also usually displayed by web browsers as the name of the web page''s tab.', 'TEXT', TRUE, TRUE),

sqlpage/templates/shell.handlebars

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
<head>
44
<meta charset="utf-8"/>
55
<title>{{default title "SQLPage"}}</title>
6+
{{#if favicon}}
7+
<link rel="icon" href="{{favicon}}">
8+
{{/if}}
9+
{{#if manifest}}
10+
<link rel="manifest" href="{{manifest}}">
11+
{{/if}}
612
<link rel="stylesheet" href="{{static_path 'sqlpage.css'}}">
713
{{#each (to_array css)}}
814
{{#if this}}

0 commit comments

Comments
 (0)