add random button to profile footer and update styles to accomodate
add wrapper classes to sidebar and undo some parent theme styles on them
This commit is contained in:
parent
7e2cbbe115
commit
c164bceeb3
5 changed files with 50 additions and 21 deletions
|
@ -738,7 +738,7 @@ function wasmo_before_after($content) {
|
|||
<div class="callout callout-top">
|
||||
<h4>Thank you for visiting wasmormon.org!</h4>
|
||||
<p>This site is mainly a repository of mormon faith transition stories. Hearing others stories is therapeutic, check out the <a href="/profiles/">was mormon profiles</a>.</p>
|
||||
<p>Telling your own story is therapeutic too, consider joining the movement and <a href="/login/">tell your own story now</a>!</p>
|
||||
<p>Telling your own story is therapeutic too, consider joining the movement and <a class="register" href="/login/">tell your own story now</a>!</p>
|
||||
</div>
|
||||
<?php
|
||||
$top_callout = ob_get_clean();
|
||||
|
|
33
style.css
33
style.css
|
@ -5,7 +5,7 @@
|
|||
Author: Evan Mullins
|
||||
Author URI: https://circlecube.com
|
||||
Template: twentynineteen
|
||||
Version: 1.9.21
|
||||
Version: 1.9.22
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Text Domain: wasmo
|
||||
|
@ -60,7 +60,8 @@ h2,
|
|||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
h6,
|
||||
.sidebar .wp-block-button__link {
|
||||
font-family: "Open Sans", sans-serif;
|
||||
}
|
||||
|
||||
|
@ -257,20 +258,38 @@ body.logged-in .menu-item.logged-in {
|
|||
text-decoration: none;
|
||||
color: var(--color-white);
|
||||
line-height: 1.1em;
|
||||
opacity: 1;
|
||||
opacity: 0;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
.directory .person .directory-name {
|
||||
.directory-full .person .directory-name {
|
||||
opacity: 0;
|
||||
}
|
||||
.directory .person:hover .directory-name {
|
||||
.directory-full .person:hover .directory-name {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.widget-area.sidebar {
|
||||
padding: 0 1rem;
|
||||
}
|
||||
|
||||
.sidebar.entry .widget-column.entry-content {
|
||||
margin: 3rem 0;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
.sidebar.entry .widget-column.entry-content > *,
|
||||
.sidebar.entry .the-directory.entry-content > * {
|
||||
margin: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
.sidebar.entry .widget-column.entry-content .widget {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
.entry .entry-content .wp-block-image figure {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
/* directory widget */
|
||||
.widget .the-directory {
|
||||
margin: 0 auto 2rem;
|
||||
|
@ -342,6 +361,10 @@ h2.tagline:before {
|
|||
margin: 6rem 0;
|
||||
}
|
||||
|
||||
.buttons + .buttons {
|
||||
margin-top: -5rem;
|
||||
}
|
||||
|
||||
.buttons .wp-block-button a {
|
||||
margin: 0 1rem 1rem 0;
|
||||
display: inline-block;
|
||||
|
|
|
@ -55,7 +55,7 @@ if ( false === ( $the_directory = get_transient( $transient_name ) ) ) {
|
|||
$users = get_users( $args );
|
||||
|
||||
$the_directory .= '<section class="entry-content the-directory directory-' . $context . ' directory-' . $state . ' directory-' . $max_profiles . '">';
|
||||
$the_directory .= '<div class="directory">';
|
||||
$the_directory .= '<div class="directory directory-' . $context . '">';
|
||||
$counter = 0;
|
||||
// Array of WP_User objects.
|
||||
foreach ( $users as $user ) {
|
||||
|
@ -104,12 +104,11 @@ if ( false === ( $the_directory = get_transient( $transient_name ) ) ) {
|
|||
}
|
||||
|
||||
$counter++;
|
||||
$userimg = get_field( 'photo', 'user_' . $userid );
|
||||
$username = esc_html( $user->display_name );
|
||||
|
||||
$the_directory .= '<a class="person person-' . $counter . ' person-id-' . $userid . '" href="' . get_author_posts_url( $userid ) . '">';
|
||||
$the_directory .= '<a title="' . $username . '" class="person person-' . $counter . ' person-id-' . $userid . '" href="' . get_author_posts_url( $userid ) . '">';
|
||||
$the_directory .= '<span class="directory-img">';
|
||||
if ( $userimg ) {
|
||||
if ( $has_image ) {
|
||||
$the_directory .= wp_get_attachment_image( $userimg, 'medium' );
|
||||
} else {
|
||||
$hash = md5( strtolower( trim( $user->user_email ) ) );
|
||||
|
|
|
@ -251,20 +251,27 @@ endif;
|
|||
</div>
|
||||
<?php } // end admin check ?>
|
||||
|
||||
<div class="buttons">
|
||||
<?php if (
|
||||
is_user_logged_in() &&
|
||||
$userid === get_current_user_id()
|
||||
) { ?>
|
||||
<?php if (
|
||||
is_user_logged_in() &&
|
||||
$userid === get_current_user_id()
|
||||
) { ?>
|
||||
<div class="buttons">
|
||||
<span class="edit-link">
|
||||
<a href="<?php echo home_url( '/edit/' ); ?>">Edit Your Profile</a>
|
||||
</span>
|
||||
<?php } ?>
|
||||
<span class="wp-block-button is-style-outline">
|
||||
<a class="wp-block-button__link" href="<?php echo home_url( '/directory/' ); ?>">Back to the Directory</a>
|
||||
</span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="buttons">
|
||||
<span class="wp-block-button">
|
||||
<a class="wp-block-button__link" href="<?php echo home_url( '/login/' ); ?>">Contribute your own story</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<span class="wp-block-button is-style-outline">
|
||||
<a class="wp-block-button__link" href="<?php echo home_url( '/directory/' ); ?>">Back to the Directory</a>
|
||||
</span>
|
||||
<span class="wp-block-button is-style-outline">
|
||||
<a class="wp-block-button__link" href="<?php echo home_url( '?randomprofile=1' ); ?>">Random Profile</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
|
@ -9,11 +9,11 @@
|
|||
|
||||
if ( is_active_sidebar( 'sidebar' ) ) : ?>
|
||||
|
||||
<aside class="widget-area sidebar" role="complementary" aria-label="<?php esc_attr_e( 'Sidebar', 'twentynineteen' ); ?>">
|
||||
<aside class="widget-area sidebar entry" role="complementary" aria-label="<?php esc_attr_e( 'Sidebar', 'twentynineteen' ); ?>">
|
||||
<?php
|
||||
if ( is_active_sidebar( 'sidebar' ) ) {
|
||||
?>
|
||||
<div class="widget-column sidebar-widgets">
|
||||
<div class="widget-column sidebar-widgets entry-content">
|
||||
<?php dynamic_sidebar( 'sidebar' ); ?>
|
||||
</div>
|
||||
<?php
|
||||
|
|
Loading…
Reference in a new issue