Rev 176 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line | 
|---|---|---|---|
| 2 | szabot | 1 | {% extends "base.html" %} | 
        
| 2 | |||
| 3 | szabot | 3 | {% block title %}Number translator{% end %} | 
        
| 2 | szabot | 4 | |
| 5 | {% block body %} | 
        ||
| 176 | muzer | 6 | <!-- | 
        
| 7 | #    This file is part of Tsim Apiak. | 
        ||
| 8 | #   | 
        ||
| 9 | #    Tsim Apiak is free software: you can redistribute it and/or modify | 
        ||
| 10 | #    it under the terms of the GNU General Public Licence as published by | 
        ||
| 11 | #    the Free Software Foundation, either version 3 of the Licence, or | 
        ||
| 12 | #    (at your option) any later version.  | 
        ||
| 13 | #    | 
        ||
| 14 | #    In addition to this, you must also comply with clause 4 of the | 
        ||
| 15 | #    Apache Licence, version 2.0, concerning attribution. Where there | 
        ||
| 16 | #    is a contradiction between the two licences, the GPL            | 
        ||
| 17 | #    takes preference. | 
        ||
| 18 | #   | 
        ||
| 186 | szabot | 19 | #    Tsim Apiak is distributed in the hope that it will be useful, | 
        
| 176 | muzer | 20 | #    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
        
| 21 | #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
        ||
| 22 | #    GNU General Public License for more details. | 
        ||
| 23 | #   | 
        ||
| 24 | #    You should have received a copy of the GNU General Public License | 
        ||
| 25 | #    along with Tsim Apiak.  If not, see <http://www.gnu.org/licenses/>.    | 
        ||
| 26 | --> | 
        ||
| 27 | |||
| 2 | szabot | 28 | <b>Na'vi number:</b><br />  | 
        
| 29 | <form action="/number" method="post"> | 
        ||
| 30 | <input id="num" name="num" type="text" value="{{last}}" style="width: 100%;" /> | 
        ||
| 31 | <input name="btn" type="submit" value="Translate!" /> | 
        ||
| 32 | </form> | 
        ||
| 33 | {% if type(numout) == tuple %} | 
        ||
| 34 | Decimal: {{ numout[0] }}<br /> | 
        ||
| 35 | Octal: {{ numout[1] }} | 
        ||
| 36 | {% elif type(numout) == int %} | 
        ||
| 37 | Not a valid number!  | 
        ||
| 38 | {% end %} | 
        ||
| 39 | <script type="text/javascript"> | 
        ||
| 40 | document.getElementById("num").focus(); | 
        ||
| 41 | </script> | 
        ||
| 176 | muzer | 42 | {% end %} |