Skip to content

Commit

Permalink
Merge pull request #3 from GEANT/dv_tncpics_cleanup1
Browse files Browse the repository at this point in the history
TNC pics cleanup
  • Loading branch information
dnmvisser authored Jan 9, 2024
2 parents 368a3af + 304d478 commit 8f6403d
Show file tree
Hide file tree
Showing 76 changed files with 7 additions and 5 deletions.
Binary file added public/assets/gfx/tnc2004_1.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 public/assets/gfx/tnc2004_2.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 public/assets/gfx/tnc2005_1.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 public/assets/gfx/tnc2005_2.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 public/assets/gfx/tnc2005_3.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 public/assets/gfx/tnc2005_4.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 public/assets/gfx/tnc2005_5.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 public/assets/gfx/tnc2006_1.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 public/assets/gfx/tnc2006_2.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 public/assets/gfx/tnc2006_3.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 public/assets/gfx/tnc2006_4.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 public/assets/gfx/tnc2006_5.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 public/assets/gfx/tnc2007_1.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 public/assets/gfx/tnc2007_2.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 public/assets/gfx/tnc2007_3.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 public/assets/gfx/tnc2007_4.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 modified public/assets/gfx/tnc2008_1.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 modified public/assets/gfx/tnc2008_2.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 modified public/assets/gfx/tnc2008_3.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 removed public/assets/gfx/tnc2008_4.jpg
Binary file not shown.
Binary file removed public/assets/gfx/tnc2008_5.jpg
Binary file not shown.
Binary file removed public/assets/gfx/tnc2008_6.jpg
Binary file not shown.
Binary file modified public/assets/gfx/tnc2009_1.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 modified public/assets/gfx/tnc2009_2.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 modified public/assets/gfx/tnc2009_3.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 modified public/assets/gfx/tnc2009_4.jpg
Binary file modified public/assets/gfx/tnc2009_5.jpg
Binary file removed public/assets/gfx/tnc2009_6.jpg
Diff not rendered.
Binary file removed public/assets/gfx/tnc2009_7.jpg
Diff not rendered.
Binary file modified public/assets/gfx/tnc2010_1.jpg
Binary file modified public/assets/gfx/tnc2010_2.jpg
Binary file modified public/assets/gfx/tnc2010_3.jpg
Binary file modified public/assets/gfx/tnc2010_4.jpg
Binary file modified public/assets/gfx/tnc2010_5.jpg
Binary file modified public/assets/gfx/tnc2010_6.jpg
Binary file modified public/assets/gfx/tnc2010_7.jpg
Binary file added public/assets/gfx/tnc2010_8.jpg
Binary file modified public/assets/gfx/tnc2011_1.jpg
Binary file modified public/assets/gfx/tnc2011_2.jpg
Binary file modified public/assets/gfx/tnc2011_3.jpg
Binary file modified public/assets/gfx/tnc2011_4.jpg
Binary file modified public/assets/gfx/tnc2011_5.jpg
Binary file modified public/assets/gfx/tnc2011_6.jpg
Binary file removed public/assets/gfx/tnc2011_7.jpg
Diff not rendered.
Binary file removed public/assets/gfx/tnc2011_8.jpg
Diff not rendered.
Binary file modified public/assets/gfx/tnc2012_1.jpg
Binary file added public/assets/gfx/tnc2012_10.jpg
Binary file modified public/assets/gfx/tnc2012_2.jpg
Binary file modified public/assets/gfx/tnc2012_3.jpg
Binary file modified public/assets/gfx/tnc2012_4.jpg
Binary file modified public/assets/gfx/tnc2012_5.jpg
Binary file added public/assets/gfx/tnc2012_6.jpg
Binary file added public/assets/gfx/tnc2012_7.jpg
Binary file added public/assets/gfx/tnc2012_8.jpg
Binary file added public/assets/gfx/tnc2012_9.jpg
Binary file modified public/assets/gfx/tnc2013_1.jpg
Binary file modified public/assets/gfx/tnc2013_2.jpg
Binary file modified public/assets/gfx/tnc2013_3.jpg
Binary file modified public/assets/gfx/tnc2013_4.jpg
Binary file modified public/assets/gfx/tnc2013_5.jpg
Binary file modified public/assets/gfx/tnc2014_1.jpg
Binary file modified public/assets/gfx/tnc2014_2.jpg
Binary file modified public/assets/gfx/tnc2014_3.jpg
Binary file removed public/assets/gfx/tnc2014_4.jpg
Diff not rendered.
Binary file removed public/assets/gfx/tnc2014_5.jpg
Diff not rendered.
Binary file modified public/assets/gfx/tnc2015_4.jpg
Binary file modified public/assets/gfx/tnc2019_3.jpg
Binary file removed public/assets/gfx/tnc2019_8.jpg
Diff not rendered.
Binary file modified public/assets/gfx/tnc2022_1.jpg
Binary file modified public/assets/gfx/tnc2022_2.jpg
Binary file modified public/assets/gfx/tnc2022_4.jpg
Binary file removed public/assets/gfx/tnc2022_6.jpg
Diff not rendered.
Binary file removed public/assets/gfx/tnc2022_7.jpg
Diff not rendered.
Binary file removed public/assets/gfx/tnc2022_8.jpg
Diff not rendered.
10 changes: 6 additions & 4 deletions src/ThemeTncController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,22 @@ public function display(array &$data): void
$tncs = $moduleConfig->getArray('tncs');

$tnc_pics_dir = Module::getModuleDir('geant') . '/public/assets/gfx';
$tnc_pics = array_values(preg_grep("/^tnc\d{4}_\d+\.(jpg|png)$/", scandir($tnc_pics_dir)));
$tnc_pic = $tnc_pics[rand(0,count($tnc_pics)-1)];
$tnc_pics = yaml_parse_file('/etc/simplesamlphp/wayf/metadata.yml');
$pic = $tnc_pics[rand(0,count($tnc_pics)-1)];

$tnc_year = substr($tnc_pic, 3, 4);
$tnc_year = substr($pic['filename'], 3, 4);
# From 2015 onwards the year is depicted as "15" instead of 2015...
$tnc_name = "TNC" . ($tnc_year < 2015 ? $tnc_year : substr($tnc_year, -2));
$tnc_url = $tncs[$tnc_year]["url"];

$tnc_location = $tncs[$tnc_year]["location"];

$data['tnc_location'] = $tnc_location;
$data['tnc_pic'] = $tnc_pic;
$data['tnc_pic'] = $pic['filename'];
$data['tnc_name'] = $tnc_name;
$data['tnc_url'] = $tnc_url;
$data['copyright'] = $pic['copyright'];
$data['original_url'] = $pic['original_url'];
}

}
2 changes: 1 addition & 1 deletion themes/tnc/default/_header.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="wrap">
<img id="geant" src="{{ asset('gfx/geant-logo-white.svg', 'geant') }}" alt="GÉANT logo"/>
<p class="credits">
Picture from <a title="Go to {% if 'web.archive.org' in tnc_url %}an archived copy of {% endif %}the {{ tnc_name }} website" href="{{ tnc_url }}">{{ tnc_name }}</a> in {{ tnc_location }}
Picture from <a title="Go to {% if 'web.archive.org' in tnc_url %}an archived copy of {% endif %}the {{ tnc_name }} website" href="{{ tnc_url }}">{{ tnc_name }}</a> in {{ tnc_location|e }}<br />&copy; {{ copyright|e }}
</p>
{% if not hideLanguageBar %}
<div class="menuspace">
Expand Down

0 comments on commit 8f6403d

Please sign in to comment.