Final commit for hierarchy change
No files matched your search
@@ -0,0 +1,12 @@
|
||||
from flask import Flask
|
||||
from flask.ext.sqlalchemy import SQLAlchemy
|
||||
from flask.ext.openid import OpenID
|
||||
from flask.ext.cache import Cache
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config.from_object('config')
|
||||
db = SQLAlchemy(app)
|
||||
oid = OpenID(app)
|
||||
cache = Cache(app, config={'CACHE_TYPE': app.config['CACHE_TYPE']})
|
||||
|
||||
from app import views, models
|
||||
@@ -0,0 +1,488 @@
|
||||
import os
|
||||
import re
|
||||
from time import strftime, gmtime
|
||||
from hashlib import sha256
|
||||
from peewee import *
|
||||
|
||||
from app import app, cache, db
|
||||
|
||||
board_db = MySQLDatabase(app.config['FORUM_NAME'], **{'passwd': app.config['FORUM_PASSWORD'],
|
||||
'host': app.config['FORUM_HOST'], 'user': app.config['FORUM_USERNAME']})
|
||||
|
||||
def registerUserForumId(user, username, password):
|
||||
try:
|
||||
u = Users.filter(name=username).get()
|
||||
hashpass = sha256(password+app.config['FORUM_SALT']+u.pss).hexdigest()
|
||||
if hashpass == u.password:
|
||||
user.forum_id = u.id
|
||||
db.session.commit()
|
||||
return {"forum_name":u.name, "forum_id":u.id}
|
||||
except DoesNotExist:
|
||||
pass
|
||||
return False
|
||||
|
||||
@cache.memoize(60*5)
|
||||
def latest_news(num=3):
|
||||
latest_news = []
|
||||
try:
|
||||
board_db.connect()
|
||||
news_forum = Forums.get(fn.Lower(Forums.title) % '%news%')
|
||||
for thread in Threads.select().where(
|
||||
Threads.forum == news_forum.id).order_by(Threads.date.desc()).limit(num):
|
||||
# Last revision of the first post
|
||||
post = Posts.select().where(Posts.thread == thread.id).get()
|
||||
raw_text = PostsText.select().where(PostsText.pid == post.id).order_by(PostsText.revision.desc()).limit(1).get()
|
||||
|
||||
#remove BBCode
|
||||
text = re.sub(r"\[(\/)?(\w+)\]", '', raw_text.text)
|
||||
|
||||
timestamp = thread.date
|
||||
date = strftime('%B %d, %Y %H:%M:%S UTC', gmtime(timestamp))
|
||||
if not timestamp:
|
||||
post = Posts.select().where(Posts.thread == thread.id).get()
|
||||
timestamp = post and post.date
|
||||
url = 'http://board.dotanoobs.com/?page=thread&id=%d' % thread.id
|
||||
latest_news.append({'title':thread.title, 'text':text, 'date':date, 'timestamp':timestamp, 'url':url})
|
||||
except Exception as e:
|
||||
latest_news.append({'title':'Error with forum db', 'text':e, 'url':''})
|
||||
finally:
|
||||
board_db.close()
|
||||
return latest_news
|
||||
|
||||
class UnknownFieldType(object):
|
||||
pass
|
||||
|
||||
class BaseModel(Model):
|
||||
class Meta:
|
||||
database = board_db
|
||||
|
||||
class Badges(BaseModel):
|
||||
color = IntegerField()
|
||||
name = CharField()
|
||||
owner = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'badges'
|
||||
|
||||
class Blockedlayouts(BaseModel):
|
||||
blockee = IntegerField()
|
||||
user = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'blockedlayouts'
|
||||
|
||||
class Categories(BaseModel):
|
||||
corder = IntegerField()
|
||||
name = CharField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'categories'
|
||||
|
||||
class Enabledplugins(BaseModel):
|
||||
plugin = CharField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'enabledplugins'
|
||||
|
||||
class Forummods(BaseModel):
|
||||
forum = IntegerField()
|
||||
user = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'forummods'
|
||||
|
||||
class Forums(BaseModel):
|
||||
catid = IntegerField()
|
||||
description = TextField(null=True)
|
||||
forder = IntegerField()
|
||||
hidden = IntegerField()
|
||||
lastpostdate = IntegerField()
|
||||
lastpostid = IntegerField()
|
||||
lastpostuser = IntegerField()
|
||||
minpower = IntegerField()
|
||||
minpowerreply = IntegerField()
|
||||
minpowerthread = IntegerField()
|
||||
numposts = IntegerField()
|
||||
numthreads = IntegerField()
|
||||
title = CharField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'forums'
|
||||
|
||||
class Guests(BaseModel):
|
||||
bot = IntegerField()
|
||||
date = IntegerField()
|
||||
ip = CharField()
|
||||
lastforum = IntegerField()
|
||||
lasturl = CharField()
|
||||
useragent = CharField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'guests'
|
||||
|
||||
class Ignoredforums(BaseModel):
|
||||
fid = IntegerField()
|
||||
uid = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'ignoredforums'
|
||||
|
||||
class Ip2C(BaseModel):
|
||||
cc = CharField(null=True)
|
||||
ip_from = BigIntegerField()
|
||||
ip_to = BigIntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'ip2c'
|
||||
|
||||
class Ipbans(BaseModel):
|
||||
date = IntegerField()
|
||||
ip = CharField()
|
||||
reason = CharField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'ipbans'
|
||||
|
||||
class Log(BaseModel):
|
||||
date = IntegerField()
|
||||
forum = IntegerField()
|
||||
forum2 = IntegerField()
|
||||
ip = CharField()
|
||||
pm = IntegerField()
|
||||
post = IntegerField()
|
||||
text = CharField()
|
||||
thread = IntegerField()
|
||||
type = CharField()
|
||||
user = IntegerField()
|
||||
user2 = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'log'
|
||||
|
||||
class Misc(BaseModel):
|
||||
hotcount = IntegerField()
|
||||
maxpostsday = IntegerField()
|
||||
maxpostsdaydate = IntegerField()
|
||||
maxpostshour = IntegerField()
|
||||
maxpostshourdate = IntegerField()
|
||||
maxusers = IntegerField()
|
||||
maxusersdate = IntegerField()
|
||||
maxuserstext = TextField(null=True)
|
||||
milestone = TextField(null=True)
|
||||
version = IntegerField()
|
||||
views = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'misc'
|
||||
|
||||
class Moodavatars(BaseModel):
|
||||
mid = IntegerField()
|
||||
name = CharField()
|
||||
uid = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'moodavatars'
|
||||
|
||||
class Notifications(BaseModel):
|
||||
description = TextField(null=True)
|
||||
link = IntegerField()
|
||||
linklocation = CharField()
|
||||
time = IntegerField()
|
||||
title = CharField()
|
||||
type = CharField()
|
||||
uid = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'notifications'
|
||||
|
||||
class Pmsgs(BaseModel):
|
||||
date = IntegerField()
|
||||
deleted = IntegerField()
|
||||
drafting = IntegerField()
|
||||
ip = CharField()
|
||||
msgread = IntegerField()
|
||||
userfrom = IntegerField()
|
||||
userto = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'pmsgs'
|
||||
|
||||
class PmsgsText(BaseModel):
|
||||
pid = IntegerField()
|
||||
text = TextField(null=True)
|
||||
title = CharField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'pmsgs_text'
|
||||
|
||||
class Poll(BaseModel):
|
||||
briefing = TextField(null=True)
|
||||
closed = IntegerField()
|
||||
doublevote = IntegerField()
|
||||
question = CharField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'poll'
|
||||
|
||||
class PollChoices(BaseModel):
|
||||
choice = CharField()
|
||||
color = CharField()
|
||||
poll = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'poll_choices'
|
||||
|
||||
class Pollvotes(BaseModel):
|
||||
choiceid = IntegerField()
|
||||
poll = IntegerField()
|
||||
user = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'pollvotes'
|
||||
|
||||
class Postplusones(BaseModel):
|
||||
post = IntegerField()
|
||||
user = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'postplusones'
|
||||
|
||||
class Posts(BaseModel):
|
||||
currentrevision = IntegerField()
|
||||
date = IntegerField()
|
||||
deleted = IntegerField()
|
||||
deletedby = IntegerField()
|
||||
ip = CharField()
|
||||
mood = IntegerField()
|
||||
num = IntegerField()
|
||||
options = IntegerField()
|
||||
postplusones = IntegerField()
|
||||
reason = CharField()
|
||||
thread = IntegerField()
|
||||
user = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'posts'
|
||||
|
||||
class PostsText(BaseModel):
|
||||
date = IntegerField()
|
||||
pid = IntegerField(primary_key=True)
|
||||
revision = IntegerField()
|
||||
text = TextField(null=True)
|
||||
user = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'posts_text'
|
||||
|
||||
class Proxybans(BaseModel):
|
||||
ip = CharField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'proxybans'
|
||||
|
||||
class Queryerrors(BaseModel):
|
||||
cookie = TextField(null=True)
|
||||
error = TextField(null=True)
|
||||
get = TextField(null=True)
|
||||
ip = CharField()
|
||||
post = TextField(null=True)
|
||||
query = TextField(null=True)
|
||||
time = IntegerField()
|
||||
user = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'queryerrors'
|
||||
|
||||
class Reports(BaseModel):
|
||||
hidden = IntegerField()
|
||||
ip = CharField()
|
||||
request = TextField(null=True)
|
||||
severity = IntegerField()
|
||||
text = CharField()
|
||||
time = IntegerField()
|
||||
user = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'reports'
|
||||
|
||||
class Sessions(BaseModel):
|
||||
autoexpire = IntegerField()
|
||||
expiration = IntegerField()
|
||||
id = CharField()
|
||||
iplock = IntegerField()
|
||||
iplockaddr = CharField()
|
||||
lastip = CharField()
|
||||
lasttime = IntegerField()
|
||||
lasturl = CharField()
|
||||
user = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'sessions'
|
||||
|
||||
class Settings(BaseModel):
|
||||
name = CharField()
|
||||
plugin = CharField()
|
||||
value = TextField(null=True)
|
||||
|
||||
class Meta:
|
||||
db_table = 'settings'
|
||||
|
||||
class Smilies(BaseModel):
|
||||
code = CharField()
|
||||
image = CharField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'smilies'
|
||||
|
||||
class Threads(BaseModel):
|
||||
closed = IntegerField()
|
||||
date = IntegerField()
|
||||
firstpostid = IntegerField()
|
||||
forum = IntegerField()
|
||||
icon = CharField()
|
||||
lastpostdate = IntegerField()
|
||||
lastposter = IntegerField()
|
||||
lastpostid = IntegerField()
|
||||
poll = IntegerField()
|
||||
replies = IntegerField()
|
||||
sticky = IntegerField()
|
||||
title = CharField()
|
||||
user = IntegerField()
|
||||
views = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'threads'
|
||||
|
||||
class Threadsread(BaseModel):
|
||||
date = IntegerField()
|
||||
thread = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'threadsread'
|
||||
|
||||
class Uploader(BaseModel):
|
||||
category = IntegerField()
|
||||
date = IntegerField()
|
||||
description = CharField()
|
||||
downloads = IntegerField()
|
||||
filename = CharField()
|
||||
private = IntegerField()
|
||||
user = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'uploader'
|
||||
|
||||
class UploaderCategories(BaseModel):
|
||||
description = TextField(null=True)
|
||||
name = CharField()
|
||||
ord = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'uploader_categories'
|
||||
|
||||
class Usercomments(BaseModel):
|
||||
cid = IntegerField()
|
||||
date = IntegerField()
|
||||
text = TextField(null=True)
|
||||
uid = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'usercomments'
|
||||
|
||||
class Usergroups(BaseModel):
|
||||
inherits = IntegerField()
|
||||
permissions = TextField(null=True)
|
||||
title = CharField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'usergroups'
|
||||
|
||||
class Userpermissions(BaseModel):
|
||||
permissions = TextField(null=True)
|
||||
uid = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'userpermissions'
|
||||
|
||||
class Users(BaseModel):
|
||||
bio = TextField(null=True)
|
||||
birthday = IntegerField()
|
||||
blocklayouts = IntegerField()
|
||||
color = CharField()
|
||||
dateformat = CharField()
|
||||
displayname = CharField()
|
||||
email = CharField()
|
||||
fontsize = IntegerField()
|
||||
forbiddens = CharField()
|
||||
globalblock = IntegerField()
|
||||
hascolor = IntegerField()
|
||||
homepagename = CharField()
|
||||
homepageurl = CharField()
|
||||
karma = IntegerField()
|
||||
lastactivity = IntegerField()
|
||||
lastforum = IntegerField()
|
||||
lastip = CharField()
|
||||
lastknownbrowser = TextField(null=True)
|
||||
lastposttime = IntegerField()
|
||||
lasturl = CharField()
|
||||
location = CharField()
|
||||
loggedin = IntegerField()
|
||||
lostkey = CharField()
|
||||
lostkeytimer = IntegerField()
|
||||
minipic = CharField()
|
||||
name = CharField()
|
||||
newcomments = IntegerField()
|
||||
password = CharField()
|
||||
picture = CharField()
|
||||
pluginsettings = TextField(null=True)
|
||||
postheader = TextField(null=True)
|
||||
postplusones = IntegerField()
|
||||
postplusonesgiven = IntegerField()
|
||||
posts = IntegerField()
|
||||
postsperpage = IntegerField()
|
||||
powerlevel = IntegerField()
|
||||
pss = CharField()
|
||||
rankset = CharField()
|
||||
realname = CharField()
|
||||
regdate = IntegerField()
|
||||
sex = IntegerField()
|
||||
showemail = IntegerField()
|
||||
signature = TextField(null=True)
|
||||
signsep = IntegerField()
|
||||
tempbanpl = IntegerField()
|
||||
tempbantime = BigIntegerField()
|
||||
theme = CharField()
|
||||
threadsperpage = IntegerField()
|
||||
timeformat = CharField()
|
||||
timezone = FloatField()
|
||||
title = CharField()
|
||||
usebanners = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'users'
|
||||
|
||||
class Uservotes(BaseModel):
|
||||
uid = IntegerField()
|
||||
up = IntegerField()
|
||||
voter = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'uservotes'
|
||||
|
||||
class WikiPages(BaseModel):
|
||||
flags = IntegerField()
|
||||
id = CharField()
|
||||
revision = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'wiki_pages'
|
||||
|
||||
class WikiPagesText(BaseModel):
|
||||
date = IntegerField()
|
||||
id = CharField()
|
||||
revision = IntegerField()
|
||||
text = TextField(null=True)
|
||||
user = IntegerField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'wiki_pages_text'
|
||||
@@ -0,0 +1,23 @@
|
||||
from flask_wtf import Form
|
||||
from wtforms import TextField, BooleanField, TextAreaField, PasswordField, SelectField, IntegerField, DateTimeField, validators
|
||||
from datetime import datetime
|
||||
|
||||
class SettingsForm(Form):
|
||||
public = BooleanField('public', default=True)
|
||||
logo = BooleanField('biglogo', default=True)
|
||||
twitch = TextField('twitch')
|
||||
bio_text = TextAreaField('bio_text')
|
||||
|
||||
class EnableStatsForm(Form):
|
||||
teamspeak_id = TextField('teamspeak_id')
|
||||
forum_username = TextField('forum_username')
|
||||
forum_password = PasswordField('forum_password')
|
||||
|
||||
class EventForm(Form):
|
||||
name = TextField('name', [validators.Required()])
|
||||
desc = TextAreaField('desc', [validators.Required()])
|
||||
type = SelectField(u'Event Type', choices=[('coaching', 'Coaching'), ('inhouse', 'In-House'), ('tournament', 'Tournament'), ('other', 'Other')])
|
||||
start_time = DateTimeField('start_time', format='%d.%m.%Y %H:%M')
|
||||
end_time = DateTimeField('end_time', format='%d.%m.%Y %H:%M')
|
||||
points = IntegerField('points', [validators.Required()])
|
||||
reward_threshold = IntegerField('reward_threshold')
|
||||
@@ -0,0 +1,299 @@
|
||||
import simplejson as json
|
||||
from datetime import datetime
|
||||
from random import choice
|
||||
from flask.ext.sqlalchemy import SQLAlchemy
|
||||
from sqlalchemy.ext.mutable import Mutable
|
||||
|
||||
import board
|
||||
from app import db, app
|
||||
from utils import parse_valve_heropedia, complete_hero_data
|
||||
|
||||
# Model independant get_or_create
|
||||
def get_or_create_instance(session, model, **kwargs):
|
||||
instance = session.query(model).filter_by(**kwargs).first()
|
||||
if instance:
|
||||
return instance
|
||||
else:
|
||||
instance = model(**kwargs)
|
||||
session.add(instance)
|
||||
return instance
|
||||
|
||||
# Get a little of that Mongoness back
|
||||
class Json(db.TypeDecorator):
|
||||
impl = db.Text
|
||||
|
||||
def process_bind_param(self, value, dialect):
|
||||
if value is not None:
|
||||
value = json.dumps(value)
|
||||
return value
|
||||
|
||||
def process_result_value(self, value, dialect):
|
||||
if value is not None:
|
||||
value = json.loads(value)
|
||||
return value
|
||||
|
||||
# Mongoness factor - phase 2
|
||||
class MutableDict(Mutable, dict):
|
||||
@classmethod
|
||||
def coerce(cls, key, value):
|
||||
if not isinstance(value, MutableDict):
|
||||
if isinstance(value, dict):
|
||||
return MutableDict(value)
|
||||
return Mutable.coerce(key,value)
|
||||
else:
|
||||
return value
|
||||
|
||||
def __delitem__(self, key):
|
||||
dict.__delitem__(self, key)
|
||||
self.changed()
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
dict.__setitem__(self, key, value)
|
||||
self.changed()
|
||||
|
||||
def __getstate__(self):
|
||||
return dict(self)
|
||||
|
||||
def __setstate__(self, state):
|
||||
self.update(self)
|
||||
|
||||
|
||||
class User(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
steam_id = db.Column(db.String(40), unique=True)
|
||||
forum_id = db.Column(db.Integer)
|
||||
teamspeak_id = db.Column(db.String(200), unique=True)
|
||||
|
||||
nickname = db.Column(db.String(80))
|
||||
avatar = db.Column(db.String(255))
|
||||
admin = db.Column(db.Boolean)
|
||||
|
||||
bio_text = db.Column(db.String(4096))
|
||||
created = db.Column(db.DateTime)
|
||||
last_seen = db.Column(db.DateTime)
|
||||
twitch = db.Column(db.String(60))
|
||||
random_heroes = db.Column(MutableDict.as_mutable(Json))
|
||||
|
||||
public = db.Column(db.Boolean)
|
||||
logo = db.Column(db.Boolean)
|
||||
|
||||
points_from_events = db.Column(db.Integer)
|
||||
points_from_ts3 = db.Column(db.Integer)
|
||||
points_from_forum = db.Column(db.Integer)
|
||||
ts3_starttime = db.Column(db.DateTime)
|
||||
ts3_endtime = db.Column(db.DateTime)
|
||||
ts3_rewardtime = db.Column(db.DateTime)
|
||||
ts3_connections = db.Column(MutableDict.as_mutable(Json))
|
||||
last_post_reward = db.Column(db.Integer)
|
||||
|
||||
|
||||
@classmethod
|
||||
def get_or_create(self, steam_id):
|
||||
return get_or_create_instance(db.session, User, steam_id=steam_id)
|
||||
|
||||
def __init__(self, steam_id):
|
||||
self.steam_id = steam_id
|
||||
self.random_heroes = {'current':None, 'completed':[]}
|
||||
self.created = datetime.utcnow()
|
||||
self.last_seen = datetime.utcnow()
|
||||
self.bio_text = None
|
||||
self.points_from_events = 0
|
||||
self.points_from_ts3 = 0
|
||||
self.points_from_forum = 0
|
||||
self.admin = False
|
||||
self.public = True
|
||||
self.biglogo = True
|
||||
|
||||
@property
|
||||
def random_hero(self):
|
||||
if not self.random_heroes['current']:
|
||||
heroes = []
|
||||
for (tavern_name, tavern) in parse_valve_heropedia():
|
||||
heroes.extend([complete_hero_data('name', entry['name']) for entry in tavern])
|
||||
if heroes:
|
||||
self.random_heroes['current'] = choice(heroes)
|
||||
self.random_heroes = self.random_heroes
|
||||
db.session.commit()
|
||||
return self.random_heroes['current']
|
||||
|
||||
@random_hero.setter
|
||||
def random_hero(self, herodata):
|
||||
self.random_heroes['current'] = herodata
|
||||
self.random_heroes = self.random_heroes
|
||||
db.session.commit()
|
||||
|
||||
@property
|
||||
def random_completed(self):
|
||||
return self.random_heroes['completed']
|
||||
|
||||
def random_success(self):
|
||||
self.random_heroes['completed'].append(self.random_heroes['current']['name'])
|
||||
self.random_heroes['current'] = None
|
||||
self.random_heroes = self.random_heroes
|
||||
db.session.commit()
|
||||
return self.random_hero
|
||||
|
||||
def random_skip(self):
|
||||
self.random_heroes['current'] = None
|
||||
self.random_heroes = self.random_heroes
|
||||
db.session.commit()
|
||||
return self.random_hero
|
||||
|
||||
def update_connection(self, reward_threshold=30):
|
||||
now = datetime.utcnow()
|
||||
self.ts3_starttime = self.ts3_starttime or now
|
||||
self.ts3_endtime = now
|
||||
# Add general TS3 points here
|
||||
if self.ts3_endtime and self.ts3_rewardtime:
|
||||
duration = (self.ts3_endtime - self.ts3_rewardtime) / 60.0
|
||||
if duration > reward_threshold:
|
||||
self.ts3_rewardtime = datetime.utcnow()
|
||||
self.points_from_ts3 += 1
|
||||
else:
|
||||
self.ts3_rewardtime = datetime.utcnow()
|
||||
self.last_seen = datetime.utcnow()
|
||||
print self.ts3_starttime, self.ts3_endtime, self.ts3_rewardtime
|
||||
db.session.commit();
|
||||
|
||||
def finalize_connection(self):
|
||||
self.ts3_connections.append({'starttime': self.ts3_starttime, 'endtime': self.ts3_endtime})
|
||||
self.ts3_startime = None
|
||||
self.ts3_endtime = None
|
||||
db.session.commit();
|
||||
|
||||
def update_forum_posts(self, reward_threshold=5):
|
||||
if self.forum_id:
|
||||
posts = board.Users.select().where(board.Users.id == int(self.forum_id))[0].posts
|
||||
if self.last_post_reward:
|
||||
num_points = (posts - self.last_post_reward) / reward_threshold
|
||||
if num_points > 0:
|
||||
self.points_from_forum += num_points
|
||||
self.last_post_reward += num_points * reward_threshold
|
||||
else:
|
||||
# Initialize if this is the first reward
|
||||
self.last_post_reward = posts
|
||||
db.session.commit()
|
||||
|
||||
@property
|
||||
def is_active(self):
|
||||
return self.ts3_starttime and True or False
|
||||
|
||||
def __repr__(self):
|
||||
return '<User {}>'.format(self.id)
|
||||
|
||||
class TeamspeakData(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
time = db.Column(db.DateTime())
|
||||
clients = db.Column(Json())
|
||||
|
||||
def __init__(self, clientlist):
|
||||
self.time = datetime.utcnow()
|
||||
self.clients = clientlist
|
||||
|
||||
class Event(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
name = db.Column(db.String(200))
|
||||
desc = db.Column(db.String(4096))
|
||||
type = db.Column(db.String(20))
|
||||
|
||||
start_time = db.Column(db.DateTime)
|
||||
end_time = db.Column(db.DateTime)
|
||||
points = db.Column(db.Integer)
|
||||
reward_threshold = db.Column(db.Integer)
|
||||
|
||||
total_subchans = db.Column(db.Integer)
|
||||
channels = db.Column(MutableDict.as_mutable(Json))
|
||||
participants = db.Column(MutableDict.as_mutable(Json))
|
||||
|
||||
def __init__(self, id):
|
||||
self.channels = {'event_cid':None, 'cids':[]}
|
||||
|
||||
@classmethod
|
||||
def get_or_create(self, event_id):
|
||||
return get_or_create_instance(db.session, Event, id=event_id)
|
||||
|
||||
@property
|
||||
def cids(self):
|
||||
return self.channels['cids']
|
||||
|
||||
@property
|
||||
def event_cid(self):
|
||||
return self.channels['event_cid']
|
||||
|
||||
@property
|
||||
def channel_ids(self):
|
||||
cids = self.channels['cids']
|
||||
if self.channels['event_cid']:
|
||||
cids.append(self.channels['event_cid'])
|
||||
return cids
|
||||
|
||||
def create_channels(self):
|
||||
import ts3
|
||||
server = ts3.TS3Server(app.config['TS3_HOST'], app.config['TS3_PORT'])
|
||||
server.login(app.config['TS3_USERNAME'], app.config['TS3_PASSWORD'])
|
||||
server.use(1)
|
||||
# Create the parent channel
|
||||
if not self.event_cid:
|
||||
# Find the LFG channel and place this one after
|
||||
response = server.send_command('channelfind', keys={'pattern': 'Looking for Group'})
|
||||
if response.is_successful:
|
||||
cid = response.data[0]['cid']
|
||||
response = server.send_command('channelcreate', keys={'channel_name':self.name.encode('utf-8'), 'channel_flag_semi_permanent':'1', 'channel_order':cid})
|
||||
if response.is_successful:
|
||||
self.channels['event_cid'] = response.data[0]['cid']
|
||||
# Create the subchannels
|
||||
if not self.cids:
|
||||
cids = []
|
||||
keys = {'channel_name':'Event Room #{}'.format(len(self.cids) + 1), 'channel_flag_semi_permanent':'1', 'cpid':self.event_cid.encode('utf-8')}
|
||||
response = server.send_command('channelcreate', keys=keys)
|
||||
if response.is_successful:
|
||||
parent_cid = response.data[0]['cid']
|
||||
cids.append(parent_cid)
|
||||
else:
|
||||
raise UserWarning("channelcreate failed")
|
||||
response = server.send_command('channelcreate', keys={'channel_name':'Radiant Team', 'channel_flag_semi_permanent':'1', 'cpid':parent_cid})
|
||||
if response.is_successful:
|
||||
cids.append(response.data[0]['cid'])
|
||||
response = server.send_command('channelcreate', keys={'channel_name':'Dire Team', 'channel_flag_semi_permanent':'1', 'cpid':parent_cid})
|
||||
if response.is_successful:
|
||||
cids.append(response.data[0]['cid'])
|
||||
response = server.send_command('channelcreate', keys={'channel_name':'Spectators', 'channel_flag_semi_permanent':'1', 'cpid':parent_cid})
|
||||
if response.is_successful:
|
||||
cids.append(response.data[0]['cid'])
|
||||
self.channels['cids'] = cids
|
||||
db.session.commit()
|
||||
|
||||
def remove_channels(self):
|
||||
import ts3
|
||||
server = ts3.TS3Server(app.config['TS3_HOST'], app.config['TS3_PORT'])
|
||||
server.login(app.config['TS3_USERNAME'], app.config['TS3_PASSWORD'])
|
||||
server.use(1)
|
||||
response = server.send_command('channeldelete', keys={'cid':self.event_cid.encode('utf-8'), 'force':'1'})
|
||||
if response.is_successful:
|
||||
self.channels = {'event_cid': None, 'cids':[]}
|
||||
db.session.commit()
|
||||
|
||||
@property
|
||||
def active(self):
|
||||
current_time = datetime.utcnow()
|
||||
return self.start_time < current_time and current_time < self.end_time
|
||||
|
||||
@property
|
||||
def expired(self):
|
||||
current_time = datetime.utcnow()
|
||||
return self.end_time < curent_time
|
||||
|
||||
def add_participant(self, user):
|
||||
entry = self.participants.setdefault(user, {'start_time': datetime.utcnow() })
|
||||
entry['end_time'] = datetime.utcnow()
|
||||
if 'points' not in entry and (entry['end_time'] - entry['start_time']) > self.reward_threshold:
|
||||
user.points_from_events += self.points
|
||||
entry['points'] = self.points
|
||||
db.session.commit()
|
||||
|
||||
@property
|
||||
def participants(self):
|
||||
return tuple(self.participants)
|
||||
|
||||
def __repr__(self):
|
||||
return '<Event {}>'.format(self.id)
|
||||
@@ -0,0 +1,100 @@
|
||||
body {
|
||||
/*background:url("../img/back_pattern.png") repeat fixed 0 0 transparent;*/
|
||||
}
|
||||
#container {
|
||||
width: 80%;
|
||||
margin: 1em auto 6em;
|
||||
}
|
||||
#biglogo {
|
||||
width:65%;
|
||||
max-width:650px;
|
||||
min-width:250px;
|
||||
}
|
||||
.uk-navbar-brand > img, .uk-navbar-flip > img {
|
||||
height:35px;
|
||||
}
|
||||
|
||||
footer {
|
||||
width:60%;
|
||||
text-align:center;
|
||||
border-top: 1px solid #999;
|
||||
padding:8px 30px;
|
||||
}
|
||||
|
||||
#ocnav-header {
|
||||
padding-left:22%;
|
||||
color: white;
|
||||
}
|
||||
.uk-nav-side > li.uk-active > a {
|
||||
background-color: #6FAC34;
|
||||
}
|
||||
|
||||
.dn-news-article > .uk-article-title {
|
||||
font-size:26px;
|
||||
}
|
||||
.dn-news-article > .uk-article-title:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
#about-us-more, #less {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.team_logo {
|
||||
border-radius:6px;
|
||||
margin-right: 1em;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.25);
|
||||
}
|
||||
|
||||
.botpad {
|
||||
padding-bottom:80px;
|
||||
}
|
||||
|
||||
#tsviewer > .uk-modal-dialog {
|
||||
max-height: 80%;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.ts_num {
|
||||
color: #D9A859;
|
||||
}
|
||||
.dn-streamer, .dn-streamer-offline {
|
||||
display: inline-block;
|
||||
width: 105px;
|
||||
padding: 2px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
#streams p.uk-text-bold {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.dn-streamer-offline > img {
|
||||
height:50px;
|
||||
}
|
||||
|
||||
.dn-streamer-hover {
|
||||
background:#CACACA;
|
||||
}
|
||||
|
||||
.dn-hero-icon {
|
||||
background:#000;
|
||||
padding:4px;
|
||||
margin:2px;
|
||||
}
|
||||
|
||||
#streams {
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
#events_small > dl.uk-description-list-line > dt, #events_large > dl.uk-description-list-line > dt {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
#events_small .uk-badge, #events_large .uk-badge {
|
||||
float:right;
|
||||
}
|
||||
|
||||
#profile_links > a {
|
||||
font-size:14px;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
.uk-panel.tavern {
|
||||
border-left: 2px solid #CCCCCC;
|
||||
display: inline-block;
|
||||
padding: 2px;
|
||||
}
|
||||
.uk-panel.tavern > img {
|
||||
padding:4px;
|
||||
margin:2px;
|
||||
}
|
||||
#tavernStrength, #tavernAgility, #tavernIntelligence {
|
||||
display:block;
|
||||
background-image:url('http://media.steampowered.com/apps/dota2/images/heropedia/overviewicon_str.png');
|
||||
background-repeat:no-repeat;
|
||||
overflow:visible;
|
||||
text-transform:uppercase;
|
||||
color: black;
|
||||
padding:6px 10px 15px 40px;
|
||||
}
|
||||
#tavernAgility{
|
||||
background-image:url('http://media.steampowered.com/apps/dota2/images/heropedia/overviewicon_agi.png');
|
||||
}
|
||||
#tavernIntelligence{
|
||||
background-image:url('http://media.steampowered.com/apps/dota2/images/heropedia/overviewicon_int.png');
|
||||
}
|
||||
|
||||
.heroIcons {
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.heroCol {
|
||||
float:left;
|
||||
width:277px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.filterMatchedHero {
|
||||
background-color:#000;
|
||||
}
|
||||
.filterUnmatchedHero {
|
||||
filter:alpha(opacity=25);
|
||||
-moz-opacity: .25;
|
||||
opacity: .25;
|
||||
background-color:#000000;
|
||||
cursor:default;
|
||||
}
|
||||
@@ -0,0 +1,269 @@
|
||||
/**
|
||||
* This file is part of devMX TS3 Webviewer Lite.
|
||||
* Copyright (C) 2012 Maximilian Narr
|
||||
*
|
||||
* devMX Webviewer Lite is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* TeamSpeak3 Webviewer is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with devMX TS3 Webviewer Lite. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
.devmx-webviewer
|
||||
{
|
||||
font-family: sans-serif;
|
||||
font-size: 14px;
|
||||
white-space: normal;
|
||||
width: 100%;
|
||||
line-height: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tswv-link
|
||||
{
|
||||
cursor: pointer;
|
||||
text-decoration: inherit;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
/* Servername */
|
||||
.tswv-servername
|
||||
{
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
|
||||
/* General */
|
||||
|
||||
.tswv-channel,
|
||||
.tswv-client
|
||||
{
|
||||
margin-left: 16px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.tswv-label
|
||||
{
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
|
||||
/* General image */
|
||||
.tswv-image
|
||||
{
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
/* Left aligned image */
|
||||
.tswv-image-left
|
||||
{
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* Right aligned image */
|
||||
.tswv-image-right
|
||||
{
|
||||
float: right;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
|
||||
/* Channels */
|
||||
/* normal channel */
|
||||
.tswv-channel-normal
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/channel-normal.png");
|
||||
}
|
||||
|
||||
/* Full channel */
|
||||
.tswv-channel-full
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/channel-full.png");
|
||||
}
|
||||
|
||||
/* Channel with password (channel Icon) */
|
||||
.tswv-channel-password
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/channel-password.png");
|
||||
}
|
||||
|
||||
/* Channel with password (Lock icon) */
|
||||
.tswv-channel-password-right
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/channel-password-right.png");
|
||||
}
|
||||
|
||||
/* Default channel */
|
||||
.tswv-channel-home
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/channel-home.png");
|
||||
}
|
||||
|
||||
/* Moderated channel */
|
||||
.tswv-channel-moderated
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/channel-moderated.png");
|
||||
}
|
||||
|
||||
/* Channel with 48khz codec */
|
||||
.tswv-channel-48khz
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/channel-48khz.png");
|
||||
}
|
||||
|
||||
|
||||
/* Server image */
|
||||
.tswv-server-image
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/server.png");
|
||||
}
|
||||
|
||||
|
||||
/* Clients */
|
||||
/* normal client */
|
||||
.tswv-client-normal
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/client-normal.png");
|
||||
}
|
||||
|
||||
/* talking client */
|
||||
.tswv-client-talking
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/client-talking.png");
|
||||
}
|
||||
|
||||
/* channelcommander */
|
||||
.tswv-client-channel-commander
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/client-channel-commander.png");
|
||||
}
|
||||
|
||||
/* talking channelcommander */
|
||||
.tswv-client-channel-commander-talking
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/client-channel-commander-talking.png");
|
||||
}
|
||||
|
||||
/* mic muted client */
|
||||
.tswv-client-input-muted
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/input-muted.png");
|
||||
}
|
||||
|
||||
/* speaker muted client */
|
||||
.tswv-client-output-muted
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/output-muted.png");
|
||||
}
|
||||
|
||||
/* hardware mic muted client */
|
||||
.tswv-client-input-muted-hardware
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/hardware-input-muted.png");
|
||||
}
|
||||
|
||||
/* hardware speaker muted client */
|
||||
.tswv-client-output-muted-hardware
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/hardware-output-muted.png");
|
||||
}
|
||||
|
||||
/* away client */
|
||||
.tswv-client-away
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/client-away.png");
|
||||
}
|
||||
|
||||
/* Client with priority speaker */
|
||||
.tswv-client-priority-speaker
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/client-priority-speaker.png");
|
||||
}
|
||||
|
||||
/* Client with granted talkpower */
|
||||
.tswv-client-talkpower-granted
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/client-talkpower-granted.png");
|
||||
}
|
||||
|
||||
/* Query Clients */
|
||||
.tswv-client-query
|
||||
{
|
||||
background-image: url("../img/ts3_viewer/client-query.png");
|
||||
}
|
||||
|
||||
|
||||
/* Spacer */
|
||||
/* General */
|
||||
.tswv-spacer
|
||||
{
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* right spacer */
|
||||
.tswv-spacer-right
|
||||
{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* left spacer */
|
||||
.tswv-spacer-left
|
||||
{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* center spacer */
|
||||
.tswv-spacer-center
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ___ */
|
||||
.tswv-spacer-line
|
||||
{
|
||||
background: url(../img/ts3_viewer/linie.png) repeat-x;
|
||||
}
|
||||
|
||||
/* --- */
|
||||
.tswv-spacer-dash
|
||||
{
|
||||
background: url(../img/ts3_viewer/bs.png) repeat-x;
|
||||
}
|
||||
|
||||
/* -.- */
|
||||
.tswv-spacer-line-point
|
||||
{
|
||||
background: url(../img/ts3_viewer/bspunkt.png) repeat-x;
|
||||
}
|
||||
|
||||
/* -.. */
|
||||
.tswv-spacer-line-double-point
|
||||
{
|
||||
background: url(../img/ts3_viewer/bsdpunkt.png) repeat-x;
|
||||
}
|
||||
|
||||
/* ... */
|
||||
.tswv-spacer-point
|
||||
{
|
||||
background: url(../img/ts3_viewer/punkt.png) repeat-x;
|
||||
}
|
||||
|
||||
/* repeat spacer */
|
||||
.tswv-spacer-overflow
|
||||
{
|
||||
width: inherit;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/*! UIkit 1.0.1 | http://www.getuikit.com | (c) 2013 YOOtheme | MIT License */
|
||||
|
||||
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:Consolas,monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:0;margin:0;padding:0}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}input[type="radio"],input[type="checkbox"]{cursor:pointer}button:disabled,input:disabled{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0}input[type="search"]{-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}::-moz-placeholder{opacity:1}table{border-collapse:collapse;border-spacing:0}html{font-size:14px}body{background:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:normal;line-height:20px;color:#444}@media(max-width:767px){body{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto}}a{text-decoration:none}a:hover{text-decoration:underline}a{color:#07d}a:hover{color:#059}em{color:#d05}ins{background:#ffa;color:#444;text-decoration:none}mark{background:#ffa;color:#444}::-moz-selection{background:#39f;color:#fff;text-shadow:none}::selection{background:#39f;color:#fff;text-shadow:none}abbr[title],dfn[title]{cursor:help}dfn[title]{border-bottom:1px dotted;font-style:normal}img{-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;height:auto;vertical-align:middle}.uk-img-preserve,.uk-img-preserve img,img[src*="maps.gstatic.com"],img[src*="googleapis.com"]{max-width:none}p,hr,ul,ol,dl,blockquote,pre,address,fieldset,figure{margin:0 0 15px 0}*+p,*+hr,*+ul,*+ol,*+dl,*+blockquote,*+pre,*+address,*+fieldset,*+figure{margin-top:15px}h1,h2,h3,h4,h5,h6{margin:0 0 15px 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:normal;color:#444;text-transform:none}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:25px}h1,.uk-h1{font-size:36px;line-height:42px}h2,.uk-h2{font-size:24px;line-height:30px}h3,.uk-h3{font-size:18px;line-height:24px}h4,.uk-h4{font-size:16px;line-height:22px}h5,.uk-h5{font-size:14px;line-height:20px}h6,.uk-h6{font-size:12px;line-height:18px}ul,ol{padding-left:30px}ul>li>ul,ul>li>ol,ol>li>ol,ol>li>ul{margin:0}dt{font-weight:bold}dd{margin-left:0}hr{display:block;padding:0;border:0;border-top:1px solid #ddd}address{font-style:normal}q,blockquote{font-style:italic}blockquote{padding-left:15px;border-left:5px solid #ddd;font-size:16px;line-height:22px}blockquote small{display:block;color:#999;font-style:normal}blockquote p:last-of-type{margin-bottom:5px}code{color:#d05;font-size:12px;white-space:nowrap;padding:0 4px;border:1px solid #ddd;border-radius:3px;background:#fafafa}pre code{color:inherit;white-space:pre-wrap;padding:0;border:0;background:transparent}pre{padding:10px;background:#fafafa;color:#444;font-size:12px;line-height:18px;-moz-tab-size:4;tab-size:4;border:1px solid #ddd;border-radius:3px}button,input:not([type="radio"]):not([type="checkbox"]),select{vertical-align:middle}iframe{border:0}@-ms-viewport{width:device-width}.uk-grid:before,.uk-grid:after{content:" ";display:table}.uk-grid:after{clear:both}.uk-grid{margin:0 0 0 -25px;padding:0;list-style:none}.uk-grid+.uk-grid{margin-top:25px}.uk-grid>[class*='uk-width-']{margin:0;padding-left:25px;float:left}.uk-grid>[class*='uk-width-']>:last-child{margin-bottom:0}.uk-grid>.uk-grid-margin{margin-top:25px}.uk-grid-divider:not(:empty){margin-left:-25px;margin-right:-25px}.uk-grid-divider:not(:empty)>[class*='uk-width-']{padding-left:25px;padding-right:25px}.uk-grid-divider:not(:empty)>[class*='uk-width-1-']:not(.uk-width-1-1):nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-2-']:nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-3-']:nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-4-']:nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-5-']:nth-child(n+2),.uk-grid-divider:not(:empty)>[claLine truncated
|
||||
@@ -0,0 +1,3 @@
|
||||
/*! UIkit 1.0.1 | http://www.getuikit.com | (c) 2013 YOOtheme | MIT License */
|
||||
|
||||
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:Consolas,monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:0;margin:0;padding:0}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}input[type="radio"],input[type="checkbox"]{cursor:pointer}button:disabled,input:disabled{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0}input[type="search"]{-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}::-moz-placeholder{opacity:1}table{border-collapse:collapse;border-spacing:0}html{font-size:14px}body{background:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:normal;line-height:20px;color:#444;background-image:-webkit-radial-gradient(100% 100%,center,#fff,#fff);background-image:radial-gradient(100% 100% at center,#fff,#fff)}@media(max-width:767px){body{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto}}a{text-decoration:none}a:hover{text-decoration:underline}a{color:#07d}a:hover{color:#059}em{color:#d05}ins{background:#ffa;color:#444;text-decoration:none}mark{background:#ffa;color:#444}::-moz-selection{background:#39f;color:#fff;text-shadow:none}::selection{background:#39f;color:#fff;text-shadow:none}abbr[title],dfn[title]{cursor:help}dfn[title]{border-bottom:1px dotted;font-style:normal}img{-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;height:auto;vertical-align:middle}.uk-img-preserve,.uk-img-preserve img,img[src*="maps.gstatic.com"],img[src*="googleapis.com"]{max-width:none}p,hr,ul,ol,dl,blockquote,pre,address,fieldset,figure{margin:0 0 15px 0}*+p,*+hr,*+ul,*+ol,*+dl,*+blockquote,*+pre,*+address,*+fieldset,*+figure{margin-top:15px}h1,h2,h3,h4,h5,h6{margin:0 0 15px 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:normal;color:#444;text-transform:none}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:25px}h1,.uk-h1{font-size:36px;line-height:42px}h2,.uk-h2{font-size:24px;line-height:30px}h3,.uk-h3{font-size:18px;line-height:24px}h4,.uk-h4{font-size:16px;line-height:22px}h5,.uk-h5{font-size:14px;line-height:20px}h6,.uk-h6{font-size:12px;line-height:18px}ul,ol{padding-left:30px}ul>li>ul,ul>li>ol,ol>li>ol,ol>li>ul{margin:0}dt{font-weight:bold}dd{margin-left:0}hr{display:block;padding:0;border:0;border-top:1px solid #ddd}address{font-style:normal}q,blockquote{font-style:italic}blockquote{padding-left:15px;border-left:5px solid #ddd;font-size:16px;line-height:22px}blockquote small{display:block;color:#999;font-style:normal}blockquote p:last-of-type{margin-bottom:5px}code{color:#d05;font-size:12px;white-space:nowrap;padding:0 4px;border:1px solid #ddd;border-radius:3px;background:#fafafa}pre code{color:inherit;white-space:pre-wrap;padding:0;border:0;background:transparent}pre{padding:10px;background:#fafafa;color:#444;font-size:12px;line-height:18px;-moz-tab-size:4;tab-size:4;border:1px solid #ddd;border-radius:3px}button,input:not([type="radio"]):not([type="checkbox"]),select{vertical-align:middle}iframe{border:0}@-ms-viewport{width:device-width}.uk-grid:before,.uk-grid:after{content:" ";display:table}.uk-grid:after{clear:both}.uk-grid{margin:0 0 0 -25px;padding:0;list-style:none}.uk-grid+.uk-grid{margin-top:25px}.uk-grid>[class*='uk-width-']{margin:0;padding-left:25px;float:left}.uk-grid>[class*='uk-width-']>:last-child{margin-bottom:0}.uk-grid>.uk-grid-margin{margin-top:25px}.uk-grid-divider:not(:empty){margin-left:-25px;margin-right:-25px}.uk-grid-divider:not(:empty)>[class*='uk-width-']{padding-left:25px;padding-right:25px}.uk-grid-divider:not(:empty)>[class*='uk-width-1-']:not(.uk-width-1-1):nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-2-']:nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-3-']:nth-child(n+2),.uk-grid-divider:not(:empty)>[clasLine truncated
|
||||
@@ -0,0 +1,3 @@
|
||||
/*! UIkit 1.0.1 | http://www.getuikit.com | (c) 2013 YOOtheme | MIT License */
|
||||
|
||||
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:Consolas,monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:0;margin:0;padding:0}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}input[type="radio"],input[type="checkbox"]{cursor:pointer}button:disabled,input:disabled{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0}input[type="search"]{-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}::-moz-placeholder{opacity:1}table{border-collapse:collapse;border-spacing:0}html{font-size:14px}body{background:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:normal;line-height:20px;color:#444}@media(max-width:767px){body{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto}}a{text-decoration:none}a:hover{text-decoration:underline}a{color:#07d}a:hover{color:#059}em{color:#d05}ins{background:#ffa;color:#444;text-decoration:none}mark{background:#ffa;color:#444}::-moz-selection{background:#39f;color:#fff;text-shadow:none}::selection{background:#39f;color:#fff;text-shadow:none}abbr[title],dfn[title]{cursor:help}dfn[title]{border-bottom:1px dotted;font-style:normal}img{-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;height:auto;vertical-align:middle}.uk-img-preserve,.uk-img-preserve img,img[src*="maps.gstatic.com"],img[src*="googleapis.com"]{max-width:none}p,hr,ul,ol,dl,blockquote,pre,address,fieldset,figure{margin:0 0 15px 0}*+p,*+hr,*+ul,*+ol,*+dl,*+blockquote,*+pre,*+address,*+fieldset,*+figure{margin-top:15px}h1,h2,h3,h4,h5,h6{margin:0 0 15px 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:normal;color:#444;text-transform:none}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:25px}h1,.uk-h1{font-size:36px;line-height:42px}h2,.uk-h2{font-size:24px;line-height:30px}h3,.uk-h3{font-size:18px;line-height:24px}h4,.uk-h4{font-size:16px;line-height:22px}h5,.uk-h5{font-size:14px;line-height:20px}h6,.uk-h6{font-size:12px;line-height:18px}ul,ol{padding-left:30px}ul>li>ul,ul>li>ol,ol>li>ol,ol>li>ul{margin:0}dt{font-weight:bold}dd{margin-left:0}hr{display:block;padding:0;border:0;border-top:1px solid #ddd}address{font-style:normal}q,blockquote{font-style:italic}blockquote{padding-left:15px;border-left:5px solid #ddd;font-size:16px;line-height:22px}blockquote small{display:block;color:#999;font-style:normal}blockquote p:last-of-type{margin-bottom:5px}code{color:#d05;font-size:12px;white-space:nowrap}pre code{color:inherit;white-space:pre-wrap}pre{padding:10px;background:#f5f5f5;color:#444;font-size:12px;line-height:18px;-moz-tab-size:4;tab-size:4}button,input:not([type="radio"]):not([type="checkbox"]),select{vertical-align:middle}iframe{border:0}@-ms-viewport{width:device-width}.uk-grid:before,.uk-grid:after{content:" ";display:table}.uk-grid:after{clear:both}.uk-grid{margin:0 0 0 -25px;padding:0;list-style:none}.uk-grid+.uk-grid{margin-top:25px}.uk-grid>[class*='uk-width-']{margin:0;padding-left:25px;float:left}.uk-grid>[class*='uk-width-']>:last-child{margin-bottom:0}.uk-grid>.uk-grid-margin{margin-top:25px}.uk-grid-divider:not(:empty){margin-left:-25px;margin-right:-25px}.uk-grid-divider:not(:empty)>[class*='uk-width-']{padding-left:25px;padding-right:25px}.uk-grid-divider:not(:empty)>[class*='uk-width-1-']:not(.uk-width-1-1):nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-2-']:nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-3-']:nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-4-']:nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-5-']:nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-6-']:nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-7-']:nth-child(n+2),.uk-grid-divider:not(:empty)>[class*='uk-width-8-']:ntLine truncated
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 424 B |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |