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

Add case studies pages #10

Merged
merged 12 commits into from
Aug 30, 2020
69 changes: 52 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ For navigation: `databags/nav.json`.

For contact information: `databags/contact.json`.

Images can be found under `assets/static/images/`.

### Main page content

Use the Lektor editor
Use the Lektor editor.

### Templates

Expand All @@ -43,20 +45,28 @@ Uses Jinja2 templating.

They are pulled from GitHub by just loading
whatever URL to our main profile page is.
(Do make sure it's square!)
You can also link to any square headshot on the internet,
as long as it's square and of good resolution!

### Metadata
Most forums and social networks nowadays can use fancy card views with a
title, a description and an image, which serves as a link preview. For the
card preview to work, the `<head>` section must include some metadata fields.

The most important fields have been configured for all pages with some
defaults and they can be overwritten from more specific templates. See
`templates/layout.html` for info on how to set the metadata and the defaults
used.
Most forums and social networks nowadays can use fancy card views
with a title, a description and an image,
which serves as a link preview.
For the card preview to work,
the `<head>` section must include some metadata fields.

The most important fields have been configured for all pages
with some defaults
and they can be overwritten from more specific templates.
See `templates/layout.html` for info
on how to set the metadata and the defaults used.

`title`, `og_description` and `og_image` block can be used to modify the default title
description and image in the card respectively. Here is one example from the
teammates template:
`title`, `og_description` and `og_image` block
can be used to modify the default title description
and image in the card respectively.
Here is one example from the teammates template:

```html
<!-- layout sets the metadata defaults and blocks to modify it -->
Expand All @@ -68,18 +78,43 @@ teammates template:
{% block og_description %}{{ this.blurb|string }}{% endblock %}
```

See more on possible metadata fields [here](https://ogp.me/). Moreover,
Twitter is extremely picky and in addition to being the most restrictive in
general, also requires an extra line to choose between the `summary` or
`summary_large_image` card types. For now all pages use `summary` format, but
this could be modified or left to configure for each page if desired.
See more on possible metadata fields [here](https://ogp.me/).
Moreover, Twitter is extremely picky
and in addition to being the most restrictive in general,
also requires an extra line to choose between the `summary`
or `summary_large_image` card types.
For now all pages use `summary` format,
but this could be modified or left to configure for each page if desired.

### Case Studies

If our clients agree to it, we will put up case studies of that project.
Case studies are written in Markdown,
and are intended to showcase what we can do.
They should use jargon sparingly,
focus on business value being delivered,
and highlight the key contributions made by PyMC Labs.

For visual effect and branding,
we can also add cover images to the case studies.
This is done in the Lektor editor,
by adding an attachment to the website case study.
While pasting in the case study,
on the bottom-left corner of the Lektor editor interface,
click on the "Add Attachment" link/button.
Then, an image that is named either `cover.png` or `cover.jpg`.
That image will serve as the case study cover image
in our case studies gallery,
and be displayed on the right side of the case study page.
If you don't upload any cover image,
then the default Rev. Bayes image will be used.

### Other stuff to edit?

Consult:

- [Lektor docs][lektor]
- [Eric Ma][ericmjl] for a one-on-one coaching session on how to make the website.
- [Eric Ma][ericmjl] for a one-on-one coaching session on how to make/edit the website.

[lektor]: https://getlektor.com
[ericmjl]: http://shortwhale.com/ericmjl
Expand Down
Binary file added assets/static/images/case_study/cover.afdesign
Binary file not shown.
Binary file added assets/static/images/case_study/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/static/images/case_study/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions content/case-studies/another-project/contents.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
project_name: Another project
---
authors: Ravin, Adrian
---
case_study: Blah blah blah
---
client: Another client
---
date: 2020-08-30
---
summary: A summary sentence
1 change: 1 addition & 0 deletions content/case-studies/contents.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_model: case_studies
11 changes: 11 additions & 0 deletions content/case-studies/some-project/contents.lr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
project_name: Some Project
---
authors: Thomas, Brandon, Max
---
case_study: blah
---
client: Some client
---
date: 2020-08-30
---
summary: Another summary sentence.
2 changes: 2 additions & 0 deletions content/team/adrian-seyboldt/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ linkedin_url:
picture:
---
twitter_url: https://twitter.com/aseyboldt
---
visible: no
4 changes: 3 additions & 1 deletion content/team/alexandre-andorra/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ linkedin_url: https://www.linkedin.com/in/aandorra-pollsposition/
---
personal_url: https://learnbayesstats.anvil.app/
---
specializations: Bayesian models, Unrepresentative and survey data, Causal inference, Teaching and communicating Bayesian stats topics
specializations: Bayesian models, Unrepresentative and survey data, Causal inference, Teaching and communicating Bayesian stats topics
---
visible: yes
2 changes: 2 additions & 0 deletions content/team/brandon-willard/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ linkedin_url: https://www.linkedin.com/in/brandon-t-willard-468bb410/
personal_url: https://brandonwillard.github.io/
---
specializations: Programming Language Development, Symbolic Mathematics, Mathematical Statistics, Bayesian Statistics, Convex Analysis, Machine Learning, Shrinkage and Sparsity Priors
---
visible: yes
2 changes: 2 additions & 0 deletions content/team/eric-ma/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ linkedin_url: https://www.linkedin.com/in/ericmjl/
specializations: Deep learning, Graph theory, Bayesian statistics
---
personal_url: https://ericmjl.github.io/
---
visible: yes
2 changes: 2 additions & 0 deletions content/team/luciano-paz/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ linkedin_url: https://www.linkedin.com/in/luciano-paz-4139b5123/
personal_url: https://lucianopaz.github.io
---
specializations: Bayesian statistics
---
visible: yes
2 changes: 2 additions & 0 deletions content/team/maxim-kochurov/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ twitter_url: https://twitter.com/ferrine96
specializations: computer vision, Bayesian modelling, optimization, development
---
location: Moscow, Russia
---
visible: yes
2 changes: 2 additions & 0 deletions content/team/oriol-abril-pla/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ linkedin_url: https://www.linkedin.com/in/oriol-abril-pla-1b9123180/
personal_url: https://oriolabril.github.io/oriol_unraveled/
---
specializations: Bayesian statistics, Data visualization, Model comparison
---
visible: yes
2 changes: 2 additions & 0 deletions content/team/ravin-kumar/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ linkedin_url: https://www.linkedin.com/in/ravinakumar/
personal_url: https://ravinkumar.com
---
specializations: Data Organization Decision Making, Bayesian statistics, Supply Chain, Manufacturing
---
visible: yes
2 changes: 2 additions & 0 deletions content/team/thomas-wiecki/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ personal_url: https://twiecki.io
blurb: Making Bayesian modeling accessible to a wider audience.
---
specializations: Bayesian statistics, teaching
---
visible: yes
6 changes: 6 additions & 0 deletions models/case_studies.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[model]
name = Case Studies

[children]
enabled = True
model = case_study
43 changes: 43 additions & 0 deletions models/case_study.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[model]
name = Case Study

[fields.project_name]
name = Project Name
description = A short and memorable version of the project name.
type = string

[fields.client]
name = Client
description = Client name
type = string
width = 1/3

; I'm not sure how to dynamically load choices from another model yet.
[fields.authors]
name = Author(s)
description = Author(s) of the case study
type = checkboxes
width = 1/3
choices = Adrian, Alex, Brandon, Eric, Luciano, Max, Oriol, Ravin, Thomas

[fields.date]
name = Date
type = date
width = 1/3

[fields.summary]
name = Summary
description = Once sentence summary that goes on the main page of our case studies.
type = string

[fields.case_study]
name = Case Study Text
type = markdown

[fields.attachments]
enabled = True

[fields.visible]
name = Visible
description = Check this box to showcase this case study.
type = boolean
6 changes: 6 additions & 0 deletions models/teammate.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type = string

[fields.picture]
label = Picture URL
description = Please link to a square image!
type = url

[fields.github_url]
Expand Down Expand Up @@ -36,3 +37,8 @@ type = string
[fields.blurb]
label = Blurb (140 characters)
type = string

[fields.visible]
label = Visible?
description = Check the box to show this teammate on "Teammates" page.
type = boolean
2 changes: 2 additions & 0 deletions models/testimonial.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ name = Testimonial

[fields.client]
name = Client
description = Client name
type = string

[fields.testimonial]
name = Testimonial
description = A few words from the client that they have agreed we can showcase.
type = markdown
12 changes: 12 additions & 0 deletions templates/case_studies.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "layout.html" %}
{% from "macros/case_study.html" import render_case_study_card %}
{% block title %}Case Studies - PyMC Labs{% endblock %}
{% block og_description %}Read about our success stories.{% endblock %}
{% block body %}

<div class="row">
{% for case_study in this.children %}
{{ render_case_study_card(case_study) }}
{% endfor %}
</div>
{% endblock %}
8 changes: 8 additions & 0 deletions templates/case_study.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends "layout.html" %}
{% from "macros/case_study.html" import render_case_study_page %}
{% block title %}{{ this.project_name }} - PyMC Labs{% endblock %}
{% block og_description %}{{ this.summary }}{% endblock %}

{% block body %}
{{ render_case_study_page(this) }}
{% endblock %}
Loading