Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkIncognito85 committed Mar 12, 2022
1 parent 523e102 commit 98b24ea
Show file tree
Hide file tree
Showing 16 changed files with 206 additions and 182 deletions.
45 changes: 45 additions & 0 deletions Theme/Argon/ArgonSettings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
namespace Themes\Argon;

use App\Admin\Settings\SettingsInterface;
use ClientX\Renderer\RendererInterface;
use ClientX\Renderer\TwigRenderer;
use ClientX\Validator;

class ArgonSettings implements SettingsInterface {

public function name(): string
{
return "argon";
}

public function title(): string
{
return "Argon Theme";
}

public function icon(): string
{
return "fas fa-fill";
}

public function render(RendererInterface $renderer)
{

return $renderer->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');
}
}
3 changes: 2 additions & 1 deletion Theme/Argon/Views/Account/home.twig
Original file line number Diff line number Diff line change
@@ -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") %}
71 changes: 71 additions & 0 deletions Theme/Argon/Views/Announcements/index.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{% extends "layout.twig" %}

{% block title trans("announcements") %}

{% block body %}

<section class="forms">
<div class="container-fluid">
<div class="row">
<div class="col-md-3 col-sm-12">
<div class="card">
<div class="card-body">
<h4>{{ trans("announcementsadmin.bymonth") }}</h4>
<ul class="list-group">
<a class="list-group-item "
href="{{ path('announcements.index') }}">{{ trans("announcementsadmin.all") }}</a>
{% for month in months %}
{% set currentDate = [month.format('Y'),month.format('m')] | join('-') %}
<a class="list-group-item {{ currentDate == current ? 'active' }}"
href="{{ path('announcements.view', {year: month.format('Y'), month: month.format('m')}) }}">{{ month.format('M Y') }}</a>
{% endfor %}
</ul>
</div>
</div>
</div>
<div class="col-md-9 col-sm-12">
{% for row in announcements|batch(3) %}
<div class="card-group" style="margin-top: 30px;">

{% for announcement in row %}
<div class="card">
<div class="card-header p-0 mx-3 mt-3 position-relative z-index-1">
<a href="{{ path('announcements.show', {id: announcement.id}) }}" class="d-block">
<img src="{{ announcement.thumbnailUrl }}" class="img-fluid border-radius-lg">
</a>
</div>

<div class="card-body pt-2">
{% if announcement.pinned %}
<span class="text-gradient text-primary text-uppercase text-xs font-weight-bold my-2">{{ trans("pinned") }}</span>
{% endif %}
<a href="{{ path('announcements.show', {id: announcement.id}) }}" class="card-title h5 d-block text-darker">
{{ announcement.title }}
</a>
<p class="card-description mb-4">
{{ announcement.excerpt | raw }}
</p>
<a class="card-footer" href="{{ path('announcements.show', {id: announcement.id}) }}">
{{ trans("see_more") }}
</a>
<div class="author align-items-center">
<div class="name ps-3">
<div class="stats">
<small>{{ announcement.createdAt.format('h M y') }}</small>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</section>
{% endblock %}

{% block scripts %}
{{ ago_scripts() }}

{% endblock %}
56 changes: 32 additions & 24 deletions Theme/Argon/Views/Basket/show.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,48 +15,49 @@
<div class="row">

{% for row in basket.rows %}
<div class="col-lg-6 col-md-6 col-12 row-{{ row.product.id }}">
<div class="row-{{ row.product.id }}">

<div class="col-12">
<div class="row">
<div class="col-lg-6 col-md-6 col-12">
<div class="d-flex">
<div>
<h6 class="text-lg mb-0 mt-2">{{ row.product.name }}</h6>
<span class="badge bg-primary" id="price-{{ row.product.id }}">{{trans("price") }}
:
{{ row.product.originalPrice(row.toRecurring().name) | formatted_price(true, 'none') | trans }}</span>
{% if row.product.originalSetupfee(row.toRecurring().name) != 0 %}
<span class="badge bg-info" id="setupfee-{{ row.product.id }}">{{trans("setupfee") }}
:
{{ row.product.originalSetupfee(row.toRecurring().name) | formatted_price(true, 'none') | trans }}</span>
<div class="row mt-3">
{% endif %}
<p class="text-sm mb-3 mt-3">
{% if row.product.data is empty %}
<div class="col-lg-3 col-sm-12">

