Badges fixes in articles list
This commit is contained in:
parent
a870192546
commit
afa342e57f
@ -180,6 +180,12 @@ footer {
|
|||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.articles-list .certification {
|
||||||
|
transform: translate(0, +10%);
|
||||||
|
width: 1.1em;
|
||||||
|
margin-left: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
.articles-list .article-title {
|
.articles-list .article-title {
|
||||||
font: 1.5em cfont, Arial;
|
font: 1.5em cfont, Arial;
|
||||||
padding: 0.5em 0;
|
padding: 0.5em 0;
|
||||||
|
@ -40,8 +40,8 @@ function listArticles($result, $rootPageURL, $badges) {
|
|||||||
$articleResume = $article['resume'];
|
$articleResume = $article['resume'];
|
||||||
$miniatureURL = empty($article['miniature']) ? $rootPageURL . "src/img/empty.jpg" : $article['miniature'];
|
$miniatureURL = empty($article['miniature']) ? $rootPageURL . "src/img/empty.jpg" : $article['miniature'];
|
||||||
|
|
||||||
if(isset($article['username']) && isset($article['display_name']) && isset($article['certification'])) {
|
if (isset($article['username'])) {
|
||||||
$badge = $article['certification'] > 0 ? '<svg class="certification" viewBox="0 0 22 22" aria-label="Compte certifié" role="img"><g>' . $badges[$userCertification] . '</g></svg>' : "";
|
$badge = $article['certification'] > 0 ? '<svg class="certification" viewBox="0 0 22 22" aria-label="Compte certifié" role="img"><g>' . $badges[$article['certification']] . '</g></svg>' : "";
|
||||||
$authorLink = ' | <a href="user.php?user=' . $article['username'] . '">' . $article['display_name'] . $badge . '</a>';
|
$authorLink = ' | <a href="user.php?user=' . $article['username'] . '">' . $article['display_name'] . $badge . '</a>';
|
||||||
} else {
|
} else {
|
||||||
$authorLink = '';
|
$authorLink = '';
|
||||||
@ -58,7 +58,7 @@ function listArticles($result, $rootPageURL, $badges) {
|
|||||||
echo('</a>');
|
echo('</a>');
|
||||||
|
|
||||||
echo('<div class="article-info">');
|
echo('<div class="article-info">');
|
||||||
echo('<div class="article-data">n° ' . $articleID . ' | ' . $pubDate . '</div>');
|
echo('<div class="article-data">n° ' . $articleID . ' | ' . $pubDate . $authorLink . '</div>');
|
||||||
|
|
||||||
echo('<a href="'. $rootPageURL .'news?article=' . $articleID . '" class="article-link">');
|
echo('<a href="'. $rootPageURL .'news?article=' . $articleID . '" class="article-link">');
|
||||||
echo('<div class="article-title">' . $articleTitle . '</div>');
|
echo('<div class="article-title">' . $articleTitle . '</div>');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user