Skip to content

Commit 7fe07f8

Browse files
author
Ariel Jolo
committed
trying new layout
1 parent 111ada2 commit 7fe07f8

File tree

1 file changed

+45
-13
lines changed

1 file changed

+45
-13
lines changed
Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,86 @@
11
<?php
22
/**
33
* Template for displaying a board member in a side-by-side layout.
4+
* All header elements in one column on the left, fixed below the site header.
45
*
56
* @package osi
67
*/
78
?>
89
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
910
<div class="board-member-wrapper">
10-
<!-- Fixed Left Column: Header -->
11+
12+
<!-- Fixed Left Column: CPT Header -->
1113
<div class="board-member-header">
1214
<?php get_template_part( 'template-parts/header-board-member' ); ?>
1315
</div>
1416

15-
<!-- Scrollable Right Column: Content -->
17+
<!-- Scrollable Right Column: Main Content -->
1618
<div class="board-member-content">
1719
<div class="entry-content post--content">
1820
<?php the_content(); ?>
1921
</div><!-- .entry-content -->
2022
<section class="alignwide email-block">
21-
<?php // Uncomment below if needed: get_template_part( 'template-parts/nav-postname-pager' ); ?>
22-
<?php // Uncomment below if needed: get_template_part( 'template-parts/email-block' ); ?>
23+
<?php // get_template_part( 'template-parts/nav-postname-pager' ); ?>
24+
<?php // get_template_part( 'template-parts/email-block' ); ?>
2325
</section>
2426
</div>
25-
</div>
27+
</div><!-- .board-member-wrapper -->
2628
</article>
2729

2830
<style>
31+
/* Overall wrapper to place columns side by side */
2932
.board-member-wrapper {
3033
display: flex;
3134
}
3235

33-
/* Left Column: Fixed Header */
36+
/* Left Column: Fixed Header (one column stacked) */
3437
.board-member-header {
35-
width: 40%; /* Adjust as needed (or use a fixed width, e.g., 350px) */
36-
position: fixed; /* Keeps the header fixed on the left */
37-
top: 0;
38+
width: 40%;
39+
position: fixed;
40+
top: 120px; /* Adjust this to match your site header’s height */
3841
left: 0;
3942
bottom: 0;
40-
overflow-y: auto; /* In case header content overflows */
41-
background-color: #fff; /* Optional: ensures the content below doesn't show through */
42-
padding: 20px; /* Optional spacing */
43+
overflow-y: auto;
44+
background-color: #fff;
45+
padding: 20px;
4346
box-sizing: border-box;
4447
}
4548

4649
/* Right Column: Scrollable Content */
4750
.board-member-content {
48-
margin-left: 40%; /* Must match header width; if using fixed px for header, set this to same px value */
51+
margin-left: 40%; /* Must match board-member-header width */
4952
width: 60%;
5053
padding: 20px;
5154
overflow-y: auto;
5255
box-sizing: border-box;
5356
}
57+
58+
/* Stack all items in header vertically */
59+
.cpt-header-single-column > * {
60+
display: block;
61+
margin-bottom: 1rem;
62+
}
63+
64+
/* Existing styles for images, text, etc. */
65+
.member-image {
66+
margin-bottom: 1.5rem;
67+
}
68+
.member-image img.circular-image {
69+
border-radius: 50%;
70+
border: 4px solid #FFF;
71+
width: 300px; /* adjust as needed */
72+
height: 300px;
73+
object-fit: cover;
74+
}
75+
.member-position,
76+
.member-dates,
77+
.member-seat,
78+
.member-term-item {
79+
display: block;
80+
margin-bottom: 1rem;
81+
}
82+
.member-pronouns {
83+
font-family: 'Space Mono', monospace;
84+
display: inline-block;
85+
}
5486
</style>

0 commit comments

Comments
 (0)