forked from tk-sls.de/linuxfoo-gitlab
modify tag structure to avoid p and ul elements
This commit is contained in:
parent
7c7685bee7
commit
6efb5ccf18
@ -132,13 +132,13 @@ class LinuxfooGitlab {
|
|||||||
'</span>';
|
'</span>';
|
||||||
|
|
||||||
if($commits_count>0) {
|
if($commits_count>0) {
|
||||||
$out .= '<ul class="commits">';
|
$out .= '<span class="commits" role="list">';
|
||||||
|
|
||||||
foreach($commits as $commit) {
|
foreach($commits as $commit) {
|
||||||
$out .= '<li>'.self::format_commit($atts, $commit).'</li>';
|
$out .= '<span class="commit">'.self::format_commit($atts, $commit).'</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$out .= '</ul>';
|
$out .= '</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -171,32 +171,32 @@ class LinuxfooGitlab {
|
|||||||
else {
|
else {
|
||||||
if(count($releases)==0) {
|
if(count($releases)==0) {
|
||||||
$out .=
|
$out .=
|
||||||
'<p class="releases">'.
|
'<span class="releases">'.
|
||||||
__('This project has currently no releases.', 'linuxfoo-gitlab').
|
__('This project has currently no releases.', 'linuxfoo-gitlab').
|
||||||
'</p>';
|
'</span>';
|
||||||
}
|
}
|
||||||
elseif($atts['releases']=='latest') {
|
elseif($atts['releases']=='latest') {
|
||||||
$out .=
|
$out .=
|
||||||
'<p class="releases">'.
|
'<span class="releases">'.
|
||||||
__('Latest release', 'linuxfoo-gitlab').': '.
|
__('Latest release', 'linuxfoo-gitlab').': '.
|
||||||
'<a href="'.$releases[0]->_links->self.'">'.$releases[0]->name.'</a>'.
|
'<a href="'.$releases[0]->_links->self.'">'.$releases[0]->name.'</a>'.
|
||||||
'</p>';
|
'</span>';
|
||||||
}
|
}
|
||||||
elseif($atts['releases']=='all') {
|
elseif($atts['releases']=='all') {
|
||||||
$out .=
|
$out .=
|
||||||
'<p class="releases">'.
|
'<span class="releases">'.
|
||||||
__('Releases', 'linuxfoo-gitlab').': '.
|
__('Releases', 'linuxfoo-gitlab').': '.
|
||||||
'</p>'.
|
'</span>'.
|
||||||
'<ul class="releases">';
|
'<span class="releases" role="list">';
|
||||||
|
|
||||||
foreach($releases as $release) {
|
foreach($releases as $release) {
|
||||||
$out .=
|
$out .=
|
||||||
'<li>'.
|
'<span class="release">'.
|
||||||
'<a href="'.$release->_links->self.'">'.$release->name.'</a>'.
|
'<a href="'.$release->_links->self.'">'.$release->name.'</a>'.
|
||||||
'</li>';
|
'</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$out .= '</ul>';
|
$out .= '</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -212,7 +212,7 @@ class LinuxfooGitlab {
|
|||||||
static function show_project($atts, $content, $tag) {
|
static function show_project($atts, $content, $tag) {
|
||||||
global $post;
|
global $post;
|
||||||
|
|
||||||
$out = '<div class="linuxfoo_gitlab">';
|
$out = '<span class="linuxfoo_gitlab">';
|
||||||
|
|
||||||
if(
|
if(
|
||||||
is_null($atts['url']) ||
|
is_null($atts['url']) ||
|
||||||
@ -255,7 +255,7 @@ class LinuxfooGitlab {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$out .= '</div>';
|
$out .= '</span>';
|
||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
10
styles.css
10
styles.css
@ -1,13 +1,17 @@
|
|||||||
.linuxfoo_gitlab {
|
.linuxfoo_gitlab {
|
||||||
|
display: block;
|
||||||
border: 1px dashed #8a8a8a;
|
border: 1px dashed #8a8a8a;
|
||||||
border-radius: .5em;
|
border-radius: .5em;
|
||||||
padding: .25em .5em;
|
padding: .25em .5em;
|
||||||
}
|
}
|
||||||
.linuxfoo_gitlab .commits {
|
.linuxfoo_gitlab .commits, .linuxfoo_gitlab .releases {
|
||||||
|
display: block;
|
||||||
margin: .25em 0 .25em 0;
|
margin: .25em 0 .25em 0;
|
||||||
}
|
}
|
||||||
.linuxfoo_gitlab .releases {
|
.linuxfoo_gitlab .commit, .linuxfoo_gitlab .release {
|
||||||
margin: .25em 0 .25em 0;
|
display: list-item;
|
||||||
|
list-style-type: square;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
}
|
}
|
||||||
.linuxfoo_gitlab .project_header {
|
.linuxfoo_gitlab .project_header {
|
||||||
display: block;
|
display: block;
|
||||||
|
Loading…
Reference in New Issue
Block a user