Skip to content

Commit

Permalink
update theme
Browse files Browse the repository at this point in the history
  • Loading branch information
kritzl committed Jul 12, 2024
1 parent 5c7087a commit 230f6eb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/vinywaji/gui/static_src/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
},
safelist: [
{
pattern: /bg-(primary|gray|lime|orange)-(50|100|200|300|400|500|600|700|800|900|950)/,
pattern: /bg-(primary|gray|lime|green|orange)-(50|100|200|300|400|500|600|700|800|900|950)/,
variants: ['hover', 'focus', 'dark', 'dark:hover', 'dark:focus'],
},
],
Expand Down
7 changes: 5 additions & 2 deletions src/vinywaji/gui/templates/components/forms.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{% load macros %}

{% macro button title type="submit" class="" color="primary" %}
<button class="bg-{{ color }}-400 hover:bg-{{ color }}-500 dark:bg-{{ color }}-600 dark:hover:bg-{{ color }}-700 px-4 py-2 rounded-lg min-w-30 {{ class }}" type="{{ type }}">
{% macro button title type="submit" class="" color="primary" darkColor=False %}
<button class="bg-{{ color }}-400 hover:bg-{{ color }}-500
dark:bg-{% if darkColor %}{{ darkColor }}{% else %}{{ color }}{% endif %}-600
dark:hover:bg-{% if darkColor %}{{ darkColor }}{% else %}{{ color }}{% endif %}-700
px-4 py-2 rounded-lg min-w-30 {{ class }}" type="{{ type }}">
{{ title }}
</button>
{% endmacro %}
Expand Down
2 changes: 1 addition & 1 deletion src/vinywaji/gui/templates/components/forms/pay-up.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<div class="grid grid-cols-1 sm:grid-cols-3 justify-stretch gap-2">
{% usemacro input "Deposit Value (€)" "amount" type="number" required=True step="0.1" min="0.1" class="sm:col-span-2" %}

{% usemacro button "Deposit" color="lime" %}
{% usemacro button "Deposit" color="lime" darkColor="green" %}
</div>
</form>
11 changes: 9 additions & 2 deletions src/vinywaji/gui/templates/components/transaction.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{% load mathfilters %}
{% load humanize %}

<div class="rounded-2xl py-2 px-4 shadow-lg flex flex-col {% if transaction.amount < 0 %}bg-orange-200 dark:bg-orange-700{% else %}bg-lime-200 dark:bg-lime-700{% endif %}">
<div class="flex justify-between text-gray-600 dark:text-gray-400">
<div class="rounded-2xl py-2 px-4 shadow-lg flex flex-col
{% if transaction.amount < 0 %}
bg-orange-300 dark:bg-orange-900
{% elif transaction.amount == 0 %}
bg-gray-300 dark:bg-gray-700
{% else %}
bg-lime-300 dark:bg-green-900
{% endif %}">
<div class="flex justify-between text-gray-700 dark:text-gray-300">
<span>
{% if transaction.amount < 0 %}purchase
{% elif transaction.amount == 0 %}transaction (why???)
Expand Down

0 comments on commit 230f6eb

Please sign in to comment.