styling + fixes

This commit is contained in:
Andy Miller
2019-12-05 22:05:37 -07:00
parent 25f09afe03
commit e7e2a4c99d
10 changed files with 141 additions and 18 deletions

View File

@@ -861,3 +861,4 @@ PLUGIN_ADMIN:
MODULE_SETUP: "Module Setup"
MODULE_TEMPLATE: "Module Template"
ADD_MODULE_CONTENT: "Add Module Content"
CHANGELOG: "Changelog"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -86,6 +86,9 @@
// Notifications
@import "template/notifications";
// Changelog
@import "template/changelog";
// Media
@import "template/media";
@import "template/jqcron";

View File

@@ -0,0 +1,117 @@
// Changelog
body .changelog {
text-align: left;
.remodal-close {
display: none;
}
code {
white-space: pre-wrap;
vertical-align: inherit;
font-size: 0.8rem;
}
h1 {
text-align: center;
font-size: 2rem;
margin: 1rem 0;
letter-spacing: -1px;
}
.remodal {
}
.remodal-confirm {
float: right;
}
.changelog-overflow {
max-height: 500px;
overflow: auto;
margin-bottom: 1em;
border: 1px solid #ddd;
border-radius: 3px;
background: white;
padding: 1em;
}
margin-top: -2rem;
h3, h4 {
text-align: center;
font-weight: bold;
}
h3 {
font-size: 1.3rem;
margin: 1.3rem 0 0 0;
line-height: 1;
}
h3 + h4 {
font-size: 1rem;
margin: 0 0 1rem 0;
color: #666;
}
ol {
list-style: none;
padding: 0;
margin: 0 0 3rem 0;
a[href='#new'] {
& + ul > li {
&:before {
background-color: #207DE5;
content: 'New';
}
}
}
a[href='#improved'] {
& + ul > li {
&:before {
background-color: #FBCA04;
color: #333;
content: 'Improved';
}
}
}
a[href='#bugfix'] {
& + ul > li {
&:before {
background-color: #FC2929;
content: 'Bugfix';
}
}
}
}
ul {
list-style: none;
padding: 0;
li {
margin-bottom: 0.5rem;
padding-left: 6rem;
margin-left: 0;
list-style: none;
&:before {
margin-left: -6rem;
display: inline-block;
border-radius: 2px;
color: #fff;
font-weight: bold;
margin-right: 1rem;
text-align: center;
width: 5rem;
font-size: 0.8rem;
padding: 2px 0;
font-style: normal;
}
}
}
}

View File

@@ -1,21 +1,12 @@
{#{% set type = uri.param('type')|default('grav') %}#}
{#{% set title = 'Grav' %}#}
{#{% set repo = attribute(repository, type) %}#}
{#{% if uri.param('slug') %}#}
{#{% set changelog = attribute(repo, slug).changelog %}#}
{#{% set title = attribute(repo, slug).name %}#}
{#{% else %}#}
{#{% set changelog = repo.changelog %}#}
{#{% endif %}#}
{% set slug = uri.param('slug') %}
{% if slug %}
{% set changelog = admin.gpm.findPackage(slug).changelog %}
{% set package = admin.gpm.findPackage(slug) %}
{% set changelog = package.changelog %}
{% set title = package.name %}
{% else %}
{% set changelog = admin.gpm.grav.changelog %}
{% set title = "Grav" %}
{% endif %}
<section id="ajax" class="changelog">

View File

@@ -1 +1 @@
<div class="remodal" data-remodal-id="changelog" data-remodal-options="hashTracking: false">Changelog</div>
<div class="remodal" data-remodal-id="changelog" data-remodal-options="hashTracking: false"></div>

View File

@@ -60,9 +60,11 @@
</tr>
{% endif %}
{% if admin.gpm.findPackage(plugin.slug).changelog %}
<tr>
<td>{{ "PLUGIN_ADMIN.CHANGELOG"|tu }}</td>
<td class="double"><a class="button button-small" href="#" data-remodal-target="changelog" data-remodal-changelog="{{ base_url_relative }}/changelog/type:plugins/slug:{{ plugin.slug }}">Changelog</a></td>
<td>{{ "PLUGIN_ADMIN.CHANGELOG"|tu }}:</td>
<td class="double"><a class="button button-small" href="#" data-remodal-target="changelog" data-remodal-changelog="{{ base_url_relative }}/changelog/slug:{{ plugin.slug }}"><i class="fa fa-binoculars"></i> View Changelog</a></td>
</tr>
{% endif %}
</table>

View File

@@ -72,3 +72,4 @@
{% include 'partials/modal-add-package.html.twig' with { type: 'plugin' } %}
{% include 'partials/modal-update-packages.html.twig' with { type: 'plugin' } %}
{% include 'partials/modal-changelog.html.twig' with { package: plugin} %}

View File

@@ -91,6 +91,13 @@
<td class="double"><a href="{{ readme_link }}" target="_blank" rel="noopener noreferrer">{{ readme_link }}</a></td>
</tr>
{% endif %}
{% if admin.gpm.findPackage(theme.slug).changelog %}
<tr>
<td>{{ "PLUGIN_ADMIN.CHANGELOG"|tu }}:</td>
<td class="double"><a class="button button-small" href="#" data-remodal-target="changelog" data-remodal-changelog="{{ base_url_relative }}/changelog/slug:{{ theme.slug }}"><i class="fa fa-binoculars"></i> View Changelog</a></td>
</tr>
{% endif %}
</table>
</div>
@@ -118,3 +125,4 @@
{% include 'partials/modal-add-package.html.twig' with { type: 'theme' } %}
{% include 'partials/modal-update-packages.html.twig' with { type: 'theme' } %}
{% include 'partials/modal-reinstall-package.html.twig' with { type: 'theme', package: theme } %}
{% include 'partials/modal-changelog.html.twig' with { package: plugin} %}