add photos

This commit is contained in:
William Zhang 2017-11-15 17:16:44 -05:00
parent e5f5dae811
commit a631b5b026
26 changed files with 58 additions and 2 deletions

0
.gitmodules vendored Normal file
View File

23
_plugins/file_exists.rb Normal file
View File

@ -0,0 +1,23 @@
module Jekyll
class FileExistsTag < Liquid::Tag
def initialize(tag_name, path, tokens)
super
@path = path
end
def render(context)
# Pipe parameter through Liquid to make additional replacements possible
url = Liquid::Template.parse(@path).render context
# Adds the site source, so that it also works with a custom one
site_source = context.registers[:site].config['source']
file_path = site_source + '/' + url
# Check if file exists (returns true or false)
"#{File.exist?(file_path.strip!)}"
end
end
end
Liquid::Template.register_tag('file_exists', Jekyll::FileExistsTag)

View File

@ -35,14 +35,29 @@ orgs: ["officers", "excomm", "senators", "sponsors"]
<h2>{{ org.name }}</h2>
{% for member in org.members %}
<div class="{{ org.username }}-intro">
{% assign year = member.year | downcase %}
{% assign first = member.first | slice: 0 %}
{% assign last = member.last | slice: 0,7 %}
{% if name != "sponsors" %}
{% capture filename %}img/people/{{ year }}{{ first }}{{ last }}.jpg{% endcapture %}
{% else %}
{% capture filename %}img/people/{{ first }}{{ last }}.jpg{% endcapture %}
{% endif %}
{% capture exists %}
{% file_exists: {{ path }} %}
{% endcapture %}
{% if exists == false %}
{% capture filename %}img/profile.jpg{% endcapture %}
{% endif %}
<div class="{{ org.username }}-image">
<img src="{{ filename | strip_newlines | downcase }}" />
</div>
<div class="{{ org.username }}-text">
{% assign year = member.year | downcase %}
<span>{{ member.first }} {{ member.last }}</span>
{% if name != "sponsors" and name != "senators" %}
<span>{{ year }}</span>
{% endif %}
{% if name != "officers" %}
<span>{{ member.title }}</span>
{% endif %}

View File

@ -39,7 +39,6 @@
.sponsors-image:after {
width: 100%;
height: 100%;
content: '';
display: block;
position: relative;
background-image: url('../img/profile.jpg');
@ -48,6 +47,15 @@
border-radius: 50%;
}
.officers-image img,
.excomm-image img,
.senators-image img,
.sponsors-image img {
width: 100%;
height: 100%;
border-radius: 50%;
}
.officers-text,
#excomm-desc,
.excomm-text,

BIN
img/people/2018alin.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

BIN
img/people/2018alulushi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
img/people/2018kdu.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

BIN
img/people/2018llin.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 KiB

BIN
img/people/2018nbegotka.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

BIN
img/people/2018schappid.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

BIN
img/people/2018sxie.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

BIN
img/people/2018wzhang.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

BIN
img/people/2019amohidee.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

BIN
img/people/2019lgersony.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 KiB

BIN
img/people/2019lkeesing.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 KiB

BIN
img/people/2019mcho.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

BIN
img/people/2019suppalap.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

BIN
img/people/2020dbedi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

BIN
img/people/2020mdass.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

BIN
img/people/2020mhuang.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

BIN
img/people/2020mkyryche.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

BIN
img/people/2020rkalra.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 KiB

BIN
img/people/ahurowit.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

10
img/people/convert.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
FILES=.
for f in $FILES/*.jpg
do
convert $f -strip -resize 150x150 -quality 50 ${f%.*}-new.jpg;
mkdir -p $FILES/out;
mv $FILES/*-new.jpg $FILES/out;
done

BIN
img/people/mrazzino.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB