Skip to content

Commit

Permalink
Added page legend #637
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jun 2, 2016
1 parent 45e9e77 commit 2bbcc16
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@

1. [](#improved)
* Cleaned up the Page Preview CSS to make it more 'standard' [#634](https://github.com/getgrav/grav-plugin-admin/issues/634)
* Added a legend with the Page colors explained [#637](https://github.com/getgrav/grav-plugin-admin/issues/637)
1. [](#bugfix)
* Fixed "Data type `System` doesn't exist!" error when activating a theme [#635](https://github.com/getgrav/grav-plugin-admin/issues/635)
* Fixed issue with custom media types not deleting on save [#633](https://github.com/getgrav/grav-plugin-admin/issues/633)
* Fixed issue when saving `List` field type in plugins + pages


Expand Down
3 changes: 2 additions & 1 deletion languages/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -559,4 +559,5 @@ PLUGIN_ADMIN:
MIME_TYPE: "Mime Type"
THUMB: "Thumb"
TYPE: "Type"
FILE_EXTENSION: "File Extension"
FILE_EXTENSION: "File Extension"
LEGEND: "Page Legend"
2 changes: 1 addition & 1 deletion themes/grav/css-compiled/template.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/grav/css-compiled/template.css.map

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions themes/grav/scss/template/_pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,19 @@
&.modular {
color: #9055AF;
}
}

#pages-legend {
margin-top: 1.5rem;
text-align: center;

h2, ul, li {
display: inline-block;
}

li {
margin-right: 0.75rem;
}
}
}

Expand Down
9 changes: 6 additions & 3 deletions themes/grav/templates/pages.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,12 @@
<span class="button button-x-small" data-page-toggleall="collapse"><i class="fa fa-fw fa-minus-circle"></i> {{ "PLUGIN_ADMIN.COLLAPSE_ALL"|tu }}</span>
</div>
</form>
<ul class="pages-list depth-0">
{{ _self.loop(pages, 0, _context) }}
</ul>
<div class="pages-list">
<ul class="depth-0">
{{ _self.loop(pages, 0, _context) }}
</ul>
{% include 'partials/page-legend.html.twig' %}
</div>
{% endif %}
</div>

Expand Down
11 changes: 11 additions & 0 deletions themes/grav/templates/partials/page-legend.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% set legend = {'VISIBLE':'', 'NON_ROUTABLE':'not-routable', 'NON_VISIBLE':'not-visible', 'MODULAR':'modular'} %}
<div id="pages-legend">
<strong>{{ 'PLUGIN_ADMIN.LEGEND'|tu }}:</strong>
<ul>
{% for key, class in legend %}
<li><i class="page-icon fa fa-fw fa-circle-o {{ class }}"></i> {{ ('PLUGIN_ADMIN.'~key)|tu }}</li>
{% endfor %}
</ul>
</div>


0 comments on commit 2bbcc16

Please sign in to comment.