Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ready: Add Faculty Profile Builder #485

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ navbar:
link: 'index.html'
- text: 'About DUB'
link: 'aboutdub.html'
- text: 'DUB Seminar'
link: 'seminar.html'
# - text: 'People'
# link: 'people.html'
- text: 'Faculty'
link: 'faculty.html'
- text: 'Calendar'
link: 'calendar.html'
# - text: 'Resources'
# link: 'resources.html'
- text: 'Getting Involved'
Expand Down Expand Up @@ -70,3 +70,5 @@ exclude:
- secrets
# Tests
- tests
# People raw images that are processed for the images we then use
- _people/faculty/_images_raw
54 changes: 54 additions & 0 deletions _includes/peopletable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{% assign people = include.people | sort: 'name' %}
{% assign peoplesize = people | size %}
{% assign peoplemod = peoplesize | modulo: 2 %}
{% assign peoplesplit = peoplesize | divided_by: 2 | plus: peoplemod %}

<html>
<section>
<div class="row">
{% for item_person in people %}
{% assign photo_path = item_person.path | split:"." | first | append:"-processed.jpg" %}
{% capture photo_exists %}{% file_exists {{ photo_path }} %}{% endcapture %}
{% if photo_exists == 'false' %}
{% assign photo_path = item_person.path | split:"." | first | append:"-processed.jpeg" %}
{% capture photo_exists %}{% file_exists {{ photo_path }} %}{% endcapture %}
{% endif %}
{% if photo_exists == 'false' %}
{% assign photo_path = item_person.path | split:"." | first | append:"-processed.png" %}
{% capture photo_exists %}{% file_exists {{ photo_path }} %}{% endcapture %}
{% endif %}
{% if photo_exists == 'true' %}
{% assign photo_url = photo_path | remove: "_" | prepend: "/" | prepend: site.baseurl %}
{% else %}
{% assign photo_url = "default.jpg" | prepend: "/people/" | prepend: site.baseurl %}
{% endif %}
<div class="media col-md-6 people-col">
<div class="media-left">
<div class="media-object">
{% assign assuming_photo_exists_url = photo_path | prepend: "/" | prepend: site.baseurl %}
<img src="{{ photo_url }}" class="img-circle"/>
</div>
</div>
<div class="media-body">
<h4 class="media-heading">
<a href="{{ item_person.web }}">
{% for item_name in item_person.name %}
{{ item_name }}
{% endfor %}
{{index}}
</a>
</h4>
{% for item_position in item_person.positions %}
<i>{{ item_position.title }}</i>, {{ item_position.affiliation }}
<br />
{% endfor %}
</div>
</div>
{% assign loopindex = forloop.index | modulo: 2 %}
{% if loopindex == 0 %}
<div class="col-md-12"></div>
{% endif %}
{% endfor %}
</div>
</section>
</html>
99 changes: 99 additions & 0 deletions _people/_template.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
################################################################################
# Version of the people format. The only valid value for this is 1.
# We may increment this in the future to simplify maintenance of old people.
################################################################################
version: 1

################################################################################
# A people file might exist but lack values for some fields. These are 'TBD'.
# The only valid value is 'True'. A TBD field should not be present if 'False'.
################################################################################
{% for tbd in tbds %}
{{ tbd }}: true
{% endfor %}

################################################################################
# Full name listed in the order of fields provided.
#
# name:
# - First name field
# - Second name field
# - etc (up to five fields)
################################################################################
name:
{% for name_part in name %}
- {{ name_part }}
{% endfor %}

################################################################################
# Each person has a single main role.
#
# Valid roles: faculty
################################################################################
role:
- {{ role }}

################################################################################
# UW NetID, used for unique identification
################################################################################
netid: {{ netid }}

################################################################################
# A person may have multiple positions, which consist of a title and affiliation.
#
# Faculty have one or more title and affiliations.
#
# Valid faculty titles:
# Assistant Professor
# Adjunct Assistant Professor
# Affiliate Assistant Professor
# Associate Professor
# Adjunct Associate Professor
# Affiliate Associate Professor
# Professor
# Adjunct Professor
# Affiliate Professor
# Lecturer
# Senior Lecturer
# Professor Emeritus

#
# Valid faculty affiliations:
# Computer Science & Engineering
# Division of Design
# Human Centered Design & Engineering
# Information School
# Human-Computer Interaction & Design
# Architecture
# Biomedical & Health Informatics
# Civil & Environmental Engineering
# Communication
# DXARTS Digital Arts
# Electrical Engineering
# Industrial & Systems Engineering
# Mechanical Engineering
# Nursing
# Psychology
# Rehabilitation Medicine
# Other

################################################################################
positions:
{% for position in positions %}
- title: {{ position.title }}
affiliation: {{ position.affiliation }}
{% endfor %}

################################################################################
# A person may have a website. If not, this field should not be present.
#
# web:
# - https://homes.cs.washington.edu/~jfogarty/
################################################################################
{% if 'homepage_link' %}
web:
- {{ homepage_link }}
{% endif %}

---
82 changes: 82 additions & 0 deletions _people/_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
################################################################################
# Version of the people format. The only valid value for this is 1.
# We may increment this in the future to simplify maintenance of old people.
################################################################################
version: 1

################################################################################
# A people file might exist but lack values for some fields. These are 'TBD'.
# The only valid value is 'True'. A TBD field should not be present if 'False'.
################################################################################
tbd_web: true

################################################################################
# Full name listed in the order of last name, first name, middle name(s).
#
# name:
# - Surname
# - First
# - Middle
# - More
################################################################################
name:
- Surname
- First
- Middle

################################################################################
# Each person has a single main role.
#
# Valid roles: faculty
################################################################################
role:
- faculty

################################################################################
# A person may have multiple positions, which consist of titles and affiliations.
#
# Faculty have one or more title and affiliations.
#
# Valid faculty titles:
# Assistant Professor
# Associate Professor
# Professor
#
# Lecturer
# Senior Lecturer
#
# Professor Emeritus
#
# Valid faculty and doctoral affiliations:
# Computer Science & Engineering
# Division of Design
# Human Centered Design & Engineering
# Information School
#
# Human Computer Interaction & Design
#
# Architecture
# Biomedical & Health Informatics
# Civil & Environmental Engineering
# Communication
# DXARTS Digital Arts
# Electrical Engineering
# Industrial & Systems Engineering
# Mechanical Engineering
# Nursing
# Psychology
# Rehabilitation Medicine
################################################################################
positions:
- title: Associate Professor
affiliation: Computer Science & Engineering

################################################################################
# A person may have a website. If not, this field should not be present.
#
# web:
# - https://homes.cs.washington.edu/~jfogarty/
################################################################################

---
Binary file added _people/default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _people/faculty-new/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file exists so git will commit this directory if it's empty.
1 change: 1 addition & 0 deletions _people/faculty/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file exists so git will commit this directory if it's empty.
3 changes: 3 additions & 0 deletions _remote_data_sequences.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
roles:
faculty:
last_accessed_row: 6
Loading