navbar_title + fix shell navbar layout when a page has no title
fixes https://github.com/lovasoa/SQLpage/issues/566 thanks @alexisrc1
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
- New columns component: `columns`. Useful to display a comparison between items, or large key figures to an user.
|
||||
- New foldable component: `foldable`. Useful to display a list of items that can be expanded individually.
|
||||
- CLI arguments parsing: SQLPage now processes command-line arguments to set the web root and configuration directory. It also allows getting the currently installed version of SQLPage with `sqlpage --version` without starting the server.
|
||||
- New `navbar_title` property in the [shell](https://sql.datapage.app/documentation.sql?component=shell#component) component to set the title of the top navigation bar. This allows to display a different title in the top menu than the one that appears in the tab of the browser. This can also be set to the empty string to hide the title in the top menu, in case you want to display only a logo for instance.
|
||||
|
||||
## 0.28.0 (2024-08-31)
|
||||
- Chart component: fix the labels of pie charts displaying too many decimal places.
|
||||
|
||||
@@ -945,7 +945,8 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
|
||||
('sidebar_theme', 'Used with sidebar property, It can be set to "dark" to exclusively set the sidebar into dark theme.', 'BOOLEAN', TRUE, TRUE),
|
||||
('theme', 'Set to "dark" to use a dark theme.', 'TEXT', TRUE, TRUE),
|
||||
('footer', 'Muted text to display in the footer of the page. This can be used to display a link to the terms and conditions of your application, for instance. By default, shows "Built with SQLPage". Supports links with markdown.', 'TEXT', TRUE, TRUE),
|
||||
('preview_image', 'The URL of an image to display as a link preview when the page is shared on social media', 'URL', TRUE, TRUE)
|
||||
('preview_image', 'The URL of an image to display as a link preview when the page is shared on social media', 'URL', TRUE, TRUE),
|
||||
('navbar_title', 'The title to display in the top navigation bar. Used to display a different title in the top menu than the one that appears in the tab of the browser.', 'TEXT', TRUE, TRUE)
|
||||
) x;
|
||||
|
||||
INSERT INTO example(component, description, properties) VALUES
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 89 KiB |
@@ -165,11 +165,9 @@
|
||||
{{~icon_img icon~}}
|
||||
{{/if}}
|
||||
</a>
|
||||
{{#if title}}
|
||||
<h1 class="mb-0 fs-2 text-truncate flex-grow-1" style="flex-basis:0">
|
||||
<a class="text-decoration-none" href="{{#if link}}{{link}}{{else}}/{{/if}}">{{title}}</a>
|
||||
</h1>
|
||||
{{/if}}
|
||||
<h1 class="mb-0 fs-2 text-truncate flex-grow-1" style="flex-basis:0">
|
||||
<a class="text-decoration-none" href="{{#if link}}{{link}}{{else}}/{{/if}}">{{default navbar_title title}}</a>
|
||||
</h1>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-menu" aria-controls="navbar-menu" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user