diff --git a/Theme/Argon/ArgonSettings.php b/Theme/Argon/ArgonSettings.php new file mode 100644 index 0000000..6dc5adb --- /dev/null +++ b/Theme/Argon/ArgonSettings.php @@ -0,0 +1,45 @@ +render("setting/argon", ['themes' => [ + 'none' => 'User choose between Dark and light', + 'dark' => "Dark only", + 'light' => "Light only" + ], 'default' => [ + 'dark' => "Dark", + 'light' => "Light" + ]]); + + return ''; + } + + public function validate(array $params): Validator + { + return (new Validator($params))->notEmpty('argon_theme'); + } +} \ No newline at end of file diff --git a/Theme/Argon/Views/Account/home.twig b/Theme/Argon/Views/Account/home.twig index 09373d1..b6ae9bd 100644 --- a/Theme/Argon/Views/Account/home.twig +++ b/Theme/Argon/Views/Account/home.twig @@ -1,4 +1,5 @@ -{% if is_dark() %} +{% if is_dark() or (config('argon_default') == 'dark' and request().CookieParams.theme == 'dark') %} {% set dark = true %} {% endif %} +{% set marginBtn = true %} {% include("@account-copy/home.twig") %} \ No newline at end of file diff --git a/Theme/Argon/Views/Announcements/index.twig b/Theme/Argon/Views/Announcements/index.twig new file mode 100644 index 0000000..2c622e0 --- /dev/null +++ b/Theme/Argon/Views/Announcements/index.twig @@ -0,0 +1,71 @@ +{% extends "layout.twig" %} + +{% block title trans("announcements") %} + +{% block body %} + +
+
+
+
+
+
+

{{ trans("announcementsadmin.bymonth") }}

+ +
+
+
+
+ {% for row in announcements|batch(3) %} +
+ + {% for announcement in row %} +
+
+ + + +
+ +
+ {% if announcement.pinned %} + {{ trans("pinned") }} + {% endif %} + + {{ announcement.title }} + +

+ {{ announcement.excerpt | raw }} +

+ + {{ trans("see_more") }} + +
+
+
+ {{ announcement.createdAt.format('h M y') }} +
+
+
+
+
+ {% endfor %} +
+ {% endfor %} +
+
+
+{% endblock %} + +{% block scripts %} + {{ ago_scripts() }} + +{% endblock %} \ No newline at end of file diff --git a/Theme/Argon/Views/Basket/show.twig b/Theme/Argon/Views/Basket/show.twig index 17707af..003f67b 100644 --- a/Theme/Argon/Views/Basket/show.twig +++ b/Theme/Argon/Views/Basket/show.twig @@ -15,48 +15,49 @@
{% for row in basket.rows %} -
+
+ +
+
+
{{ row.product.name }}
{{trans("price") }} : {{ row.product.originalPrice(row.toRecurring().name) | formatted_price(true, 'none') | trans }} + {% if row.product.originalSetupfee(row.toRecurring().name) != 0 %} {{trans("setupfee") }} : {{ row.product.originalSetupfee(row.toRecurring().name) | formatted_price(true, 'none') | trans }} -
+ {% endif %} +

{% if row.product.data is empty %} -

- - -
+ {% else %} -

{{ row.product.primaryData }}

+ {{ row.product.primaryData }} {% endif %} +

{% if row.product.free %} -

{{ trans("recurrings.monthly") }}

+ {{ trans("recurrings.monthly") }} {% elseif row.product.paymenttype == 'onetime' %} -

{{ trans("onetime") }}

+ {{ trans("onetime") }} {% else %} {% if row.isUniqueCycle() %} -

{{ trans(row.UniqueCycle.translateKey) }}

