Add new style for avatar

This commit is contained in:
ulaulaman 2021-10-12 15:01:10 +02:00
parent 8481a5fa8a
commit 098a784998
2 changed files with 25 additions and 7 deletions

View File

@ -9,3 +9,24 @@
.read-more-state:checked ~ .read-more-trigger_closed { .read-more-state:checked ~ .read-more-trigger_closed {
display: none; display: none;
} }
.avatar {
background-color: #f9f9f9;
border: 1px solid #cccccc;
padding: 3px;
font: 11px/1.4em Arial, sans-serif;
text-align: center;
vertical-align: baseline;
}
.avatar img {
border: 1px solid #cccccc;
vertical-align:middle;
margin-bottom: 3px;
width:92%;
}
.right {
margin: 0.5em 0pt 0.5em 0.8em;
float:right;
}

View File

@ -2,7 +2,7 @@
/* /*
Plugin Name: Co-Authors Widget Dev Plugin Name: Co-Authors Widget Dev
Description: The plugin add a widget and a shortcode in order to show authors of an article. It is compatible with Co-Authors Plus. Description: The plugin add a widget and a shortcode in order to show authors of an article. It is compatible with Co-Authors Plus.
Version: 2021.1008 Version: 2021.1012
Author: Gianluigi Filippelli Author: Gianluigi Filippelli
Author URI: http://dropseaofulaula.blogspot.it/ Author URI: http://dropseaofulaula.blogspot.it/
Plugin URI: https://gitea.it/ulaulaman/widget-for-co-authors-dev Plugin URI: https://gitea.it/ulaulaman/widget-for-co-authors-dev
@ -10,9 +10,6 @@ Gitea Plugin URI: https://gitea.it/ulaulaman/widget-for-co-authors-dev
License: GPLv2 or later License: GPLv2 or later
*/ */
/* ------------------------------------------------------ */
# ---------------------------------------------------------
// Load translations // Load translations
add_action( 'plugins_loaded', 'caw_load_translations' ); add_action( 'plugins_loaded', 'caw_load_translations' );
function caw_load_translations() { function caw_load_translations() {
@ -42,8 +39,8 @@ function blog_avatars() {
<div class="block-item-text"> <div class="block-item-text">
<input type="checkbox" hidden class="read-more-state" id="<?php echo $i; ?>" /> <input type="checkbox" hidden class="read-more-state" id="<?php echo $i; ?>" />
<div class="read-more-wrap"> <div class="read-more-wrap">
<p><div style="float:left; padding: 5px;"><?php echo coauthors_get_avatar( $coauthor, 65 ); ?> <div class="avatar right"><?php echo coauthors_get_avatar( $coauthor, 65 ); ?>
<a href=<?php echo get_author_posts_url( $coauthor->ID, $coauthor->user_nicename ); ?>><?php echo $coauthor->display_name; ?></a></div><span class="read-more-target"><?php echo $coauthor->description; ?></span></p> <a href="<?php echo get_author_posts_url( $coauthor->ID, $coauthor->user_nicename ); ?>"><?php echo $coauthor->display_name; ?></a></div><span class="read-more-target"><?php echo $coauthor->description; ?></span>
</div> </div>
<label for="<?php echo $i; ?>" class="read-more-trigger_closed"> <label for="<?php echo $i; ?>" class="read-more-trigger_closed">
<strong>+ <?php printf( $show_profile ); ?></strong> <strong>+ <?php printf( $show_profile ); ?></strong>
@ -60,7 +57,7 @@ function blog_avatars() {
<div class="block-item-text"> <div class="block-item-text">
<input type="checkbox" hidden class="read-more-state" id="<?php echo $i; ?>" /> <input type="checkbox" hidden class="read-more-state" id="<?php echo $i; ?>" />
<div class="read-more-wrap"> <div class="read-more-wrap">
<p><div style="float:left; padding: 5px;"><?php echo get_avatar( get_the_author_meta( 'user_email' ), 65 ); ?><a href=<?php echo get_the_author_meta( 'user_url' ); ?>><?php echo get_the_author_meta( 'display_name' ); ?></a></div><span class="read-more-target"><?php echo get_the_author_meta( 'description' ); ?></span></p> <div class="avatar right"><?php echo get_avatar( get_the_author_meta( 'user_email' ), 65 ); ?><a href="<?php echo get_the_author_meta( 'user_url' ); ?>"><?php echo get_the_author_meta( 'display_name' ); ?></a></div><span class="read-more-target"><?php echo get_the_author_meta( 'description' ); ?></span>
</div> </div>
<label for="<?php echo $i; ?>" class="read-more-trigger_closed"> <label for="<?php echo $i; ?>" class="read-more-trigger_closed">
<strong>+ <?php printf( $show_profile ); ?></strong> <strong>+ <?php printf( $show_profile ); ?></strong>