Commit e207d306 authored by Guus Hoekman's avatar Guus Hoekman

Merge branch 'additions-ryan' into 'master'

Improvements on Ryan's additions

See merge request !2
parents f39b3bea 1467984d
Pipeline #85720650 passed with stage
in 1 minute and 29 seconds
......@@ -12,13 +12,11 @@
</a>
</div>
<div class="column attribution">
<i class="far fa-fw fa-database"></i> Data provided by the <a href="https://www.football-data.org">football-data.org API</a> and <a href="https://fbref.com/en/">FBref</a><br>
<i class="far fa-fw fa-database"></i> Data provided by the <a href="https://www.football-data.org">football-data.org API</a>, <a href="https://en.wikipedia.org/">Wikipedia</a>, and <a href="https://fbref.com/en/">FBref</a><br>
<i class="fab fa-fw fa-css3"></i> Made with <a href="https://bulma.io">Bulma</a><br>
<i class="far fa-fw fa-flag"></i> Flags from <a href="https://www.flaticon.com/packs/rectangular-country-simple-flags">Flaticon</a><br>
<i class="fab fa-fw fa-gitlab"></i> Source on <a href="https://gitlab.com/guushoekman/cann-tables">Gitlab</a>
</div>
<div class="column">
</div>
</div>
</div>
</footer>
\ No newline at end of file
......@@ -12,8 +12,8 @@
{% include footer.html %}
<!-- navbar -->
<script>
// navbar
document.addEventListener('DOMContentLoaded', function () {
// Get all "navbar-burger" elements
......@@ -39,6 +39,17 @@
}
});
// season dropdowns
$(".season.dropdown").click(function(event) {
event.stopPropagation();
var thisButton = $(this);
thisButton.addClass("is-active");
});
document.addEventListener('click', function(event) {
$(".dropdown").removeClass("is-active")
});
</script>
<!-- Google Analytics... sorry -->
......
---
layout: base
---
<section class="section league-seasons">
<div class="container">
<div class="tabs is-centered">
<ul>
{% for league in site.leagues %}
{% if league.code == page.code %}
<li {% if league.season == page.season %}class="is-active"{% endif %}><a href="{{ league.url }}">{{ league.season }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</section>
<section class="section league-table">
<div class="container">
<div class="columns is-centered is-desktop">
<div class="column is-4-desktop">
<div class="box league-info">
<div class="has-text-centered">
<img src="/img/flags/{{ page.code }}.svg" alt="{{ page.country }} flag">
<img src="/img/logos/{{ page.code }}.svg" alt="{{ page.competition }} logo">
</div>
<table class="table is-fullwidth">
<tbody>
<tr>
<th>Country</th>
<td>{{ page.country }}</td>
</tr>
<tr>
<th>League</th>
<td>{{ page.competition }}</td>
</tr>
<tr>
<th>Season</th>
<td>{{ page.season }}</td>
</tr>
</tbody>
</table>
<div class="buttons is-centered">
<a class="button source" target="_blank" href=""><span class="icon"><i class="fab fa-wikipedia-w"></i></span><span>Source</span></a>
<a class="button" target="_blank" href="{% if page.latest and page.api != false %}https://data.canntables.com/{{ page.code }}.js{% else %}/js/{{ page.season | replace: '/', '-' }}/{{ page.code }}.js{% endif %}"><span class="icon"><i class="fas fa-database"></i></span><span>Data</span></a>
<a class="button" href="mailto:[email protected]"><span class="icon"><i class="fas fa-exclamation-circle"></i></span><span>Correct a mistake</span></a>
<div class="sticky-box">
<div class="season dropdown is-fullwidth">
<div class="dropdown-trigger">
<button class="button" aria-haspopup="true" aria-controls="seasons">
<span><strong>{{ page.season }} season</strong></span>
<span class="icon is-small">
<i class="fas fa-angle-down" aria-hidden="true"></i>
</span>
</button>
</div>
<div class="dropdown-menu" id="seasons" role="menu">
<div class="dropdown-content">
{% for league in site.leagues %}
{% if league.code == page.code %}
<a href="{{ league.url }}" class="dropdown-item{% if league.season == page.season %} is-active{% endif %}">{{ league.season }}</a>
{% endif %}
{% endfor %}
</div>
</div>
</div>
<hr>
<div class="legend has-text-centered">
<div class="team-box">
<span class="position">Pos</span><span class="name">Team name</span><span class="played">Played</span><span class="goal-difference equal">Goal dif</span>
<div class="box league-info">
<div class="has-text-centered">
<img src="/img/flags/{{ page.code }}.svg" alt="{{ page.country }} flag">
<img src="/img/logos/{{ page.code }}.svg" alt="{{ page.competition }} logo">
</div>
<table class="table is-fullwidth">
<tbody>
<tr>
<th>Country</th>
<td>{{ page.country }}</td>
</tr>
<tr>
<th>League</th>
<td>{{ page.competition }}</td>
</tr>
<tr>
<th>Season</th>
<td>{{ page.season }}</td>
</tr>
</tbody>
</table>
<div class="buttons is-centered">
<a class="button source" target="_blank" href=""><span class="icon"><i class="fas fa-database"></i></span><span>Source</span></a>
<a class="button" target="_blank" href="{% if page.latest and page.api != false %}https://data.canntables.com/{{ page.code }}.js{% else %}/js/{{ page.season | replace: '/', '-' }}/{{ page.code }}.js{% endif %}"><span class="icon"><i class="fas fa-table"></i></span><span>Data</span></a>
<a class="button" href="mailto:[email protected]"><span class="icon"><i class="fas fa-exclamation-circle"></i></span><span>Correct a mistake</span></a>
</div>
<div class="qualifications">
<span class="legend-entry cl"><span class="square"></span>Champions League</span>
<span class="legend-entry el"><span class="square"></span>Europa League</span>
<span class="legend-entry el-playoffs hidden"><span class="square"></span>Europa League playoffs</span>
<span class="legend-entry relegation-playoffs hidden"><span class="square"></span>Relegation playoffs</span>
<span class="legend-entry relegation"><span class="square"></span>Relegation</span>
<hr>
<div class="legend has-text-centered">
<div class="team-box">
<span class="position">Pos</span><span class="name">Team name</span><span class="played">Played</span><span class="goal-difference equal">Goal dif</span>
</div>
<div class="qualifications">
<span class="legend-entry cl"><span class="square"></span>Champions League</span>
<span class="legend-entry el"><span class="square"></span>Europa League</span>
<span class="legend-entry el-playoffs hidden"><span class="square"></span>Europa League playoffs</span>
<span class="legend-entry relegation-playoffs hidden"><span class="square"></span>Relegation playoffs</span>
<span class="legend-entry relegation"><span class="square"></span>Relegation</span>
</div>
</div>
</div>
</div>
......
---
layout: base
---
<section class="section">
<div class="container">
<div class="tabs is-centered">
<ul>
{% for season in site.seasons %}
<li {% if season.season == page.season %}class="is-active"{% endif %}><a href="{{ season.url }}">{{ season.season }}</a></li>
{% endfor %}
</ul>
</div>
</div>
</section>
<section class="section season-table single-season">
<div class="container">
<div class="columns is-gapless is-mobile is-multiline">
<div class="column information is-12-mobile is-4-tablet is-3-widescreen">
<h1 class="title is-size-5-touch is-size-4-desktop">{{ page.season }} season</h1>
<div class="legend is-hidden-mobile">
<span class="team-circle" style="background-color: #4daf4a"></span>Champions League + qualifiers<br>
<span class="team-circle" style="background-color: #377eb8"></span>Europa League + qualifiers<br>
<span class="el-playoffs hidden"><span class="team-circle" style="background-color: #984ea3"></span>Europa League playoffs (local)<br></span>
<span class="relegation-playoffs hidden"><span class="team-circle" style="background-color: #ff7f00"></span>Relegation playoffs<br></span>
<span class="team-circle" style="background-color: #e41a1c"></span>Relegation
</div>
<hr>
<div class="toggle-grid">
<input id="toggleGrid" type="checkbox" name="toggleGrid" class="switch is-small is-info is-rounded" onclick="showGrid()">
<label for="toggleGrid">Toggle grid</label>
</div>
{% if page.latest == true %}
<div>
Last updated: <span class="last-update"></span>
<div class="sticky-box">
<div class="season dropdown is-fullwidth">
<div class="dropdown-trigger">
<button class="button" aria-haspopup="true" aria-controls="seasons">
<span><strong>{{ page.season }} season</strong></span>
<span class="icon is-small">
<i class="fas fa-angle-down" aria-hidden="true"></i>
</span>
</button>
</div>
<div class="dropdown-menu" id="seasons" role="menu">
<div class="dropdown-content">
{% for season in site.seasons %}
<a href="{{ season.url }}" class="dropdown-item{% if season.season == page.season %} is-active{% endif %}">{{ season.season }}</a>
{% endfor %}
</div>
</div>
</div>
{% endif %}
<div class="legend is-hidden-mobile">
<span class="team-circle" style="background-color: #4daf4a"></span>Champions League + qualifiers<br>
<span class="team-circle" style="background-color: #377eb8"></span>Europa League + qualifiers<br>
<span class="el-playoffs hidden"><span class="team-circle" style="background-color: #91b8d8"></span>Europa League playoffs (local)<br></span>
<span class="relegation-playoffs hidden"><span class="team-circle" style="background-color: #ff7f00"></span>Relegation playoffs<br></span>
<span class="team-circle" style="background-color: #e41a1c"></span>Relegation
</div>
<hr>
<div class="toggle-grid">
<input id="toggleGrid" type="checkbox" name="toggleGrid" class="switch is-small is-info is-rounded" onclick="showGrid()">
<label for="toggleGrid">Toggle grid</label>
</div>
{% if page.latest == true %}
<div>
Last updated: <span class="last-update"></span>
</div>
{% endif %}
</div>
</div>
<div class="column league-tables">
<div class="tabs is-centered">
......
---
layout: league
season: "1999/00"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2000/01"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2001/02"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2002/03"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2003/04"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2004/05"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2005/06"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2006/07"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2007/08"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2008/09"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2009/10"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2010/11"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2011/12"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2012/13"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2013/14"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2014/15"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "2015/16"
code: "de"
competition: "Bundesliga"
country: "Germany"
---
---
layout: league
season: "1999/00"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2000/01"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2001/02"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2002/03"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2003/04"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2004/05"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2005/06"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2006/07"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2007/08"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2008/09"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2009/10"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2010/11"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2011/12"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2012/13"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2013/14"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2014/15"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "2015/16"
code: "en"
competition: "Premier League"
country: "England"
---
---
layout: league
season: "1999/00"
code: "es"
competition: "La Liga"
country: "Spain"
---
---
layout: league
season: "2000/01"
code: "es"
competition: "La Liga"
country: "Spain"
---
---
layout: league
season: "2001/02"
code: "es"
competition: "La Liga"
country: "Spain"
---
---
layout: league
season: "2002/03"
code: "es"
competition: "La Liga"
country: "Spain"
---
---
layout: league
season: "2003/04"
code: "es"
competition: "La Liga"
country: "Spain"
---
---
layout: league
season: "2004/05"
code: "es"
competition: "La Liga"
country: "Spain"
---
---
layout: league
season: "2005/06"
code: "es"
competition: "La Liga"
country: "Spain"
---
---
layout: league
season: "2006/07"
code: "es"
competition: "La Liga"
country: "Spain"
---
---
layout: league
season: "2007/08"
code: "es"
competition: "La Liga"
country: "Spain"
---
---
layout: league
season: "2008/09"
code: "es"