Skip to content

Commit 1405687

Browse files
authored
feat: components redesign (#780)
1 parent 1d2b2f9 commit 1405687

File tree

5 files changed

+22
-21
lines changed

5 files changed

+22
-21
lines changed

src/unfold/static/unfold/css/styles.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
<button {% if submit %}type="submit"{% endif%} {% if name %}name="{{ name }}"{% endif %} class="bg-primary-600 border border-transparent font-medium px-3 py-2 rounded-md text-sm text-white">
2-
{{ children }}
3-
</button>
1+
<{% if href %}a href="{{ href }}"{% else %}button{% endif%} {% if submit %}type="submit"{% endif%} {% if name %}name="{{ name }}"{% endif %}
2+
class="border font-medium px-3 py-2 rounded-md text-center whitespace-nowrap {% if variant == "default" %}bg-white dark:border-gray-700 dark:bg-transparent dark:text-white{% else %}bg-primary-600 border-transparent text-white{% endif %}{% if class %} {{ class }}{% endif %}">
3+
{{ children }}
4+
</{% if href %}a{% else %}button{% endif%}>

src/unfold/templates/unfold/components/card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="border flex flex-col flex-grow overflow-hidden p-6 relative rounded-md shadow-sm dark:border-gray-800{% if class %} {{ class }}{% endif %}">
1+
<div class="border flex flex-col flex-grow overflow-hidden p-6 relative rounded-md shadow-sm dark:border-gray-800 {% if class %} {{ class }}{% endif %}">
22
{% if title %}
33
<h2 class="border-b font-semibold mb-6 -mt-2 -mx-6 pb-4 px-6 text-font-important-light dark:text-font-important-dark dark:border-gray-800">
44
{{ title }}
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<div class="{% if class %}{{ class }}{% endif %}">
2-
<div class="flex flex-row mb-2.5 text-sm">
3-
{% if title %}
4-
<h3 class="text-sm">
5-
{{ title }}
6-
</h3>
2+
<div class="overflow-hidden relative px-2 py-1 text-sm">
3+
{% if value %}
4+
<div class="absolute bottom-0 left-0 rounded top-0 bg-primary-100 z-10 dark:bg-primary-500/20" style="width: {{ value }}%"></div>
75
{% endif %}
86

9-
{% if description %}
10-
<strong class="font-semibold ml-auto">
11-
{{ description }}
12-
</strong>
13-
{% endif %}
14-
</div>
7+
<div class="flex flex-row relative z-20">
8+
{% if title %}
9+
<h3 class="text-font-default-light dark:text-font-default-dark text-sm">
10+
{{ title }}
11+
</h3>
12+
{% endif %}
1513

16-
<div class="bg-gray-200 flex flex-row h-1 rounded overflow-hidden dark:bg-white/10">
17-
{% if value %}
18-
<div class="bg-primary-500 h-1 rounded-full" style="width: {{ value }}%"></div>
19-
{% endif %}
14+
{% if description %}
15+
<strong class="font-semibold text-font-important-light ml-auto dark:text-font-important-dark">
16+
{{ description }}
17+
</strong>
18+
{% endif %}
19+
</div>
2020
</div>
2121
</div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div class="bg-gray-200 dark:bg-gray-800 dark:border-gray-800 {% if vertical == 1 %}mx-8 w-px{% else%}h-px my-8{% endif %}{% if class %} {{ class }}{% endif %}"></div>
1+
<div class="bg-gray-200 dark:bg-gray-800 dark:border-gray-800 {% if vertical == 1 %}mx-6 w-px{% else%}h-px my-6{% endif %}{% if class %} {{ class }}{% endif %}"></div>

0 commit comments

Comments
 (0)