<input type="number" class="form-control quantity" name="quantity" value="{{ row.quantity }}" id="quantity-{{ row.quantity }}" style="width:5rem;" data-id="{{ row.product.id }}" onchange="changeQuantity(this)">
</div>
<input type="number" class="form-control quantity" name="quantity" value="{{ row.quantity }}" id="quantity-{{ row.quantity }}" style="width:5rem;" data-id="{{ row.product.id }}" onchange="changeQuantity(this)">
{% else %}
<p>{{ row.product.primaryData }}</p>
{{ row.product.primaryData }}
{% endif %}
</p>

{% if row.product.free %}
<p>{{ trans("recurrings.monthly") }}</p>
{{ trans("recurrings.monthly") }}
{% elseif row.product.paymenttype == 'onetime' %}
<p>{{ trans("onetime") }}</p>
{{ trans("onetime") }}
{% else %}

{% if row.isUniqueCycle() %}
<p>{{ trans(row.UniqueCycle.translateKey) }}</p>
{{ trans(row.UniqueCycle.translateKey) }}
{% else %}
<div class="col-lg-9 col-sm-12">

<select class="form-control billing" data-id="{{ row.product.id }}" onchange="changeBilling(this)">
{% for cycle in row.cyclesAvailable %}
{% if row.product.originalPrice(cycle.name, 0, true) != 0 %}
<option value="{{ cycle.name }}" {% if cycle.name == row.billing %} selected {% endif %}>{{ trans(cycle.translateKey) }} {{ row.product.getDiscountForRecurring(cycle, row.UniqueCycle)!= 0 ? row.product.getDiscountForRecurring(cycle, row.UniqueCycle) ~ "% Saved" }}</option>
<option value="{{ cycle.name }}" {% if cycle.name == row.billing %} selected {% endif %}>{{ trans(cycle.translateKey) }}</option>
{% endif %}
{% endfor %}
</select>
</div>
{% endif %}
{% endif %}
</div>


</div>
</div>
Expand All @@ -74,25 +75,28 @@
<i class="fas fa-trash"></i>
</button>
</div>
</div>
</div>
</div>
{% endfor %}

<div class="col-lg-9 col-md-6 col-12"></div>
<div class="col-lg-3 col-12 ms-auto">
<h6 class="mb-3">{{trans("basket.title")}}</h6>
<div class="d-flex justify-content-between">
<span class="mb-2 text-sm">
<span class="mb-2">
<strong>{{ trans("subtotal") }}:</strong>
</span>
<span class="text-dark font-weight-bold ms-2" id="subtotal">{{ basket.subtotal | formatted_price(true, "none") | trans }}</span>
</div>
<div class="d-flex justify-content-between">
<span class="mb-2 text-sm">
<span class="mb-2">
<strong>{{ trans("discount") }}:</strong>
</span>
<span class="text-dark ms-2 font-weight-bold" id="discount">{{ basket.discount | formatted_price(true, "none") | trans }}</span>
</div>
<div class="d-flex justify-content-between">
<span class="text-sm">
<span class="">
<strong>{{ trans("setupfee") }}:</strong>
</span>
<span class="text-dark ms-2 font-weight-bold" id="setupfee">{{ basket.setupfee | formatted_price(true, "none") | trans }}</span>
Expand All @@ -102,18 +106,22 @@
<span class="text-sm">
<strong>{{ trans("tax") }}:</strong>
</span>
<span class="text-dark ms-2 font-weight-bold" id="tax">{{ basket.vat(current_user()) }}</span>
<span class="text-dark ms-2 font-weight-bold" id="tax">{{ basket.vat(current_user()) }}%</span>
</div>

<div class="d-flex justify-content-between mt-4">
<span class="mb-2 text-lg">
Total:
<div class="d-flex justify-content-between">
<span class="text-sm">
<strong>{{ trans("total") }}:</strong>
</span>
<span class="text-dark text-lg ms-2 font-weight-bold" id="total">{{ basket.total | formatted_price(true, "none") | trans }}</span>
<span class="text-dark ms-2 font-weight-bold" id="total">{{ basket.total | formatted_price(true, "none") | trans }} </span>
</div>

<div class="d-flex justify-content-between mt-4">
<a href="{{ path('basket.checkout') }}" class="btn btn-primary float-right" style="max-width:auto;">{{ trans("basket.checkout" ) }}</a>
</div>

