docs(dashboard): added screenshots to examples

This commit is contained in:
Folke Lemaitre 2024-11-18 15:57:40 +01:00
parent 38aca4f06c
commit c7b0cbc624
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 27 additions and 1 deletions

View file

@ -32,6 +32,7 @@ Table of Contents *snacks-dashboard-table-of-contents*
- Snacks.dashboard.sections.startup()|snacks-dashboard-module-snacks.dashboard.sections.startup()|
- Snacks.dashboard.sections.terminal()|snacks-dashboard-module-snacks.dashboard.sections.terminal()|
- Snacks.dashboard.setup()|snacks-dashboard-module-snacks.dashboard.setup()|
7. Links |snacks-dashboard-links|
==============================================================================
1. Usage *snacks-dashboard-usage*
@ -569,6 +570,17 @@ Check if the dashboard should be opened
Snacks.dashboard.setup()
<
==============================================================================
7. Links *snacks-dashboard-links*
1. *image*: https://github.com/user-attachments/assets/bbf4d2cd-6fc5-4122-a462-0ca59ba89545
2. *image*: https://github.com/user-attachments/assets/e498ef8f-83ce-4917-a720-8cb31d98ecec
3. *image*: https://github.com/user-attachments/assets/772e84fe-b220-4841-bbe9-6e28780dc30a
4. *image*: https://github.com/user-attachments/assets/823f702d-e5d0-449a-afd2-684e1fb97622
5. *image*: https://github.com/user-attachments/assets/e98997b6-07d3-4162-bc06-2768b78fe353
6. *image*: https://github.com/user-attachments/assets/2fb17ecc-8bc0-48d3-a023-aa8dfc70247e
7. *image*: https://github.com/user-attachments/assets/561eff8c-ddf0-4de9-8485-e6be18a19c0b
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl:

View file

@ -88,6 +88,7 @@ In the example below, both sections are equivalent.
### `advanced`
A more advanced example using multiple panes
![image](https://github.com/user-attachments/assets/bbf4d2cd-6fc5-4122-a462-0ca59ba89545)
```lua
{
@ -123,6 +124,7 @@ A more advanced example using multiple panes
### `chafa`
An example using the `chafa` command to display an image
![image](https://github.com/user-attachments/assets/e498ef8f-83ce-4917-a720-8cb31d98ecec)
```lua
{
@ -145,6 +147,7 @@ An example using the `chafa` command to display an image
### `compact_files`
A more compact version of the `files` example
![image](https://github.com/user-attachments/assets/772e84fe-b220-4841-bbe9-6e28780dc30a)
```lua
{
@ -161,6 +164,7 @@ A more compact version of the `files` example
### `doom`
Similar to the Emacs Doom dashboard
![image](https://github.com/user-attachments/assets/823f702d-e5d0-449a-afd2-684e1fb97622)
```lua
{
@ -175,6 +179,7 @@ Similar to the Emacs Doom dashboard
### `files`
A simple example with a header, keys, recent files, and projects
![image](https://github.com/user-attachments/assets/e98997b6-07d3-4162-bc06-2768b78fe353)
```lua
{
@ -191,6 +196,7 @@ A simple example with a header, keys, recent files, and projects
### `pokemon`
Pokemons, because why not?
![image](https://github.com/user-attachments/assets/2fb17ecc-8bc0-48d3-a023-aa8dfc70247e)
```lua
{
@ -213,6 +219,7 @@ Pokemons, because why not?
### `startify`
Similar to the Vim Startify dashboard
![image](https://github.com/user-attachments/assets/561eff8c-ddf0-4de9-8485-e6be18a19c0b)
```lua
{

View file

@ -1,11 +1,12 @@
local M = {}
M.style = "compact_files"
M.style = "pokemon"
---@type table<string, snacks.dashboard.Section>
M.examples = {}
-- Similar to the Emacs Doom dashboard
-- ![image](https://github.com/user-attachments/assets/823f702d-e5d0-449a-afd2-684e1fb97622)
M.examples.doom = {
sections = {
{ section = "header" },
@ -15,6 +16,7 @@ M.examples.doom = {
}
-- Similar to the Vim Startify dashboard
-- ![image](https://github.com/user-attachments/assets/561eff8c-ddf0-4de9-8485-e6be18a19c0b)
M.examples.startify = {
formats = {
key = function(item)
@ -35,6 +37,7 @@ M.examples.startify = {
}
-- A more advanced example using multiple panes
-- ![image](https://github.com/user-attachments/assets/bbf4d2cd-6fc5-4122-a462-0ca59ba89545)
M.examples.advanced = {
sections = {
{ section = "header" },
@ -65,6 +68,7 @@ M.examples.advanced = {
}
-- A simple example with a header, keys, recent files, and projects
-- ![image](https://github.com/user-attachments/assets/e98997b6-07d3-4162-bc06-2768b78fe353)
M.examples.files = {
sections = {
{ section = "header" },
@ -76,6 +80,7 @@ M.examples.files = {
}
-- A more compact version of the `files` example
-- ![image](https://github.com/user-attachments/assets/772e84fe-b220-4841-bbe9-6e28780dc30a)
M.examples.compact_files = {
sections = {
{ section = "header" },
@ -87,6 +92,7 @@ M.examples.compact_files = {
}
-- An example using the `chafa` command to display an image
-- ![image](https://github.com/user-attachments/assets/e498ef8f-83ce-4917-a720-8cb31d98ecec)
M.examples.chafa = {
sections = {
{
@ -104,6 +110,7 @@ M.examples.chafa = {
}
-- Pokemons, because why not?
-- ![image](https://github.com/user-attachments/assets/2fb17ecc-8bc0-48d3-a023-aa8dfc70247e)
M.examples.pokemon = {
sections = {
{ section = "header" },