Mercurial > hg > batmud > maputils
changeset 1892:f8551f0a36cc
Change search.html to search.php
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 06 Nov 2017 03:10:27 +0200 |
parents | 68b784c7eae2 |
children | f9581f28d9f7 |
files | www/search.css www/search.html www/search.php |
diffstat | 3 files changed, 143 insertions(+), 140 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/search.css Mon Nov 06 03:10:27 2017 +0200 @@ -0,0 +1,86 @@ +#error { + font-size: 2em; + text-align: center; + color: red; + background: black; + padding: 1em; +} + +#note { + color: red; + background: black; + padding: 0.5em; +} + +h1 { + font-size: 1.3em; + margin: 0.2em; +} + +h2 { + font-size: 0.75em; + margin: 0.2em; +} + +#searchBox, #resultsBox { + background: #454; + display: inline-block; + vertical-align: top; + min-width: 35%; + border-radius:0.3em; + padding: 0.5em; + margin: auto; +} + +#resultsBox { +} + +#logBox { + display: block; + vertical-align: top; + padding: 0.5em; + margin-top: 0.5em; + background: #232; +} + +#controls { + text-align: right; +} + +#controls button { + padding-left: 1em; + padding-right: 1em; + padding-top: 0.5em; + padding-bottom: 0.5em; + margin: 0.5em; +} + +#mapList { + margin: 0.5em; + display: block; +} + +#mapList .map + label { + display: inline; + padding: 0.25em; + margin: 0.15em; + border-radius: 0.2em; + color: black; + background: #565; + text-align: right; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + box-shadow: 1px 1px 1px #000; +} + +#mapList .map { + display: none; +} + +#mapList .map:checked + label { + color: white; + background: #c62; + text-decoration: underline; +}
--- a/www/search.html Mon Nov 06 03:09:11 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8"> - <title>Pupunen BatMUD map search (DEMO/ALPHA)</title> - <script type="text/javascript" src="search.js"></script> - <style type="text/css"> - #error { - font-size: 2em; - text-align: center; - color: red; - background: black; - padding: 1em; - } - - #note { - color: red; - background: black; - padding: 0.5em; - } - - h1 { - font-size: 1.3em; - margin: 0.2em; - } - - h2 { - font-size: 0.75em; - margin: 0.2em; - } - - #searchBox, #resultsBox { - background: #eee; - display: inline-block; - vertical-align: top; - min-width: 35%; - border-radius:0.3em; - padding: 0.5em; - margin: auto; - } - - #resultsBox { - } - - #logBox { - display: block; - vertical-align: top; - padding: 0.5em; - margin-top: 0.5em; - } - - #controls { - text-align: right; - } - - #controls button { - padding-left: 1em; - padding-right: 1em; - padding-top: 0.5em; - padding-bottom: 0.5em; - margin: 0.5em; - } - - #mapList { - margin: 0.5em; - display: block; - } - - #mapList .map + label { - display: inline; - padding: 0.25em; - margin: 0.15em; - border-radius: 0.2em; - color: black; - background: #ccc; - text-align: right; - user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - box-shadow: 1px 1px 1px #000; - } - - #mapList .map { - display: none; - } - - #mapList .map:checked + label { - color: white; - background: green; - text-decoration: underline; - } - </style> -</head> -<body onload="mapInitSearch()"> - -<h1>Pupunen BatMUD map search (DEMO/ALPHA)</h1> -<noscript> - <div id="error"> - This page requires JavaScript to be enabled to work. - </div> -</noscript> - -<div id="searchBox"> - <h2>Search pattern</h2> -<textarea id="pattern" cols="30" rows="15"> -FFFFHHHFFHHHHHHHHHHHH -FFHHHHHHHHHHHHHHHHHHH -HFHHHHHHHH*HHHHHHHHHH -HFHHHHHHHHHHHHHHHHHHH -FFHHHHHHHHHHHHHHHHHHH -</textarea> - <div id="controls"> - <div id="mapList">LOADING MAP LIST...</div> - <button id="btnMaps" type="button">C^</button> - <button class="large" id="btnClear" type="button">Clear search</button> - <button class="large" id="btnSearch" type="button">Search</button> - </div> -</div> - -<div id="resultsBox"> - <h2>Search results</h2> - <div id="results"></div> -</div> - -<div id="note"> -The search ignores following characters (they act as wildcards): -<b>*, @, ?, %, C</b> and -whitespace, thus searching <b>exact</b> matches for player cities (C), shrine -(%) and location markers (?) is not possible. "*" and "@" will be used to center the search coordinates -if they are present in the pattern. -</div> - -<div id="logBox"> - <h2>Log</h2> - <div id="log"></div> -</div> - -</body> -</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/search.php Mon Nov 06 03:10:27 2017 +0200 @@ -0,0 +1,57 @@ +<?php +require "config.inc.php"; +require "world.inc.php"; +require "common.inc.php"; + +mpPrintPageHeader($pageTitle, + " <script type=\"text/javascript\" src=\"search.js\"></script>\n". + " <link rel=\"stylesheet\" href=\"search.css\" type=\"text/css\" />\n", + " onload=\"mapInitSearch()\"" +); + +?> +<h1>Pupunen BatMUD map search (BETA)</h1> +<noscript> + <div id="error"> + This page requires JavaScript to be enabled to work. + </div> +</noscript> + +<div id="searchBox"> + <h2>Search pattern</h2> +<textarea id="pattern" cols="30" rows="15"> +FFFFHHHFFHHHHHHHHHHHH +FFHHHHHHHHHHHHHHHHHHH +HFHHHHHHHH*HHHHHHHHHH +HFHHHHHHHHHHHHHHHHHHH +FFHHHHHHHHHHHHHHHHHHH +</textarea> + <div id="controls"> + <div id="mapList">LOADING MAP LIST...</div> + <button id="btnMaps" type="button">C^</button> + <button class="large" id="btnClear" type="button">Clear search</button> + <button class="large" id="btnSearch" type="button">Search</button> + </div> +</div> + +<div id="resultsBox"> + <h2>Search results</h2> + <div id="results"></div> +</div> + +<div id="note"> +The search ignores following characters (they act as wildcards): +<b>*, @, ?, %, C</b> and +whitespace, thus searching <b>exact</b> matches for player cities (C), shrine +(%) and location markers (?) is not possible. "*" and "@" will be used to center the search coordinates +if they are present in the pattern. +</div> + +<div id="logBox"> + <h2>Log</h2> + <div id="log"></div> +</div> + +<?php +mpPrintPageFooter(FALSE); +?>