Compare commits

...

2 Commits

Author SHA1 Message Date
Gesche c8f8073904 add styling! 2019-01-27 13:40:04 +01:00
Gesche 55c1f788a7 remove vocation choice (all chars start as none on tutorial island) 2019-01-27 13:39:49 +01:00
10 changed files with 80 additions and 13 deletions

View File

@ -21,6 +21,6 @@ class LoginForm(forms.Form):
class CreateCharacterForm(forms.Form):
name = forms.CharField()
vocation = forms.ChoiceField(
choices=VocationHelper.get_base_vocation_choices())
#vocation = forms.ChoiceField(
# choices=VocationHelper.get_base_vocation_choices())
sex = forms.ChoiceField(choices=((0, 'female'), (1, 'male')))

View File

@ -1,5 +1,50 @@
@font-face {
font-family: Martel;
src: url('../fonts/martel.eot');
src: local("Martel"), url('../fonts/martel.ttf');
}
.sidebar-nav {
margin-top: 20px;
padding: 0;
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.

View File

@ -1,7 +1,7 @@
{% extends "base_generic.html" %}
{% block content %}
<h1>Add Character</h1>
<h2 class="tibia-headline">Add Character</h2>
<form method="post">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Save">

View File

@ -1,17 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% block title %}<title>Ambitious Server</title>{% endblock %}
<meta name="viewport" content="width=device-width, initial-scale=1">
{% block title %}<title>SomeTibia</title>{% endblock %}
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<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 -->
{% load static %}
<link rel="stylesheet" href="{% static 'css/styles.css' %}">
</head>
<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="row">
<div class="col-sm-2">
<div class="col-sm-3">
{% block sidebar %}
<ul class="sidebar-nav">
{% if user.is_authenticated %}
@ -24,12 +40,16 @@
{% if user.is_authenticated %}
<li><a href="{% url 'accounts:characters' %}">My characters</a></li>
{% endif %}
<li><a href="">All authors</a></li>
</ul>
{% endblock %}
</div>
<div class="col-sm-10 ">{% block content %}{% endblock %}</div>
<div class="col-sm-9 ">{% block content %}{% endblock %}</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>
</html>

View File

@ -1,7 +1,7 @@
{% extends "base_generic.html" %}
{% block content %}
<h1>Highscore</h1>
<h2 class="tibia-headline">Highscore</h2>
{% if best_players %}
<table style="width:50%">

View File

@ -1,7 +1,7 @@
{% extends "base_generic.html" %}
{% block content %}
<h1>Login</h1>
<h1 class="tibia-headline">Login</h1>
<form method="post">
{% csrf_token %}

View File

@ -1,6 +1,7 @@
{% extends "base_generic.html" %}
{% block content %}
<h2 class="tibia-headline">My Characters</h2>
{% if players %}
<ul>
{% for player in players %}

View File

@ -66,7 +66,7 @@ class CreateCharView(LoginRequiredMixin, FormView):
success_url = reverse_lazy('accounts:characters')
def form_valid(self, form):
rookgaard = Towns.objects.get(name='Rookgaard')
rookgaard = Towns.objects.get(name='Rookgaard Tutorial Island')
start_health = 150
start_mana = 55
start_cap = 400
@ -75,7 +75,8 @@ class CreateCharView(LoginRequiredMixin, FormView):
player = Players.objects.create(
name=form.cleaned_data['name'],
level=1,
vocation=int(form.cleaned_data['vocation']),
#vocation=int(form.cleaned_data['vocation']),
vocation=0,
sex=int(form.cleaned_data['sex']),
posx=rookgaard.posx,
posy=rookgaard.posy,