Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Large batch of updates to responsive redesign, mostly around transcri…
…pt pages
- Loading branch information
1 parent
e1cbed7
commit af41014
Showing
38 changed files
with
422 additions
and
250 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
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 |
---|---|---|
|
@@ -17,5 +17,7 @@ | |
], | ||
"dependencies": { | ||
"foundation-sites": "^6.3.1", | ||
"jquery-expander": "^1.7.0", | ||
"underscore": "^1.8.3" | ||
} | ||
} |
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,8 +1,23 @@ | ||
from imagekit import ImageSpec, register | ||
from imagekit.processors import ResizeToFill | ||
|
||
def crop_first(image, requested_size, opts): | ||
if 'crop_first' in opts: | ||
(t, r, b, l) = (int(x) for x in opts['crop_first'].split(',')) | ||
(w, h) = image.size | ||
image = image.crop((l, t, w-r, h-b)) | ||
return image | ||
crop_first.valid_options = ['crop_first'] | ||
class ExplicitCrop(object): | ||
|
||
def __init__(self, top, right, bottom, left): | ||
self.top = top | ||
self.right = right | ||
self.bottom = bottom | ||
self.left = left | ||
|
||
def process(self, img): | ||
(w, h) = img.size | ||
return img.crop((self.left, self.top, w - self.right, h - self.bottom)) | ||
|
||
class StatementPageHeadshot(ImageSpec): | ||
processors = [ExplicitCrop(10, 10, 68, 10), # should give us 122x152 | ||
ResizeToFill(100, 125)] | ||
format = 'JPEG' | ||
options = {'quality': 80} | ||
|
||
|
||
register.generator('op:statement_headshot', StatementPageHeadshot) |
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
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
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
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
Oops, something went wrong.