| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <?php
- /**
- * Catalog view.
- *
- * Contains the view layout and some code to present the data
- *
- * @category View
- * @property_read Catalog_Page $page The page model
- * @property_read int $UID Player ID
- */
- ?>
- <!DOCTYPE html>
- <html lang='en'>
- <head>
- <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
- <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
- <title><?=$page->title?></title>
- <link rel='shortcut icon' href='<?=$page->favicon?>'/>
- <!-- CSS files -->
- <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>ui.css'/>
- <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>catalog.css'/>
- <!-- Meta tags -->
- <link rel='canonical' href='<?=$page->canonical?>'/>
- <link rel='author' href='<?=$page->author?>'/>
- <link rel='publisher' href='<?=$page->author?>'/>
- <meta name='description' content='<?=$page->description?>'/>
- <meta property='og:title' content='<?=$page->title?>'/>
- <meta property='og:url' content='<?=$page->canonical?>'/>
- <meta property='og:description' content='<?=$page->description?>'/>
- <meta property='og:image' content='<?=$page->icon?>'/>
- <meta property='og:site_name' content='<?=$page->name?>'/>
- <meta property='og:type' content='website'/>
- <meta property='og:locale' content='en'/>
- <meta name='twitter:card' content='summary'/>
- <meta name='twitter:title' content='<?=$page->title?>'/>
- <meta name='twitter:description' content='<?=$page->description?>'/>
- <meta name='twitter:image' content='<?=$page->icon?>'/>
- <meta name='twitter:url' content='<?=$page->canonical?>'/>
- <meta name='robots' content='index follow'/>
- </head>
- <body>
- <?php
- include __DIR__ . "/inc/header.php";
- ?>
- <aside id='filters' class='content filters'>
- <h2 id='filters_title'>
- Catalog
- </h2>
- <p>
- A list with every monster in the game.
- </p>
- <form action='/<?=$UID?>/catalog/' method='get' id='filter_catalog' class='filter'>
- <table>
- <tr>
- <td class='label'>
- Element:
- </td>
- <td>
- <?php
- $selected = Array("", "", "", "", "");
- $selected[$page->filters["ELEMENT"] - 1] = "selected";
- ?>
- <select name='element'>
- <option value='0'>All</option>
- <option value='<?=ELEMENT_ID::WATER?>' <?=$selected[0]?>>Water</option>
- <option value='<?=ELEMENT_ID::FIRE?>' <?=$selected[1]?>>Fire</option>
- <option value='<?=ELEMENT_ID::WIND?>' <?=$selected[2]?>>Wind</option>
- <option value='<?=ELEMENT_ID::LIGHT?>' <?=$selected[3]?>>Light</option>
- <option value='<?=ELEMENT_ID::DARK?>' <?=$selected[4]?>>Dark</option>
- </select>
- </td>
- </tr>
- <tr>
- <td class='label' id='filter_stars'>
- Stars:
- </td>
- <td>
- <input type='number' name='min_stars' id='filter_stars_min' min='1' max='5' value='<?=$page->filters["MIN_STARS"]?>'/>
- -
- <input type='number' name='max_stars' id='filter_stars_max' min='1' max='5' value='<?=$page->filters["MAX_STARS"]?>'/>
- </td>
- </tr>
- <tr>
- <td class='label'>
- Name:
- </td>
- <td>
- <input type='text' name='name' id='filter_name' value='<?=$page->filters["NAME"]?>'/>
- </td>
- </tr>
- </table>
- <input type='submit' value='Apply'/>
- </form>
- </aside> <!-- #filters -->
- <main>
- <section id='list' class='list'>
- <h2>
- Catalog
- </h2>
- <article>
- <?php
- $element = "";
- foreach ($page->units as $mon){
- if ($mon->element != $element){
- if ($element != ""){
- ?>
- </article>
- <article>
- <?php
- }
- $element = $mon->element;
- }
- if (!in_array($mon->id, $page->units_open)){
- $closed = "closed";
- }
- else{
- $closed = "";
- }
- ?>
- <div class='monster <?=$closed?>'>
- <a href='/<?=$UID?>/catalog/<?=$mon->id?>'>
- <div class='monster_panel'>
- <?=HTML::unit_panel($mon)?>
- </div>
- </a>
- </div>
- <?php
- }
- ?>
- </article>
- </section> <!-- #catalog -->
- </main>
- <?php
- include __DIR__ . "/inc/footer.php";
- ?>
- </body>
- </html>
|