Skip to content

Commit 063a626

Browse files
committed
improve color documentation
fixes #409
1 parent b1005b9 commit 063a626

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

examples/official-site/colors.sql

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
select 'dynamic' as component, properties FROM example WHERE component = 'shell' LIMIT 1;
22

3-
select 'list' as component,
4-
'Colors' as title;
3+
create temporary table if not exists colors as select column1 as color, column2 as hex from (values
4+
('blue', '#0054a6'), ('azure', '#4299e1'), ('indigo', '#4263eb'), ('purple', '#ae3ec9'), ('pink', '#d6336c'), ('red', '#d63939'), ('orange', '#f76707'), ('yellow', '#f59f00'), ('lime', '#74b816'), ('green', '#2fb344'), ('teal', '#0ca678'), ('cyan', '#17a2b8'),
5+
('blue-lt', '#e9f0f9'), ('azure-lt', '#ecf5fc'), ('indigo-lt', '#eceffd'), ('purple-lt', '#f7ecfa'), ('pink-lt', '#fbebf0'), ('red-lt', '#fbebeb'), ('orange-lt', '#fef0e6'), ('yellow-lt', '#fef5e6'), ('lime-lt', '#f1f8e8'), ('green-lt', '#eaf7ec'), ('teal-lt', '#e7f6f2'), ('cyan-lt', '#e8f6f8'),
6+
('gray-50', '#f8fafc'), ('gray-100', '#f1f5f9'), ('gray-200', '#e2e8f0'), ('gray-300', '#c8d3e1'), ('gray-400', '#9ba9be'), ('gray-500', '#6c7a91'), ('gray-600', '#49566c'), ('gray-700', '#313c52'), ('gray-800', '#1d273b'), ('gray-900', '#0f172a'),
7+
('facebook', '#1877F2'), ('twitter', '#1da1f2'), ('linkedin', '#0a66c2'), ('google', '#dc4e41'), ('youtube', '#ff0000'), ('vimeo', '#1ab7ea'), ('dribbble', '#ea4c89'), ('github', '#181717'), ('instagram', '#e4405f'), ('pinterest', '#bd081c'), ('vk', '#6383a8'), ('rss', '#ffa500'), ('flickr', '#0063dc'), ('bitbucket', '#0052cc'), ('tabler', '#0054a6'),
8+
('black', '#000000'), ('white', '#ffffff'), ('gray', '#808080'),
9+
('primary', '#0054a6'), ('secondary', '#49566c'), ('success', '#2fb344'), ('info', '#17a2b8'), ('warning', '#f59f00'), ('danger', '#d63939'), ('light', '#f1f5f9'), ('dark', '#0f172a')
10+
);
11+
12+
select 'card' as component, 'Colors' as title;
13+
select color as title, hex as description, color as background_color
14+
from colors;

examples/official-site/documentation.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ select
7070
(CASE WHEN optional THEN '' ELSE 'REQUIRED. ' END) || description_md as description_md,
7171
type as footer,
7272
CASE type
73-
WHEN 'COLOR' THEN 'https://tabler.io/docs/base/colors'
73+
WHEN 'COLOR' THEN '/colors.sql'
7474
WHEN 'ICON' THEN 'https://tabler-icons.io/'
7575
END AS footer_link,
7676
CASE WHEN optional THEN 'lime' ELSE 'azure' END as color
@@ -87,7 +87,7 @@ select
8787
(CASE WHEN optional THEN '' ELSE 'REQUIRED. ' END) || description_md as description_md,
8888
type as footer,
8989
CASE type
90-
WHEN 'COLOR' THEN 'https://tabler.io/docs/base/colors'
90+
WHEN 'COLOR' THEN '/colors.sql'
9191
WHEN 'ICON' THEN 'https://tabler-icons.io/'
9292
END AS footer_link,
9393
CASE WHEN optional THEN 'lime' ELSE 'azure' END as color

0 commit comments

Comments
 (0)