2020-04-24 18:08:09 +02:00
|
|
|
{% extends "layouts/app.twig" %}
|
|
|
|
{% import 'macros/base.twig' as m %}
|
|
|
|
{% import 'macros/form.twig' as f %}
|
|
|
|
|
|
|
|
{% block title %}{{ __('Design') }}{% endblock %}
|
|
|
|
|
|
|
|
{% set colors=['success', 'info', 'warning', 'danger'] %}
|
2021-04-29 21:58:20 +02:00
|
|
|
{% set types=[
|
|
|
|
'primary',
|
|
|
|
'secondary',
|
|
|
|
'success',
|
|
|
|
'danger',
|
|
|
|
'warning',
|
|
|
|
'info',
|
|
|
|
'light',
|
|
|
|
'dark'
|
|
|
|
]
|
|
|
|
%}
|
2021-04-17 14:49:53 +02:00
|
|
|
{% set types_color=[
|
|
|
|
['primary', 'light'],
|
|
|
|
['secondary', 'light'],
|
|
|
|
['success', 'light'],
|
|
|
|
['danger', 'light'],
|
|
|
|
['warning', 'dark'],
|
|
|
|
['info', 'dark'],
|
|
|
|
['light', 'dark'],
|
|
|
|
['dark', 'light'],
|
|
|
|
] %}
|
2021-08-05 01:00:12 +02:00
|
|
|
{% set types_buttons=['link']|merge(types) %}
|
2021-07-25 21:41:57 +02:00
|
|
|
{% set shortsum='Lorem ipsum dolor…' %}
|
2020-04-24 18:08:09 +02:00
|
|
|
{% set lipsum='Lorem ipsum dolor sit amet, consectetur adipisici elit…' %}
|
2021-04-10 17:02:34 +02:00
|
|
|
{% set linksum='Lorem ipsum! Dolor <a href="#">link</a> amet, consectetur adipisici elit!' %}
|
2020-04-24 18:08:09 +02:00
|
|
|
|
|
|
|
{% block content %}
|
2021-04-17 14:47:01 +02:00
|
|
|
<div class="col-12">
|
|
|
|
<div class="container">
|
2021-07-29 21:05:45 +02:00
|
|
|
<h1 class="mb-4">
|
|
|
|
{{ block('title') }} <small class="text-muted">{{ themes[themeId]['name'] }}</small>
|
|
|
|
</h1>
|
2020-04-24 18:08:09 +02:00
|
|
|
|
2021-04-17 14:47:01 +02:00
|
|
|
<h2>Elements <small class="text-muted">small</small></h2>
|
2020-04-24 18:08:09 +02:00
|
|
|
<div class="row">
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-6 col-lg-2 mb-4">
|
2021-04-17 14:49:53 +02:00
|
|
|
<h3>Headings <small class="text-muted">small</small></h3>
|
|
|
|
<h4>H4 <small class="text-muted">small</small></h4>
|
|
|
|
<h5>H5 <small class="text-muted">small</small></h5>
|
|
|
|
<h6>H6 <small class="text-muted">small</small></h6>
|
2021-04-10 17:02:34 +02:00
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-6 mb-4">
|
2021-04-10 17:02:34 +02:00
|
|
|
<h3>Lists</h3>
|
|
|
|
<p>
|
|
|
|
This page should be used when creating and testing new designs to find usability and/or design issues.
|
|
|
|
{{ lipsum|replace({'…': '.'}) }}
|
|
|
|
</p>
|
|
|
|
<ul>
|
|
|
|
<li>Unordered</li>
|
|
|
|
<li>List</li>
|
|
|
|
<li>Items</li>
|
|
|
|
</ul>
|
|
|
|
<ol>
|
|
|
|
<li>Ordered</li>
|
|
|
|
<li>List</li>
|
|
|
|
<li>Items</li>
|
|
|
|
</ol>
|
|
|
|
<p>{{ linksum|raw }} {{ lipsum }}</p>
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-lg-4 mb-4">
|
2021-04-10 17:02:34 +02:00
|
|
|
<h3>Themes</h3>
|
|
|
|
<ul>
|
2021-04-29 21:58:20 +02:00
|
|
|
{% for id,theme in themes %}
|
2021-04-10 17:02:34 +02:00
|
|
|
<li>
|
|
|
|
<a href="{{ url('design', {'theme': id}) }}">
|
2021-04-29 21:58:20 +02:00
|
|
|
{{ theme['name'] }}
|
2021-04-10 17:02:34 +02:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2020-04-24 18:08:09 +02:00
|
|
|
</div>
|
2021-04-10 17:02:34 +02:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-6 col-lg-4 mb-4">
|
2020-04-24 18:08:09 +02:00
|
|
|
<h3>Tables</h3>
|
|
|
|
<table class="table table-striped">
|
|
|
|
<tr>
|
|
|
|
<th>Header 1</th>
|
|
|
|
<th>Header 2</th>
|
|
|
|
<th>Header 3</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Table content</td>
|
|
|
|
<td>{{ lipsum }}</td>
|
2021-07-22 21:22:21 +02:00
|
|
|
<td><span class="text-success">{{ m.icon('check-lg') }}</span></td>
|
2020-04-24 18:08:09 +02:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Another content</td>
|
|
|
|
<td></td>
|
2021-07-22 21:22:21 +02:00
|
|
|
<td><span class="text-danger">{{ m.icon('x-lg') }}</span></td>
|
2020-04-24 18:08:09 +02:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-6 col-lg-4 mb-4">
|
2021-04-10 17:02:34 +02:00
|
|
|
<h3>Navigation Tabs</h3>
|
|
|
|
<ul class="nav nav-tabs">
|
2021-04-17 14:49:53 +02:00
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link active" href="#">Lorem</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="#">Ipsum</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="#">Dolor</a>
|
|
|
|
</li>
|
2021-04-10 17:02:34 +02:00
|
|
|
</ul>
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-6 col-lg-4 mb-4">
|
2021-04-10 17:02:34 +02:00
|
|
|
<h3>Navigation Pills</h3>
|
2021-04-17 14:49:53 +02:00
|
|
|
<ul class="nav nav-pills flex-column">
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link active" href="#">Some</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="#">Test</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="#">Menu</a>
|
|
|
|
</li>
|
2021-04-10 17:02:34 +02:00
|
|
|
</ul>
|
|
|
|
</div>
|
2020-04-24 18:08:09 +02:00
|
|
|
</div>
|
2020-12-07 18:55:09 +01:00
|
|
|
|
2020-04-24 18:08:09 +02:00
|
|
|
<div class="row">
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-6 col-md-12 mb-4">
|
2020-04-24 18:08:09 +02:00
|
|
|
<h3>Texts</h3>
|
|
|
|
<p>
|
|
|
|
{{ linksum|raw }}<br>
|
|
|
|
{{ lipsum }} {{ lipsum|replace({'…': '.'}) }} {{ lipsum|replace({'…': '.'}) }} {{ lipsum }}
|
|
|
|
</p>
|
|
|
|
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="row mb-4">
|
2020-04-24 18:08:09 +02:00
|
|
|
{% for color in types %}
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-12 col-md-3">
|
2020-04-24 18:08:09 +02:00
|
|
|
<p class="text-{{ color }}">{{ color|capitalize }}: {{ linksum|raw }}</p>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-07 18:55:09 +01:00
|
|
|
|
2020-04-24 18:08:09 +02:00
|
|
|
<div class="row">
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-6 col-md-12 mb-4">
|
2021-04-17 14:49:53 +02:00
|
|
|
<h3>Badges</h3>
|
2020-04-24 18:08:09 +02:00
|
|
|
<p>
|
2021-04-17 14:49:53 +02:00
|
|
|
{% for type in types_color %}
|
|
|
|
<span class="badge bg-{{ type[0] }} text-{{ type[1] }}">{{ type[0]|capitalize }}</span>
|
2020-04-24 18:08:09 +02:00
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-6 col-md-12 mb-4">
|
2020-04-24 18:08:09 +02:00
|
|
|
<h3>Buttons</h3>
|
|
|
|
<p>
|
|
|
|
{% for type in types_buttons %}
|
|
|
|
{{ f.button(type|capitalize, {'btn_type': type, 'name': 'button-' ~ type}) }}
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-07 18:55:09 +01:00
|
|
|
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="row mb-4">
|
2021-07-25 21:41:57 +02:00
|
|
|
<div class="col">
|
2020-04-24 18:08:09 +02:00
|
|
|
<h3>Alerts</h3>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
{% for color in colors %}
|
2021-07-25 21:41:57 +02:00
|
|
|
<div class="col">
|
2020-04-24 18:08:09 +02:00
|
|
|
<h4>{{ color|capitalize }}</h4>
|
|
|
|
{{ m.alert(lipsum, color) }}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-07 18:55:09 +01:00
|
|
|
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="row mb-4">
|
2021-07-25 21:41:57 +02:00
|
|
|
<div class="col-md-12 mb-3">
|
|
|
|
<h3>Cards</h3>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
{% for type in types %}
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col mb-3">
|
2021-07-25 21:41:57 +02:00
|
|
|
<div class="card border-{{ type }} {{ m.type_bg_class() }}">
|
|
|
|
<h4 class="card-header bg-{{ type }}">{{ type|capitalize }}</h4>
|
|
|
|
<div class="card-body">
|
|
|
|
<p class="card-text">{{ shortsum }}</p>
|
|
|
|
<p class="card-text"><a href="#" class="card-link">Some link</a></p>
|
|
|
|
</div>
|
|
|
|
<div class="card-footer text-muted">
|
|
|
|
Footer
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="row mb-4">
|
2020-04-24 18:08:09 +02:00
|
|
|
<div class="col-md-12">
|
|
|
|
<h3>Forms</h3>
|
|
|
|
|
|
|
|
<div class="row">
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-3 col-lg-2">
|
2020-04-24 18:08:09 +02:00
|
|
|
{{ f.input('form-input-text', 'Text', 'text', {'value': 'Value'}) }}
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-3 col-lg-2">
|
2020-05-01 16:29:28 +02:00
|
|
|
{{ f.input('form-input-text-hidden-label', 'Hidden label', 'text', {'value': 'Hidden label', 'hide_label': true}) }}
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-3 col-lg-2">
|
2020-04-24 18:08:09 +02:00
|
|
|
{{ f.input('form-input-text-disabled', 'Disabled', 'text', {'disabled': true, 'value': 'Value'}) }}
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-3 col-lg-2">
|
2020-04-24 18:08:09 +02:00
|
|
|
{{ f.input('form-input-text-readonly', 'Readonly', 'text', {'readonly': true, 'value': 'Value'}) }}
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-3 col-lg-2">
|
2020-04-24 18:08:09 +02:00
|
|
|
{{ f.input('form-input-password', 'Password', 'password', {'value': 'Value'}) }}
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-3 col-lg-2">
|
2020-04-24 18:08:09 +02:00
|
|
|
{{ f.input('form-input-number', 'Number', 'number', {'value': 42}) }}
|
|
|
|
</div>
|
2020-05-01 16:29:28 +02:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-3 col-lg-2">
|
2020-04-24 18:08:09 +02:00
|
|
|
{{ f.textarea('form-input-textarea', 'Textarea', {'rows': 2, 'value': lipsum}) }}
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-3 col-lg-2">
|
2020-04-24 18:08:09 +02:00
|
|
|
{{ f.select('form-input-select', {'lorem': 'Ipsum', 'dolor': 'Sit'}, 'Select', 'dolor') }}
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-3 col-lg-2">
|
2021-04-29 21:58:20 +02:00
|
|
|
<label class="form-label">Button</label>
|
|
|
|
<div>
|
2021-07-29 20:18:40 +02:00
|
|
|
{{ f.button('Button') }}
|
2021-04-29 21:58:20 +02:00
|
|
|
</div>
|
2020-04-24 18:08:09 +02:00
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-3 col-lg-2">
|
2020-04-24 18:08:09 +02:00
|
|
|
Submit button<br>
|
|
|
|
{{ f.submit() }}
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-3 col-lg-2">
|
2020-04-24 18:08:09 +02:00
|
|
|
Checkbox<br>
|
|
|
|
{{ f.checkbox('form-input-checkbox', 'Checkbox', true) }}
|
|
|
|
{{ f.checkbox('form-input-checkbox-2', 'Checkbox 2') }}
|
|
|
|
</div>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="col-md-3 col-lg-2 checkbox-inline">
|
2020-04-24 18:08:09 +02:00
|
|
|
Radio<br>
|
|
|
|
<label>
|
|
|
|
<input type="radio" checked="checked" name="form-input-radio" value="1"> Yey
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
<input type="radio" name="form-input-radio"> Nay
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-12-07 18:55:09 +01:00
|
|
|
<h3>Other</h3>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="row mb-4">
|
2021-07-25 21:41:57 +02:00
|
|
|
<div class="col">
|
2020-12-07 18:55:09 +01:00
|
|
|
<h4>Code</h4>
|
|
|
|
<p>
|
2021-07-25 21:41:57 +02:00
|
|
|
<code>3.1415926535897932384626433832795</code>
|
2020-12-07 18:55:09 +01:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-04-24 18:08:09 +02:00
|
|
|
|
|
|
|
<h2>Macros</h2>
|
|
|
|
<h3>base.twig</h3>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="row mb-4">
|
2020-04-24 18:08:09 +02:00
|
|
|
<div class="col-md-3">
|
|
|
|
<h4><code>angel()</code></h4>
|
|
|
|
<p>{{ m.angel() }}</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
2021-07-22 21:22:21 +02:00
|
|
|
<h4><code>icon(icon_name)</code></h4>
|
|
|
|
<p>{{ m.icon('star') }}</p>
|
2020-04-24 18:08:09 +02:00
|
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<h4><code>alert(message, type)</code></h4>
|
|
|
|
<p>{{ m.alert('Test content', 'info') }}</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<h4><code>user(user)</code></h4>
|
|
|
|
<p>{{ m.user(demo_user) }}<br>{{ m.user(demo_user_2) }}</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<h4><code>button(label, url, type, size)</code></h4>
|
|
|
|
<p>{{ m.button('Label', '#', 'info', 'sm') }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h3>form.twig</h3>
|
2021-07-29 21:05:45 +02:00
|
|
|
<div class="row mb-4">
|
2020-04-24 18:08:09 +02:00
|
|
|
<div class="col-md-3">
|
|
|
|
<h4><code>input(name, label, type, opt)</code></h4>
|
|
|
|
<p>{{ f.input('input-name', 'Label', 'text', {'required': true, 'value': 'Value'}) }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
<h4><code>textarea(name, label, opt)</code></h4>
|
|
|
|
<p>{{ f.textarea('textarea-name', 'Label', {'required': true, 'rows': 2, 'value': lipsum}) }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
<h4><code>select(name, data, label, selected)</code></h4>
|
|
|
|
<p>{{ f.select('select-name', {'foo': 'Foo', 'bar': 'Bar'}, 'Label', 'bar') }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
<h4><code>checkbox(name, label, checked, value)</code></h4>
|
|
|
|
<p>
|
|
|
|
{{ f.checkbox('checkbox-name', 'Label', false) }}<br>
|
|
|
|
{{ f.checkbox('checkbox-name', 'Label', true, 'on') }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<h4><code>hidden(name, value)</code></h4>
|
|
|
|
<p>
|
|
|
|
{{ f.hidden('hidden-name', 'hidden value') | escape }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
<h4><code>button(label, opt)</code></h4>
|
|
|
|
<p>
|
2021-07-29 20:18:40 +02:00
|
|
|
{{ f.button('Label', {'name': 'button-name', 'value': 'buton-value'}) }}
|
2020-04-24 18:08:09 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-3">
|
|
|
|
<h4><code>submit(label, opt)</code></h4>
|
|
|
|
<p>
|
|
|
|
{{ f.submit() }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-04-17 14:47:01 +02:00
|
|
|
</div>
|
2020-04-24 18:08:09 +02:00
|
|
|
{% endblock %}
|