Skip to content

Commit

Permalink
style: Better table style for horizontal ones
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Sep 12, 2023
1 parent a826ec9 commit 8c6246a
Show file tree
Hide file tree
Showing 25 changed files with 88 additions and 91 deletions.
4 changes: 2 additions & 2 deletions lib/RoadizFontBundle/templates/admin/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<div class="content-table-cont metadata-list">
<table class="uk-table content-table">
<tr>
<td>{% trans %}created.at{% endtrans %}</td>
<th>{% trans %}created.at{% endtrans %}</th>
<td>{{ item.createdAt|format_datetime('long', locale=app.request.locale) }}</td>
</tr>
<tr>
<td>{% trans %}updated.at{% endtrans %}</td>
<th>{% trans %}updated.at{% endtrans %}</th>
<td>{{ item.updatedAt|format_datetime('long', locale=app.request.locale) }}</td>
</tr>
</table>
Expand Down
12 changes: 6 additions & 6 deletions lib/RoadizRozierBundle/templates/documents/preview.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@
<article class="content content-document-infos">
<div class="content-inner">
<table class="uk-table content-table">
<tr><td>{% trans %}document.relative_url{% endtrans %}</td><td>{{ document|url(thumbnailFormat) }}</td></tr>
<tr><td>{% trans %}document.absolute_url{% endtrans %}</td><td>{{ document|url(thumbnailFormat|merge({absolute:true})) }}</td></tr>
<tr><td>{% trans %}document.unprocessed_url{% endtrans %}</td><td>{{ document|url({noProcess:true}) }}</td></tr>
<tr><th>{% trans %}document.relative_url{% endtrans %}</th><td>{{ document|url(thumbnailFormat) }}</td></tr>
<tr><th>{% trans %}document.absolute_url{% endtrans %}</th><td>{{ document|url(thumbnailFormat|merge({absolute:true})) }}</td></tr>
<tr><th>{% trans %}document.unprocessed_url{% endtrans %}</th><td>{{ document|url({noProcess:true}) }}</td></tr>
{% if document.isEmbed and document|embedFinder %}
<tr><td>{% trans %}document.source_url{% endtrans %}</td><td>{{ (document|embedFinder).source }}</td></tr>
<tr><th>{% trans %}document.source_url{% endtrans %}</th><td>{{ (document|embedFinder).source }}</td></tr>
{% endif %}
<tr><td>{% trans %}document.filesize{% endtrans %}</td><td>{{ document.filesize|formatBytes }}</td></tr>
<tr><th>{% trans %}document.filesize{% endtrans %}</th><td>{{ document.filesize|formatBytes }}</td></tr>
{% for key, info in infos %}
<tr><td>{{ ('document.' ~ key)|trans }}</td><td>{{ info }}</td></tr>
<tr><th>{{ ('document.' ~ key)|trans }}</th><td>{{ info }}</td></tr>
{% endfor %}
</table>
{% if otherVideos|length %}
Expand Down
4 changes: 2 additions & 2 deletions lib/RoadizRozierBundle/templates/nodes/editAliases.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{% endif %}

<h2 id="manage-aliases" class="content-subtitle">{% trans %}urlAlias{% endtrans %}</h2>
<p class="form-row-desc"><small>{% trans %}nodeSource.urlAlias.help{% endtrans %}</small></p>
<p class="form-row-desc">{% trans %}nodeSource.urlAlias.help{% endtrans %}</p>

<div class="content-table-cont">
<table class="aliases content-table uk-table">
Expand Down Expand Up @@ -75,7 +75,7 @@
<hr />

<h2 id="manage-redirections" class="content-subtitle">{% trans %}manage.redirections{% endtrans %}</h2>
<p class="form-row-desc"><small>{% trans %}nodeSource.redirections.help{% endtrans %}</small></p>
<p class="form-row-desc">{% trans %}nodeSource.redirections.help{% endtrans %}</p>