</div>
</div>
<a href="{{ path('basket.checkout') }}" class="btn btn-primary float-right" style="max-width:auto;">{{ trans("basket.checkout" ) }}</a>

</div>
</div>
Expand Down
122 changes: 1 addition & 121 deletions Theme/Argon/Views/Proxmox/data.twig
Original file line number Diff line number Diff line change
@@ -1,121 +1 @@
{% if inAdmin %}
{% set bootstrap = 'v4' %}
{% endif %}
<style>
.imagecheck {
margin: 0;
position: relative;
cursor: pointer;
}
.imagecheck-input {
position: absolute;
z-index: -1;
opacity: 0;
}
.card.card-large-icons .card-icon .fab {
font-size: 60px;
}
.card-icon {
display: flex;
justify-content: center;
padding: 10px;
}
.imagecheck-input:checked ~ .imagecheck-figure:before {
opacity: 1;
}
.imagecheck-figure:before {
content: '';
position: absolute;
top: .25rem;
left: .25rem;
display: block;
width: 1rem;
height: 1rem;
pointer-events: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background: var({{ bootstrap == 'v4' ? '--primary' : '--bs-primary'}}) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E") no-repeat center center/50% 50%;
color: #fff;
z-index: 1;
border-radius: 3px;
opacity: 0;
transition: .3s opacity;
}
</style>
<div class="col-md-12 col-xl-{{ inAdmin == false ? 12 : 6 }} col-sm-12">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-12">
{% if bootstrap == 'v4' %}
<div class="form-group custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="choosehostname" name="choosehostname" data-toggle="collapse" {{ item.choosehostname ? 'checked' }} data-target="#virtualizorGroup">
<label class="custom-control-label" for="choosehostname">
{{ trans("proxmox.choosehostname") }}
</label>
</div>

<div id="virtualizorGroup" class="{{ item.choosehostname ? 'show' : 'collapse' }} mt-3">
{{ field('hostname', item.hostname, trans("proxmox.hostname")) }}
</div>
{% else %}

<div class="form-check">
<input type="checkbox" class="form-check-input" id="choosehostname" name="choosehostname" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne" {{ item.choosehostname ? 'checked' }}>
<label class="form-check-label" for="choosehostname">
{{ trans("proxmox.choosehostname") }}
</label>
</div>
<div id="collapseOne" class="accordion-collapse border-0 {{item.choosehostname ? 'collapse show' : 'collapse'}}" aria-labelledby="headingOne" data-bs-parent="#choosehostname">
{{ field('hostname', item.hostname, trans("proxmox.hostname")) }}
</div>
{% 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 %}

<div class="row mt-4">

{% for key, value in oses %}

<div class="col-xl-4 col-sm-12 col-md-6 col-12">
<label class="imagecheck mb-2 mt-2">
<input name="osid" type="radio" value="{{ key }}" {{ loop.first ? 'checked' : '' }} class="imagecheck-input" />
<div class="card card-large-icons imagecheck-figure">
<div class="card-icon bg-primary text-white">
{% if value is proxmox_debian %}
<img
src="{{ theme_global('debian.svg') }}" width="60" height="60">
{% else %}
<i class="{{ value | proxmox_os_icon }}"></i>
{% endif %}
</div>
<div class="card-body">
<p>
{{ value }}
</p>
</div>
</div>
</label>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>

{{ include('@proxmox-copy/data', {bootstrap: 'v5'}) }}
3 changes: 1 addition & 2 deletions Theme/Argon/Views/Shop/domaindata.twig
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{% set boostrap = 'v5' %}
{% include('@shop/domaindata') %}
{{ include('@shop-copy/domaindata', {bootstrap: 'v5'}) }}
4 changes: 1 addition & 3 deletions Theme/Argon/Views/Virtualizor/data.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% set bootstrap = 'v5' %}

{% include "@virtualizor-copy/data.twig" %}
{{ include('@virtualizor-copy/data', {bootstrap: 'v5'}) }}
4 changes: 1 addition & 3 deletions Theme/Argon/Views/VirtualizorCloud/data.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{% set bootstrap = 'v5' %}

{% include "@virtualizorcloud-copy/data.twig" %}
{{ include('@virtualizorcloud-copy/data', {bootstrap: 'v5'}) }}
Loading

0 comments on commit 98b24ea

Please sign in to comment.