Update core 8.3.0

This commit is contained in:
Rob Davies 2017-04-13 15:53:35 +01:00
parent da7a7918f8
commit cd7a898e66
6144 changed files with 132297 additions and 87747 deletions

View file

@ -0,0 +1,87 @@
/**
* @file
* Styles for the system status counter component.
*/
.system-status-counter {
box-sizing: border-box;
overflow-y: hidden;
border: 1px solid #e6e4df;
border-radius: 3px;
display: inline-block;
width: 100%;
white-space: nowrap;
background: #FCFCFA;
}
.system-status-counter__status-icon {
display: inline-block;
height: 60px;
width: 60px;
vertical-align: middle;
border-right: 1px solid #e6e4df; /* LTR */
border-left: 0; /* LTR */
background-color: #faf9f5;
box-shadow: 0 1px 1px rgba(0, 0, 0, .1) inset;
}
[dir="rtl"] .system-status-counter__status-icon {
border-right: 0;
border-left: 1px solid #e6e4df;
box-shadow: 0 1px 1px rgba(0, 0, 0, .1) inset;
}
.system-status-counter__status-icon:before {
content: "";
background-size: 25px;
background-position: 50% center;
background-repeat: no-repeat;
width: 100%;
height: 100%;
display: block;
}
.system-status-counter__status-icon--error:before {
background-image: url(../../../stable/images/core/icons/e32700/error.svg);
}
.system-status-counter__status-icon--warning:before {
background-image: url(../../../stable/images/core/icons/e29700/warning.svg);
}
.system-status-counter__status-icon--checked:before {
background-image: url(../../../stable/images/core/icons/73b355/check.svg);
}
.system-status-counter__status-title {
display: inline-block;
vertical-align: middle;
text-transform: uppercase;
padding: 0 6px;
font-size: 1rem;
line-height: 1em;
font-weight: bold;
}
.system-status-counter__title-count {
display: block;
margin-bottom: 2px;
}
.system-status-counter__details {
font-size: 12px;
font-weight: normal;
text-transform: none;
display: block;
line-height: 1.5;
}
@media screen and (min-width: 61em) {
.system-status-counter__status-icon,
.system-status-counter {
height: 65px;
}
.system-status-counter__status-icon {
width: 65px;
}
.system-status-counter__status-title {
font-size: 16px;
padding: 10px 3%;
}
.system-status-counter__status-icon:before {
background-size: 35px;
}
}

View file

@ -0,0 +1,26 @@
/**
* @file
* Styles for the system status report counters.
*/
.system-status-report-counters__item {
margin: 10px 0;
width: 100%;
}
@media screen and (min-width: 60em) {
.system-status-report-counters__item {
margin-bottom: 20px;
}
.system-status-report-counters {
flex-wrap: wrap;
display: flex;
justify-content: space-between;
}
.system-status-report-counters__item--half-width {
width: 49%;
}
.system-status-report-counters__item--third-width {
width: 32%;
}
}

View file

