profile updates - links and about added, initial styles

This commit is contained in:
Evan Mullins 2019-03-12 08:30:59 -06:00
parent b415110b85
commit 7cc0f745f6
3 changed files with 133 additions and 12 deletions

View file

@ -64,6 +64,25 @@
"append": "",
"maxlength": ""
},
{
"key": "field_5c87b7a994494",
"label": "About Me",
"name": "about_me",
"type": "textarea",
"instructions": "Describe your background within a mormon context.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"maxlength": "",
"rows": 5,
"new_lines": "wpautop"
},
{
"key": "field_5c815ad1df647",
"label": "Why I left",
@ -306,5 +325,5 @@
],
"active": 1,
"description": "",
"modified": 1552397635
"modified": 1552398299
}

View file

@ -130,4 +130,49 @@ body.logged-in .main-navigation .main-menu .menu-item.logged-in {
/* profile */
.acf-input .acf-url i {
top: 12px;
}
h1.hi,
h2.tagline {
margin: 0;
}
h1.hi:before,
h2.tagline:before {
content: none;
}
.entry .entry-content .content-header {
display: flex;
max-width: 100%;
width: 100%;
}
.content-left {
flex-basis: 200px;
min-width: 200px;
margin-right: 1rem;
}
/* @media only screen and (min-width: 768px) {
.content-left {
width: 25%;
}
} */
h2.tagline {
color: var(--color-gray2);
font-family: serif;
font-style: italic;
font-size: 1.5rem;
font-weight: normal;
line-height: 1.2em;
margin-top: .5rem;
}
.social-links {
list-style: none;
margin: 0;
padding: 0;
}
.social-links li {
display: inline-block;
}

View file

@ -4,23 +4,80 @@
*/
?>
<div class="user_photo"><?php
$userimg = get_field( 'photo', 'user_' . $userid );
if ( $userimg ) {
echo wp_get_attachment_image( $userimg, 'medium' );
}
?></div>
<div class="hi"><?php echo get_field( 'hi', 'user_' . $userid ); ?></div>
<div class="tagline"><?php echo get_field( 'tagline', 'user_' . $userid ); ?></div>
<h3>Why I left</h3>
<div class="why_i_left"><?php echo get_field( 'why_i_left', 'user_' . $userid ); ?></div>
<div class="content-header">
<div class="content-left">
<div class="user_photo"><?php
$userimg = get_field( 'photo', 'user_' . $userid );
if ( $userimg ) {
echo wp_get_attachment_image( $userimg, 'medium' );
}
?></div>
<?php
$links = get_field( 'links', 'user_' . $userid );
if ( $links ) { ?>
<ul class="social-links">
<?php if ( $links['facebook'] ) {
$svg = twentynineteen_get_social_link_svg( $links['facebook'], 26 );
?>
<li class="facebook"><a target="_blank" rel="noopener noreferrer" href="<?php
echo esc_url( $links['facebook'] );
?>"><span class="screen-reader-text">Facebook</span><?php echo $svg; ?></a></li>
<?php } ?>
<?php if ( $links['instagram'] ) {
$svg = twentynineteen_get_social_link_svg( $links['instagram'], 26 );
?>
<li class="instagram"><a target="_blank" rel="noopener noreferrer" href="<?php
echo esc_url( $links['instagram'] );
?>"><span class="screen-reader-text">instagram</span><?php echo $svg; ?></a></li>
<?php } ?>
<?php if ( $links['twitter'] ) {
$svg = twentynineteen_get_social_link_svg( $links['twitter'], 26 );
?>
<li class="twitter"><a target="_blank" rel="noopener noreferrer" href="<?php
echo esc_url( $links['twitter'] );
?>"><span class="screen-reader-text">twitter</span><?php echo $svg; ?></a></li>
<?php } ?>
<?php if ( $links['other'] ) {
$svg = twentynineteen_get_social_link_svg( $links['other'], 26 );
if ( empty( $svg ) ) {
$svg = twentynineteen_get_icon_svg( 'link' );
}
?>
<li class="other"><a target="_blank" rel="noopener noreferrer" href="<?php
echo esc_url( $links['other'] );
?>"><span class="screen-reader-text">other</span><?php echo $svg; ?></a></li>
<?php } ?>
</ul>
<?php } ?>
</div>
<div class="content-right">
<?php if ( get_field( 'hi', 'user_' . $userid ) ) { ?>
<h1 class="hi"><?php echo get_field( 'hi', 'user_' . $userid ); ?></h1>
<?php } ?>
<?php if ( get_field( 'tagline', 'user_' . $userid ) ) { ?>
<h2 class="tagline"><?php echo get_field( 'tagline', 'user_' . $userid ); ?></h2>
<?php } ?>
</div>
</div>
<?php if ( get_field( 'about_me', 'user_' . $userid ) ) { ?>
<h3>About me</h3>
<div class="about_me"><?php echo get_field( 'about_me', 'user_' . $userid ); ?></div>
<?php } ?>
<?php if ( get_field( 'why_i_left', 'user_' . $userid ) ) { ?>
<h3>Why I left</h3>
<div class="why_i_left"><?php echo get_field( 'why_i_left', 'user_' . $userid ); ?></div>
<?php } ?>
<?php
//questions repeater
if( have_rows( 'questions', 'user_' . $userid ) ):
?>
<h3>Questions</h3>
<h3>Questions I've answered</h3>
<?php
// loop through the rows of data