Skip to content

Commit

Permalink
made who nav modular
Browse files Browse the repository at this point in the history
  • Loading branch information
bogreudell committed Dec 21, 2020
1 parent 70ff330 commit c270d71
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 63 deletions.
4 changes: 2 additions & 2 deletions acf-json/group_5fe0faa94896c.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
{
"param": "page_template",
"operator": "==",
"value": "template-leadership.php"
"value": "template-team.php"
}
]
],
Expand All @@ -108,5 +108,5 @@
"hide_on_screen": "",
"active": true,
"description": "",
"modified": 1608580577
"modified": 1608585162
}
6 changes: 3 additions & 3 deletions components/team-nav.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<ul class="wt_who-navigation">
<li class="active">
<li<?php if ($current_page === 'team'):?> class="active"<?php endif; ?>>
<a href="<?php bloginfo('url'); ?>/who/leadership">Team</a>
</li>
<li>
<li<?php if ($current_page === 'contributors'):?> class="active"<?php endif; ?>>
<a href="<?php bloginfo('url'); ?>/who/contributors">Contributors</a>
</li>
<li>
<li<?php if ($current_page === 'supporters'):?> class="active"<?php endif; ?>>
<a href="<?php bloginfo('url'); ?>/who/supporters">Supporters</a>
</li>
</ul>
54 changes: 27 additions & 27 deletions stylus/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -509,76 +509,76 @@ body.home .wt_donate-banner:before {
z-index: -1;
}
}
body.page-template-template-leadership .wt_page-intro {
body.page-template-template-team .wt_page-intro {
margin-bottom: 2%;
}
body.page-template-template-leadership .wt_page-intro h1,
body.page-template-template-leadership .wt_page-intro h2 {
body.page-template-template-team .wt_page-intro h1,
body.page-template-template-team .wt_page-intro h2 {
margin-top: 0;
text-align: center;
}
body.page-template-template-leadership .wt_who-navigation {
body.page-template-template-team .wt_who-navigation {
margin: 0 auto;
padding: 0;
text-align: center;
}
body.page-template-template-leadership .wt_who-navigation li {
body.page-template-template-team .wt_who-navigation li {
display: inline-block;
margin: 0 10px;
text-transform: uppercase;
font-weight: bold;
}
body.page-template-template-leadership .wt_who-navigation li:hover::after,
body.page-template-template-leadership .wt_who-navigation li.active::after {
body.page-template-template-team .wt_who-navigation li:hover::after,
body.page-template-template-team .wt_who-navigation li.active::after {
content: "";
width: 7px;
height: 7px;
display: block;
margin: 5px auto;
border-radius: 100%;
}
body.page-template-template-leadership .wt_who-navigation li:hover::after {
body.page-template-template-team .wt_who-navigation li:hover::after {
background-color: #dedede;
}
body.page-template-template-leadership .wt_who-navigation li.active::after {
body.page-template-template-team .wt_who-navigation li.active::after {
background-color: #86e9c3;
}
body.page-template-template-leadership .wt_face-grid {
body.page-template-template-team .wt_face-grid {
width: 90%;
margin: 5% auto 15%;
text-align: center;
}
body.page-template-template-leadership .wt_face-grid.large>h1 {
body.page-template-template-team .wt_face-grid.large>h1 {
margin-bottom: 0;
}
body.page-template-template-leadership .wt_face-grid.large>p {
body.page-template-template-team .wt_face-grid.large>p {
font-size: 2rem;
margin-bottom: 4rem;
}
body.page-template-template-leadership .wt_face-grid.large .wt_member {
body.page-template-template-team .wt_face-grid.large .wt_member {
display: inline-block;
width: 31%;
margin: 1% 0.5%;
vertical-align: top;
text-align: left;
}
body.page-template-template-leadership .wt_face-grid.large .wt_member .wt_member-photo {
body.page-template-template-team .wt_face-grid.large .wt_member .wt_member-photo {
width: 100%;
padding-bottom: 100%;
background-size: cover !important;
margin-bottom: 10px;
}
body.page-template-template-leadership .wt_face-grid.large .wt_member .wt_member-photo.empty {
body.page-template-template-team .wt_face-grid.large .wt_member .wt_member-photo.empty {
background-color: #86e9c3;
}
body.page-template-template-leadership .wt_face-grid.large .wt_member h2 {
body.page-template-template-team .wt_face-grid.large .wt_member h2 {
font-size: 1em;
}
body.page-template-template-leadership .wt_face-grid.large .wt_member .wt_member-location {
body.page-template-template-team .wt_face-grid.large .wt_member .wt_member-location {
margin-top: 20px;
font-style: italic;
}
body.page-template-template-leadership .wt_face-grid.large .wt_member .wt_member-bio {
body.page-template-template-team .wt_face-grid.large .wt_member .wt_member-bio {
margin: 5px 0 10px;
padding-right: 5px;
}
Expand Down Expand Up @@ -624,7 +624,7 @@ body.page-template-template-leadership .wt_face-grid.large .wt_member .wt_member
border-right: 40vw solid #86e9c3;
z-index: -1;
}
.leadership > .wt_page-intro::before {
.team > .wt_page-intro::before {
content: "";
background-color: transparent;
position: absolute;
Expand All @@ -635,7 +635,7 @@ body.page-template-template-leadership .wt_face-grid.large .wt_member .wt_member
border-bottom: 50px solid transparent;
z-index: -1;
}
.leadership > .wt_three-column-face-grid:nth-of-type(4)::before {
.team > .wt_three-column-face-grid:nth-of-type(4)::before {
content: "";
background-color: transparent;
position: absolute;
Expand All @@ -647,7 +647,7 @@ body.page-template-template-leadership .wt_face-grid.large .wt_member .wt_member
border-bottom: 100px solid transparent;
z-index: -1;
}
.leadership > .wt_two-column-face-grid:nth-of-type(2)::after {
.team > .wt_two-column-face-grid:nth-of-type(2)::after {
content: "";
background-color: transparent;
position: absolute;
Expand All @@ -656,7 +656,7 @@ body.page-template-template-leadership .wt_face-grid.large .wt_member .wt_member
border-right: 40vw solid #86e9c3;
z-index: -1;
}
.leadership > .wt_names-list::before {
.team > .wt_names-list::before {
content: "";
background-color: transparent;
position: absolute;
Expand Down Expand Up @@ -709,19 +709,19 @@ body.page-template-template-leadership .wt_face-grid.large .wt_member .wt_member
z-index: -1;
}
@media only screen and (max-width: 979px) {
body.page-template-template-leadership h1 {
body.page-template-template-team h1 {
margin-top: 10%;
}
body.page-template-template-leadership .wt_who-navigation {
body.page-template-template-team .wt_who-navigation {
font-size: 1rem;
}
body.page-template-template-leadership .wt_who-navigation li.active:after {
body.page-template-template-team .wt_who-navigation li.active:after {
background: #000 !important;
}
body.page-template-template-leadership .wt_face-grid {
body.page-template-template-team .wt_face-grid {
font-size: 1rem !important;
}
body.page-template-template-leadership .wt_face-grid.large .wt_member {
body.page-template-template-team .wt_face-grid.large .wt_member {
width: 48% !important;
margin: 1.5% 0.5% !important;
}
Expand Down
6 changes: 3 additions & 3 deletions stylus/require/template-team.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
\*------------------------------------*/

body
&.page-template-template-leadership
&.page-template-template-team
.wt_page-intro
margin-bottom 2%

Expand Down Expand Up @@ -142,15 +142,15 @@ style-who-we-are(c)
.contributors
style-who-we-are rgb(134,233,195)

.leadership
.team
style-who-we-are rgb(134,233,195)

.supporters
style-who-we-are rgb(255,246,143)

@media only screen and (max-width: 979px)
body
&.page-template-template-leadership
&.page-template-template-team
h1
margin-top 10%

Expand Down
19 changes: 5 additions & 14 deletions template-contributors.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
<?php /* Template name: Community */ get_header(); ?>
<?php /* Template name: Community */ get_header();

<?php include( locate_template('components/page-intro.php') ); ?>
include( locate_template('components/page-intro.php') );

$current_page = 'contributors';
include( locate_template('components/team-nav.php') );

<ul class="wt_who-navigation">
<li>
<a href="<?php bloginfo('url'); ?>/who/leadership">Leadership</a>
</li>
<li class="active">
<a href="<?php bloginfo('url'); ?>/who/contributors">Contributors</a>
</li>
<li>
<a href="<?php bloginfo('url'); ?>/who/supporters">Supporters</a>
</li>
</ul>
<?php
// Custom Query args
$args = array(
'post_type' => 'contributors',
Expand Down
18 changes: 4 additions & 14 deletions template-donors.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
<?php /* Template name: Donors */ get_header(); ?>
<?php /* Template name: Donors */ get_header();

<?php include( locate_template('components/page-intro.php') ); ?>
include( locate_template('components/page-intro.php') );

<ul class="wt_who-navigation">
<li>
<a href="<?php bloginfo('url'); ?>/who/leadership">Leadership</a>
</li>
<li>
<a href="<?php bloginfo('url'); ?>/who/contributors">Contributors</a>
</li>
<li class="active">
<a href="<?php bloginfo('url'); ?>/who/supporters">Supporters</a>
</li>
</ul>
$current_page = 'supporters';
include( locate_template('components/team-nav.php') );

<?php
// locate component templates
// include( locate_template('components/partners.php') ); need to decide what this constitutes
include( locate_template('components/supporters.php') );
Expand Down
2 changes: 2 additions & 0 deletions template-team.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php /* Template name: Team */ get_header();
include( locate_template('components/page-intro.php') );

$current_page = 'team';
include( locate_template('components/team-nav.php') );

// vars
Expand Down

0 comments on commit c270d71

Please sign in to comment.