Compare commits
No commits in common. "c8f8073904798d9da7a96cfc8326231ea485a9e4" and "e7b78f418abb6f1e6bbcb72180b257f7cc649255" have entirely different histories.
c8f8073904
...
e7b78f418a
|
@ -21,6 +21,6 @@ class LoginForm(forms.Form):
|
||||||
|
|
||||||
class CreateCharacterForm(forms.Form):
|
class CreateCharacterForm(forms.Form):
|
||||||
name = forms.CharField()
|
name = forms.CharField()
|
||||||
#vocation = forms.ChoiceField(
|
vocation = forms.ChoiceField(
|
||||||
# choices=VocationHelper.get_base_vocation_choices())
|
choices=VocationHelper.get_base_vocation_choices())
|
||||||
sex = forms.ChoiceField(choices=((0, 'female'), (1, 'male')))
|
sex = forms.ChoiceField(choices=((0, 'female'), (1, 'male')))
|
|
@ -1,50 +1,5 @@
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: Martel;
|
|
||||||
src: url('../fonts/martel.eot');
|
|
||||||
src: local("Martel"), url('../fonts/martel.ttf');
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-nav {
|
.sidebar-nav {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tibia-headline {
|
|
||||||
font-family: "Martel", Georgia, "Times New Roman", serif;
|
|
||||||
color: gold;
|
|
||||||
text-shadow: 2px 2px black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.blog-header-logo {
|
|
||||||
font-family: "Martel", Georgia, "Times New Roman", serif;
|
|
||||||
font-size: 2.25rem;
|
|
||||||
color: gold;
|
|
||||||
text-shadow: 2px 2px black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-gold {
|
|
||||||
color: gold;
|
|
||||||
}
|
|
||||||
|
|
||||||
body { background: lightgray !important; }
|
|
||||||
|
|
||||||
a:visited {
|
|
||||||
color: darkgoldenrod !important;
|
|
||||||
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: gold !important;
|
|
||||||
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
color: lightgoldenrodyellow !important;
|
|
||||||
text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,7 +1,7 @@
|
||||||
{% extends "base_generic.html" %}
|
{% extends "base_generic.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2 class="tibia-headline">Add Character</h2>
|
<h1>Add Character</h1>
|
||||||
<form method="post">{% csrf_token %}
|
<form method="post">{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{{ form.as_p }}
|
||||||
<input type="submit" value="Save">
|
<input type="submit" value="Save">
|
||||||
|
|
|
@ -1,33 +1,17 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
{% block title %}<title>SomeTibia</title>{% endblock %}
|
{% block title %}<title>Ambitious Server</title>{% endblock %}
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
||||||
<!-- Add additional CSS in static file -->
|
<!-- Add additional CSS in static file -->
|
||||||
{% load static %}
|
{% load static %}
|
||||||
<link rel="stylesheet" href="{% static 'css/styles.css' %}">
|
<link rel="stylesheet" href="{% static 'css/styles.css' %}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
|
||||||
<header class="blog-header py-3">
|
|
||||||
<div class="row flex-nowrap justify-content-between align-items-center">
|
|
||||||
<div class="col-4 pt-1">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-4 text-center">
|
|
||||||
<a class="blog-header-logo" href="{% url 'accounts:index' %}">SomeTibia</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-4 d-flex justify-content-end align-items-center">
|
|
||||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'accounts:register' %}">Register now!</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-2">
|
||||||
{% block sidebar %}
|
{% block sidebar %}
|
||||||
<ul class="sidebar-nav">
|
<ul class="sidebar-nav">
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
|
@ -40,16 +24,12 @@
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<li><a href="{% url 'accounts:characters' %}">My characters</a></li>
|
<li><a href="{% url 'accounts:characters' %}">My characters</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<li><a href="">All authors</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-9 ">{% block content %}{% endblock %}</div>
|
<div class="col-sm-10 ">{% block content %}{% endblock %}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- scripts -->
|
|
||||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1,7 +1,7 @@
|
||||||
{% extends "base_generic.html" %}
|
{% extends "base_generic.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2 class="tibia-headline">Highscore</h2>
|
<h1>Highscore</h1>
|
||||||
|
|
||||||
{% if best_players %}
|
{% if best_players %}
|
||||||
<table style="width:50%">
|
<table style="width:50%">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% extends "base_generic.html" %}
|
{% extends "base_generic.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1 class="tibia-headline">Login</h1>
|
<h1>Login</h1>
|
||||||
|
|
||||||
<form method="post">
|
<form method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{% extends "base_generic.html" %}
|
{% extends "base_generic.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2 class="tibia-headline">My Characters</h2>
|
|
||||||
{% if players %}
|
{% if players %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for player in players %}
|
{% for player in players %}
|
||||||
|
|
|
@ -66,7 +66,7 @@ class CreateCharView(LoginRequiredMixin, FormView):
|
||||||
success_url = reverse_lazy('accounts:characters')
|
success_url = reverse_lazy('accounts:characters')
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
rookgaard = Towns.objects.get(name='Rookgaard Tutorial Island')
|
rookgaard = Towns.objects.get(name='Rookgaard')
|
||||||
start_health = 150
|
start_health = 150
|
||||||
start_mana = 55
|
start_mana = 55
|
||||||
start_cap = 400
|
start_cap = 400
|
||||||
|
@ -75,8 +75,7 @@ class CreateCharView(LoginRequiredMixin, FormView):
|
||||||
player = Players.objects.create(
|
player = Players.objects.create(
|
||||||
name=form.cleaned_data['name'],
|
name=form.cleaned_data['name'],
|
||||||
level=1,
|
level=1,
|
||||||
#vocation=int(form.cleaned_data['vocation']),
|
vocation=int(form.cleaned_data['vocation']),
|
||||||
vocation=0,
|
|
||||||
sex=int(form.cleaned_data['sex']),
|
sex=int(form.cleaned_data['sex']),
|
||||||
posx=rookgaard.posx,
|
posx=rookgaard.posx,
|
||||||
posy=rookgaard.posy,
|
posy=rookgaard.posy,
|
||||||
|
|
Loading…
Reference in New Issue