Compare commits
merge into: binaryatrocity:master
binaryatrocity:development
binaryatrocity:master
binaryatrocity:production
pull from: binaryatrocity:development
binaryatrocity:development
binaryatrocity:master
binaryatrocity:production
8 Commits
master
...
developmen
Author | SHA1 | Message | Date |
---|---|---|---|
Brandon Cornejo | 6f97bba84d |
Fix up ts3/forum points stuff
|
10 years ago |
Brandon Cornejo | efd36e4548 |
Change error-handling to ignore for Steam nickname encoding
|
10 years ago |
Brandon Cornejo | 71b12a38f4 |
Use unicode encoding for Steam usernames
|
10 years ago |
Brandon Cornejo | 2d3e550b69 |
Update to MySQL-python 1.2.5
|
10 years ago |
Brandon Cornejo | 02b5033cce |
Remove winrate data from Profile page
|
10 years ago |
Brandon Cornejo | b4ea3e4165 |
Remove numpy from pip requirements
|
10 years ago |
Brandon Cornejo | 2420f10cda |
Remove A-Z hero challenge stuff
|
10 years ago |
Brandon Cornejo | 7c3eade8dc |
Add delete_cronjobs command to run.py
|
10 years ago |
10 changed files with 77 additions and 197 deletions
-
81app/models.py
-
4app/teamspeak.py
-
89app/templates/hero_random.html
-
1app/templates/layout.html
-
9app/templates/private_profile.html
-
19app/templates/profile.html
-
18app/views.py
-
34migrations/versions/50e77b6e7331_.py
-
5requirements.txt
-
14run.py
@ -1,89 +0,0 @@ |
|||||
{% extends "layout.html" %} |
|
||||
{% block head %} |
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/heropedia.css') }}" > |
|
||||
{% endblock %} |
|
||||
|
|
||||
{% block title %} A-Z Challenge: {{ user.nickname }}{% endblock %} |
|
||||
|
|
||||
{% block content %} |
|
||||
{% set taverns = heropedia() %} |
|
||||
<h2 class="uk-text-center">{{ user.nickname }}'s A-Z Challenge</h2> |
|
||||
<hr /> |
|
||||
<div class="uk-grid"> |
|
||||
<div class="uk-width-large-1-3 uk-width-medium-1-1 uk-panel uk-text-center uk-margin-bottom"> |
|
||||
<h3 class="uk-panel-title">Current Hero</h3> |
|
||||
<h4 class="uk-text-bold uk-margin-remove">{{ user.random_hero['localized_name'] }}</h4> |
|
||||
<img src="{{ url_for('static', filename=hero_image_large(user.random_hero)) }}" class="dn-hero-icon" /> |
|
||||
|
|
||||
<p> |
|
||||
<span id="heroes_completed">Heroes Completed: {{ user.random_heroes.completed | length }}</span><br/> |
|
||||
<span id="heroes_left">Heroes Left: {{ total_hero_pool() - user.random_heroes.completed|length }}</span> |
|
||||
</span> |
|
||||
</p> |
|
||||
|
|
||||
{% if g.user and g.user.steam_id == user.steam_id %} |
|
||||
<form action="{{ url_for('user_random_hero', userid=g.user.id) }}" method="post" id="random_form" class="uk-margin"> |
|
||||
<input type="checkbox" name="completed" id="completed_checkbox" style="display:none;"> |
|
||||
<input type="checkbox" name="skip" id="skip_checkbox" style="display:none;"> |
|
||||
<a class="uk-button uk-button-success" id="completed_button">Completed!</a> |
|
||||
<a class="uk-button uk-button-primary" id="skip_button">Skip</a> |
|
||||
</form> |
|
||||
{% endif %} |
|
||||
</div> |
|
||||
<div class="uk-width-large-2-3 uk-width-medium-1-1 uk-panel uk-text-center uk-margin"> |
|
||||
{% if user.az_completions > 0 %} |
|
||||
<div class="uk-badge uk-panel-badge uk-badge-notification uk-badge-success">x{{ user.az_completions }}</div> |
|
||||
{% endif %} |
|
||||
<h3 class="uk-panel-title">Completed</h3> |
|
||||
{% for hero in user.random_heroes.completed %} |
|
||||
<img src="{{ url_for('static', filename=hero_image_small(hero)) }}" class="dn-hero-icon" /> |
|
||||
{% endfor %} |
|
||||
<br/><br/> |
|
||||
<br/><br/> |
|
||||
</div> |
|
||||
<div class="uk-width-large-2-3 uk-width-medium-1-1 uk-container-center"> |
|
||||
<ul class="uk-tab" data-uk-tab="{connect:'#taverns'}"> |
|
||||
<li class="uk-active"><a href="">Strength</a></li> |
|
||||
<li><a href="">Agility</a></li> |
|
||||
<li><a href="">Intelligence</a></li> |
|
||||
</ul> |
|
||||
<ul id="taverns" class="uk-switcher uk-margin"> |
|
||||
<li><div class="uk-panel tavern"> |
|
||||
<label id="tavernStrength">Strength</label> |
|
||||
{% for hero in taverns[0][1] + taverns[3][1] %} |
|
||||
<img class="{{hero['name'] in user.random_completed and 'filterUnmatchedHero' or 'filterMatchedHero' }}" id="{{ hero['name'] }}" src="{{ url_for('static', filename=hero_image_small(hero)) }}" /> |
|
||||
{% endfor %} |
|
||||
</div></li> |
|
||||
<li><div class="uk-panel tavern"> |
|
||||
<label id="tavernAgility">Agility</label> |
|
||||
{% for hero in taverns[1][1] + taverns[4][1] %} |
|
||||
<img class="{{hero['name'] in user.random_completed and 'filterUnmatchedHero' or 'filterMatchedHero' }}" id="{{ hero['name'] }}" src="{{ url_for('static', filename=hero_image_small(hero)) }}" /> |
|
||||
{% endfor %} |
|
||||
</div> </li> |
|
||||
<li><div class="uk-panel tavern"> |
|
||||
<label id="tavernIntelligence">Intelligence</label> |
|
||||
{% for hero in taverns[2][1] + taverns[5][1] %} |
|
||||
<img class="{{hero['name'] in user.random_completed and 'filterUnmatchedHero' or 'filterMatchedHero' }}" id="{{ hero['name'] }}" src="{{ url_for('static', filename=hero_image_small(hero)) }}" /> |
|
||||
{% endfor %} |
|
||||
</div> </li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</div> |
|
||||
{% endblock %} |
|
||||
|
|
||||
{% if g.user and g.user.id == user.id %} |
|
||||
{% block pagescripts %} |
|
||||
<script> |
|
||||
$(document).ready(function() { |
|
||||
$('#completed_button').click( function() { |
|
||||
$('#completed_checkbox').attr('checked', true); |
|
||||
$('#random_form').submit(); |
|
||||
}); |
|
||||
$('#skip_button').click( function() { |
|
||||
$('#skip_checkbox').attr('checked', true); |
|
||||
$('#random_form').submit(); |
|
||||
}); |
|
||||
}); |
|
||||
</script> |
|
||||
{% endblock %} |
|
||||
{% endif %} |
|
@ -0,0 +1,34 @@ |
|||||
|
"""empty message |
||||
|
|
||||
|
Revision ID: 50e77b6e7331 |
||||
|
Revises: 9e520de441f |
||||
|
Create Date: 2014-11-17 13:21:23.705195 |
||||
|
|
||||
|
""" |
||||
|
|
||||
|
# revision identifiers, used by Alembic. |
||||
|
revision = '50e77b6e7331' |
||||
|
down_revision = '9e520de441f' |
||||
|
|
||||
|
from alembic import op |
||||
|
import sqlalchemy as sa |
||||
|
from sqlalchemy.dialects import mysql |
||||
|
|
||||
|
def upgrade(): |
||||
|
### commands auto generated by Alembic - please adjust! ### |
||||
|
op.add_column('user', sa.Column('ts3_longest_stretch', sa.Interval(), nullable=True)) |
||||
|
op.add_column('user', sa.Column('ts3_stretch_award_time', sa.DateTime(), nullable=True)) |
||||
|
op.drop_column('user', u'random_heroes') |
||||
|
op.drop_column('user', u'ts3_connections') |
||||
|
op.drop_column('user', u'az_completions') |
||||
|
### end Alembic commands ### |
||||
|
|
||||
|
|
||||
|
def downgrade(): |
||||
|
### commands auto generated by Alembic - please adjust! ### |
||||
|
op.add_column('user', sa.Column(u'az_completions', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True)) |
||||
|
op.add_column('user', sa.Column(u'ts3_connections', mysql.TEXT(), nullable=True)) |
||||
|
op.add_column('user', sa.Column(u'random_heroes', mysql.TEXT(), nullable=True)) |
||||
|
op.drop_column('user', 'ts3_stretch_award_time') |
||||
|
op.drop_column('user', 'ts3_longest_stretch') |
||||
|
### end Alembic commands ### |
Write
Preview
Loading…
Cancel
Save
Reference in new issue