diff --git a/assets/css/plugin-check-admin.css b/assets/css/plugin-check-admin.css new file mode 100644 index 000000000..7445f5511 --- /dev/null +++ b/assets/css/plugin-check-admin.css @@ -0,0 +1,63 @@ +/* Responsive table */ +@media screen and (max-width: 782px) { + #plugin-check__submit { + margin-top: 1em; + } + + table#plugin-check__categories td { + padding-bottom: .5em; + } + + table.plugin-check__results-table { + border: 0; + } + + table.plugin-check__results-table caption { + font-size: 1.3em; + } + + table.plugin-check__results-table thead { + border: none; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; + } + + table.plugin-check__results-table tr { + border-bottom: 3px solid #ddd; + display: block; + } + + table.plugin-check__results-table td, + table.plugin-check__results-table code { + font-size: .9em; + } + + table.plugin-check__results-table td { + border-bottom: 1px solid #ddd; + display: block; + text-align: right; + } + + table.plugin-check__results-table td::before { + content: attr(data-label); + float: left; + font-weight: bold; + } + + .rtl table.plugin-check__results-table td { + text-align: left; + } + + .rtl table.plugin-check__results-table td::before { + float: right; + } + + table.plugin-check__results-table td:last-child { + border-bottom: 0; + } +} \ No newline at end of file diff --git a/includes/Admin/Admin_Page.php b/includes/Admin/Admin_Page.php index 8ad4345fa..24736828b 100644 --- a/includes/Admin/Admin_Page.php +++ b/includes/Admin/Admin_Page.php @@ -184,6 +184,13 @@ public function enqueue_scripts() { true ); + wp_enqueue_style( + 'plugin-check-admin', + WP_PLUGIN_CHECK_PLUGIN_DIR_URL . 'assets/css/plugin-check-admin.css', + array(), + WP_PLUGIN_CHECK_VERSION + ); + wp_add_inline_script( 'plugin-check-admin', 'const PLUGIN_CHECK = ' . json_encode( diff --git a/templates/admin-page.php b/templates/admin-page.php index ab91ef046..7440b70d2 100644 --- a/templates/admin-page.php +++ b/templates/admin-page.php @@ -39,7 +39,7 @@ - +
$label ) { ?> diff --git a/templates/results-row.php b/templates/results-row.php index aa3a9e82d..fba068492 100644 --- a/templates/results-row.php +++ b/templates/results-row.php @@ -1,17 +1,17 @@ - - - - -
+ {{data.line}} + {{data.column}} + {{data.type}} + {{data.code}} + {{{data.message}}} <# if ( data.docs ) { #>