-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a Gutenberg-first (not utilizing the shortcode) dynamic block. And likely renders the legacy block from #104 useless because I added the "Staff Loop Template" for a layout option. It contains 3 layout options: - image left, content right - content left, image right - image top, content bottom You can control the fields that are shown on each Single Staff Member block via toggle switches in the `Content Options` panel. **TODO: make these filterable? Would allow users/plugin developers to add their own custom fields.** All functions that handle the layouts, and all block field render functions are pluggable in that a user can add a function with the same name to their theme and it will be used instead of the function contained in Simple Staff List.
- Loading branch information
1 parent
70ed491
commit 2945af5
Showing
10 changed files
with
593 additions
and
944 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
.wp-block-simple-staff-list-static .sorry.warning { | ||
background: #7668ce; | ||
color: white; | ||
font-size: 1.2rem; } | ||
.wp-block-simple-staff-list-static .sorry.warning { | ||
background: #7668ce; | ||
color: white; | ||
font-size: 1.2rem; } | ||
.wp-block-simple-staff-list-static .sorry.warning{background:#7668ce;color:white;font-size:1.2rem} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1 @@ | ||
.wp-block-simple-staff-list-static { | ||
|
||
.sorry.warning { | ||
background: rgb(118, 104, 206); | ||
color: white; | ||
font-size: 1.2rem; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,46 @@ | ||
$black: #222; | ||
$dark: #f7b733; | ||
$light: rgba(254, 243, 224, 0.52); | ||
.wp-block-simple-staff-list-single-staff-member { | ||
|
||
&.layout-1, &.layout-2 { | ||
display: grid; | ||
grid-column-gap: 20px; | ||
} | ||
|
||
@media screen and (min-width: 600px) { | ||
&.layout-1 { | ||
grid-template-columns: 35%; | ||
img { | ||
grid-column-start: 1; | ||
} | ||
|
||
.staff-member-content { | ||
grid-column-start: 2; | ||
} | ||
} | ||
|
||
&.layout-2 { | ||
grid-template-columns: auto 35%; | ||
img { | ||
grid-column-start: 2; | ||
} | ||
|
||
.entry-content .wp-block-jsforwpblocks-static, | ||
.wp-block-jsforwpblocks-static { | ||
.staff-member-content { | ||
grid-column-start: 1; | ||
grid-row-start: 1; | ||
} | ||
} | ||
} | ||
|
||
background: $light; | ||
border: 5px $dark solid; | ||
padding: 1rem; | ||
&.layout-1, &.layout-2, &.layout-3 { | ||
.contact-link { | ||
display: block; | ||
} | ||
|
||
h2 { | ||
color: $black; | ||
font-size: 2rem; | ||
margin: 1rem 0; | ||
} | ||
.social-icon:not(:last-child) { | ||
margin-right: .5em; | ||
} | ||
|
||
p { | ||
font-size: 1.4rem; | ||
.staff-member-photo { | ||
float: none; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.