Skip to content

Commit d6bbc72

Browse files
authored
Merge pull request #749 from distributive/april-fools-2023
Late Night Additions
2 parents 2170e4d + 2e25366 commit d6bbc72

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

app/Resources/views/layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
<a class="navbar-brand" href="{{ path('netrunnerdb_index') }}">
115115
<span class="icon icon-link-half-top"></span>
116116
<span class="icon icon-link-half-bottom"></span>
117-
NetrunnerDB
117+
DaegrunnerDB
118118
</a>
119119
</div>
120120
<div class="navbar-collapse collapse">

src/AppBundle/Entity/Card.php

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,36 +1015,51 @@ public function setIsRestricted(bool $isRestricted)
10151015
return $this;
10161016
}
10171017

1018+
/**
1019+
* @return string
1020+
*/
1021+
public function getDaegedImageCode()
1022+
{
1023+
if ($this->code != '33028') {
1024+
return '33028';
1025+
} else {
1026+
// Tunnel Vision, the Cerberus 3, Grim, Lab Dog, Watchdog, Pup, Komainu, Rover Algo, Bankhar
1027+
$dogs = array('33081', '29006', '06096', '06094', '04020', '08052', '11015', '05018', '05017', '12100', '33074');
1028+
return $dogs[array_rand($dogs)];
1029+
}
1030+
return $this->code != '33028' ? '33028' : '33081';
1031+
}
1032+
10181033
/**
10191034
* @return string
10201035
*/
10211036
public function getTinyImagePath()
10221037
{
1023-
return '/tiny/' . $this->code . '.jpg';
1038+
return '/tiny/' . $this->getDaegedImageCode() . '.jpg';
10241039
}
10251040

10261041
/**
10271042
* @return string
10281043
*/
10291044
public function getSmallImagePath()
10301045
{
1031-
return '/small/' . $this->code . '.jpg';
1046+
return '/small/' . $this->getDaegedImageCode() . '.jpg';
10321047
}
10331048

10341049
/**
10351050
* @return string
10361051
*/
10371052
public function getMediumImagePath()
10381053
{
1039-
return '/medium/' . $this->code . '.jpg';
1054+
return '/medium/' . $this->getDaegedImageCode() . '.jpg';
10401055
}
10411056

10421057
/**
10431058
* @return string
10441059
*/
10451060
public function getLargeImagePath()
10461061
{
1047-
return '/large/' . $this->code . '.jpg';
1062+
return '/large/' . $this->getDaegedImageCode() . '.jpg';
10481063
}
10491064

10501065
/**

web/css/style.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ body {font-size:16px;font-family: 'LatoWeb', sans-serif;}
143143
.qtip-nrdb .card-image-corp-ice { background-size:115px; background-position: -9px -77px;transform: rotate(90deg) ;-webkit-transform: rotate(90deg) ;-moz-transform: rotate(90deg) ;-o-transform: rotate(90deg) ;-ms-transform: rotate(90deg)}
144144
.card-image { border-radius: 4.19%/3%; }
145145

146+
.card-image-daeg { background-size:175px !important; background-position: -74px -20px }
147+
146148
article.rules aside{border-left:1px solid blue;padding-left:20px}
147149
article.rules span.anr{font-style:italic;white-space:nowrap}
148150
article.rules{border-top:1px dashed black;clear:both}

web/js/nrdb.tip.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
type += '<p>Strength <b>' + card.strength + '</b></p>';
3333
var image_svg = '';
3434
if($('#nrdb_svg_hex').length) {
35-
image_svg = '<div class="card-image card-image-' + card.side_code + '-' + card.type_code + '"' + (card.imageUrl ? ' style="background-image:url(' + NRDB.card_image_url + '/small/' + card.code+ '.jpg)"' : '')
36-
+ '><svg width="103px" height="90px" viewBox="0 0 677 601" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><mask id="mask"><use xlink:href="#rect" style="fill:white" /><use xlink:href="#hex" style="fill:black"/></mask><use xlink:href="#rect" mask="url(#mask)"/><use xlink:href="#hex" style="stroke:black;fill:none;stroke-width:15" /></svg></div>';
35+
image_svg = '<div class="card-image card-image-daeg" style="background-image:url(https://static.nrdbassets.com/v1/small/33028.jpg)"><svg width="103px" height="90px" viewBox="0 0 677 601" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><mask id="mask"><use xlink:href="#rect" style="fill:white" /><use xlink:href="#hex" style="fill:black"/></mask><use xlink:href="#rect" mask="url(#mask)"/><use xlink:href="#hex" style="stroke:black;fill:none;stroke-width:15" /></svg></div>';
3736
}
3837

3938
$('.qtip').each(function(){

0 commit comments

Comments
 (0)