-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adds a "profiles by id" streamfield component * adds a "latest X profiles" streamfield component
- Loading branch information
Showing
8 changed files
with
386 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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
89 changes: 89 additions & 0 deletions
89
network-api/networkapi/wagtailpages/migrations/0038_auto_20180920_1100.py
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
45 changes: 45 additions & 0 deletions
45
network-api/networkapi/wagtailpages/templates/wagtailpages/blocks/profile_blocks.html
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<div class="profiles"> | ||
<div class="row"> | ||
{% for profile in profiles %} | ||
<div class="col-md-6 col-12 mb-5"> | ||
<div class="person-card row no-gutters"> | ||
<div class="col-4 mr-3"> | ||
<div class="row"> | ||
<div class="col"> | ||
<img | ||
src="{% if profile.thumbnail %}{{ profile.thumbnail }}{% else %}/_images/fellowships/headshot/placeholder.jpg{% endif %}" | ||
class="headshot" | ||
alt="Headshot" | ||
> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col bio-content pt-3"> | ||
|
||
<div class="meta-block mb-2"> | ||
<div class="h5-heading mb-1">{{profile.name }}</div> | ||
{% if profile.program_type %} | ||
<div class="meta-block-item meta-block-item-role">{{ profile.program_type }}{% if profile.program_year %}, {{ profile.program_year }}{% endif %}</div> | ||
{% endif %} | ||
</div> | ||
|
||
{% if profile.issues|length > 0 %} | ||
<div class="person-issues"> | ||
{% for issue in profile.issues %} | ||
<span class="issue-link small d-inline-block mr-1">{{ issue }}</span> | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
|
||
<hr> | ||
|
||
<div class="full-profile"> | ||
<a href="https://www.mozillapulse.org/profile/{{ profile.profile_id }}">SEE FULL PROFILE →</a> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> |
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 |
---|---|---|
|
@@ -82,3 +82,5 @@ body div.wagtail-draft-warning { | |
font-weight: bold; | ||
text-transform: uppercase; | ||
} | ||
|
||
@import './wagtail/blocks'; |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.cms { | ||
@import './profiles'; | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,109 @@ | ||
.profiles { | ||
.headshot { | ||
width: 100%; | ||
} | ||
|
||
.person-card { | ||
border-top: 0.25rem solid black; | ||
} | ||
|
||
.person-card-featured { | ||
.more-details { | ||
background-color: $blue; | ||
color: white; | ||
|
||
&:hover { | ||
background-color: $dark-blue; | ||
} | ||
} | ||
} | ||
|
||
.person-issues { | ||
line-height: 1; | ||
} | ||
|
||
.meta-block { | ||
.meta-block-item { | ||
display: flex; | ||
align-items: center; | ||
font-size: 12px; | ||
font-weight: 900; | ||
|
||
&::before { | ||
width: 12px; | ||
height: 12px; | ||
display: block; | ||
content: ''; | ||
margin-right: 5px; | ||
background-size: contain; | ||
background-repeat: no-repeat; | ||
} | ||
} | ||
|
||
.meta-block-item-role { | ||
&::before { | ||
background-image: url('/_images/glyphs/mozilla-icon.svg'); | ||
} | ||
} | ||
|
||
.meta-block-item-location { | ||
&::before { | ||
background-image: url('/_images/glyphs/map-marker-icon.svg'); | ||
} | ||
} | ||
} | ||
|
||
.person-social-links { | ||
position: relative; | ||
z-index: 1; | ||
border-top: 1px solid $gray-lightest; | ||
padding-top: 0.75em; | ||
} | ||
|
||
.issue-link { | ||
font-style: italic; | ||
} | ||
|
||
.issue-link:not(:last-child)::after { | ||
content: ', '; | ||
} | ||
|
||
.person-quote { | ||
z-index: 1; | ||
|
||
&::before { | ||
content: '\201C'; | ||
font-size: 15em; | ||
color: $subtle-gray; | ||
z-index: -1; | ||
position: absolute; | ||
font-weight: bold; | ||
font-style: initial; | ||
top: -0.3em; | ||
} | ||
} | ||
|
||
.person-bio { | ||
margin-top: 1em; | ||
|
||
ul { | ||
list-style-type: disc; | ||
list-style-position: outside; | ||
padding: 0 30px; | ||
} | ||
} | ||
|
||
.partnership_logo { | ||
max-width: 8rem; | ||
max-height: 3rem; | ||
filter: grayscale(100%) opacity(50%); | ||
} | ||
|
||
.full-profile { | ||
text-align: left; | ||
|
||
@media (min-width: $bp-md) { | ||
text-align: right; | ||
} | ||
} | ||
} |