Skip to content

Commit

Permalink
Merge pull request #54 from questionlp/multiple-bluff-segments
Browse files Browse the repository at this point in the history
Add support for shows with multiple Bluff segments
  • Loading branch information
questionlp authored Dec 26, 2023
2 parents d56de37 + b38fb9f commit d8ce758
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 45 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changes

## 5.8.0

### Application Changes

- Add support for rendering multiple Bluff the Listener segment results for a given show

### Component Changes

- Upgrade wwdtm from 2.5.0 to 2.6.0, which requires Wait Wait Stats Database version 4.4 or higher
- Upgrade Markdown from 3.4.3 to 3.5.1

## 5.7.2

### Application Changes
Expand Down
52 changes: 32 additions & 20 deletions app/shows/templates/shows/all_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,30 +132,42 @@ <h2><a href="{{ url_for('shows.year_month_day',
</div>
</div>

{% if show.bluff.chosen_panelist or show.bluff.correct_panelist %}
<div class="row">
{% if show.bluffs and show.bluffs|length >= 1 %}
{% if show.bluffs[0]["chosen_panelist"] and show.bluffs[0]["correct_panelist"] %}
<div class="row bluff-label">
<div class="col s12">
<div class="label">Bluff</div>
</div>
<div class="col s12 m6 show-bluff-chosen">
Chosen:
{% if show.bluff.chosen_panelist %}
<a href="{{ url_for('panelists.details',
panelist_slug=show.bluff.chosen_panelist.slug) }}">{{ show.bluff.chosen_panelist.name }}</a>
{% else %}
<span class="data-na">N/A</span>
{% endif %}
<div class="label">Bluff(s)</div>
</div>
<div class="col s12 m6 show-bluff-correct">
Correct:
{% if show.bluff.correct_panelist %}
<a href="{{ url_for('panelists.details',
panelist_slug=show.bluff.correct_panelist.slug) }}">{{ show.bluff.correct_panelist.name }}</a>
{% else %}
<span class="data-na">N/A</span>
{% endif %}
</div>

<div class="bluff-wrap">
{% for bluff in show.bluffs %}
<div class="row bluff-segment">
<div class="col s12 m1 l1 bluff-segment-num">
#{{ bluff.segment }}
</div>
<div class="col s12 m5 l5 show-bluff-chosen">
Chosen:
{% if bluff.chosen_panelist %}
<a href="{{ url_for('panelists.details',
panelist_slug=bluff.chosen_panelist.slug) }}">{{ bluff.chosen_panelist.name }}</a>
{% else %}
<span class="data-na">N/A</span>
{% endif %}
</div>
<div class="col s12 m6 l6 show-bluff-correct">
Correct:
{% if bluff.correct_panelist %}
<a href="{{ url_for('panelists.details',
panelist_slug=bluff.correct_panelist.slug) }}">{{ bluff.correct_panelist.name }}</a>
{% else %}
<span class="data-na">N/A</span>
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}

{% if show.description %}
Expand Down
52 changes: 32 additions & 20 deletions app/shows/templates/shows/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,30 +129,42 @@ <h2><a href="{{ url_for('shows.year_month_day',
</div>
</div>

{% if show.bluff.chosen_panelist or show.bluff.correct_panelist %}
<div class="row">
{% if show.bluffs and show.bluffs|length >= 1 %}
{% if show.bluffs[0]["chosen_panelist"] and show.bluffs[0]["correct_panelist"] %}
<div class="row bluff-label">
<div class="col s12">
<div class="label">Bluff</div>
</div>
<div class="col s12 m6 show-bluff-chosen">
Chosen:
{% if show.bluff.chosen_panelist %}
<a href="{{ url_for('panelists.details',
panelist_slug=show.bluff.chosen_panelist.slug) }}">{{ show.bluff.chosen_panelist.name }}</a>
{% else %}
<span class="data-na">N/A</span>
{% endif %}
<div class="label">Bluff(s)</div>
</div>
<div class="col s12 m6 show-bluff-correct">
Correct:
{% if show.bluff.correct_panelist %}
<a href="{{ url_for('panelists.details',
panelist_slug=show.bluff.correct_panelist.slug) }}">{{ show.bluff.correct_panelist.name }}</a>
{% else %}
<span class="data-na">N/A</span>
{% endif %}
</div>

<div class="bluff-wrap">
{% for bluff in show.bluffs %}
<div class="row bluff-segment">
<div class="col s12 m1 l1 bluff-segment-num">
#{{ bluff.segment }}
</div>
<div class="col s12 m5 l5 show-bluff-chosen">
Chosen:
{% if bluff.chosen_panelist %}
<a href="{{ url_for('panelists.details',
panelist_slug=bluff.chosen_panelist.slug) }}">{{ bluff.chosen_panelist.name }}</a>
{% else %}
<span class="data-na">N/A</span>
{% endif %}
</div>
<div class="col s12 m6 l6 show-bluff-correct">
Correct:
{% if bluff.correct_panelist %}
<a href="{{ url_for('panelists.details',
panelist_slug=bluff.correct_panelist.slug) }}">{{ bluff.correct_panelist.name }}</a>
{% else %}
<span class="data-na">N/A</span>
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}

{% if show.description %}
Expand Down
5 changes: 5 additions & 0 deletions app/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
.host-guest, .scorekeeper-guest { background-color: #c8e6c9; color: #242f39; font-weight: 500; padding: 0.2rem 0.5rem; margin: 0 0.25rem; }
.guest-show-repeat>a, .host-show-repeat>a, .location-show-repeat>a, .panelist-show-repeat>a, .scorekeeper-show-repeat>a { border-bottom: none !important; }
.host-appearance-list>ul, .location-appearance-list>ul, .panelist-appearance-list>ul, .scorekeeper-appearance-list>ul { column-count: 3; column-fill: balance; }
.bluff-wrap { margin-bottom: 20px; }
.row.bluff-label { margin-bottom: 0; }
.row.bluff-segment { line-height: 1.75; margin-bottom: 0; }
.bluff-segment-num { font-weight: 600; }
.col.s12.bluff-segment-num { font-weight: 600; margin: 0; }
.materialboxed { margin: 0 auto; }
.panelist-rank { font-weight: 500; margin-left: 0.25rem; }
q.scorekeeper-description { display: inline-block; font-style: italic; }
Expand Down
2 changes: 1 addition & 1 deletion app/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Copyright (c) 2018-2023 Linh Pham
# stats.wwdt.me is released under the terms of the Apache License 2.0
"""Application Version for Wait Wait Stats Page"""
APP_VERSION = "5.7.2"
APP_VERSION = "5.8.0"
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ black==23.11.0

Flask==3.0.0
gunicorn==21.2.0
Markdown==3.4.3
Markdown==3.5.1

wwdtm==2.5.0
wwdtm==2.6.0
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Flask==3.0.0
gunicorn==21.2.0
Markdown==3.4.3
Markdown==3.5.1

wwdtm==2.5.0
wwdtm==2.6.0

0 comments on commit d8ce758

Please sign in to comment.