Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions examples/official-site/content/components/code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
icon: code
since: 0.19.0
category: page-layout
summary: Display source code with syntax highlighting.
top:
- class
- id
row:
- name: contents
type: TEXT
required: true
description: A block of code.
- name: description
type: TEXT
description: Description of the snipet of code.
- name: description_md
type: TEXT
description: Rich text in the markdown format. Among others, this allows you to write bold text using `**bold**`,
italics using `*italics*`, and links using `[text](https://example.com)`.
- name: language
type: TEXT
description: Set the programming language name.
- name: title
type: TEXT
description: Set the heading level (default level is 1)
---

Displays one or many blocks of code from a programming language or formated text as XML or JSON.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
rows:
- component: code
- title: A HTML5 example
language: html
description: Here’s the very minimum that an HTML document should contain, assuming it has CSS and JavaScript
linked to it.
contents: |-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<!-- page content -->
</body>
</html>
---

Displays a block of HTML code.
52 changes: 52 additions & 0 deletions examples/official-site/content/components/columns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
icon: columns
since: 0.29.0
category: page-layout
summary: Compare plans, features, or options in side-by-side cards.
row:
- name: button_color
type: TEXT
description: Optional color for the button.
- name: button_text
type: TEXT
description: Text for the button.
- name: description
type: TEXT
description: A brief description of the item.
- name: description_md
type: TEXT
description: A brief description of the item, formatted using markdown.
- name: icon
type: ICON
description: Optional icon to display in a ribbon.
- name: icon_color
type: TEXT
description: Color for the icon in the ribbon.
- name: item
type: JSON
description: A list of bullet points associated with the columns, represented either as text, or as a json
object with "icon", "color", and "description" or "description_md" fields.
- name: link
type: TEXT
description: A link associated with the item.
- name: size
type: INTEGER
description: Width on a 12-column grid on larger screens. For three equal columns, return three rows with `size` set to 4.
- name: small_text
type: TEXT
description: Optional small text to display after the value.
- name: target
type: TEXT
description: Optional target for the button. Set to "_blank" to open links in a new tab.
- name: title
type: TEXT
description: The title or label for the item.
- name: value
type: TEXT
description: The value associated with the item.
- name: value_color
type: TEXT
description: Color for the value text.
---

Use one row per plan, feature, or metric to compare them side by side. For a dashboard of values with trends and progress bars, see [`big_number`](?component=big_number).
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
rows:
- component: columns
- title: Start Plan
value: €18
description: Perfect for testing and small-scale projects
item:
- 128MB Database
- SQLPage hosting
- Community support
link: https://datapage.app
button_text: Start Free Trial
small_text: /month
- title: Pro Plan
value: €40
icon: rocket
description: For growing projects needing enhanced features
item:
- icon: database
color: blue
description: 1GB Database
- icon: headset
color: green
description: Priority Support
- icon: world
color: purple
description: Custom Domain
link: https://datapage.app
button_text: Start Free Trial
button_color: indigo
value_color: indigo
small_text: /month
- title: Enterprise Plan
value: €600
icon: building-skyscraper
description: For large-scale operations with custom needs
item:
- icon: database-plus
description_md: '**Custom Database Scaling**'
- icon: shield-lock
description_md: '**Enterprise Auth** with Single Sign-On'
- icon: headset
description_md: '**Monthly** Expert Support time'
- icon: file-certificate
description_md: '**SLA** with guaranteed uptime'
link: mailto:contact@datapage.app
button_text: Contact Us
small_text: /month
target: _blank
---

Pricing Plans Display
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
rows:
- component: columns
- title: Monthly Active Users
value: 10k
value_color: blue
size: 4
description: Total active users this month, showcasing user engagement.
item:
- icon: target
description: 'Target: 12,000'
link: '#'
button_text: User Activity Overview
button_color: info
- title: Revenue
value: $49k
value_color: blue
size: 4
description: Total revenue generated this month, indicating financial performance.
item:
- icon: trending-down
color: red
description: down from $51k last month
link: '#'
button_text: Financial Dashboard
button_color: info
- title: Customer Satisfaction
value: 94%
value_color: blue
size: 4
description: Percentage of satisfied customers, reflecting service quality.
item:
- icon: trending-up
color: green
description: + 2% this month
link: '#'
button_text: Open Google Ratings
button_color: info
---

