permit arenas having their own css

This commit is contained in:
Gnieark 2015-11-28 18:02:49 +01:00
parent 97efbf5901
commit ed7138de00
3 changed files with 8 additions and 1 deletions

View File

@ -69,6 +69,12 @@ if($currentArena == ""){
@import url(/style.css);
</style>
<?php
//arena specific css script (if needed)
if(isset($currentArenaArr['cssFile'])){
echo '<style type="text/css"><!--'."\n";
echo file_get_contents("../src/arenas/".$currentArena."/".$currentArenaArr['cssFile']);
echo "\n--></style>";
}
//arena specific script js (if needed)
if(isset($currentArenaArr['jsFile'])){
echo '<script type="text/javascript"><!--'."\n";

View File

View File

@ -4,7 +4,8 @@ $arenas=array(
'id' => "tictactoe",
'url' => "/tictactoe",
'title' => "Tic Tac Toe",
'jsFile'=> "js.js"
'jsFile'=> "js.js",
'cssFile'=> "style.css"
),
array(
'id' => "Battleship",