<div class="content-table-cont">
<table class="redirections content-table uk-table">
Expand Down
4 changes: 2 additions & 2 deletions lib/RoadizRozierBundle/templates/realms/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<div class="content-table-cont metadata-list">
<table class="uk-table content-table">
<tr>
<td>{% trans %}created.at{% endtrans %}</td>
<th>{% trans %}created.at{% endtrans %}</th>
<td>{{ item.createdAt|format_datetime('long', locale=app.request.locale) }}</td>
</tr>
<tr>
<td>{% trans %}updated.at{% endtrans %}</td>
<th>{% trans %}updated.at{% endtrans %}</th>
<td>{{ item.updatedAt|format_datetime('long', locale=app.request.locale) }}</td>
</tr>
</table>
Expand Down
8 changes: 7 additions & 1 deletion lib/Rozier/src/Resources/app/less/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ background: #CCC;

.uk-text-small {
max-width: 650px;
letter-spacing: 0.02em;
font-size: 12px;
letter-spacing: 0.005em;
line-height: 17px;

&.uk-text-muted {
color: #a5a5a5 !important;
}
}

.uk-text-danger {
Expand Down
20 changes: 10 additions & 10 deletions lib/Rozier/src/Resources/app/less/forms/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,6 @@
}
}

.form-row-desc {
max-width: 450px;
font-size: 12px;
letter-spacing: 0.005em;
line-height: 16px;
color: #b0b0b0;
margin: 5px 0 10px;
display: block;
}

.datetime-separator{
display: none;
}
Expand Down Expand Up @@ -413,6 +403,16 @@
}
}

.form-row-desc {
max-width: 550px;
font-size: 12px;
letter-spacing: 0.005em;
line-height: 17px;
color: #a5a5a5;
margin: 5px 0 10px;
display: block;
}

