1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00

Compare commits

...

3 Commits

Author SHA1 Message Date
codecalm
ce265321bf Merge branch 'dev' of https://github.com/tabler/tabler into dev-colors 2025-02-03 23:15:56 +01:00
codecalm
bc5951b50d Add build step to bundlewatch workflow 2025-02-03 23:04:41 +01:00
codecalm
ac78dd2ac4 Refactor color configuration and update color usage in templates 2025-01-16 02:32:16 +01:00
5 changed files with 25 additions and 24 deletions

View File

@@ -44,6 +44,9 @@ jobs:
- name: Install pnpm dependencies
run: pnpm install --no-frozen-lockfile
- name: Build
run: pnpm run build
- name: Run bundlewatch
run: pnpm run bundlewatch
env:

View File

@@ -1,4 +1,4 @@
<div class="mb-3">
<label class="form-label">{{ include.label | default: 'Color picker' }}</label>
<input type="color" class="form-control form-control-color" value="{{ include.color | default: site.colors.blue.hex }}" title="Choose your color">
<input type="color" class="form-control form-control-color" value="{{ include.color | default: site.theme-color }}" title="Choose your color">
</div>

View File

@@ -55,7 +55,7 @@
}
},
{% else %}
colors: [{% if include.color %}'{{ include.color }}'{% else %}{% for color in site.colors limit: colors %}tabler.getColor("{{ color[0] }}"), {% endfor %}{% endif %}],
colors: [{% if include.color %}'{{ include.color }}'{% else %}{% for color in site.colors limit: colors %}tabler.getColor("{{ color }}"), {% endfor %}{% endif %}],
{% endif %}
series: [
{% for i in site.monthsShort limit: 12 %}

View File

@@ -26,7 +26,7 @@ permalink: badges.html
<div class="card-body">
<div class="badges-list">
{% for color in site.colors %}
<span class="badge bg-{{ color[0] }} text-{{ color[0] }}-fg">{{ color[1].title }}</span>
<span class="badge bg-{{ color }} text-{{ color }}-fg">{{ color | capitalize }}</span>
{% endfor %}
</div>
</div>
@@ -37,7 +37,7 @@ permalink: badges.html
<div class="card-body">
<div class="badges-list">
{% for color in site.colors %}
<span class="badge bg-{{ color[0] }}-lt">{{ color[1].title }}</span>
<span class="badge bg-{{ color }}-lt">{{ color | capitalize }}</span>
{% endfor %}
</div>
</div>
@@ -48,7 +48,7 @@ permalink: badges.html
<div class="card-body">
<div class="badges-list">
{% for color in site.colors %}
<span class="badge badge-outline text-{{ color[0] }}">{{ color[1].title }}</span>
<span class="badge badge-outline text-{{ color }}">{{ color | capitalize }}</span>
{% endfor %}
</div>
</div>
@@ -66,7 +66,7 @@ permalink: badges.html
<div class="card-body">
<div class="btn-list">
{% for color in site.colors %}
<button class="btn">{{ color[1].title }} badge <span class="badge bg-{{ color[0] }} text-{{ color[0] }}-fg ms-2">{{ forloop.index }}</span></button>
<button class="btn">{{ color | capitalize }} badge <span class="badge bg-{{ color }} text-{{ color }}-fg ms-2">{{ forloop.index }}</span></button>
{% endfor %}
</div>
</div>
@@ -77,7 +77,7 @@ permalink: badges.html
<div class="card-body">
<div class="btn-list">
{% for color in site.colors %}
<button class="btn position-relative">{{ color[1].title }} badge <span class="badge bg-{{ color[0] }} text-{{ color[0] }}-fg badge-notification badge-pill">{{ forloop.index }}</span></button>
<button class="btn position-relative">{{ color | capitalize }} badge <span class="badge bg-{{ color }} text-{{ color }}-fg badge-notification badge-pill">{{ forloop.index }}</span></button>
{% endfor %}
</div>
</div>
@@ -88,7 +88,7 @@ permalink: badges.html
<div class="card-body">
<div class="btn-list">
{% for color in site.colors %}
<button class="btn position-relative">{{ color[1].title }} badge <span class="badge bg-{{ color[0] }} badge-notification badge-blink"></span></button>
<button class="btn position-relative">{{ color | capitalize }} badge <span class="badge bg-{{ color }} badge-notification badge-blink"></span></button>
{% endfor %}
</div>
</div>

View File

@@ -1,12 +1,10 @@
---
title: Tags
page-header: Tags
page-menu: base.tags
layout: default
permalink: tags.html
menu: base.tags
---
{% assign tag-icons = "bold,italic,underline,copy,scissors,file-plus,file-minus,ghost,star,script,photo,dog,piano" | split: "," %}
{% assign icons = "bold,italic,underline,copy,scissors,file-plus,file-minus,ghost,star,script,photo,dog,piano" | split: "," %}
<div class="row row-cards row-cols-1 row-cols-md-2 row-cols-lg-3">
<div class="col">
@@ -16,7 +14,7 @@ permalink: tags.html
<div class="tags-list">
{% for i in (1..14) %}
{% capture text %}Label {{ i }}{% endcapture %}
{% include "ui/tag.html" text=text %}
{% include ui/tag.html text=text %}
{% endfor %}
</div>
</div>
@@ -28,8 +26,8 @@ permalink: tags.html
<div class="card-body">
<h3 class="card-title">Tags with flag</h3>
<div class="tags-list">
{% for country in flags limit: 9 %}
{% include "ui/tag.html" text=country.name flag=country.code %}
{% for country in site.data.flags limit: 9 %}
{% include ui/tag.html text=country.name flag=country.code %}
{% endfor %}
</div>
</div>
@@ -41,8 +39,8 @@ permalink: tags.html
<div class="card-body">
<h3 class="card-title">Tags with icon</h3>
<div class="tags-list">
{% for icon in tag-icons %}
{% include "ui/tag.html" text=icon icon=icon %}
{% for icon in icons %}
{% include ui/tag.html text=icon icon=icon %}
{% endfor %}
</div>
</div>
@@ -54,8 +52,8 @@ permalink: tags.html
<div class="card-body">
<h3 class="card-title">Tags with avatar</h3>
<div class="tags-list">
{% for person in people limit: 8 %}
{% include "ui/tag.html" text=person.full_name person=person %}
{% for person in site.data.people limit: 8 %}
{% include ui/tag.html text=person.full_name person=person %}
{% endfor %}
</div>
</div>
@@ -70,7 +68,7 @@ permalink: tags.html
{% for color in site.colors %}
{% capture status %}{{ color[1].class }}{% endcapture %}
{% capture text %}{{ color[1].title }}{% endcapture %}
{% include "ui/tag.html" text=text status=status %}
{% include ui/tag.html text=text status=status %}
{% endfor %}
</div>
</div>
@@ -85,7 +83,7 @@ permalink: tags.html
{% for color in site.colors %}
{% capture status %}{{ color[1].class }}{% endcapture %}
{% capture text %}{{ color[1].title }}{% endcapture %}
{% include "ui/tag.html" text=text legend=status %}
{% include ui/tag.html text=text legend=status %}
{% endfor %}
</div>
</div>
@@ -99,11 +97,11 @@ permalink: tags.html
<div class="tags-list">
{% for i in (1..6) %}
{% capture text %}Label {{ i }}{% endcapture %}
{% include "ui/tag.html" text=text checkbox=true %}
{% include ui/tag.html text=text checkbox=true %}
{% endfor %}
{% for i in (7..12) %}
{% capture text %}Label {{ i }}{% endcapture %}
{% include "ui/tag.html" text=text checkbox=true checked=true %}
{% include ui/tag.html text=text checkbox=true checked=true %}
{% endfor %}
</div>
</div>
@@ -116,7 +114,7 @@ permalink: tags.html
<h3 class="card-title">Default tags</h3>
<div class="tags-list">
{% for i in (1..12) %}
{% include "ui/tag.html" text="Label" badge=i %}
{% include ui/tag.html text="Label" badge=i %}
{% endfor %}
</div>
</div>