@ -0,0 +1,161 @@
/**
* @file
* Seven styles for the System Status general info.
*/
.system-status-general-info {
border: 1px solid #ccc;
border-radius: 3px;
}
.system-status-general-info__header {
background-color: #f5f5f2;
padding: 10px;
margin: 0;
overflow: hidden;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
font-size: 14px;
text-transform: uppercase;
}
.system-status-general-info__item {
background: #fcfcfa;
border-top: 1px solid #ccc;
padding: 10px 10px 20px;
box-sizing: border-box;
overflow-x: auto;
}
.system-status-general-info__item-icon {
display: inline-block;
height: 45px;
width: 45px;
vertical-align: top;
}
.system-status-general-info__item-icon:before {
content: "";
background-size: 35px;
background-position: 50% center;
background-repeat: no-repeat;
width: 100%;
height: 100%;
display: block;
}
.system-status-general-info__item-icon--d8:before {
background-image: url(../../images/icons/cccccc/d8-logo.svg);
}
.system-status-general-info__item-icon--clock:before {
background-image: url(../../images/icons/cccccc/clock.svg);
}
.system-status-general-info__item-icon--server:before {
background-image: url(../../images/icons/cccccc/server.svg);
}
.system-status-general-info__item-icon--php:before {
background-image: url(../../images/icons/cccccc/php-logo.svg);
background-size: 45px;
}
.system-status-general-info__item-icon--database:before {
background-image: url(../../images/icons/cccccc/database.svg);
background-size: 30px;
}
.system-status-general-info__item-details {
box-sizing: border-box;
display: inline-block;
width: calc(100% - 60px);
padding-left: 10px; /* LTR */
position: relative;
}
[dir="rtl"] .system-status-general-info__item-details {
padding-right: 10px;
padding-left: 0;
}
.system-status-general-info__item-title {
margin-bottom: 0;
}
.system-status-general-info__sub-item-title {
margin: 0;
}
.system-status-general-info__sub-item__title {
font-weight: bold;
}
.system-status-general-info__sub-item__value {
display: block;
}
.system-status-general-info__run-cron {
margin: 1em 0 0;
}
@media screen and (min-width: 48em) {
.system-status-general-info__items {
display: flex;
flex-wrap: wrap;
overflow-x: hidden;
}
.system-status-general-info__item {
flex: 1;
flex-basis: 33%;
width: 33%;
}
.system-status-general-info__item:nth-child(2) {
flex: 2;
flex-basis: 66%;
}
.system-status-general-info__item:nth-child(2),
.system-status-general-info__item:nth-child(4),
.system-status-general-info__item:nth-child(5) {
border-left: 1px solid #ccc; /* LTR */
}
[dir="rtl"] .system-status-general-info__item:nth-child(1),
[dir="rtl"] .system-status-general-info__item:nth-child(3) {
border-left: 1px solid #ccc;
}
[dir="rtl"] .system-status-general-info__item:nth-child(2),
[dir="rtl"] .system-status-general-info__item:nth-child(5) {
border-left: 0;
}
.system-status-general-info__run-cron {
margin: 15px 0 5px;
}
}
@media screen and (min-width: 60em) {
.system-status-general-info__item-icon {
width: 55px;
height: 55px;
}
.system-status-general-info__item-icon:before {
background-size: 35px;
}
.system-status-general-info__item-icon--php:before {
background-size: 55px;
}
.system-status-general-info__run-cron {
position: absolute;
top: 1em;
right: 1em; /* LTR */
margin-top: 0;
}
[dir="rtl"] .system-status-general-info__run-cron {
left: 1em;
right: auto;
}
}
@media screen and (max-width: 48em) {
.system-status-general-info__header {
display: none;
}
.system-status-general-info {
border-top: 0;
margin-top: 25px;
}
}

View file

