aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/_footer.tmpl22
-rw-r--r--templates/_header.tmpl31
-rw-r--r--templates/account_create.tmpl22
-rw-r--r--templates/account_login.tmpl13
-rw-r--r--templates/account_recover.tmpl11
-rw-r--r--templates/account_summary.tmpl65
-rw-r--r--templates/character_create.tmpl23
-rw-r--r--templates/character_profile.tmpl60
-rw-r--r--templates/killstatistics.tmpl28
-rw-r--r--templates/message.tmpl6
-rw-r--r--templates/world_info.tmpl62
-rw-r--r--templates/world_list.tmpl23
12 files changed, 366 insertions, 0 deletions
diff --git a/templates/_footer.tmpl b/templates/_footer.tmpl
new file mode 100644
index 0000000..21a47e3
--- /dev/null
+++ b/templates/_footer.tmpl
@@ -0,0 +1,22 @@
+{{/* FOOTER START */}}
+ <div class="box">
+ <h1>About</h1>
+ <table class="info">
+ <tr>
+ <th>Client:</th>
+ <td>Tibia Client Version 7.7</td>
+ </tr>
+ <tr>
+ <th>Login Server:</th>
+ <td>localhost:7171</td>
+ </tr>
+ <tr>
+ <th>RSA Public Key:</th>
+ <td>142996239624163995200701773828988955507954033454661532174705160829347375827760388829672133862046006741453928458538592179906264509724520840657286865659265687630979195970404721891201847792002125535401292779123937207447574596692788513647179235335529307251350570728407373705564708871762033017096809910315212883967</td>
+ </tr>
+ </table>
+ </div>
+ </center>
+ </body>
+</html>
+{{/* FOOTER END */}} \ No newline at end of file
diff --git a/templates/_header.tmpl b/templates/_header.tmpl
new file mode 100644
index 0000000..062c681
--- /dev/null
+++ b/templates/_header.tmpl
@@ -0,0 +1,31 @@
+{{/* HEADER START */}}
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="UTF-8"/>
+ <meta name="description" content=""/>
+ <meta name="keywords" content=""/>
+ <meta name="author" content=""/>
+ <meta name="viewport" content="width=device-width, initial-scale=1"/>
+ <link rel="stylesheet" type="text/css" href="/res/css/style.css"/>
+ <title>{{.Title}}</title>
+ </head>
+
+ <body>
+ <center>
+ <div class="nav">
+ {{if .AccountID}}
+ <a class="button" href="/account">Account Summary</a>
+ <a class="button" href="/character/create">Create Character</a>
+ <a class="button" href="/account/logout">Logout</a>
+ {{else}}
+ <a class="button" href="/account">Login</a>
+ <a class="button" href="/account/create">Create Account</a>
+ <a class="button" href="/account/recover">Recover Account</a>
+ {{end}}
+ <br>
+ <a class="button" href="/character">Characters</a>
+ <a class="button" href="#">Houses</a>
+ <a class="button" href="/world">Worlds</a>
+ </div>
+{{/* HEADER END */}} \ No newline at end of file
diff --git a/templates/account_create.tmpl b/templates/account_create.tmpl
new file mode 100644
index 0000000..6ade0bf
--- /dev/null
+++ b/templates/account_create.tmpl
@@ -0,0 +1,22 @@
+{{template "_header.tmpl" .Common}}
+ <form class="box" action="/account/create" method="POST">
+ <h1>Create Account</h1>
+
+ <label for="create_account">ACCOUNT NUMBER</label>
+ <input id="create_account" type="password" name="account"/>
+
+ <label for="create_email">EMAIL</label>
+ <input id="create_email" type="text" name="email"/>
+
+ <label for="create_email_confirm">CONFIRM EMAIL</label>
+ <input id="create_email_confirm" type="text" name="email_confirm"/>
+
+ <label for="create_password">PASSWORD</label>
+ <input id="create_password" type="password" name="password"/>
+
+ <label for="create_password_confirm">CONFIRM PASSWORD</label>
+ <input id="create_password_confirm" type="password" name="password_confirm"/>
+
+ <input type="submit" value="Create"/>
+ </form>
+{{template "_footer.tmpl" .Common}} \ No newline at end of file
diff --git a/templates/account_login.tmpl b/templates/account_login.tmpl
new file mode 100644
index 0000000..2b9fbfa
--- /dev/null
+++ b/templates/account_login.tmpl
@@ -0,0 +1,13 @@
+{{template "_header.tmpl" .Common}}
+ <form class="box" action="/account" method="POST">
+ <h1>Login</h1>
+
+ <label for="login_account">ACCOUNT NUMBER</label>
+ <input id="login_account" type="password" name="account"/>
+
+ <label for="login_password">PASSWORD</label>
+ <input id="login_password" type="password" name="password"/>
+
+ <input type="submit" value="Login"/>
+ </form>
+{{template "_footer.tmpl" .Common}} \ No newline at end of file
diff --git a/templates/account_recover.tmpl b/templates/account_recover.tmpl
new file mode 100644
index 0000000..ee0d750
--- /dev/null
+++ b/templates/account_recover.tmpl
@@ -0,0 +1,11 @@
+{{template "_header.tmpl" .Common}}
+ <form class="box" action="#">
+ <h1>Recover Account</h1>
+ <p style="color: #A11;">Account recovery not currently implemented.</p>
+
+ <label for="recover_email">EMAIL</label>
+ <input id="recover_email" type="text" name="email"/>
+
+ <input type="submit" value="Recover" disabled/>
+ </form>
+{{template "_footer.tmpl" .Common}} \ No newline at end of file
diff --git a/templates/account_summary.tmpl b/templates/account_summary.tmpl
new file mode 100644
index 0000000..ae42479
--- /dev/null
+++ b/templates/account_summary.tmpl
@@ -0,0 +1,65 @@
+{{template "_header.tmpl" .Common}}
+ {{with .Account}}
+ <div class="box">
+ <h1>Account Information</h1>
+ <table class="info">
+ <tr>
+ <th>Email:</th>
+ <td>{{.Email}}</td>
+ </tr>
+ <tr>
+ <th>Status:</th>
+ {{if eq .PremiumDays 1}}
+ <td style="color: #A11;">Premium Account (last day)</td>
+ {{else if gt .PremiumDays 1}}
+ <td>Premium Account ({{.PremiumDays}} days left)</td>
+ {{else}}
+ <td>Free Account</td>
+ {{end}}
+ </tr>
+ {{if .PendingPremiumDays}}
+ <tr>
+ <th>Pending Premium:</th>
+ {{if eq .PendingPremiumDays 1}}
+ <td>1 day</td>
+ {{else}}
+ <td>{{.PendingPremiumDays}} days</td>
+ {{end}}
+ </tr>
+ {{end}}
+ </table>
+ </div>
+ {{if .Characters}}
+ <div class="box">
+ <h1>Characters</h1>
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Level</th>
+ <th>Vocation</th>
+ <th>World</th>
+ <th>Status</th>
+ </tr>
+ {{range .Characters}}
+ <tr>
+ <td><a href="/character?name={{.Name}}">{{.Name}}</a></td>
+ <td>{{or .Level 1}}</td>
+ <td>{{or .Profession "None"}}</td>
+ <td>{{.World}}</td>
+ {{if .Online}}
+ <td style="color: #1A1;">Online</td>
+ {{else}}
+ <td style="color: #A11;">Offline</td>
+ {{end}}
+ </tr>
+ {{end}}
+ </table>
+ </div>
+ {{end}}
+ {{else}}
+ <div class="box">
+ <h1>Oops</h1>
+ <p>Something went wrong when loading your account's summary. Wait a few moments and try again.</p>
+ </div>
+ {{end}}
+{{template "_footer.tmpl" .Common}} \ No newline at end of file
diff --git a/templates/character_create.tmpl b/templates/character_create.tmpl
new file mode 100644
index 0000000..c243f2d
--- /dev/null
+++ b/templates/character_create.tmpl
@@ -0,0 +1,23 @@
+{{template "_header.tmpl" .Common}}
+ <form class="box" action="/character/create" method="POST">
+ <h1>Create Account</h1>
+
+ <label for="character_name">NAME</label>
+ <input id="character_name" type="text" name="name"/>
+
+ <label for="character_sex">SEX</label>
+ <select id="character_sex" name="sex">
+ <option value="1">MALE</option>
+ <option value="2">FEMALE</option>
+ </select>
+
+ <label for="character_world">WORLD</label>
+ <select id="character_world" name="world">
+ {{range .Worlds}}
+ <option value="{{.Name}}">{{.Name}} ({{.Type}})</option>
+ {{end}}
+ </select>
+
+ <input type="submit" value="Create"/>
+ </form>
+{{template "_footer.tmpl" .Common}} \ No newline at end of file
diff --git a/templates/character_profile.tmpl b/templates/character_profile.tmpl
new file mode 100644
index 0000000..824e908
--- /dev/null
+++ b/templates/character_profile.tmpl
@@ -0,0 +1,60 @@
+{{template "_header.tmpl" .Common}}
+ {{with .Character}}
+ <div class="box">
+ <h1>Character Information</h1>
+ <table class="info">
+ <tr>
+ <th>Name:</th>
+ <td>{{.Name}}</td>
+ </tr>
+ <tr>
+ <th>Sex:</th>
+ {{if eq .Sex 1}}
+ <td>male</td>
+ {{else if eq .Sex 2}}
+ <td>female</td>
+ {{else}}
+ <td>unknown</td>
+ {{end}}
+ </tr>
+ <tr>
+ <th>Vocation:</th>
+ <td>{{or .Profession "None"}}</td>
+ </tr>
+ <tr>
+ <th>Level:</th>
+ <td>{{or .Level 1}}</td>
+ </tr>
+ <tr>
+ <th>World:</th>
+ <td>{{.World}}</td>
+ </tr>
+ <tr>
+ <th>Residence:</th>
+ <td>{{or .Residence "Rookgaard"}}</td>
+ </tr>
+ <tr>
+ <th>Last Login:</th>
+ <td>{{.LastLogin}}</td>
+ </tr>
+ <tr>
+ <th>Account Status:</th>
+ {{if .PremiumDays}}
+ <td>Premium Account</td>
+ {{else}}
+ <td>Free Account</td>
+ {{end}}
+ </tr>
+ </table>
+ </div>
+ {{end}}
+
+ <form class="box" action="/character" method="GET">
+ <h1>Search Character</h1>
+
+ <label for="search_name">CHARACTER NAME</label>
+ <input id="search_name" type="text" name="name"/>
+
+ <input type="submit" value="Search"/>
+ </form>
+{{template "_footer.tmpl" .Common}} \ No newline at end of file
diff --git a/templates/killstatistics.tmpl b/templates/killstatistics.tmpl
new file mode 100644
index 0000000..451059e
--- /dev/null
+++ b/templates/killstatistics.tmpl
@@ -0,0 +1,28 @@
+{{template "_header.tmpl" .Common}}
+ <div class="box">
+ {{with .World}}
+ <h1>Kill Statistics - <a href="/world?name={{.Name}}">{{.Name}}</a></h1>
+ {{else}}
+ <h1>Kill Statistics</h1>
+ {{end}}
+
+ {{if .KillStatistics}}
+ <table>
+ <tr>
+ <th>Creature</th>
+ <th>Times Killed</th>
+ <th>Players Killed</th>
+ </tr>
+ {{range .KillStatistics}}
+ <tr>
+ <td>{{.RaceName}}</td>
+ <td>{{.TimesKilled}}</td>
+ <td>{{.PlayersKilled}}</td>
+ </tr>
+ {{end}}
+ </table>
+ {{else}}
+ <p>There are no kill statistics.</p>
+ {{end}}
+ </div>
+{{template "_footer.tmpl" .Common}} \ No newline at end of file
diff --git a/templates/message.tmpl b/templates/message.tmpl
new file mode 100644
index 0000000..847be8f
--- /dev/null
+++ b/templates/message.tmpl
@@ -0,0 +1,6 @@
+{{template "_header.tmpl" .Common}}
+ <div class="box">
+ <h1>{{.Heading}}</h1>
+ <p>{{.Message}}</p>
+ </div>
+{{template "_footer.tmpl" .Common}} \ No newline at end of file
diff --git a/templates/world_info.tmpl b/templates/world_info.tmpl
new file mode 100644
index 0000000..c0f9c24
--- /dev/null
+++ b/templates/world_info.tmpl
@@ -0,0 +1,62 @@
+{{template "_header.tmpl" .Common}}
+ <div class="box">
+ <h1>World Information</h1>
+ {{with .World}}
+ <table class="info">
+ <tr>
+ <th>Name:</th>
+ <td>{{.Name}}</td>
+ </tr>
+ <tr>
+ <th>Type:</th>
+ <td>{{.Type}}</td>
+ </tr>
+ <tr>
+ <th>Players Online:</th>
+ <td>{{.NumPlayers}}</td>
+ </tr>
+ <tr>
+ <th>Online Record:</th>
+ {{if .OnlineRecord}}
+ <td>{{.OnlineRecord}} players (on {{.OnlineRecordTime}})</td>
+ {{else}}
+ <td>None</td>
+ {{end}}
+ </tr>
+ </table>
+ <a class="button" href="/killstatistics?world={{.Name}}">Kill Statistics</a>
+ {{else}}
+ <p>No information available.</p>
+ {{end}}
+ </div>
+
+ <div class="box">
+ <h1>Players Online</h1>
+ {{if .OnlineCharacters}}
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Level</th>
+ <th>Vocation</th>
+ <th>World</th>
+ <th>Status</th>
+ </tr>
+ {{range .OnlineCharacters}}
+ <tr>
+ <td><a href="/character?name={{.Name}}">{{.Name}}</a></td>
+ <td>{{or .Level 1}}</td>
+ <td>{{or .Profession "None"}}</td>
+ <td>{{.World}}</td>
+ {{if .Online}}
+ <td style="color: #1A1;">Online</td>
+ {{else}}
+ <td style="color: #A11;">Offline</td>
+ {{end}}
+ </tr>
+ {{end}}
+ </table>
+ {{else}}
+ <p>There are no players online.</p>
+ {{end}}
+ </div>
+{{template "_footer.tmpl" .Common}} \ No newline at end of file
diff --git a/templates/world_list.tmpl b/templates/world_list.tmpl
new file mode 100644
index 0000000..de9786c
--- /dev/null
+++ b/templates/world_list.tmpl
@@ -0,0 +1,23 @@
+{{template "_header.tmpl" .Common}}
+ <div class="box">
+ <h1>Worlds</h1>
+ {{if .Worlds}}
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Players Online</th>
+ </tr>
+ {{range .Worlds}}
+ <tr>
+ <td><a href="/world?name={{.Name}}">{{.Name}}</a></td>
+ <td>{{.Type}}</td>
+ <td>{{.NumPlayers}}</td>
+ </tr>
+ {{end}}
+ </table>
+ {{else}}
+ <p>Something went wrong when loading world data. Wait a few moments and try again.</p>
+ {{end}}
+ </div>
+{{template "_footer.tmpl" .Common}} \ No newline at end of file