Skip to content

Commit 95214df

Browse files
committed
1 parent 8263bb6 commit 95214df

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ This example illustrates creating a nice list where each item has a title, a des
6666
', json('[{"component":"list", "wrap": true},
6767
{"title":"SQL Websites", "image_url": "/favicon.ico", "description_md":"Write SQL, get a website. SQLPage is a **SQL**-based **site** generator for **PostgreSQL**, **MySQL**, **SQLite** and **SQL Server**.", "link": "/"},
6868
{"title":"SQL Forms", "image_url": "https://upload.wikimedia.org/wikipedia/commons/b/b6/FileStack_retouched.jpg", "description_md":"Easily collect data **from users to your database** using the *form* component. Handle the data in SQL with `INSERT` or `UPDATE` queries.", "link": "?component=form"},
69-
{"title":"SQL Maps", "image_url": "https://upload.wikimedia.org/wikipedia/commons/1/15/Vatican_City_map_EN.png", "description_md":"Show database contents on a map using the *map* component. Works well with *PostGIS* and *SpatiaLite*.", "link": "?component=map"}
69+
{"title":"SQL Maps", "image_url": "https://upload.wikimedia.org/wikipedia/commons/1/15/Vatican_City_map_EN.png", "description_md":"Show database contents on a map using the *map* component. Works well with *PostGIS* and *SpatiaLite*.", "link": "?component=map"},
70+
{"title":"Advanced features", "icon": "settings", "description_md":"[Authenticate users](?component=authentication), [edit data](?component=form), [generate an API](?component=json), [maintain your database schema](/your-first-sql-website/migrations.sql), and more."}
7071
]')),
7172
('list', 'A beautiful list with bells and whistles.',
7273
json('[{"component":"list", "title":"Top SQLPage features", "compact": true },

sqlpage/templates/list.handlebars

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
<div {{#if id}}id="{{id}}"{{/if}}
1010
class="list-group-item list-group-item-action p-0 {{#if active}}active{{/if}} {{class}}">
1111
<div class="row align-items-center m-0">
12-
<a {{#if link}} href="{{link}}" {{/if}}
12+
{{#if link}}<a href="{{link}}"
13+
{{~else}}<div {{/if}}
1314
class="col row align-items-center text-decoration-none link-body-emphasis m-0 {{#if ../compact}}p-1{{else}}p-3{{/if}}">
1415
{{#if color}}
1516
<div class="col-auto"><span class="badge bg-{{color}}"></span></div>
@@ -34,7 +35,11 @@
3435
</div>
3536
</div>
3637

37-
</a>
38+
{{#if link}}
39+
</a>
40+
{{else}}
41+
</div>
42+
{{/if}}
3843
{{#if view_link}}
3944
<a href="{{view_link}}" class="link-secondary col-auto" title="View">
4045
{{~icon_img 'eye'~}}

0 commit comments

Comments
 (0)