@ -3,13 +3,151 @@
* Seven styles for the System Status Report.
*/
.system-status-report__requirements-group {
padding-top: 20px;
}
.system-status-report__entry {
border: 0;
border-top: 1px solid #ccc;
border-bottom: inherit;
margin: 0;
width: 100%;
overflow: auto;
}
.system-status-report__entry:first-child {
border-top: 1px solid #bebfb9;
}
.system-status-report__entry:last-child {
.system-status-report__entry:last-of-type {
border-bottom: 1px solid #bebfb9;
}
.system-status-report__entry--error {
background-color: transparent;
}
.system-status-report__entry--warning {
background-color: transparent;
}
/* Account for native and poly-filled details element */
.system-status-report__status-title {
position: relative;
padding: 1em 1em 1em 3em; /* LTR */
box-sizing: border-box;
width: 100%;
font-weight: bold;
}
.system-status-report__status-title .details-title {
color: inherit;
text-transform: none;
}
html:not(.details) .system-status-report__status-title {
padding-left: 0;
}
.system-status-report__status-title .details-title {
padding-left: 3em; /* LTR */
}
[dir="rtl"] .system-status-report__status-title .details-title {
padding-right: 3em;
padding-left: 0;
}
[dir="rtl"].details .system-status-report__status-title {
padding: 1em 3em 1em 1em;
}
.collapse-processed > .system-status-report__status-title:before {
float: right; /* LTR */
}
.system-status-report__status-title::-webkit-details-marker {
float: right; /* LTR */
}
[dir="rtl"] .collapse-processed > .system-status-report__status-title:before {
float: left;
}
[dir="rtl"] .system-status-report__status-title::-webkit-details-marker {
float: left;
}
/* Make poly-filled details and summary elements behave correctly. */
.system-status-report summary:first-child ~ * {
display: none;
}
.system-status-report details[open] > *,
.system-status-report details > summary:first-child {
display: block;
}
.system-status-report__status-title .details-title:before,
.details .system-status-report__status-icon:before {
content: "";
background-repeat: no-repeat;
background-size: contain;
background-position: top center;
height: 16px;
width: 16px;
position: absolute;
left: 10px; /* LTR */
top: 1em;
display: inline-block;
vertical-align: top;
margin-right: 10px; /* LTR */
}
[dir="rtl"] .system-status-report__status-title .details-title:before,
[dir="rtl"].details .system-status-report__status-title:before {
left: auto;
right: 10px;
margin-right: 0;
}
.system-status-report__status-icon--error .details-title:before,
.details .system-status-report__status-icon--error:before {
background-image: url(../../../stable/images/core/icons/e32700/error.svg);
}
.system-status-report__status-icon--warning .details-title:before,
.details .system-status-report__status-icon--warning:before {
background-image: url(../../../stable/images/core/icons/e29700/warning.svg);
}
.system-status-report__entry__value {
box-sizing: border-box;
padding: 0 1em 1em 3em; /* LTR */
}
[dir="rtl"] .system-status-report__entry__value {
padding-right: 3em;
padding-left: 1em;
}
@media screen and (max-width: 48em) {
.system-status-report {
word-wrap: break-word;
}
}
@media screen and (min-width: 48em) {
.system-status-report__entry::after {
display: table;
content: '';
clear: both;
}
.system-status-report__status-title {
width: 18rem;
float: left; /* LTR */
cursor: default;
}
.system-status-report__status-title:hover,
.system-status-report__status-title:focus {
text-decoration: none;
}
[dir="rtl"] .system-status-report__status-title {
float: right;
}
.system-status-report__status-title::-webkit-details-marker {
display: none;
}
.collapse-processed > .system-status-report__status-title:before {
position: relative;
top: 3px;
}
.system-status-report__entry__value {
width: calc(100% - 23em);
float: right;
display: block;
padding-left: 0; /* LTR */
padding-top: 1em;
}
[dir="rtl"] .system-status-report__entry__value {
padding-left: 0;
padding-right: 3em;
}
}

View file

@ -38,7 +38,6 @@ tbody tr:hover,
tbody tr:focus {
background: #f7fcff;
}
/* See colors.css */
tbody tr.color-warning:hover,
tbody tr.color-warning:focus {
@ -48,6 +47,7 @@ tbody tr.color-error:hover,
tbody tr.color-error:focus {
background: #fcf4f2;
}
td,
th {
vertical-align: middle;

View file

@ -2,6 +2,7 @@
* @file
* Maintenance theming.
*/
.maintenance-page {
background-color: #e0e0d8;
background-image: -webkit-radial-gradient(hsl(203, 2%, 90%), hsl(203, 2%, 95%));
@ -51,7 +52,6 @@
.task-list {
margin-left: 0; /* LTR */
list-style-type: none;
list-style-image: none;
padding-left: 0; /* LTR */
padding-bottom: 1em;
}
@ -142,8 +142,8 @@
}
.layout-container {
margin: 0 auto;
max-width: 770px;
width: 75%;
max-width: 770px;
border-radius: 5px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
padding: 20px 0 40px 0;
@ -181,3 +181,21 @@
margin: 0.75em 1.9em;
}
}
/**
* Status report customization for install and update page.
*/
.system-status-report__status-title {
float: none;
width: 100%;
}
.system-status-report__entry__value {
float: none;
width: 100%;
padding-left: 3em; /* LTR */
padding-top: 0;
}
[dir="rtl"] .system-status-report__entry__value {
padding-left: 1em;
padding-right: 3em;
}

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="42.659" height="46.603" viewBox="0 0 42.659 46.603">
<path fill="#CCC" d="M24.15 3.73V0h-8v3.915C6.15 6.13 0 14.717 0 24.978 0 36.92 9.975 46.603 21.918 46.603s20.74-9.682 20.74-21.625c0-10.576-8.507-19.372-18.507-21.25zm7 24.072H17.83V11h5v12.802h8.32v4z"/>
</svg>

After

Width:  |  Height:  |  Size: 315 B

View file

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="47.411" height="53.531" viewBox="0 0 47.411 53.531">
<circle fill="#CCC" cx="22.308" cy="41.593" r="8.449"/>
<path fill="#CCC" d="M32.813 31.532c2.503 2.614 4.044 6.156 4.044 10.06 0 4.945-2.47 9.31-6.24 11.94 6.97-2.15 12.733-7.388 15.314-13.73 3.57-8.776.247-15.38-5.33-21.37.17.776.264 1.58.264 2.406 0 5.078-3.405 9.36-8.05 10.694z"/>
<circle fill="#CCC" cx="29.735" cy="20.838" r="6.463"/>
<path fill="#CCC" d="M11.178 50.96c-2.134-2.53-3.42-5.798-3.42-9.368 0-7.448 5.598-13.584 12.814-14.442-1.238-1.794-1.965-3.968-1.965-6.312 0-6.145 4.982-11.128 11.13-11.128.507 0 1.006.037 1.495.103C27.59 6.67 23.957 3.483 21.09 0 22.553 15.257 7.192 9.713 1.514 23.773c-3.81 9.433-.376 21.095 9.663 27.188z"/>
</svg>

After

Width:  |  Height:  |  Size: 769 B

View file

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="38.847" height="44.262" viewBox="0 0 38.847 44.262">
<path fill="#CCC" d="M19.745 0c5.74.123 12.272.953 16.9 4.668 1.865 1.498 2.786 3.91 1.597 6.126-1.255 2.34-4.13 3.733-6.518 4.6-5.63 2.04-12.113 2.38-18.014 1.573-2.92-.4-5.91-1.103-8.58-2.374C2.94 13.553.39 11.788.037 9.19c-.532-3.925 4.23-6.23 7.264-7.3C11.287.482 15.54.037 19.745 0c4.302.092-3.334.03 0 0z"/>
<path fill="#CCC" d="M6.76 17.5c3.702 1.427 7.65 1.972 11.6 2.09 4.058.12 8.107-.424 12.023-1.523 4.227-1.186 7.227-3.624 8.463-6.145v5.965c-.076.524-.197 1.028-.384 1.5-.718 1.81-2.594 2.974-4.235 3.848-4.293 2.286-9.5 3.04-14.31 3.083-4.803.043-9.902-.542-14.3-2.575-1.906-.88-3.9-2.02-4.988-3.887-.66-1.135-.626-2.21-.626-3.486v-4.38c1.232 2.64 3.94 4.422 6.757 5.51z"/>
<path fill="#CCC" d="M6.76 26.436c3.702 1.428 7.65 1.973 11.6 2.09 4.058.12 8.107-.423 12.023-1.522 4.227-1.186 7.227-3.624 8.463-6.145v5.964c-.076.524-.197 1.028-.384 1.5-.718 1.81-2.594 2.974-4.235 3.848-4.293 2.286-9.5 3.04-14.31 3.083-4.803.043-9.902-.542-14.3-2.575-1.906-.88-3.9-2.02-4.988-3.887-.66-1.135-.626-2.21-.626-3.486v-4.38c1.232 2.64 3.94 4.422 6.757 5.51z"/>
<path fill="#CCC" d="M6.76 35.374c3.702 1.428 7.65 1.973 11.6 2.09 4.058.12 8.107-.423 12.023-1.522 4.227-1.186 7.227-3.624 8.463-6.145v5.965c-.076.524-.197 1.028-.384 1.5-.718 1.81-2.594 2.974-4.235 3.848-4.293 2.286-9.5 3.04-14.31 3.083-4.803.043-9.902-.542-14.3-2.575-1.906-.88-3.9-2.02-4.988-3.887-.66-1.134-.626-2.21-.626-3.485v-4.38c1.232 2.64 3.94 4.422 6.757 5.51z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="66" height="33.447" viewBox="0 0 66 33.447">
<g fill="#CCC">
<path d="M49.5 12.255h-2.7l-1.473 7h2.4c1.59 0 2.773-.342 3.55-.94.78-.6 1.304-1.62 1.577-3.023.26-1.345.142-1.975-.357-2.528-.5-.553-1.498-.51-2.996-.51z"/>
<path d="M33 0C14.775 0 0 7.488 0 16.724s14.775 16.724 33 16.724 33-7.488 33-16.724S51.225 0 33 0zm-9.328 19.982c-.787.737-1.662 1.376-2.625 1.69-.963.313-2.19.583-3.68.583H13.99l-.935 5H9.11l3.52-18h7.584c2.28 0 3.946.34 4.992 1.537 1.046 1.197 1.36 2.74.944 4.885-.172.884-.462 1.628-.87 2.36-.413.732-.947 1.338-1.608 1.945zm11.51 2.273l1.558-8.124c.177-.91.112-1.29-.196-1.62-.308-.33-.962-.255-1.963-.255h-3.126l-2.016 10h-3.913l3.52-18h3.912l-.935 5h3.486c2.193 0 3.706.124 4.54.888.832.765 1.08 1.99.748 3.703l-1.637 8.41h-3.977zm21.747-6.708c-.173.884-.463 1.692-.872 2.424-.41.734-.944 1.404-1.605 2.01-.787.738-1.662 1.377-2.625 1.69-.963.314-2.19.584-3.68.584h-3.377l-.934 5h-3.944l3.518-18h7.584c2.282 0 3.946.34 4.992 1.537 1.046 1.2 1.36 2.61.943 4.757z"/>
<path d="M18.72 12.255h-2.703l-1.473 7h2.4c1.59 0 2.773-.342 3.552-.94.778-.6 1.303-1.62 1.576-3.023.26-1.345.142-1.975-.357-2.528-.5-.553-1.497-.51-2.996-.51z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="44" height="34" viewBox="0 0 44 34">
<path fill="#CCC" d="M29.98 7.018H7.17c-1.208 0-2.197-.748-2.197-2s.99-2 2.2-2h22.81c1.208 0 2.198.748 2.198 2s-.99 2-2.2 2zM37.61 7c-1.104 0-2-.895-2-2s.896-2 2-2 2 .895 2 2-.894 2-2 2zM0 0v10h44V0H0zM29.98 31.018H7.17c-1.208 0-2.197-.748-2.197-2s.99-2 2.2-2h22.81c1.208 0 2.198.748 2.198 2s-.99 2-2.2 2zM37.61 31c-1.104 0-2-.895-2-2s.896-2 2-2 2 .895 2 2-.894 2-2 2zM0 24v10h44V24H0zM29.98 19.018H7.17c-1.208 0-2.197-.748-2.197-2s.99-2 2.2-2h22.81c1.208 0 2.198.748 2.198 2s-.99 2-2.2 2zM37.61 19c-1.104 0-2-.895-2-2s.896-2 2-2 2 .895 2 2-.894 2-2 2zM0 12v10h44V12H0z"/>
</svg>

After

Width:  |  Height:  |  Size: 666 B

View file

@ -0,0 +1,57 @@
/**
* @file
* Provides responsive behaviors to HTML details elements.
*/
(function ($, Drupal) {
'use strict';
/**
* Initializes the responsive behaviors for details elements.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches the responsive behavior to status report specific details elements.
*/
Drupal.behaviors.responsiveDetails = {
attach: function (context) {
var $details = $(context).find('details').once('responsive-details');
if (!$details.length) {
return;
}
function detailsToggle(matches) {
if (matches) {
$details.attr('open', true);
$summaries.attr('aria-expanded', true);
$summaries.on('click.details-open', false);
}
else {
// If user explicitly opened one, leave it alone.
var $notPressed = $details
.find('> summary[aria-pressed!=true]')
.attr('aria-expanded', false);
$notPressed
.parent('details')
.attr('open', false);
// After resize, allow user to close previously opened details.
$summaries.off('.details-open');
}
}
function handleDetailsMQ(event) {
detailsToggle(event.matches);
}
var $summaries = $details.find('> summary');
var mql = window.matchMedia('(min-width:48em)');
mql.addListener(handleDetailsMQ);
detailsToggle(mql.matches);
}
};
})(jQuery, Drupal);

View file

@ -22,6 +22,12 @@ core: 8.x
libraries:
- seven/global-styling
libraries-override:
system/base:
css:
component:
/core/themes/stable/css/system/components/system-status-counter.css: css/components/system-status-counter.css
/core/themes/stable/css/system/components/system-status-report-counters.css: css/components/system-status-report-counters.css
/core/themes/stable/css/system/components/system-status-report-general-info.css: css/components/system-status-report-general-info.css
core/drupal.vertical-tabs:
css:
component:

View file

@ -27,7 +27,10 @@ global-styling:
css/components/tables.css: {}
css/components/search-admin-settings.css: {}
css/components/tablesort-indicator.css: {}
css/components/system-status-report-general-info.css: {}
css/components/system-status-report.css: {}
css/components/system-status-report-counters.css: {}
css/components/system-status-counter.css: {}
css/components/tabs.css: {}
css/components/views-ui.css: {}
layout:
@ -74,6 +77,18 @@ drupal.nav-tabs:
- core/drupal
- core/jquery.once
- core/drupal.debounce
- core/collapse
drupal.responsive-detail:
version: VERSION
js:
js/responsive-details.js: {}
dependencies:
- core/matchmedia
- core/matchmedia.addListener
- core/jquery
- core/jquery.once
- core/collapse
vertical-tabs:
version: VERSION

View file

@ -31,18 +31,18 @@ function seven_preprocess_html(&$variables) {
*/
function seven_preprocess_menu_local_tasks(&$variables) {
if (!empty($variables['primary'])) {
$variables['primary']['#attached'] = array(
'library' => array(
$variables['primary']['#attached'] = [
'library' => [
'seven/drupal.nav-tabs',
),
);
],
];
}
elseif (!empty($variables['secondary'])) {
$variables['secondary']['#attached'] = array(
'library' => array(
$variables['secondary']['#attached'] = [
'library' => [
'seven/drupal.nav-tabs',
),
);
],
];
}
}
@ -61,7 +61,7 @@ function seven_preprocess_node_add_list(&$variables) {
/** @var \Drupal\node\NodeTypeInterface $type */
foreach ($variables['content'] as $type) {
$variables['types'][$type->id()]['label'] = $type->label();
$variables['types'][$type->id()]['url'] = \Drupal::url('node.add', array('node_type' => $type->id()));
$variables['types'][$type->id()]['url'] = \Drupal::url('node.add', ['node_type' => $type->id()]);
}
}
}
@ -76,8 +76,8 @@ function seven_preprocess_block_content_add_list(&$variables) {
if (!empty($variables['content'])) {
foreach ($variables['content'] as $type) {
$variables['types'][$type->id()]['label'] = $type->label();
$options = array('query' => \Drupal::request()->query->all());
$variables['types'][$type->id()]['url'] = \Drupal::url('block_content.add_form', array('block_content_type' => $type->id()), $options);
$options = ['query' => \Drupal::request()->query->all()];
$variables['types'][$type->id()]['url'] = \Drupal::url('block_content.add_form', ['block_content_type' => $type->id()], $options);
}
}
}
@ -153,36 +153,36 @@ function seven_form_node_form_alter(&$form, FormStateInterface $form_state) {
/** @var \Drupal\node\NodeInterface $node */
$node = $form_state->getFormObject()->getEntity();
$form['#theme'] = array('node_edit_form');
$form['#theme'] = ['node_edit_form'];
$form['#attached']['library'][] = 'seven/node-form';
$form['advanced']['#type'] = 'container';
$is_new = !$node->isNew() ? format_date($node->getChangedTime(), 'short') : t('Not saved yet');
$form['meta'] = array(
'#attributes' => array('class' => array('entity-meta__header')),
$form['meta'] = [
'#attributes' => ['class' => ['entity-meta__header']],
'#type' => 'container',
'#group' => 'advanced',
'#weight' => -100,
'published' => array(
'published' => [
'#type' => 'html_tag',
'#tag' => 'h3',
'#value' => $node->isPublished() ? t('Published') : t('Not published'),
'#access' => !$node->isNew(),
'#attributes' => array(
'class' => 'entity-meta__title',
),
),
'changed' => array(
'#attributes' => [
'class' => ['entity-meta__title'],
],
],
'changed' => [
'#type' => 'item',
'#wrapper_attributes' => array('class' => array('entity-meta__last-saved', 'container-inline')),
'#wrapper_attributes' => ['class' => ['entity-meta__last-saved', 'container-inline']],
'#markup' => '<h4 class="label inline">' . t('Last saved') . '</h4> ' . $is_new,
),
'author' => array(
],
'author' => [
'#type' => 'item',
'#wrapper_attributes' => array('class' => array('author', 'container-inline')),
'#wrapper_attributes' => ['class' => ['author', 'container-inline']],
'#markup' => '<h4 class="label inline">' . t('Author') . '</h4> ' . $node->getOwner()->getUsername(),
),
);
],
];
$form['revision_information']['#type'] = 'container';
$form['revision_information']['#group'] = 'meta';
}

View file

@ -0,0 +1,12 @@
{#
/**
* @file
* Theme override for an image field widget.
*
* Included from Classy theme.
*
* @see template_preprocess_image_widget()
*/
#}
{% include '@classy/content-edit/image-widget.html.twig' %}
{{ attach_library('classy/image-widget') }}

View file

@ -0,0 +1,26 @@
{#
/**
* @file
* Theme override for status report counter.
*
* Available variables:
* - amount: The number shown on counter.
* - text: The text shown on counter.
* - severity: The severity of the counter.
*
* @ingroup themable
*/
#}
{%
set classes = [
'system-status-counter',
'system-status-counter--' ~ severity,
]
%}
<span{{ attributes.addClass(classes) }}>
<span class="system-status-counter__status-icon system-status-counter__status-icon--{{ severity }}"></span>
<span class="system-status-counter__status-title">
<span class="system-status-counter__title-count">{{ amount }} {{ text }}</span>
<span class="system-status-counter__details"><a href="#{{ severity }}" ><span class="visually-hidden">{{ text }} </span>Details</a></span>
</span>
</span>

View file

@ -0,0 +1,99 @@
{#
/**
* @file
* Theme override for status report general info.
*
* Available variables:
* - drupal: The status of Drupal installation:
* - value: The current status of Drupal installation.
* - description: The description for current status of Drupal installation.
* - cron: The status of cron:
* - value: The current status of cron.
* - description: The description for current status of cron.
* - cron.run_cron: An array to render a button for running cron.
* - database_system: The status of database system:
* - value: The current status of database sytem.
* - description: The description for current status of cron.
* - database_system_version: The info about current database version:
* - value: The current version of database.
* - description: The description for current version of database.
* - php: The current version of PHP:
* - value: The status of currently installed PHP version.
* - description: The description for current installed PHP version.
* - php_memory_limit: The info about current PHP memory limit:
* - value: The status of currently set PHP memory limit.
* - description: The description for currently set PHP memory limit.
* - webserver: The info about currently installed web server:
* - value: The status of currently installed web server.
* - description: The description for the status of currently installed web
* server.
*/
#}
<div class="system-status-general-info">
<h2 class="system-status-general-info__header">{{ 'General System Information'|t }}</h2>
<div class="system-status-general-info__items">
<div class="system-status-general-info__item">
<span class="system-status-general-info__item-icon system-status-general-info__item-icon--d8"></span>
<div class="system-status-general-info__item-details">
<h3 class="system-status-general-info__item-title">{{ 'Drupal Version'|t }}</h3>
{{ drupal.value }}
{% if drupal.description %}
<div class="description">{{ drupal.description }}</div>
{% endif %}
</div>
</div>
<div class="system-status-general-info__item">
<span class="system-status-general-info__item-icon system-status-general-info__item-icon--clock"></span>
<div class="system-status-general-info__item-details">
<h3 class="system-status-general-info__item-title">{{ 'Last Cron Run'|t }}</h3>
{{ cron.value }}
{% if cron.run_cron %}
<div class="system-status-general-info__run-cron">{{ cron.run_cron }}</div>
{% endif %}
{% if cron.description %}
<div class="system-status-general-info__description">{{ cron.description }}</div>
{% endif %}
</div>
</div>
<div class="system-status-general-info__item">
<span class="system-status-general-info__item-icon system-status-general-info__item-icon--server"></span>
<div class="system-status-general-info__item-details">
<h3 class="system-status-general-info__item-title">{{ 'Web Server'|t }}</h3>
{{ webserver.value }}
{% if webserver.description %}
<div class="description">{{ webserver.description }}</div>
{% endif %}
</div>
</div>
<div class="system-status-general-info__item">
<span class="system-status-general-info__item-icon system-status-general-info__item-icon--php"></span>
<div class="system-status-general-info__item-details">
<h3 class="system-status-general-info__item-title">{{ 'PHP'|t }}</h3>
<h4 class="system-status-general-info__sub-item-title">{{ 'Version'|t }}</h4>{{ php.value }}
{% if php.description %}
<div class="description">{{ php.description }}</div>
{% endif %}
<h4 class="system-status-general-info__sub-item-title">{{ 'Memory limit'|t }}</h4>{{ php_memory_limit.value }}
{% if php_memory_limit.description %}
<div class="description">{{ php_memory_limit.description }}</div>
{% endif %}
</div>
</div>
<div class="system-status-general-info__item">
<span class="system-status-general-info__item-icon system-status-general-info__item-icon--database"></span>
<div class="system-status-general-info__item-details">
<h3 class="system-status-general-info__item-title">{{ 'Database'|t }}</h3>
<h4 class="system-status-general-info__sub-item-title">{{ 'Version'|t }}</h4>{{ database_system_version.value }}
{% if database_system_version.description %}
<div class="description">{{ database_system_version.description }}</div>
{% endif %}
<h4 class="system-status-general-info__sub-item-title">{{ 'System'|t }}</h4>{{ database_system.value }}
{% if database_system.description %}
<div class="description">{{ database_system.description }}</div>
{% endif %}
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,50 @@
{#
/**
* @file
* Theme override to display status report.
*
* - grouped_requirements: Contains grouped requirements.
* Each group contains:
* - title: The title of the group.
* - type: The severity of the group.
* - items: The requirement instances.
* Each requirement item contains:
* - title: The title of the requirement.
* - value: (optional) The requirement's status.
* - description: (optional) The requirement's description.
* - severity_title: The title of the severity.
* - severity_status: Indicates the severity status.
*/
#}
{{ attach_library('core/drupal.collapse') }}
{{ attach_library('seven/drupal.responsive-detail') }}
<div class="system-status-report">
{% for group in grouped_requirements %}
<div class="system-status-report__requirements-group">
<h3 id="{{ group.type }}">{{ group.title }}</h3>
{% for requirement in group.items %}
<details class="system-status-report__entry system-status-report__entry--{{ group.type }} color-{{ group.type }}">
{%
set summary_classes = [
'system-status-report__status-title',
group.type in ['warning', 'error'] ? 'system-status-report__status-icon system-status-report__status-icon--' ~ group.type
]
%}
<summary{{ create_attribute({'class': summary_classes}) }} role="button">
{% if requirement.severity_title %}
<span class="visually-hidden">{{ requirement.severity_title }}</span>
{% endif %}
{{ requirement.title }}
</summary>
<div class="system-status-report__entry__value">
{{ requirement.value }}
{% if requirement.description %}
<div class="description">{{ requirement.description }}</div>
{% endif %}
</div>
</details>
{% endfor %}
</div>
{% endfor %}
</div>

View file

@ -0,0 +1,28 @@
{#
/**
* @file
* Theme override for the status report page.
*
* Available variables:
* - counters: The list of counter elements.
* - general_info: A render array to create general info element.
* - requirements: A render array to create requirements table.
*
* @see template_preprocess_status_report()
*/
#}
{% if counters|length == 3 %}
{% set element_width_class = ' system-status-report-counters__item--third-width' %}
{% elseif counters|length == 2 %}
{% set element_width_class = ' system-status-report-counters__item--half-width' %}
{% endif %}
<div class="system-status-report-counters">
{% for counter in counters %}
<div class="system-status-report-counters__item{{ element_width_class }}">
{{ counter }}
</div>
{% endfor %}
</div>
{{ general_info }}
{{ requirements }}