.uk-form-row {
position: relative;
margin: 1em 0;
Expand Down
5 changes: 2 additions & 3 deletions lib/Rozier/src/Resources/app/less/node-types/node-types.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@
padding-left: 15px;

.color {
background-color: attr(data-color);
background-color: var(--data-color);
display: block;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 5px;

border-left: 1px solid rgba(0,0,0,0.15);
//border-left: 1px solid rgba(0,0,0,0.15);
.box-sizing();
}
}
.not-reachable .name {
padding-left: 25px;
//border-left: 1px dashed #c5c5c5;

.color {
width: 10px;
Expand Down
11 changes: 7 additions & 4 deletions lib/Rozier/src/Resources/app/less/tables/tables.less
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@
th {
vertical-align: middle;
position: relative;
color:@form-head-color;
background-color: rgba(255, 255, 255, 0.75);
//border-left:1px solid @form-head-border-color;
color: @form-head-color;
.box-sizing();

a {
Expand All @@ -60,6 +58,11 @@
}
}
}
thead {
th {
background-color: rgba(255, 255, 255, 0.75);
}
}
td {
border-top: 1px solid white;
border-bottom: 1px solid @form-row-border-color;
Expand All @@ -75,7 +78,7 @@
}

&:nth-of-type(2n){
td {
td, th {
background-color: rgba(255, 255, 255, 0.75);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<table class="content-table uk-table">
{% for key, cache in cachesInfo %}
<tr>
<td>{{ key|trans }}</td>
<th>{{ key|trans }}</th>
<td>{% if cache %}<i class="uk-icon-check"></i> {{ cache }}{% else %}<i class="uk-icon-close"></i> {% trans %}no.cache.available{% endtrans %}{% endif %}</td>
</tr>
{% endfor %}
Expand Down
4 changes: 2 additions & 2 deletions lib/Rozier/src/Resources/views/custom-forms/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<div class="content-table-cont metadata-list">
<table class="uk-table content-table">
<tr>
<td>{% trans %}created.at{% endtrans %}</td>
<th>{% trans %}created.at{% endtrans %}</th>
<td>{{ item.createdAt|format_datetime('long', locale=app.request.locale) }}</td>
</tr>
<tr>
<td>{% trans %}updated.at{% endtrans %}</td>
<th>{% trans %}updated.at{% endtrans %}</th>
<td>{{ item.updatedAt|format_datetime('long', locale=app.request.locale) }}</td>
</tr>
</table>
Expand Down
12 changes: 6 additions & 6 deletions lib/Rozier/src/Resources/views/documents/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,34 @@
<div class="content-table-cont metadata-list">
<table class="uk-table content-table">
<tr>
<td>{% trans %}created.at{% endtrans %}</td>
<th>{% trans %}created.at{% endtrans %}</th>
<td>{{ document.createdAt|format_datetime('long', locale=app.request.locale) }}</td>
</tr>
<tr>
<td>{% trans %}updated.at{% endtrans %}</td>
<th>{% trans %}updated.at{% endtrans %}</th>
<td>{{ document.updatedAt|format_datetime('long', locale=app.request.locale) }}</td>
</tr>
{% if document.Local %}
<tr>
<td>{% trans %}document.filepath{% endtrans %}</td>
<th>{% trans %}document.filepath{% endtrans %}</th>
<td>{{ document|path }}</td>
</tr>
{% endif %}
{% if not document.private and document.Local %}
<tr>
<td>{% trans %}document.public_url{% endtrans %}</td>
<th>{% trans %}document.public_url{% endtrans %}</th>
<td>{{ document|url({noProcess: true}) }}</td>
</tr>
{% endif %}
{% if rawDocument and rawDocument.Local %}
<tr>
<td>{% trans %}document.raw_document{% endtrans %}</td>
<th>{% trans %}document.raw_document{% endtrans %}</th>
<td><p>{{ rawDocument|path }}</p><p><a href="{{ path('documentsDownloadPage', { documentId: rawDocument.id}) }}" class="uk-button uk-button-small rz-no-ajax-link"><i class="uk-icon-cloud-download"></i> {% trans %}download.raw.document{% endtrans %}</a></p></td>
</tr>
{% endif %}
{% if document.original %}
<tr>
<td>{% trans %}original.document{% endtrans %}</td>
<th>{% trans %}original.document{% endtrans %}</th>
<td>
<p>{{ document.original.filename }}</p>
<p><a
Expand Down
6 changes: 3 additions & 3 deletions lib/Rozier/src/Resources/views/folders/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
<div class="content-table-cont metadata-list">
<table class="uk-table content-table">
<tr>
<td>{% trans %}created.at{% endtrans %}</td>
<th>{% trans %}created.at{% endtrans %}</th>
<td>{{ folder.createdAt|format_datetime('long', locale=app.request.locale) }}</td>
</tr>
<tr>
<td>{% trans %}updated.at{% endtrans %}</td>
<th>{% trans %}updated.at{% endtrans %}</th>
<td>{{ folder.updatedAt|format_datetime('long', locale=app.request.locale) }}</td>
</tr>
<tr>
<td>{% trans %}position{% endtrans %}</td>
<th>{% trans %}position{% endtrans %}</th>
<td>{{ folder.position }}</td>
</tr>
</table>
Expand Down
4 changes: 2 additions & 2 deletions lib/Rozier/src/Resources/views/node-types/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
<div class="content-table-cont metadata-list">
<table class="node-types content-table uk-table">
<tr>
<td>{% trans %}name{% endtrans %}</td>
<th>{% trans %}name{% endtrans %}</th>
<td>{{ nodeType.name }}</td>
</tr>
<tr>
<td>{% trans %}classname{% endtrans %}</td>
<th>{% trans %}classname{% endtrans %}</th>
<td>{{ nodeType.sourceEntityClassName() }}</td>
</tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion lib/Rozier/src/Resources/views/node-types/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

<tr class="{{ classes|join(' ') }}">
<td class="name"><a href="{{ path('nodeTypesEditPage', { nodeTypeId: type.getId }) }}">
<span class="color" style="background-color:{{ type.getColor }};"></span>{{ type.getName }}
<span class="color" style="--data-color:{{ type.getColor }};"></span>{{ type.getName }}
</a></td>
<td class="mobile-hidden uk-hidden-small">{{ type.getDisplayName }}</td>
<td class="mobile-hidden uk-hidden-small uk-visible-xlarge">{{ type.getSourceEntityClassName }}</td>
Expand Down
55 changes: 22 additions & 33 deletions lib/Rozier/src/Resources/views/nodes/attributes/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,16 @@
</header>

<article class="content content-settings-list">
<div class="content-table-cont">
<div class="content-table-cont uk-margin">
<table class="attribute-value-forms content-table settings uk-table attributes">
<thead>
<tr>
<th colspan="3">{% trans %}attributes{% endtrans %}</th>
<th>{% trans %}actions{% endtrans %}</th>
</tr>
</thead>
<tbody class="uk-sortable" data-uk-sortable="{animation:0, dragCustomClass:'setting-row rz-node-type-field-dragged', handleClass:'attribute-value-col'}">
{% for attribute_value_translation_form in attribute_value_translation_forms %}
{% set attributeValue = attribute_value_translation_form.vars.data.attributeValue %}
<tr class="setting-row" data-position="{{ attributeValue.position }}" data-id="{{ attributeValue.getId }}">
<td class="name attribute-value-col">
<span class="color" style="background-color:{{ attributeValue.attribute.color|default('transparent') }};"></span>
<th class="name attribute-value-col">
<span class="color" style="--data-color: {{ attributeValue.attribute.color|default('transparent') }};"></span>
<strong>{{- attribute_value_translation_form.vars.data|attribute_label -}}</strong>
</td>
</th>
<td class="uk-visible-xlarge">
{%- if attributeValue.attribute.group %}
{{- attributeValue.attribute.group|attribute_group_label -}}
Expand Down Expand Up @@ -89,30 +83,25 @@
{% endfor %}
</tbody>
</table>

{% if addAttributeForm %}
<table>
<tr>
<td>
{% form_theme addAttributeForm '@RoadizRozier/horizontalForms.html.twig' %}
{{ form_start(addAttributeForm, {
'attr': {
'id': 'add-node-attribute-form',
'class': 'uk-form uk-form-stacked'
}
}) }}{{ form_widget(addAttributeForm) }}
{% apply spaceless %}
<button class="uk-button uk-button-primary" type="submit">
<span class="icon-container"><i class="uk-icon-rz-plus"></i></span>
<span class="label"><span class="label-text">{% trans %}add.a.node.attribute{% endtrans %}</span></span>
</button>
{% endapply %}
{{ form_end(addAttributeForm) }}
</td>
</tr>
</table>
{% endif %}
</div>
{% if addAttributeForm %}
<div class="content-table-cont uk-margin">
{% form_theme addAttributeForm '@RoadizRozier/horizontalForms.html.twig' %}
{{ form_start(addAttributeForm, {
'attr': {
'id': 'add-node-attribute-form',
'class': 'uk-form uk-form-stacked'
}
}) }}{{ form_widget(addAttributeForm) }}
{% apply spaceless %}
<button class="uk-button uk-button-primary" type="submit">
<span class="icon-container"><i class="uk-icon-rz-plus"></i></span>
<span class="label"><span class="label-text">{% trans %}add.a.node.attribute{% endtrans %}</span></span>
</button>
{% endapply %}
{{ form_end(addAttributeForm) }}
</div>
{% endif %}
<hr>

{% set currentPath = path('nodesEditAttributesPage', {
Expand Down
6 changes: 3 additions & 3 deletions lib/Rozier/src/Resources/views/nodes/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
<div class="content-table-cont metadata-list">
<table class="uk-table content-table">
<tr>
<td>{% trans %}created.at{% endtrans %}</td>
<th>{% trans %}created.at{% endtrans %}</th>
<td>{{ node.createdAt|format_datetime('long', locale=app.request.locale) }}</td>
</tr>
<tr>
<td>{% trans %}updated.at{% endtrans %}</td>
<th>{% trans %}updated.at{% endtrans %}</th>
<td>{{ node.updatedAt|format_datetime('long', locale=app.request.locale) }}</td>
</tr>
<tr>
<td>{% trans %}position{% endtrans %}</td>
<th>{% trans %}position{% endtrans %}</th>
<td>{{ node.position }}</td>
</tr>
</table>
Expand Down
4 changes: 2 additions & 2 deletions lib/Rozier/src/Resources/views/partials/js-inject.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<script src="{{ asset('js/vendor.bef642fdf27e97764a84.js', 'Rozier') }}" defer type="text/javascript"></script>
<script src="{{ asset('js/vendor.4709f8b7db4362e04115.js', 'Rozier') }}" defer type="text/javascript"></script>

<script src="{{ asset('js/app.bef642fdf27e97764a84.js', 'Rozier') }}" defer type="text/javascript"></script>
<script src="{{ asset('js/app.4709f8b7db4362e04115.js', 'Rozier') }}" defer type="text/javascript"></script>

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

<script src="{{ asset('js/simple.bef642fdf27e97764a84.js', 'Rozier') }}" defer type="text/javascript"></script>
<script src="{{ asset('js/simple.4709f8b7db4362e04115.js', 'Rozier') }}" defer type="text/javascript"></script>

Loading

0 comments on commit 8c6246a

Please sign in to comment.