+ {{ trans(row.UniqueCycle.translateKey) }} {% else %} -
+ -
{% endif %} {% endif %} -
-
@@ -74,25 +75,28 @@
+
+
+
{% endfor %}
{{trans("basket.title")}}
- + {{ trans("subtotal") }}: {{ basket.subtotal | formatted_price(true, "none") | trans }}
- + {{ trans("discount") }}: {{ basket.discount | formatted_price(true, "none") | trans }}
- + {{ trans("setupfee") }}: {{ basket.setupfee | formatted_price(true, "none") | trans }} @@ -102,18 +106,22 @@ {{ trans("tax") }}: - {{ basket.vat(current_user()) }} + {{ basket.vat(current_user()) }}%
-
- - Total: +
+ + {{ trans("total") }}: - {{ basket.total | formatted_price(true, "none") | trans }} + {{ basket.total | formatted_price(true, "none") | trans }} +
+ + +
- {{ trans("basket.checkout" ) }}
diff --git a/Theme/Argon/Views/Proxmox/data.twig b/Theme/Argon/Views/Proxmox/data.twig index f0a1a2e..a269960 100644 --- a/Theme/Argon/Views/Proxmox/data.twig +++ b/Theme/Argon/Views/Proxmox/data.twig @@ -1,121 +1 @@ -{% if inAdmin %} - {% set bootstrap = 'v4' %} -{% endif %} - -
-
-
-
-
- {% if bootstrap == 'v4' %} -
- - -
- -
- {{ field('hostname', item.hostname, trans("proxmox.hostname")) }} -
- {% else %} - -
- - -
-
- {{ field('hostname', item.hostname, trans("proxmox.hostname")) }} -
- {% endif %} - {% if config('proxmox_auth_type') == 'password' %} - {{ field('rootpass', item.rootpass, trans("password"), {type: 'password'} ) }} - {{ field('confirmation',item.confirmation, trans("confirmation"), {type: 'password'} ) }} - - {% else %} - {{ field('sshpublic', item.sshpublic, "Public SSH", {type: 'textarea'} ) }} - {% endif %} - -
- - {% for key, value in oses %} - -
- -
- {% endfor %} -
-
-
-
-
-
- \ No newline at end of file +{{ include('@proxmox-copy/data', {bootstrap: 'v5'}) }} \ No newline at end of file diff --git a/Theme/Argon/Views/Shop/domaindata.twig b/Theme/Argon/Views/Shop/domaindata.twig index 804076b..01584ff 100644 --- a/Theme/Argon/Views/Shop/domaindata.twig +++ b/Theme/Argon/Views/Shop/domaindata.twig @@ -1,2 +1 @@ -{% set boostrap = 'v5' %} -{% include('@shop/domaindata') %} \ No newline at end of file +{{ include('@shop-copy/domaindata', {bootstrap: 'v5'}) }} \ No newline at end of file diff --git a/Theme/Argon/Views/Virtualizor/data.twig b/Theme/Argon/Views/Virtualizor/data.twig index a158110..7a70898 100644 --- a/Theme/Argon/Views/Virtualizor/data.twig +++ b/Theme/Argon/Views/Virtualizor/data.twig @@ -1,3 +1 @@ -{% set bootstrap = 'v5' %} - -{% include "@virtualizor-copy/data.twig" %} +{{ include('@virtualizor-copy/data', {bootstrap: 'v5'}) }} \ No newline at end of file diff --git a/Theme/Argon/Views/VirtualizorCloud/data.twig b/Theme/Argon/Views/VirtualizorCloud/data.twig index 6a328a6..65e415d 100644 --- a/Theme/Argon/Views/VirtualizorCloud/data.twig +++ b/Theme/Argon/Views/VirtualizorCloud/data.twig @@ -1,3 +1 @@ -{% set bootstrap = 'v5' %} - -{% include "@virtualizorcloud-copy/data.twig" %} +{{ include('@virtualizorcloud-copy/data', {bootstrap: 'v5'}) }} \ No newline at end of file diff --git a/Theme/Argon/config.php b/Theme/Argon/config.php index f656fea..f58f1a4 100644 --- a/Theme/Argon/config.php +++ b/Theme/Argon/config.php @@ -1,8 +1,7 @@ \Themes\Argon\ArgonTheme::class, -]; +use function DI\add; +use function DI\get; return [ 'class' => \Themes\Argon\ArgonTheme::class, @@ -14,5 +13,8 @@ return 'mt-2'; })), - 'theme_primary' => \ClientX\setting("theme_primary") + 'theme_primary' => \ClientX\setting("theme_primary"), + 'argon_theme' => \ClientX\setting("argon_theme", "none"), + 'argon_default' => \ClientX\setting("argon_default", "light"), + 'admin.settings' => add(get(\Themes\Argon\ArgonSettings::class)) ]; \ No newline at end of file diff --git a/Theme/Argon/includes/head.twig b/Theme/Argon/includes/head.twig index 52cccc3..02bdb27 100644 --- a/Theme/Argon/includes/head.twig +++ b/Theme/Argon/includes/head.twig @@ -28,9 +28,15 @@ - + + - + + {% if config('theme_primary') %} + + {% else %} + + {% endif %}