From 6efb5ccf18c05dec37dee2d4954705b15992bad9 Mon Sep 17 00:00:00 2001 From: Tilman Kranz Date: Mon, 29 Nov 2021 19:56:05 +0100 Subject: [PATCH] modify tag structure to avoid p and ul elements --- linuxfoo-gitlab.php | 30 +++++++++++++++--------------- styles.css | 10 +++++++--- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/linuxfoo-gitlab.php b/linuxfoo-gitlab.php index fb31146..03cf0b0 100644 --- a/linuxfoo-gitlab.php +++ b/linuxfoo-gitlab.php @@ -132,13 +132,13 @@ class LinuxfooGitlab { ''; if($commits_count>0) { - $out .= ''; + $out .= ''; } } } @@ -171,32 +171,32 @@ class LinuxfooGitlab { else { if(count($releases)==0) { $out .= - '

'. + ''. __('This project has currently no releases.', 'linuxfoo-gitlab'). - '

'; + ''; } elseif($atts['releases']=='latest') { $out .= - '

'. + ''. __('Latest release', 'linuxfoo-gitlab').': '. ''.$releases[0]->name.''. - '

'; + ''; } elseif($atts['releases']=='all') { $out .= - '

'. + ''. __('Releases', 'linuxfoo-gitlab').': '. - '

'. - ''; + $out .= ''; } } } @@ -212,7 +212,7 @@ class LinuxfooGitlab { static function show_project($atts, $content, $tag) { global $post; - $out = '
'; + $out = ''; if( is_null($atts['url']) || @@ -255,7 +255,7 @@ class LinuxfooGitlab { } } - $out .= '
'; + $out .= ''; return $out; } diff --git a/styles.css b/styles.css index 229f784..1dec3c9 100644 --- a/styles.css +++ b/styles.css @@ -1,13 +1,17 @@ .linuxfoo_gitlab { + display: block; border: 1px dashed #8a8a8a; border-radius: .5em; padding: .25em .5em; } -.linuxfoo_gitlab .commits { +.linuxfoo_gitlab .commits, .linuxfoo_gitlab .releases { + display: block; margin: .25em 0 .25em 0; } -.linuxfoo_gitlab .releases { - margin: .25em 0 .25em 0; +.linuxfoo_gitlab .commit, .linuxfoo_gitlab .release { + display: list-item; + list-style-type: square; + margin: 0 0 0 1em; } .linuxfoo_gitlab .project_header { display: block;