Final commit for hierarchy change
This commit is contained in:
1 parent
4de458981f
commit
75a6844b9b
604 files changed
+28824
-1
No files matched your search
@@ -0,0 +1,9 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %} Access Denied {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
Only registered users can access this area.
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,65 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}Dota Noobs - Community{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<img id="biglogo" src="{{ url_for('static', filename='img/biglogo.png') }}">
|
||||
|
||||
<div class="panel" style="margin-left: 5em; margin-right: 5em">
|
||||
<h2>Welcome to the Doobs Community!</h2>
|
||||
<div class='panel'>
|
||||
<p class="left">
|
||||
This part of our site is dedicated to our members. If you're interested in contributing to the page, let one of the admins know!
|
||||
</p>
|
||||
<p class="left">
|
||||
On this page you'll find content created by the members of the Doobs community. There's a link to some custom items builds people have put together (cough...Gambit...cough), an archive of past Doobs inhouses as well as some games that members have cast/analyzed, as well as a blog that focuses on anything and everything DotA, pub or pro, you'll find something about it on the blog.
|
||||
</p>
|
||||
<p class="left">
|
||||
All in all, this is a page for our members, if you want something that you don't see, let us know and we'll take care of it!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel clickable" style="margin-right: 5em; margin-left: 5em;" data-href="http://www.youtube.com/user/DotaNoobsVods?feature=watch">
|
||||
<h2>Video Archive</h2>
|
||||
<ul id="videos">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel" style="margin-left: 5em; margin-right: 5em;">
|
||||
<h2>Latest Posts</h2>
|
||||
{% for post in latest_posts %}
|
||||
<div class="panel clickable" data-href="{{ post['url'] }}">
|
||||
<h3 style="float: left">{{ post['title'] }}</h3>
|
||||
<div class="date" style="float: right">{{ timestamp_to_js_date(post['date']) }}</div>
|
||||
<div style="clear: both; float: left">by {{ post['user'] }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Add the video archive
|
||||
var youtube_url = "http://gdata.youtube.com/feeds/users/DotaNoobsVods/uploads?alt=json-in-script&orderby=published&max-results=3&callback=?"
|
||||
$.getJSON(youtube_url, function(data) {
|
||||
for (var idx in data.feed.entry) {
|
||||
var entry = data.feed.entry[idx];
|
||||
console.log(entry);
|
||||
$('#videos').append("<div class='panel horizontal clickable' style='max-width: 25%; float: left; overflow: hidden;' id='video-" + idx + "' data-href='" + entry.link[0].href + "'>");
|
||||
var jquery_selector = '#video-' + idx;
|
||||
$(jquery_selector).append('<h3>' + entry.title['$t'] + '</h3>');
|
||||
$(jquery_selector).append('<img style="width: 90%;" src="' + entry['media$group']['media$thumbnail'][0].url + '">');
|
||||
setup_clickable(jquery_selector);
|
||||
$('#videos').append("</div>");
|
||||
}
|
||||
});
|
||||
// Localize the events
|
||||
$('.date').each( function( index ) {
|
||||
var d = new Date($(this).text());
|
||||
$(this).text( d.toLocaleDateString() + ' @ ' + d.toLocaleTimeString() );
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,77 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}Edit Event - DotaNoobs {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="uk-grid" data-uk-grid-margin>
|
||||
<div class="uk-width-1-1">
|
||||
{% if event.name == None %}
|
||||
<h2 class="uk-float-left"><i class="uk-icon-calendar uk-icon-large"></i> New Event</h2>
|
||||
{% else %}
|
||||
<h2 class="uk-float-left"><i class="uk-icon-calendar uk-icon-large"></i> {{ event.name }}</h2>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!--Main content area -->
|
||||
<div class="uk-width-large-2-3 uk-width-medium-1-1 uk-panel">
|
||||
<form class="uk-form uk-form-width-large" action="" method="post" name="settings">
|
||||
{{ form.hidden_tag() }}
|
||||
<fieldset data-uk-margin>
|
||||
<div class="uk-form-row">
|
||||
<label class="uk-form-label">Event Name: </label><br/>
|
||||
{{ form.name(placeholder="e.g. Tuesday Tango", class="uk-form-width-medium") }}
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<label class="uk-form-label">Type: </label>
|
||||
{{ form.type }}
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<label class="uk-form-label">Points: </labeb>
|
||||
{{ form.points(placeholder="e.g. 20") }}
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<label class="uk-form-label">Time To Earn: </label>
|
||||
{{ form.reward_threshold(placeholder="e.g. 30 (minutes)") }}
|
||||
</div>
|
||||
<br/>
|
||||
<div class="uk-form-row">
|
||||
<label class="uk-form-label">Starts</label><br/>
|
||||
<input id="start_d" placeholder="01.01.2015" data-uk-datepicker />
|
||||
<input id="start_t" placeholder="14:30" data-uk-timepicker />
|
||||
{{ form.start_time(class="datepicker uk-hidden") }}
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<label class="uk-form-label">Ends</label><br/>
|
||||
<input id="end_d" placeholder="01.01.2015" data-uk-datepicker />
|
||||
<input id="end_t" placeholder="09:30" data-uk-timepicker />
|
||||
{{ form.end_time(class="datepicker uk-hidden") }}
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<label class="uk-form-label">Description</label><br/>
|
||||
{{ form.desc(rows="10", class="uk-width-1-1", placeholder="A brief description of the event your planning; convince people to come!") }}
|
||||
</div>
|
||||
<div class="uk-form-controls uk-margin-top">
|
||||
<button class="uk-button uk-button-success" type="submit">Save</button>
|
||||
<a class="uk-button" href="{{ url_for('user_profile', userid=g.user.id) }}">Cancel</a>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block pagescripts %}
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/uikit/2.4.0/addons/datepicker/datepicker.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/uikit/2.4.0/addons/timepicker/timepicker.min.js"></script>
|
||||
<link rel=stylesheet href="//cdnjs.cloudflare.com/ajax/libs/uikit/2.4.0/addons/datepicker/datepicker.gradient.css"></link>
|
||||
<script>
|
||||
$(".uk-form").submit(function(event) {
|
||||
var s = moment($("#start_d").val() + ' ' + $("#start_t").val(), "DD.MM.YYYY HH:mm");
|
||||
var e = moment($("#end_d").val() + ' ' + $("#end_t").val(), "DD.MM.YYYY HH:mm");
|
||||
|
||||
$("#start_time").val(s.utc().format("DD.MM.YYYY HH:mm"));
|
||||
$("#end_time").val(e.utc().format("DD.MM.YYYY HH:mm"));
|
||||
|
||||
return true;
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,65 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}Account linking for {{ g.user.nickname }} - DotaNoobs {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="uk-grid" data-uk-grid-margin>
|
||||
<div class="uk-width-2-3">
|
||||
<h2 class="uk-float-left"><img class="" src="{{ g.user.avatar }}" /> {{ g.user.nickname }}'s Linked Accounts</h2>
|
||||
</div>
|
||||
<div class="uk-width-1-3 uk-text-center">
|
||||
<a href="{{ url_for('user_settings') }}" class="uk-button">Back to Settings <i class="uk-icon-star-o"></i></a>
|
||||
</div>
|
||||
<!--Main content area -->
|
||||
<div class="uk-width-1-1 uk-panel">
|
||||
<form class="uk-form uk-form-width-large" action="" method="post" name="enable_stats">
|
||||
{{ form.hidden_tag() }}
|
||||
<fieldset data-uk-margin>
|
||||
<div class="uk-form-row">
|
||||
<h3 class="">Link Teamspeak Account</h3>
|
||||
{% if g.user.teamspeak_id %} <span class="uk-text-success"><i class="uk-icon-check"></i> Already verified</span> {% endif %}
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<label class="uk-form-label">Teamspeak ID: <a href="#tsid_modal" data-uk-modal> <i class="uk-icon-question-circle" data-uk-tooltip title="Click for help"></i> </a></label> <br/>
|
||||
{{ form.teamspeak_id }}
|
||||
<div id="tsid_modal" class="uk-modal">
|
||||
<div class="uk-modal-dialog">
|
||||
<a class="uk-modal-close uk-close"></a>
|
||||
Enter your Teamspeak Unique Client ID into this field (note: this is NOT your Teamspeak name). You can access
|
||||
your TSID as follows:
|
||||
<br/>
|
||||
<ol class="">
|
||||
<li>Click on the "Settings" menu at the top of your Teamspeak client</li>
|
||||
<li>Select "Identities" from the drop-down menu.</li>
|
||||
<li>Copy your "Unique ID"</li>
|
||||
<li>Close this modal-window with the little X (upper right)</li>
|
||||
<li>Paste your "Unique ID" into the <em>Teamspeak ID</em> field</li>
|
||||
<br /><br />
|
||||
<img src="{{ url_for('static', filename='img/ts3-identities-menu.png') }}" />
|
||||
<br />
|
||||
<img src="{{ url_for('static', filename='img/ts3-identities-copy.png') }}" />
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<h3 class="">Link Forum Board Account</h3>
|
||||
{% if g.user.forum_id %} <span class="uk-text-success"><i class="uk-icon-check"></i> Already verified</span> {% endif %}
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<label class="uk-form-label">Forum Username:</label><br/>
|
||||
{{ form.forum_username }}
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<label class="uk-form-label">Forum Password:</label><br/>
|
||||
{{ form.forum_password }}
|
||||
</div>
|
||||
<div class="uk-form-controls uk-margin-top">
|
||||
<button class="uk-button uk-button-success" type="submit">Save</button>
|
||||
<a class="uk-button" href="{{ url_for('user_profile', userid=g.user.id) }}">Cancel</a>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,18 @@
|
||||
{% if active_events %}
|
||||
<h1 class="uk-panel-title">Active Events</h1>
|
||||
<dl class="uk-description-list uk-description-list-line">
|
||||
{% for event in active_events %}
|
||||
<dt><a href="{{ url_for('show_event', eventid=event.id) }}">{{ event.name }}</a> {{ event.type | event_badge | safe }}</dt>
|
||||
<dd> Ends at <span class="date">{{ event.start_time | js_datetime }}</span> </dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% endif %}
|
||||
{% if upcoming_events %}
|
||||
<h1 class="uk-panel-title">Upcoming Events</h1>
|
||||
<dl class="uk-description-list uk-description-list-line">
|
||||
{% for event in upcoming_events %}
|
||||
<dt><a href="{{ url_for('show_event', eventid=event.id) }}">{{ event.name }}</a> {{ event.type | event_badge | safe }}</dt>
|
||||
<dd> Starts at <span class="date">{{ event.start_time | js_datetime }}</span> </dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,83 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}Dota Noobs - Friends{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="uk-grid">
|
||||
<div class="uk-width-1-1 uk-text-center botpad">
|
||||
<h2 class="uk-container-center">The Legend Himself: Pyrion Flax</h2>
|
||||
<img src="{{ url_for('static', filename='img/pyrion.png') }}">
|
||||
<p>Pyrion is a pretty cool guy. He loves shane, and we love him. Check out some of his awesome work:</p>
|
||||
<div class="uk-grid">
|
||||
<div class="uk-width-1-3"><h3><a href="http://www.youtube.com/user/tedhimself">YouTube</a></h3><img src="{{ url_for('static', filename='img/pyrion-youtube.jpg') }}"></div>
|
||||
<div class="uk-width-1-3"><h3><a href="http://www.twitch.tv/pyrionflax">Twitch.tv</a></h3><img src="{{ url_for('static', filename='img/pyrion-twitch.png') }}"></div>
|
||||
<div class="uk-width-1-3"><h3><a href="http://www.facebook.com/pyrion.flax">FaceBook</a></h3><img src="{{ url_for('static', filename='img/pyrion-facebook.jpg') }}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-large-1-2 uk-width-medium-1-1 uk-text-center uk-panel botpad">
|
||||
<h2>Internet Friendlies:</h2>
|
||||
<p>DotA related websites worth the occasional visit. We know they are no DotaNoobs, but we set a pretty high quality standard around here.</p>
|
||||
<ul>
|
||||
<li><a href="http://www.reddit.com/r/DotA2/">Reddit's r/dota2</a></li>
|
||||
<li><a href="http://www.dotainsight.com">DotaInsight Podcast</a></li>
|
||||
<li><a href="http://dotabuff.com">DotaBuff</a></li>
|
||||
<li><a href="http://teamliquid.net/dota2/">Team Liquid Dota2</a></li>
|
||||
<li><a href="http://www.purgegamers.com">Purge Gamers</a></li>
|
||||
</div>
|
||||
<div class="uk-width-large-1-2 uk-width-medium-1-1 uk-text-center uk-panel">
|
||||
<h2>Streams We Like</h2>
|
||||
<ul id="streams">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block pagescripts %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
{% cache 60*5 %}
|
||||
// Add the streams
|
||||
var stream_url = "https://api.twitch.tv/kraken/streams/";
|
||||
var channels = ["2gd", "purgegamers", "synderen", "luminousinverse", "thegdstudio"]
|
||||
for (var idx in channels) {
|
||||
$.getJSON(stream_url+channels[idx]+"?callback=?", function(data) {
|
||||
if (data.stream) {
|
||||
var $a = $("<a href='"+data.stream.channel.url+"'></a>");
|
||||
var $strm = $("<div class='dn-streamer uk-text-success uk-panel uk-panel-box' id='"+data.stream.channel.name+"'></div>");
|
||||
|
||||
$strm.append("<p class='uk-text-bold'>" + data.stream.channel.display_name + "</p>");
|
||||
$strm.append("<img src='" + data.stream.preview.small + "' />");
|
||||
$strm.append("<p><i class='uk-icon-male'></i> "+data.stream.viewers+"</p>");
|
||||
|
||||
$a.append($strm);
|
||||
$("#streams").prepend($a);
|
||||
|
||||
} else {
|
||||
$.getJSON(data._links.channel+"?callback=?", function(data) {
|
||||
var $a = $("<a href='"+data.url+"'></a>");
|
||||
var $strm = $("<div class='dn-streamer-offline uk-text-success uk-panel uk-panel-box' id='"+data.name+"'></div>");
|
||||
|
||||
$strm.append("<p class='uk-text-bold'>" + data.display_name + "</p>");
|
||||
$strm.append("<img src='" + data.logo + "' />");
|
||||
$strm.append("<p class='dn-offline'>Offline</p>");
|
||||
|
||||
$a.append($strm);
|
||||
$("#streams").append($a);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
{% endcache %}
|
||||
|
||||
|
||||
$("#streams").on({
|
||||
mouseover: function() {
|
||||
$(this).addClass('dn-streamer-hover');
|
||||
},
|
||||
mouseleave: function() {
|
||||
$(this).removeClass('dn-streamer-hover');
|
||||
}
|
||||
}, "div");
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,87 @@
|
||||
{% 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.steamid == user.steamid %}
|
||||
<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">
|
||||
<div class="uk-badge uk-panel-badge uk-badge-notification uk-badge-success">x1</div>
|
||||
<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,121 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block head %} <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/ts3_viewer.css') }}"> {% endblock %}
|
||||
|
||||
{% block title %}Dota Noobs{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% cache 60*5 %}
|
||||
{% set teamspeak_data = get_teamspeak_window() %}
|
||||
{% set latest_news = get_latest_news() %}
|
||||
<div class="uk-grid">
|
||||
|
||||
<div id="events_large" class="uk-width-1-2 uk-visible-large uk-panel uk-panel-space">
|
||||
{% include "events_widget.html" %}
|
||||
</div>
|
||||
|
||||
<div id="teamspeak" class="uk-width-large-1-2 uk-width-medium-1-1 uk-panel uk-panel-box uk-text-center">
|
||||
<a href="#" data-uk-modal="{target: '#tsviewer'}"><div class="uk-badge uk-panel-badge uk-badge-success"><i class="uk-icon-user"></i> Users</div></a>
|
||||
<h1 class="uk-panel-title">Teamspeak</h1>
|
||||
<div class="uk-grid uk-margin-bottom">
|
||||
<div class="uk-width-1-3 uk-panel">
|
||||
<h3>Users<br/><span class="ts_num">{{ ts3_current_clients() }}</span></h3>
|
||||
</div>
|
||||
<div class="uk-width-1-3 uk-panel">
|
||||
<h3 class="uk-text-success">Online</h3>
|
||||
</div>
|
||||
<div class="uk-width-1-3 uk-panel">
|
||||
<h3>Countries<br/><span class="ts_num">{{ ts3_countries_active(teamspeak_data) }}</span></h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="uk-button uk-button-success uk-width-1-1" href="ts3server://voice.dotanoobs.com"><i class="uk-icon-microphone"></i> Connect</a>
|
||||
<a class="uk-button uk-width-1-1 uk-margin" href="{{ url_for('teamspeak') }}"><i class="uk-icon-globe"></i> Stats</a>
|
||||
<a class="uk-button uk-width-1-1" href="http://www.teamspeak.com/?page=downloads"><i class="uk-icon-download"></i> Download</a>
|
||||
|
||||
<div id="tsviewer" class="uk-modal uk-text-left">
|
||||
<div class="uk-modal-dialog">
|
||||
<a class="uk-modal-close uk-close"></a>
|
||||
{{ ts3_viewer() | safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="events_small" class="uk-width-1-1 uk-hidden-large uk-panel uk-panel-space">
|
||||
{% include "events_widget.html" %}
|
||||
</div>
|
||||
|
||||
<div id="streams" class="uk-width-1-1 uk-text-center uk-panel">
|
||||
</div>
|
||||
|
||||
<div class="uk-width-1-1 uk-panel uk-panel-header uk-panel-space">
|
||||
<h1 class="uk-panel-title">News and Announcements</h1>
|
||||
{% for news in latest_news %}
|
||||
<article class="uk-article dn-news-article">
|
||||
<h4 class="uk-article-title" title="{{ news['title'] }}"><a href="{{ news['url'] }}">{{ news['title'] }}</a></h4>
|
||||
<p class="uk-article-meta">{{ news['date'] }}</p>
|
||||
<p>{{ news['text'] | shorten }}</p>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endcache %}
|
||||
{% endblock %}
|
||||
|
||||
{% block pagescripts %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
if ($('#events_large > dl').length < 1) {
|
||||
var msg = "<h2>Events</h2><em>No events planned for the near future. Suggest one on the forum!</em>"
|
||||
$('#events_small').append(msg);
|
||||
$('#events_large').append(msg);
|
||||
}
|
||||
|
||||
{% cache 60*5 %}
|
||||
// Add the streams
|
||||
var stream_url = "https://api.twitch.tv/kraken/streams/";
|
||||
var channels = ["dotanoobs", "bearhugdota", "kreejaffakree", "prettypenguins", "shaneomad"];
|
||||
for (var idx in channels) {
|
||||
$.getJSON(stream_url+channels[idx]+"?callback=?", function(data) {
|
||||
if (data.stream) {
|
||||
var $a = $("<a href='"+data.stream.channel.url+"'></a>");
|
||||
var $strm = $("<div class='dn-streamer uk-text-success uk-panel uk-panel-box' id='"+data.stream.channel.name+"'></div>");
|
||||
|
||||
$strm.append("<p class='uk-text-bold'>" + data.stream.channel.display_name + "</p>");
|
||||
$strm.append("<img src='" + data.stream.preview.small + "' />");
|
||||
$strm.append("<p><i class='uk-icon-male'></i> "+data.stream.viewers+"</p>");
|
||||
|
||||
$a.append($strm);
|
||||
$("#streams").prepend($a);
|
||||
|
||||
} else {
|
||||
$.getJSON(data._links.channel+"?callback=?", function(data) {
|
||||
var $a = $("<a href='"+data.url+"'></a>");
|
||||
var $strm = $("<div class='dn-streamer-offline uk-text-success uk-panel uk-panel-box' id='"+data.name+"'></div>");
|
||||
|
||||
$strm.append("<p class='uk-text-bold'>" + data.display_name + "</p>");
|
||||
$strm.append("<img src='" + data.logo + "' />");
|
||||
$strm.append("<p class='dn-offline'>Offline</p>");
|
||||
|
||||
$a.append($strm);
|
||||
$("#streams").append($a);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
{% endcache %}
|
||||
|
||||
|
||||
$("#streams").on({
|
||||
mouseover: function() {
|
||||
$(this).addClass('dn-streamer-hover');
|
||||
},
|
||||
mouseleave: function() {
|
||||
$(this).removeClass('dn-streamer-hover');
|
||||
}
|
||||
}, "div");
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,130 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{% block head %}
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
{% endblock %}
|
||||
|
||||
<!-- Meta-tags -->
|
||||
<meta name="viewport" content="initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<!-- CSS includes -->
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/uikit/2.4.0/css/uikit.gradient.min.css" />
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/app.css') }}" />
|
||||
|
||||
<!-- Javascript includes -->
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/uikit/2.4.0/js/uikit.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navigation bar -->
|
||||
<nav class="uk-navbar uk-navbar-attached" data-uk-navbar>
|
||||
<a href="#offcanvas" class="uk-navbar-brand uk-hidden-large" data-uk-offcanvas><img src="{{ url_for('static', filename='img/navlogo.png') }}" /><i class="uk-icon-double-angle-down"></i></a>
|
||||
<a href="" class="uk-navbar-brand uk-visible-large" data-uk-offcanvas><img src="{{ url_for('static', filename='img/navlogo.png') }}" /></a>
|
||||
<!-- Check if user is logged in -->
|
||||
{% if g.user %}
|
||||
<ul class="uk-navbar-nav uk-navbar-flip">
|
||||
<li data-uk-dropdown="" class="uk-parent">
|
||||
<a href="#"><img class="uk-responsive-height" src="{{ g.user.avatar }}" /> {{ g.user.nickname }} </a>
|
||||
<div class="uk-dropdown uk-dropdown-navbar">
|
||||
<ul class="uk-nav uk-nav-navbar">
|
||||
<li><a href="{{ url_for('user_profile', userid=g.user.id) }}">Profile</a></li>
|
||||
<li><a href="{{ url_for('user_random_hero', userid=g.user.id) }}">A-Z Challenge</a></li>
|
||||
<li><a href="http://board.dotanoobs.com/?page=lastposts">Latest Posts</a></li>
|
||||
{% if g.user.admin %}
|
||||
<li><a href="{{ url_for('event_edit') }}">Add Event</a></li>
|
||||
{% endif %}
|
||||
<li class="uk-nav-divider"></li>
|
||||
<li><a href="{{ url_for('user_settings') }}">Settings</a></li>
|
||||
<li><a href="{{ url_for('logout') }}">Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</ul>
|
||||
{% else %}
|
||||
<a class="uk-navbar-flip uk-navbar-content" href="{{ url_for('login') }}"><img src="http://steamcommunity-a.akamaihd.net/public/images/signinthroughsteam/sits_large_border.png" /></a>
|
||||
{% endif %}
|
||||
<div class="uk-navbar-content uk-navbar-center uk-hidden-small uk-text-bold">DotaNoobs</div>
|
||||
</nav>
|
||||
|
||||
<!-- Flash Error Messages -->
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
<ul class="uk-list flashes uk-width-2-3 uk-container-center">
|
||||
{% for category, message in messages %}
|
||||
<li class="uk-alert uk-alert-{{ category }}">{{ message }} <a href="#" class="uk-alert-close uk-close"></a> </li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<!-- Start Main Container -->
|
||||
<div id="container" class="uk-grid">
|
||||
<!-- Big top logo -->
|
||||
{% if not g.user.logo %}
|
||||
<div class="uk-width-1-1"><img class="uk-align-center" id="biglogo" src="{{ url_for('static', filename='img/biglogo.png') }}"></div>
|
||||
{% endif %}
|
||||
<!-- Side navigation -->
|
||||
<div class="uk-visible-large uk-width-1-5 uk-panel">
|
||||
{% if g.doob%}
|
||||
<h3 class="uk-panel-title">{{ g.doob.name }}</h3>
|
||||
<hr class="uk-nav-divider" />
|
||||
{% endif %}
|
||||
<ul class="uk-nav uk-nav-side uk-text-right uk-nav-parent-icon" data-uk-nav>
|
||||
{% include 'sidenav.html' %}
|
||||
</ul>
|
||||
</div>
|
||||
<div id="offcanvas" class="uk-offcanvas">
|
||||
<div class="uk-offcanvas-bar">
|
||||
{% if g.doob%}
|
||||
<h3 class="uk-panel-title">{{ g.doob.name }}</h3>
|
||||
{% endif %}
|
||||
<ul class="uk-nav uk-nav-offcanvas" data-uk-nav>
|
||||
{% include 'sidenav.html' %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Main content area -->
|
||||
<div class="uk-width-large-4-5 uk-width-medium-5-5">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Footer section -->
|
||||
<footer class="uk-clearfix uk-align-center">
|
||||
{% cache 60*5 %}
|
||||
<div class="uk-float-left uk-visible-large">
|
||||
<a href="http://flask.pocoo.org/"><img src="{{ url_for('static', filename='img/powered-by-flask-s.png') }}" alt="Flask"></a> &
|
||||
<a href="http://store.steampowered.com/"><img src="{{ url_for('static', filename='img/steam.png') }}" alt="Steam"></a>
|
||||
</div>
|
||||
© Coypright 2013 by <a href="http://www.dotanoobs.com/"><img src="{{ url_for('static',filename='img/navlogo.png') }}" alt="DotaNoobs" /></a>
|
||||
<div class="uk-float-right uk-visible-large">
|
||||
<a href="http://www.twitch.tv/dotanoobs"><img src="{{ url_for('static', filename='img/twitchicon.png') }}" width="32" alt="Twitch.tv" /></a>
|
||||
<a href="http://www.youtube.com/user/DotaNoobsVods"><img src="{{ url_for('static', filename='img/youtube.png') }}" alt="YouTube" /></a>
|
||||
<a href="emailto:admin@dotanoobs.com"><img src="{{ url_for('static', filename='img/email.png') }}" /></a>
|
||||
</div>
|
||||
{% endcache %}
|
||||
</footer>
|
||||
<!-- Page-specific javascript here -->
|
||||
{% block pagescripts %}
|
||||
{% endblock %}
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function() {
|
||||
$("li.uk-alert > a.uk-alert-close").on('click', function(){
|
||||
$(this).parent().hide();
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.date').each(function (index) {
|
||||
var d = moment.utc($(this).text()+" UTC");
|
||||
$(this).html(d.local().format("h:mm A on MMM Do"));
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,99 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}Events - DotaNoobs {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="uk-grid" data-uk-grid-margin>
|
||||
<div class="uk-width-1-1">
|
||||
<h2 class="">Events</h2>
|
||||
</div>
|
||||
<!--Main content area -->
|
||||
<div class="uk-width-1-1 uk-panel">
|
||||
<ul class="uk-tab" data-uk-tab="{connect:'#events_table'}">
|
||||
<li class="uk-active"><a href="">Active</a></li>
|
||||
<li><a href="">Upcoming</a></li>
|
||||
<li><a href="">Expired</a></li>
|
||||
</ul>
|
||||
<ul id="events_table" class="uk-switcher uk-margin">
|
||||
<li>
|
||||
<table class='uk-table uk-table-hover'>
|
||||
<thead>
|
||||
<th>Event</th>
|
||||
<th>Type</th>
|
||||
<th>Points</th>
|
||||
<th>Starts</th>
|
||||
<th>Ends</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for event in active %}
|
||||
<tr url="{{ url_for('show_event', eventid=event.id) }}">
|
||||
<td>{{ event.name }}</td>
|
||||
<td>{{ event.type | event_badge | safe }}</td>
|
||||
<td>{{ event.points }}</td>
|
||||
<td class='date'>{{ event.start_time | js_datetime }}</td>
|
||||
<td class='date'>{{ event.end_time | js_datetime }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<table class='uk-table uk-table-hover'>
|
||||
<thead>
|
||||
<th>Event</th>
|
||||
<th>Type</th>
|
||||
<th>Points</th>
|
||||
<th>Starts</th>
|
||||
<th>Ends</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for event in upcoming %}
|
||||
<tr url="{{ url_for('show_event', eventid=event.id) }}">
|
||||
<td>{{ event.name }}</td>
|
||||
<td>{{ event.type | event_badge | safe }}</td>
|
||||
<td>{{ event.points }}</td>
|
||||
<td class='date'>{{ event.start_time | js_datetime }}</td>
|
||||
<td class='date'>{{ event.end_time | js_datetime }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<table class='uk-table uk-table-hover'>
|
||||
<thead>
|
||||
<th>Event</th>
|
||||
<th>Type</th>
|
||||
<th>Points</th>
|
||||
<th>Starts</th>
|
||||
<th>Ends</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for event in expired %}
|
||||
<tr url="{{ url_for('show_event', eventid=event.id) }}">
|
||||
<td>{{ event.name }}</td>
|
||||
<td>{{ event.type | event_badge | safe }}</td>
|
||||
<td>{{ event.points }}</td>
|
||||
<td class='date'>{{ event.start_time | js_datetime }}</td>
|
||||
<td class='date'>{{ event.end_time | js_datetime }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block pagescripts %}
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.13.3/jquery.tablesorter.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#events_table table thead th').prepend("<i class='uk-icon-sort uk-display-inline'> </i>");
|
||||
$('#events_table table').tablesorter();
|
||||
$('#events_table table tbody tr').click(function() {
|
||||
window.location = $(this).attr('url');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,9 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %} Not Found {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
The requested {{ descriptor or 'page' }} could not be found.
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,34 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}Profile - {{ user.nickname }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="uk-grid" data-uk-grid-margin>
|
||||
<div class="uk-width-2-3">
|
||||
<h2 class="uk-float-left"><img class="" src="{{ user.avatar }}" /> {{ user.nickname }}</h2>
|
||||
</div>
|
||||
<div class="uk-width-1-3 uk-text-center">
|
||||
</div>
|
||||
<!--Main content area -->
|
||||
<div class="uk-width-large-2-3 uk-width-medium-1-1 uk-panel">
|
||||
<em>This user profile is set to private.</em>
|
||||
</div>
|
||||
<!-- Side bar -->
|
||||
<div class="uk-width-large-1-3 uk-width-medium-1-1 uk-panel uk-panel-box uk-panel-box-secondary">
|
||||
<div class="uk-container-center uk-text-center">
|
||||
<span class="uk-text-bold">Current Hero</span><br/>
|
||||
<span>{{ user.random_hero['localized_name'] }}</span><br/>
|
||||
<a href={{ url_for('user_random_hero', userid=user.id) }}>
|
||||
<img src="{{ url_for('static', filename=hero_image_large(user.random_hero)) }}" class="dn-hero-icon" /><br/>
|
||||
<span>View A-Z Progress</span>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="uk-list uk-list-space uk-list-striped uk-text-center">
|
||||
<li>Completed <span id='rands'>{{ user.random_heroes.completed | length }}</span> heroes in A-Z</li>
|
||||
<li>Has <span id='points_total'>0</span> doobs points</li>
|
||||
<li>Last seen at <span class='date'> {{ user.last_seen | js_datetime }}</span></li>
|
||||
<li>Doob since <span class='date'> {{ user.created | js_datetime }}</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,52 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}Profile - {{ user.nickname }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="uk-grid" data-uk-grid-margin>
|
||||
<div class="uk-width-2-3">
|
||||
<h2 class="uk-float-left"><img class="" src="{{ user.avatar }}" /> {{ user.nickname }}</h2>
|
||||
</div>
|
||||
<div id="profile_links" class="uk-width-1-3 uk-text-center">
|
||||
<div class="uk-panel">
|
||||
{% if user.public %}
|
||||
<a href="http://steamcommunity.com/profiles/{{ user.steam_id | safe }}">Steam</a> |
|
||||
<a href="http://board.dotanoobs.com/?page=profile&id={{ user.id | safe }}">Forum Profile</a> |
|
||||
<a href="http://dotabuff.com/search?q={{ user.steam_id }}">Dotabuff</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<!--Main content area -->
|
||||
<div class="uk-width-large-2-3 uk-width-medium-1-1 uk-panel">
|
||||
{% if user.public %}
|
||||
{% if user.bio_text == None %}
|
||||
<em class="uk-text-danger">This user's profile bio is empty!</em>
|
||||
{% else %}
|
||||
<em class="uk-text-bold">{{ user.bio_text }}</em>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<em class="uk-text-danger">This user profile is set to private</em>
|
||||
{% endif %}
|
||||
{% if user.id == g.user.id %} <a href="{{ url_for('user_settings')}}"><i class="uk-icon-edit"></i></a>{% endif %}
|
||||
</div>
|
||||
<!-- Side bar -->
|
||||
<div class="uk-width-large-1-3 uk-width-medium-1-1 uk-panel uk-panel-box uk-panel-box-secondary">
|
||||
{% if user.public %}
|
||||
<div class="uk-container-center uk-text-center">
|
||||
<span class="uk-text-bold">Current Hero</span><br/>
|
||||
<span>{{ user.random_hero['localized_name'] }}</span><br/>
|
||||
<a href={{ url_for('user_random_hero', userid=user.id) }}>
|
||||
<img src="{{ url_for('static', filename=hero_image_large(user.random_hero)) }}" class="dn-hero-icon" /><br/>
|
||||
<span>View A-Z Progress</span>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="uk-list uk-list-space uk-list-striped uk-text-center uk-text-small">
|
||||
<li>Completed <span id='rands'>{{ user.random_heroes.completed | length }}</span> heroes in A-Z</li>
|
||||
<li>Has <span id='points_total'>0</span> doobs points</li>
|
||||
<li>Last seen at <span class='date'> {{ user.last_seen | js_datetime }}</span></li>
|
||||
<li>Doob since <span class='date'> {{ user.created | js_datetime }}</span></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,40 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}Settings for {{ g.user.nickname }} - DotaNoobs {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="uk-grid" data-uk-grid-margin>
|
||||
<div class="uk-width-2-3">
|
||||
<h2 class="uk-float-left"><img class="" src="{{ g.user.avatar }}" /> {{ g.user.nickname }}'s Settings</h2>
|
||||
</div>
|
||||
<div class="uk-width-1-3 uk-text-center">
|
||||
<a href="{{ url_for('enable_statistics') }}" class="uk-button uk-button-danger">Enable Statistics <i class="uk-icon-star"></i></a>
|
||||
</div>
|
||||
<!--Main content area -->
|
||||
<div class="uk-width-1-1 uk-panel">
|
||||
<form class="uk-form uk-form-width-large" action="" method="post" name="settings">
|
||||
{{ form.hidden_tag() }}
|
||||
<fieldset data-uk-margin>
|
||||
<div class="uk-form-row">
|
||||
<ul class="uk-list">
|
||||
<li><label class="uk-form-label"> {{ form.public }} Public Profile</label></li>
|
||||
<li><label class="uk-form-label"> {{ form.logo }} Hide Big Logo</label></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<label class="uk-form-label">Twitch.tv Username:</label> <br/>
|
||||
{{ form.twitch(placeholder="e.g. shaneomad") }}
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<label class="uk-form-label">Biography text:</label><br/>
|
||||
{{ form.bio_text(rows=14, class='uk-width-1-1', data=g.user.bio_text, placedholder='What you place here is displayed in your profile when other users view it.') }}
|
||||
</div>
|
||||
<div class="uk-form-controls uk-margin-top">
|
||||
<button class="uk-button uk-button-success" type="submit">Save</button>
|
||||
<a class="uk-button" href="{{ url_for('user_profile', userid=g.user.id) }}">Cancel</a>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,53 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}Event - {{ event.name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="uk-grid" data-uk-grid-margin>
|
||||
<div class="uk-width-2-3">
|
||||
<div class="uk-panel">
|
||||
<h2 class="uk-float-left uk-width-1-1">{{ event.name }}</h2>
|
||||
Event Type: {{ event.type | event_badge | safe }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-3 uk-text-center">
|
||||
{% if g.user.admin %}
|
||||
<a class="uk-button" href="{{ url_for('event_edit', eventid=event.id) }}">Edit</a>
|
||||
<a class="uk-button" href="{{ url_for('event_delete', eventid=event.id) }}">Delete</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!--Main content area -->
|
||||
<div class="uk-width-large-2-3 uk-width-medium-1-1 uk-panel">
|
||||
{% if event.desc == None %}
|
||||
<em class="uk-text-danger">This event has no description.</em>
|
||||
{% else %}
|
||||
<em class="uk-text-bold">{{ event.desc }}</em>
|
||||
{% endif %}
|
||||
{% if g.user.admin %} <a href="{{ url_for('user_settings')}}"><i class="uk-icon-edit"></i></a>{% endif %}
|
||||
</div>
|
||||
<!-- Side bar -->
|
||||
<div class="uk-width-large-1-3 uk-width-medium-1-1 uk-panel">
|
||||
<table class="uk-table uk-table-striped uk-table-hover uk-text-right">
|
||||
<h2 class="uk-text-center">Information</h2>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>This event is worth <span id='points'>{{ event.points }}</span> points a tick. </td>
|
||||
<td><i class="uk-icon-money"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Payout every <span id='reward'>{{ event.reward_threshold }}</span> minutes (1 tick). </td>
|
||||
<td><i class="uk-icon-clock-o"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Starting at <span class='date'>{{ event.start_time | js_datetime }}</span></td>
|
||||
<td><i class="uk-icon-calendar"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ending at <span class='date'>{{ event.end_time | js_datetime }}</span></td>
|
||||
<td><i class="uk-icon-warning"></i></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,32 @@
|
||||
{% for endpoint, title in [
|
||||
('index', 'Home'),
|
||||
('friends', 'Friends'),
|
||||
('list_events', 'Events'),
|
||||
('teamspeak', 'TS3 Stats'),
|
||||
] %}
|
||||
<li{% if endpoint == request.endpoint %} class='uk-active' {% endif %}>
|
||||
<a href="{{ url_for(endpoint) }}">{{ title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li class="uk-parent">
|
||||
<a href="#">Stream Stats</a>
|
||||
<ul class="uk-nav-sub">
|
||||
<li><a href="http://potatr.dotanoobs.com">Potato_Bot</a></li>
|
||||
<li><a href="http://potatr.dotanoobs.com">Cider_Bot</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="uk-nav-divider"></li>
|
||||
<li class="uk-nav-header">Social</li>
|
||||
<li><a href="http://board.dotanoobs.com"><i class="uk-icon-group"></i> Board</a></li>
|
||||
<li><a href="http://www.youtube.com/user/DotaNoobsVods"><i class="uk-icon-youtube"></i> YouTube</a></li>
|
||||
<li><a href="http://webchat.oftc.net/?channels=dotanoobs&uio=d4"><i class="uk-icon-comments"></i> IRC Chat</a></li>
|
||||
<li class="uk-nav-divider"></li>
|
||||
<li class="uk-nav-header">Controls</li>
|
||||
{% if not g.user%}
|
||||
<li><a href="{{ url_for('login') }}"><i class="uk-icon-sign-in"></i> Login</a></li>
|
||||
<li><a href="{{ url_for('login') }}"><i class="uk-icon-star"></i> Register</a></li>
|
||||
{% else %}
|
||||
<li {% if request.endpoint == 'user_profile' %} class='uk-active' {% endif %}><a href="{{ url_for('user_profile', userid=g.user.id) }}"><i class="uk-icon-dashboard"></i> Profile</a></li>
|
||||
<li {% if request.endpoint == 'user_settings' %} class='uk-active' {% endif %}><a href="{{ url_for('user_settings') }}"><i class="uk-icon-cogs"></i> Settings</a></li>
|
||||
<li><a href="{{ url_for('logout') }}"><i class="uk-icon-sign-out"></i> Logout</a></li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,173 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}Dota Noobs - Teamspeak{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/ts3_viewer.css') }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="uk-grid">
|
||||
<div class="uk-width-large-1-2 uk-width-medium-1-1">
|
||||
<h3 class="uk-text-bold uk-text-center">Recent Activity</h3>
|
||||
<div class="uk-panel">
|
||||
<ul>
|
||||
<li>Users currently connected: <span id="current_clients"></span></li>
|
||||
<li>Unique users this week: <span id="unique_clients"></span></li>
|
||||
<li>Countries active this week: <span id="country_clients"></span></li>
|
||||
</div>
|
||||
<div class="uk-panel" id="teamspeak_active_users"></div>
|
||||
<div class="uk-panel" id="teamspeak_map"></div>
|
||||
<div class="uk-panel uk-panel-divider"></div>
|
||||
</div>
|
||||
<div class="uk-width-large-1-2 uk-width-medium-1-1">
|
||||
<div class="uk-panel uk-panel-space uk-panel-box uk-text-center">
|
||||
<h3 class="uk-text-bold uk-text-center">Current Status</h3>
|
||||
<a class="uk-button uk-button-success" href="ts3server://voice.dotanoobs.com">Connect</a>
|
||||
<a class="uk-button uk-button-primary" href="http://www.teamspeak.com/download">Download</a>
|
||||
<h5><strong>Server: voice.dotanoobs.com</strong></h5>
|
||||
<div class="uk-panel uk-text-left">
|
||||
{{ ts3_viewer() | safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block pagescripts %}
|
||||
{% cache 60*5 %}
|
||||
{% set teamspeak_data = get_teamspeak_window() %}
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highcharts/3.0.7/highcharts.js"></script>
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highcharts/3.0.7/modules/map.src.js"></script>
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highcharts/3.0.7/modules/data.src.js"></script>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/world-map-shapes.js') }}"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#unique_clients').html("{{ ts3_active_clients(teamspeak_data) }}");
|
||||
$('#current_clients').html("{{ ts3_current_clients() }}");
|
||||
$('#country_clients').html("{{ ts3_countries_active(teamspeak_data) }}");
|
||||
Highcharts.setOptions({
|
||||
global: {
|
||||
useUTC: false
|
||||
}
|
||||
});
|
||||
var chart = new Highcharts.Chart({
|
||||
chart: {
|
||||
renderTo: 'teamspeak_active_users',
|
||||
alignTicks: false,
|
||||
},
|
||||
title: {
|
||||
text: null,
|
||||
},
|
||||
xAxis: {
|
||||
type: 'datetime',
|
||||
dateTimeLabelFormats: {
|
||||
hour: '%l%P',
|
||||
day: '%a',
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'Active Users',
|
||||
},
|
||||
min: 0,
|
||||
tickInterval: 5,
|
||||
},
|
||||
tooltip: {
|
||||
formatter: function() {
|
||||
return Highcharts.dateFormat('%a %b %e @ %l%P', this.x) + ' <b>(' + this.y + ')</b>';
|
||||
}
|
||||
},
|
||||
plotOptions: {
|
||||
series: {
|
||||
marker: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
showInLegend: false,
|
||||
type: 'areaspline',
|
||||
data: [
|
||||
{% for data in teamspeak_data %}
|
||||
[new Date('{{ data.time | js_datetime }}').valueOf(), {{ data.clients | count }}],
|
||||
{% endfor %}
|
||||
],
|
||||
}],
|
||||
});
|
||||
var map_options = {
|
||||
chart: {
|
||||
renderTo: 'teamspeak_map',
|
||||
borderWidth: 1,
|
||||
zoomType: 'xy'
|
||||
},
|
||||
title: {
|
||||
text: 'Doobs by country'
|
||||
},
|
||||
legend: {
|
||||
align: 'left',
|
||||
verticalAlign: 'bottom',
|
||||
floating: true,
|
||||
layout: 'vertical',
|
||||
valueDecimals: 0
|
||||
},
|
||||
series: [{
|
||||
name: 'Active users',
|
||||
data: [],
|
||||
valueRanges: [{
|
||||
to: 1,
|
||||
color: 'rgba(19,64,117,0.05)'
|
||||
}, {
|
||||
from: 1,
|
||||
to: 5,
|
||||
color: 'rgba(19,64,117,0.4)'
|
||||
}, {
|
||||
from: 5,
|
||||
to: 10,
|
||||
color: 'rgba(19,64,117,0.5)'
|
||||
}, {
|
||||
from: 10,
|
||||
to: 20,
|
||||
color: 'rgba(19,64,117,0.6)'
|
||||
}, {
|
||||
from: 20,
|
||||
to: 30,
|
||||
color: 'rgba(19,64,117,0.8)'
|
||||
}, {
|
||||
from: 30,
|
||||
color: 'rgba(19,64,117,1)'
|
||||
}],
|
||||
states: {
|
||||
hover: {
|
||||
color: '#DD6E28'
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
// Populate the data points
|
||||
var data = {{ num_unique_clients_by_country(teamspeak_data) | tojson | safe }};
|
||||
var country_names = {{ country_abbreviation_mapping() | tojson | safe }};
|
||||
for (var key in shapes) {
|
||||
var num = 0;
|
||||
if (key in data) {
|
||||
num = data[key];
|
||||
}
|
||||
map_options.series[0].data.push({
|
||||
y: num,
|
||||
name: country_names[key],
|
||||
path: shapes[key],
|
||||
states: {
|
||||
hover: {
|
||||
color: '#FF7F00'
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// Finalize the map
|
||||
var map = new Highcharts.Map(map_options);
|
||||
});
|
||||
</script>
|
||||
{% endcache %}
|
||||
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user