Skip to content

Commit 35583a5

Browse files
Option to completely hide the footer from the shell.handlebars template (#836)
* shell.handlebars: remove footer when it is exactly an empty string With this patch, if the user specifies the footer for the shell as exactly the empty string, then the whole footer is removed from the page. Leaving the footer as null or undefined still shows the "Build with SQLPage" default footer. * Update CHANGELOG.md
1 parent 0969495 commit 35583a5

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- `markdown_allow_dangerous_html`: allow the usage of html in markdown (default: false)
1414
- `markdown_allow_dangerous_protocol`: allow the usage of custom protocols in markdown (default: false)
1515
- see [configuration.md](./configuration.md) for more details.
16+
- In the shell component, setting the `footer` parameter to the empty string (`''`) will now completely hide the footer, instead of showing the default one
1617

1718
## 0.33.1 (2025-02-25)
1819

sqlpage/templates/shell.handlebars

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -214,16 +214,18 @@
214214
{{~#each_row~}}{{~/each_row~}}
215215
</main>
216216

217-
<footer class="w-100 text-center fs-6 my-2 text-secondary" id="sqlpage_footer">
218-
{{#if footer}}
219-
{{{markdown footer}}}
220-
{{else}}
221-
<!-- You can change this footer using the 'footer' parameter of the 'shell' component -->
222-
Built with <a class="text-reset" href="https://sql-page.com"
223-
title="SQLPage v{{buildinfo 'CARGO_PKG_VERSION'}}">SQLPage</a>
224-
{{/if}}
225-
</footer>
217+
{{#unless (eq footer '')}}
218+
<footer class="w-100 text-center fs-6 my-2 text-secondary" id="sqlpage_footer">
219+
{{#if footer}}
220+
{{{markdown footer}}}
221+
{{else}}
222+
<!-- You can change this footer using the 'footer' parameter of the 'shell' component -->
223+
Built with <a class="text-reset" href="https://sql-page.com"
224+
title="SQLPage v{{buildinfo 'CARGO_PKG_VERSION'}}">SQLPage</a>
225+
{{/if}}
226+
</footer>
227+
{{/unless}}
226228
</div>
227229
</div>
228230
</body>
229-
</html>
231+
</html>

0 commit comments

Comments
 (0)