-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from loic425/features/fresh-admin
Apply new fresh admin panel
- Loading branch information
Showing
8 changed files
with
399 additions
and
2 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,230 @@ | ||
$app-brand-color: #1abb9c; | ||
$segment-spacing: 1.8em; | ||
$segment-title-spacing: 1.2em 1.8em; | ||
$accordion-title-spacing: 1.2em 1.8em; | ||
|
||
// ---------------------------------- | ||
// ------------ Globals | ||
// ---------------------------------- | ||
|
||
.ui.inverted.menu { | ||
background: #1d212b; | ||
} | ||
|
||
body.pushable .pusher { | ||
background: #f9f9f9; | ||
} | ||
|
||
#wrapper.full.height { | ||
padding: 64px 12px 0 12px; | ||
} | ||
|
||
a { | ||
color: $app-brand-color; | ||
&:hover { color: $app-brand-color; } | ||
} | ||
|
||
// ---------------------------------- | ||
// ------------ Buttons | ||
// ---------------------------------- | ||
|
||
.ui.button { | ||
font-weight: 400; | ||
} | ||
|
||
.ui.primary.button { | ||
background-color: $app-brand-color; | ||
&:hover, &:focus { background-color: #279c7f; } | ||
} | ||
|
||
.ui.labeled.icon.button { | ||
padding-left: 2.8em !important; | ||
} | ||
|
||
.ui.labeled.icon.button>.icon, | ||
.ui.labeled.icon.buttons>.button>.icon { | ||
width: 2.8em !important; | ||
background: none !important; | ||
padding-left: .2em; | ||
} | ||
|
||
// ---------------------------------- | ||
// ------------ Forms | ||
// ---------------------------------- | ||
|
||
.ui.form .field > label { | ||
margin: 0 0 .5rem 0; | ||
color: rgba(0,0,0,.8); | ||
font-weight: 400; | ||
} | ||
|
||
.ui.form .field > input:focus, | ||
.ui.form .field > textarea:focus { | ||
border-color: rgba($app-brand-color, .4); | ||
} | ||
|
||
// ---------------------------------- | ||
// ------------ Sidebar menu | ||
// ---------------------------------- | ||
|
||
#sidebar.ui.sidebar.vertical.menu { | ||
> .item:first-child { | ||
margin-bottom: 10px; | ||
} | ||
|
||
> .item:not(:first-child) { | ||
margin-right: 10px; | ||
} | ||
|
||
.item > .header { | ||
text-transform: uppercase; | ||
font-size: 11px; | ||
margin-bottom: 16px; | ||
} | ||
|
||
.item > i.icon { | ||
float: none !important; | ||
margin: 2px 10px 2px 0 !important; | ||
opacity: .5; | ||
} | ||
|
||
.item::before { | ||
display: none; | ||
} | ||
|
||
.item.active { | ||
font-weight: inherit !important; | ||
background: $app-brand-color !important; | ||
border-radius: 0 99px 99px 0 !important; | ||
} | ||
} | ||
|
||
// ---------------------------------- | ||
// ------------ Header | ||
// ---------------------------------- | ||
|
||
.ui.header { | ||
.content { | ||
padding-left: 1.3rem !important; | ||
} | ||
|
||
.content .sub.header { | ||
font-size: 1rem; | ||
color: #9a9a9a; | ||
padding-top: 3px; | ||
} | ||
|
||
.circular.icon { | ||
width: 2.5em !important; | ||
height: 2.5em !important; | ||
font-size: 1em; | ||
color: $app-brand-color; | ||
background: rgba($app-brand-color, .1); | ||
box-shadow: none; | ||
} | ||
} | ||
|
||
// ---------------------------------- | ||
// ------------ Breadcrumb | ||
// ---------------------------------- | ||
|
||
.ui.breadcrumb { | ||
.active { | ||
color: #9a9a9a; | ||
font-weight: 400 !important; | ||
} | ||
|
||
a { | ||
color: #9a9a9a; | ||
&:hover { color: $app-brand-color; } | ||
} | ||
|
||
.divider { | ||
opacity: .4; | ||
} | ||
} | ||
|
||
// ---------------------------------- | ||
// ------------ Segment | ||
// ---------------------------------- | ||
|
||
.ui.segment, | ||
.ui.attached.segment { | ||
box-shadow: 0 2px 4px 0 rgba(34,36,38,.03); | ||
border: 1px solid rgba(34,36,38,.1); | ||
padding: $segment-spacing; | ||
width: 100%; | ||
} | ||
|
||
.ui.attached.segment { | ||
margin-left: 0; | ||
margin-right: 0; | ||
} | ||
|
||
.ui.attached.header { | ||
padding: $segment-title-spacing; | ||
margin: 0; | ||
box-shadow: 0 2px 4px 0 rgba(34,36,38,.03); | ||
border: 1px solid rgba(34,36,38,.1); | ||
border-bottom: 1px solid #eaeaea; | ||
font-size: inherit; | ||
} | ||
|
||
.segment.spaceless { | ||
padding: 0 !important; | ||
} | ||
|
||
// ---------------------------------- | ||
// ------------ Accordion | ||
// ---------------------------------- | ||
|
||
.ui.styled.accordion { | ||
box-shadow: 0 2px 4px 0 rgba(34,36,38,.03); | ||
border: 1px solid rgba(34,36,38,.1); | ||
|
||
.title { | ||
padding: $accordion-title-spacing; | ||
border-top: none; | ||
} | ||
|
||
.content { | ||
padding: $segment-spacing; | ||
border-top: 1px solid #eaeaea; | ||
} | ||
} | ||
|
||
// ---------------------------------- | ||
// ------------ Pagination / Menu | ||
// ---------------------------------- | ||
|
||
.ui.menu { | ||
box-shadow: 0 2px 4px 0 rgba(34,36,38,.03); | ||
border: 1px solid rgba(34,36,38,.1); | ||
} | ||
|
||
// ---------------------------------- | ||
// ------------ Table | ||
// ---------------------------------- | ||
|
||
.sylius-grid-table-wrapper { | ||
.ui.sortable.table { | ||
thead th { | ||
padding-top: 20px; | ||
padding-bottom: 20px; | ||
|
||
&.sorted { | ||
background: inherit; | ||
color: $app-brand-color; | ||
} | ||
} | ||
} | ||
} | ||
|
||
// ---------------------------------- | ||
// ------------ Toggle | ||
// ---------------------------------- | ||
|
||
.ui.toggle.checkbox input:checked~.box:before, .ui.toggle.checkbox input:checked~label:before, | ||
.ui.toggle.checkbox input:focus:checked~.box:before, .ui.toggle.checkbox input:focus:checked~label:before { | ||
background-color: $app-brand-color !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import "ui"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{% import '@SyliusUi/Macro/pagination.html.twig' as pagination %} | ||
{% import '@SyliusUi/Macro/buttons.html.twig' as buttons %} | ||
{% import '@SyliusUi/Macro/messages.html.twig' as messages %} | ||
{% import '@SyliusUi/Macro/table.html.twig' as table %} | ||
|
||
{% set definition = grid.definition %} | ||
{% set data = grid.data %} | ||
|
||
{% set path = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %} | ||
|
||
{% if definition.enabledFilters|length > 0 %} | ||
<div class="ui hidden divider"></div> | ||
<div class="ui styled fluid accordion"> | ||
<div class="title active"> | ||
<i class="dropdown icon"></i> | ||
{{ 'sylius.ui.filters'|trans }} | ||
</div> | ||
<div class="content active"> | ||
<form method="get" action="{{ path }}" class="ui loadable form"> | ||
<div class="two fields"> | ||
{% for filter in definition.enabledFilters|sort_by('position') if filter.enabled %} | ||
{{ sylius_grid_render_filter(grid, filter) }} | ||
|
||
{% if loop.index0 % 2 %} | ||
</div> | ||
<div class="two fields"> | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
{{ buttons.filter() }} | ||
{{ buttons.resetFilters(path) }} | ||
</form> | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
{% if data|length > 0 and definition.actionGroups.bulk is defined and definition.getEnabledActions('bulk')|length > 0 %} | ||
<div class="ui hidden divider"></div> | ||
<div class="ui styled fluid accordion"> | ||
<div class="title active"> | ||
<i class="dropdown icon"></i> | ||
{{ 'sylius.ui.bulk_actions'|trans }} | ||
</div> | ||
<div class="content active"> | ||
{% for action in definition.getEnabledActions('bulk') %} | ||
{{ sylius_grid_render_bulk_action(grid, action, null) }} | ||
{% endfor %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
<div class="ui hidden divider"></div> | ||
<div class="sylius-grid-wrapper"> | ||
{% if definition.limits|length > 1 and data|length > min(definition.limits) %} | ||
<div class="sylius-grid-nav"> | ||
<div class="sylius-grid-nav__pagination"> | ||
{{ pagination.simple(data) }} | ||
</div> | ||
<div class="sylius-grid-nav__perpage"> | ||
<div class="ui fluid one menu sylius-paginate"> | ||
{{ pagination.perPage(data, definition.limits) }} | ||
</div> | ||
</div> | ||
</div> | ||
{% else %} | ||
{{ pagination.simple(data) }} | ||
{% endif %} | ||
|
||
{% if data|length > 0 %} | ||
<div class="ui segment spaceless sylius-grid-table-wrapper"> | ||
<table class="ui sortable stackable very basic celled table"> | ||
<thead> | ||
<tr> | ||
{{ table.headers(grid, definition, app.request.attributes) }} | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for row in data %} | ||
{{ table.row(grid, definition, row) }} | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% else %} | ||
{{ messages.info('sylius.ui.no_results_to_display') }} | ||
{% endif %} | ||
{{ pagination.simple(data) }} | ||
</div> |
Oops, something went wrong.