Tech Company KPIs Display
34 changes: 34 additions & 0 deletions examples/official-site/content/components/divider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
icon: separator
since: 0.18.0
category: page-layout
summary: Separate sections with a horizontal rule.
top:
- name: bold
type: BOOLEAN
description: Whether the text is bold.
- class
- name: color
type: COLOR
description: The name of a color for this span of text.
- name: contents
type: TEXT
description: A text in the divider.
- name: italics
type: BOOLEAN
description: Whether the text is italicized.
- name: link
type: URL
description: URL of the link for the divider text. Available only when contents is present.
- name: position
type: TEXT
description: Position of the text (e.g. left, right).
- name: size
type: INTEGER
description: The size of the divider text, from 1 to 6.
- name: underline
type: BOOLEAN
description: Whether the text is underlined.
---

Dividers help organize content and make the interface layout clear and uncluttered.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
rows:
- component: divider
---

An empty divider
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
rows:
- component: divider
contents: Hello
---

A divider with centered text
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
rows:
- component: divider
contents: Hello
position: left
---

A divider with text at left
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
rows:
- component: divider
contents: SQLPage components
link: /documentation.sql
color: blue
---

A divider with blue text and a link
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
rows:
- component: divider
contents: Important notice
position: left
color: red
size: 5
bold: true
italics: true
underline: true
---

A divider with bold, italic, and underlined text
37 changes: 37 additions & 0 deletions examples/official-site/content/components/foldable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
icon: chevrons-down
since: 0.29.0
category: page-layout
summary: Let readers expand individual sections to see their contents.
top:
- name: class
type: TEXT
description: CSS class(es) to add to the foldable container. When set at the top level, applies to the
entire foldable component.
- name: id
type: TEXT
description: ID attribute added to the container in HTML. Used for targeting through CSS or for scrolling
via links. When set at the top level, applies to the entire foldable component.
row:
- name: class
type: TEXT
description: CSS class(es) to add to individual foldable items.
- name: description
type: TEXT
description: Plain text description of the item, displayed when expanded.
- name: description_md
type: TEXT
description: Markdown description of the item, displayed when expanded.
- name: expanded
type: BOOLEAN
description: If set to TRUE, the foldable item starts in an expanded state. Defaults FALSE
- name: id
type: TEXT
description: ID attribute added to individual foldable items. Used for targeting through CSS or for scrolling
via links.
- name: title
type: TEXT
description: Title of the foldable item, displayed on the button.
---

A foldable list of elements which can be expanded individually.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
rows:
- component: foldable
- title: The foldable component
description: This is a simple foldable component. It can be used to show and hide content. It is a list
of items, each with a title and a description. The description is displayed when the item is expanded.
---

A single foldable paragraph of text
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
rows:
- component: foldable
- title: Quick Prototyping
description_md: |-
Build a functional web app prototype in minutes using just SQL queries:

- Rapid development
- Ideal for MVPs
- Great for internal tools

Learn more about [quick prototyping](/your-first-sql-website/).
expanded: true
- title: Data Visualization
description_md: |-
Quickly transform your database into useful insights:

1. **Charts**: Line, bar, pie
2. **KPIs**: Appealing visualizations of key metrics
3. **Maps**: Geospatial data

As simple as:

```sql
SELECT 'chart' as component;
SELECT date as x, revenue as y FROM sales;
```
- title: Don't stare, interact!
description_md: |-
SQLPage is not just a passive *Business Intelligence* tool. With SQLPage, you can act upon user input:

- *User input collection*: Building a form is just as easy as building a chart.
- *Data validation*: Write your own validation rules in SQL.
- *Database updates*: `INSERT` and `UPDATE` are first-class citizens.
- *File uploads*: Upload `CSV` and other files, store and display them the way you want.

> Let users interact with your data, not just look at it!
---

A SQLPage-themed foldable list with Markdown
Loading
Loading