Mobile comment form

This commit is contained in:
Fabiano Alencar 2018-03-07 14:02:04 -03:00
parent e6736413a4
commit fdb424d8eb
4 changed files with 12 additions and 8 deletions

View File

@ -17,7 +17,7 @@
width: 45vw; width: 45vw;
} }
@media (max-width: 576px){ @media (max-width: 576px){
width: 100vw; width: 90vw;
} }
} }
} }

View File

@ -27,7 +27,7 @@ if (post_password_required()) {
<div id="respond" class="clearfix"> <div id="respond" class="clearfix">
<div for="comment" class="d-block"> <div for="comment" class="d-block">
<span class="text-jelly-bean"><?php _e('Leave your comment', 'tainacan-theme'); ?></span> <span class="text-jelly-bean"><?php _e('Leave your comment', 'tainacan-theme'); ?></span>
<span class="text-oslo-gray authenticated ml-sm-3"> <span class="text-oslo-gray authenticated ml-sm-3 d-none d-sm-block">
<?php <?php
_e('Authenticated as', 'tainacan-theme'); echo ': '; _e('Authenticated as', 'tainacan-theme'); echo ': ';
echo '<a href="'. get_author_posts_url($current_user->ID) .'">' . $current_user->display_name . '</a>'; echo '<a href="'. get_author_posts_url($current_user->ID) .'">' . $current_user->display_name . '</a>';
@ -36,16 +36,22 @@ if (post_password_required()) {
</div> </div>
<form autocomplete="off" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="form-comment" class="form-inline px-sm-5"> <form autocomplete="off" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="form-comment" class="form-inline px-sm-5">
<div class="row mx-sm-auto"> <div class="row mx-sm-auto p-3">
<div class="form-group"> <div class="form-group">
<?php <?php
comment_id_fields(); comment_id_fields();
$args = array('class' => 'img-fluid rounded-circle mr-sm-3', ); $args = array('class' => 'img-fluid rounded-circle mr-sm-3', );
echo get_avatar( $current_user->ID, 60, '', $current_user->display_name, $args ); echo get_avatar( $current_user->ID, 60, '', $current_user->display_name, $args );
?> ?>
<span class="text-oslo-gray authenticated ml-3 d-inline d-sm-none">
<?php
_e('Authenticated as', 'tainacan-theme'); echo ': ';
echo '<a href="'. get_author_posts_url($current_user->ID) .'" class="font-weight-light">' . $current_user->display_name . '</a>';
?>
</span>
<textarea name="comment" id="comment" tabindex="1" required class="form-control mr-sm-3" rows="2" placeholder="<?php _e('Enter your comment here.', 'tainacan-theme'); ?>"></textarea> <textarea name="comment" id="comment" tabindex="1" required class="form-control mr-sm-3" rows="2" placeholder="<?php _e('Enter your comment here.', 'tainacan-theme'); ?>"></textarea>
</div> </div>
<button id="submit" class="btn btn-info bg-jungle-green align-self-center" type="submit" name="submit"><?php _e('Send', 'tainacan-theme') ?></button> <button id="submit" class="btn btn-info bg-jungle-green align-self-center ml-auto " type="submit" name="submit"><?php _e('Send', 'tainacan-theme') ?></button>
</div> </div>
<?php cancel_comment_reply_link('Cancel'); ?> <?php cancel_comment_reply_link('Cancel'); ?>

View File

@ -3,14 +3,11 @@
<div class="container-fluid mt-5"> <div class="container-fluid mt-5">
<div class="row"> <div class="row">
<div class="col-sm-9"> <div class="col col-sm-9 mx-sm-auto p-3">
<div id="content" role="main"> <div id="content" role="main">
<?php get_template_part('template-parts/single-post', get_post_format()); ?> <?php get_template_part('template-parts/single-post', get_post_format()); ?>
</div><!-- /#content --> </div><!-- /#content -->
</div> </div>
<div class="col-sm-3">
<?php get_sidebar(); ?>
</div>
</div><!-- /.row --> </div><!-- /.row -->
</div><!-- /.container-fluid --> </div><!-- /.container-fluid -->

1
theme-unit-test Submodule

@ -0,0 +1 @@
Subproject commit 252c98dc0c72b97bdb21494b6ac86923208d274b