Skip to content

Commit

Permalink
Refactor/template styles (#14)
Browse files Browse the repository at this point in the history
* Moved all styles to css files

* Updated version

---------

Co-authored-by: Konrad Sroga <konradsroga@gmail.com>
  • Loading branch information
pteroca-com and ksroga authored Sep 9, 2024
1 parent b14c3d3 commit 39d52f3
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 64 deletions.
8 changes: 8 additions & 0 deletions public/assets/css/panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,12 @@ a:hover {
border: 1px solid #e0e0e0;
border-radius: 8px;
box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.05);
}

.product-image-container {
height: 200px;
width: 100%;
overflow: hidden;
background-size: cover;
border-radius: 7px;
}
2 changes: 1 addition & 1 deletion src/Core/Twig/AppExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ public function getCaptchaSiteKey(): ?string

public function getAppVersion(): string
{
return '0.2.1';
return '0.2.2';
}
}
11 changes: 0 additions & 11 deletions templates/panel/registration/register.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('/assets/css/app.css') }}">
<link rel="stylesheet" href="{{ asset('/assets/css/panel.css?v=' ~ get_app_version()) }}">
<style>
body {
background: #f1f5f9;
}
.login-wrapper {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
</style>
{% endblock %}

{% block body %}
Expand Down
11 changes: 0 additions & 11 deletions templates/panel/reset_password/request.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@
{% endblock %}

{% block body %}
<style>
body {
background: #f1f5f9;
}
.login-wrapper {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
</style>
<div class="container">
<div class="row">
<div class="col-12">
Expand Down
11 changes: 0 additions & 11 deletions templates/panel/reset_password/reset.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@
{% endblock %}

{% block body %}
<style>
body {
background: #f1f5f9;
}
.login-wrapper {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
</style>
<div class="container">
<div class="row">
<div class="col-12">
Expand Down
16 changes: 1 addition & 15 deletions templates/panel/store/product.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,11 @@
</a>
{% endblock %}

{% block head_stylesheets %}
{{ parent() }}
<style>
.product-image-container {
height: 200px;
width: 100%;
overflow: hidden;
background: url("{{ product.imagePath ?? asset('/assets/img/placeholders/300x150.png') }}") no-repeat center center;
background-size: cover;
border-radius: 7px;
}
</style>
{% endblock %}

{% block main %}
<div class="container mt-5 product-details">
<h1 class="product-name">{{ product.name }}</h1>
<div class="row">
<div class="col-md-12 product-image-container mt-3 mb-5"></div>
<div class="col-md-12 product-image-container mt-3 mb-5" style='background: url("{{ product.imagePath ?? asset('/assets/img/placeholders/300x150.png') }}")'></div>
<div class="col-md-8">
<h2>{{ 'pteroca.product.information'|trans }}</h2>
<p>{{ product.description }}</p>
Expand Down
16 changes: 1 addition & 15 deletions templates/panel/store/renew.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,11 @@
</a>
{% endblock %}

{% block head_stylesheets %}
{{ parent() }}
<style>
.product-image-container {
height: 200px;
width: 100%;
overflow: hidden;
background: url("{{ product.imagePath ?? asset('/assets/img/placeholders/300x150.png') }}") no-repeat center center;
background-size: cover;
border-radius: 7px;
}
</style>
{% endblock %}

{% block main %}
<div class="container mt-5 product-details">
<h1>{{ 'pteroca.renew.title'|trans }}: {{ product.name }}</h1>
<div class="row">
<div class="col-md-12 product-image-container mt-3 mb-5"></div>
<div class="col-md-12 product-image-container mt-3 mb-5" style='background: url("{{ product.imagePath ?? asset('/assets/img/placeholders/300x150.png') }}")'></div>
<div class="col-md-8">
<h2>{{ 'pteroca.product.information'|trans }}</h2>
<p>{{ product.description }}</p>
Expand Down

0 comments on commit 39d52f3

Please sign in to comment.