├── outputs └── empty ├── judge ├── __init__.py ├── migrations │ ├── __init__.py │ ├── 0012_auto_20160522_1851.py │ ├── 0004_problem_num_tests.py │ ├── 0010_submission_private.py │ ├── 0002_submission_problem.py │ ├── 0007_auto_20160405_1702.py │ ├── 0003_auto_20160226_1636.py │ ├── 0005_auto_20160321_1928.py │ ├── 0011_auto_20160522_1751.py │ ├── 0008_auto_20160405_1704.py │ ├── 0006_auto_20160405_1603.py │ ├── 0009_auto_20160522_1549.py │ └── 0001_initial.py ├── tests.py ├── apps.py ├── admin.py ├── urls.py ├── forms.py ├── models.py ├── views.py └── tasks.py ├── submissions └── empty ├── testcases └── empty ├── docker └── Dockerfile ├── static ├── semantic │ ├── dist.zip │ ├── .versions │ ├── themes │ │ └── default │ │ │ └── assets │ │ │ ├── fonts │ │ │ ├── icons.eot │ │ │ ├── icons.otf │ │ │ ├── icons.ttf │ │ │ ├── icons.woff │ │ │ └── icons.woff2 │ │ │ └── images │ │ │ └── flags.png │ ├── README.md │ ├── package.json │ ├── components │ │ ├── sticky.min.css │ │ ├── tab.min.css │ │ ├── rail.min.css │ │ ├── breadcrumb.min.css │ │ ├── video.min.css │ │ ├── nag.min.css │ │ ├── sticky.css │ │ ├── site.min.css │ │ ├── embed.min.css │ │ ├── container.min.css │ │ ├── shape.min.css │ │ ├── ad.min.css │ │ ├── tab.css │ │ ├── reset.min.css │ │ ├── dimmer.min.css │ │ ├── comment.min.css │ │ ├── breadcrumb.css │ │ ├── rail.css │ │ ├── video.css │ │ ├── colorize.min.js │ │ ├── nag.css │ │ ├── loader.min.css │ │ ├── image.min.css │ │ ├── site.css │ │ ├── feed.min.css │ │ ├── container.css │ │ ├── shape.css │ │ ├── embed.css │ │ ├── popup.min.css │ │ ├── dimmer.css │ │ ├── rating.min.js │ │ ├── ad.css │ │ ├── nag.min.js │ │ ├── item.min.css │ │ ├── visit.min.js │ │ ├── message.min.css │ │ ├── search.min.css │ │ ├── video.min.js │ │ ├── divider.min.css │ │ ├── comment.css │ │ ├── reveal.min.css │ │ ├── site.min.js │ │ ├── accordion.min.css │ │ └── modal.min.css │ ├── package.js │ └── LICENSE ├── fonts │ ├── CaviarDreams.ttf │ ├── CaviarDreams_Bold.ttf │ ├── CaviarDreams_Italic.ttf │ └── CaviarDreams_BoldItalic.ttf └── css │ └── base.css ├── poj ├── __init__.py ├── wsgi.py ├── celery.py ├── urls.py └── settings.py ├── .gitattributes ├── .gitignore ├── requirements.txt ├── templates └── judge │ ├── index.html │ ├── submission.html │ ├── problem.html │ ├── addproblem.html │ ├── all.html │ ├── submit.html │ ├── register.html │ ├── login.html │ └── base.html ├── manage.py ├── run.py ├── notes ├── LICENSE.md └── README.md /outputs/empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /judge/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /submissions/empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testcases/empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /judge/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /judge/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | RUN apt-get update && apt-get install -y gcc g++ 3 | -------------------------------------------------------------------------------- /static/semantic/dist.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paramsingh/poj/HEAD/static/semantic/dist.zip -------------------------------------------------------------------------------- /poj/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from .celery import app as celery_app 4 | -------------------------------------------------------------------------------- /static/fonts/CaviarDreams.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paramsingh/poj/HEAD/static/fonts/CaviarDreams.ttf -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | static/semantic/* linguist-vendored 2 | static/js/jquery-1.11.0.min.js linguist-vendored 3 | 4 | -------------------------------------------------------------------------------- /static/semantic/.versions: -------------------------------------------------------------------------------- 1 | jquery@1.11.3_2 2 | meteor@1.1.6 3 | semantic:ui-css@2.0.7 4 | underscore@1.0.3 5 | -------------------------------------------------------------------------------- /static/fonts/CaviarDreams_Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paramsingh/poj/HEAD/static/fonts/CaviarDreams_Bold.ttf -------------------------------------------------------------------------------- /static/fonts/CaviarDreams_Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paramsingh/poj/HEAD/static/fonts/CaviarDreams_Italic.ttf -------------------------------------------------------------------------------- /static/fonts/CaviarDreams_BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paramsingh/poj/HEAD/static/fonts/CaviarDreams_BoldItalic.ttf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | testcases/* 3 | bin/* 4 | submissions/* 5 | outputs/* 6 | db.sqlite3 7 | bin 8 | lib/ 9 | pojenv/ 10 | include/ 11 | -------------------------------------------------------------------------------- /static/semantic/themes/default/assets/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paramsingh/poj/HEAD/static/semantic/themes/default/assets/fonts/icons.eot -------------------------------------------------------------------------------- /static/semantic/themes/default/assets/fonts/icons.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paramsingh/poj/HEAD/static/semantic/themes/default/assets/fonts/icons.otf -------------------------------------------------------------------------------- /static/semantic/themes/default/assets/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paramsingh/poj/HEAD/static/semantic/themes/default/assets/fonts/icons.ttf -------------------------------------------------------------------------------- /static/semantic/themes/default/assets/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paramsingh/poj/HEAD/static/semantic/themes/default/assets/fonts/icons.woff -------------------------------------------------------------------------------- /static/semantic/themes/default/assets/images/flags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paramsingh/poj/HEAD/static/semantic/themes/default/assets/images/flags.png -------------------------------------------------------------------------------- /static/semantic/themes/default/assets/fonts/icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paramsingh/poj/HEAD/static/semantic/themes/default/assets/fonts/icons.woff2 -------------------------------------------------------------------------------- /judge/apps.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | 3 | from django.apps import AppConfig 4 | 5 | 6 | class JudgeConfig(AppConfig): 7 | name = 'judge' 8 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | amqp==1.4.9 2 | anyjson==0.3.3 3 | billiard==3.3.0.23 4 | celery==3.1.23 5 | Django==1.9.2 6 | kombu==3.0.35 7 | pytz==2016.4 8 | redis==2.10.5 9 | -------------------------------------------------------------------------------- /static/css/base.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'caviar'; 3 | src = url('../fonts/CaviarDreams.ttf'); 4 | } 5 | 6 | 7 | a { 8 | font: caviar; 9 | } 10 | -------------------------------------------------------------------------------- /templates/judge/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'judge/base.html' %} 2 | 3 | {% block body_block %} 4 |
5 |

Welcome to POJ!

6 |
7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /judge/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from judge.models import Problem, Coder, Submission, TestCase 3 | 4 | admin.site.register(Problem) 5 | admin.site.register(Coder) 6 | admin.site.register(Submission) 7 | admin.site.register(TestCase) 8 | 9 | -------------------------------------------------------------------------------- /templates/judge/submission.html: -------------------------------------------------------------------------------- 1 | {% extends "judge/base.html" %} 2 | 3 | {% block body_block %} 4 | 5 | {{submission.submitter.user.username}} 6 |
7 | {{submission.status}} 8 |
9 | {{submission.lang}} 10 |
11 | {{submission.code}} 12 |
13 | 14 | {% endblock %} -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "poj.settings") 7 | 8 | from django.core.management import execute_from_command_line 9 | 10 | execute_from_command_line(sys.argv) 11 | -------------------------------------------------------------------------------- /templates/judge/problem.html: -------------------------------------------------------------------------------- 1 | {% extends 'judge/base.html' %} 2 | 3 | {% block body_block %} 4 |
5 |
6 |

{{ problem.name}}

7 |

8 | {{ problem.statement }} 9 |
10 |
11 | {% endblock %} 12 | 13 | {% block submit %} 14 | 15 | Submit Solution 16 | 17 | {%endblock%} 18 | -------------------------------------------------------------------------------- /poj/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for poj project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "poj.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /poj/celery.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | import os 3 | from celery import Celery 4 | 5 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'poj.settings') 6 | 7 | from django.conf import settings 8 | 9 | app = Celery('poj') 10 | 11 | app.config_from_object('django.conf:settings') 12 | app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) 13 | 14 | 15 | @app.task(bind=True) 16 | def debug_task(self): 17 | print("Request: {0!r}".format(self.request)) 18 | -------------------------------------------------------------------------------- /static/semantic/README.md: -------------------------------------------------------------------------------- 1 | # CSS Distribution 2 | 3 | This repository is automatically synced with the main [Semantic UI](https://github.com/Semantic-Org/Semantic-UI) repository to provide lightweight CSS only version of Semantic UI. 4 | 5 | This package **does not support theming** and includes generated CSS files of the default theme only. 6 | 7 | You can view more on Semantic UI at [LearnSemantic.com](http://www.learnsemantic.com) and [Semantic-UI.com](http://www.semantic-ui.com) 8 | -------------------------------------------------------------------------------- /templates/judge/addproblem.html: -------------------------------------------------------------------------------- 1 | {% extends 'judge/base.html' %} 2 | 3 | {% block title %} Add a problem {% endblock %} 4 | 5 | {% block body_block %} 6 | 7 |

Add a problem

8 |
10 | {% csrf_token %} 11 | {{ problem_form.as_p }} 12 | 13 | 14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /templates/judge/all.html: -------------------------------------------------------------------------------- 1 | {% extends 'judge/base.html' %} 2 | 3 | {% block body_block %} 4 |
5 | {% for p in problems %} 6 |
7 | 8 |
9 |
10 |

11 | {{p.id}}. {{p.name}} 12 |

13 |
14 |
15 |
16 | {% endfor %} 17 |
18 | {% endblock %} -------------------------------------------------------------------------------- /judge/migrations/0012_auto_20160522_1851.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.2 on 2016-05-22 18:51 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('judge', '0011_auto_20160522_1751'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RenameField( 16 | model_name='problem', 17 | old_name='num_accepted', 18 | new_name='num_ac', 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /judge/migrations/0004_problem_num_tests.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.2 on 2016-02-26 17:08 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('judge', '0003_auto_20160226_1636'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='problem', 17 | name='num_tests', 18 | field=models.IntegerField(default=0), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /judge/migrations/0010_submission_private.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.2 on 2016-05-22 16:20 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('judge', '0009_auto_20160522_1549'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='submission', 17 | name='private', 18 | field=models.BooleanField(default=True), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /static/semantic/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "semantic-ui-css", 3 | "version": "2.1.8", 4 | "title": "Semantic UI", 5 | "description": "CSS Only distribution of Semantic UI", 6 | "homepage": "http://www.semantic-ui.com", 7 | "author": "Jack Lukic ", 8 | "license": "MIT", 9 | "repository": { 10 | "type": "git", 11 | "url": "git://github.com/Semantic-Org/Semantic-UI-CSS.git" 12 | }, 13 | "bugs": { 14 | "url": "https://github.com/Semantic-Org/Semantic-UI/issues" 15 | }, 16 | "dependencies": { 17 | "jquery": "x.*" 18 | } 19 | } -------------------------------------------------------------------------------- /run.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import subprocess 3 | 4 | if __name__ == "__main__": 5 | try: 6 | executable = sys.argv[1] 7 | input_filename = sys.argv[2] 8 | output_filename = sys.argv[3] 9 | tl = sys.argv[4] 10 | except IndexError: 11 | sys.exit(-1) 12 | 13 | input_file = open(input_filename, "r") 14 | output_file = open(output_filename, "w") 15 | returncode = subprocess.call(["timeout", tl, "./{}".format(executable)], stdin = input_file, stdout = output_file) 16 | print(returncode) 17 | input_file.close() 18 | output_file.close() 19 | -------------------------------------------------------------------------------- /judge/migrations/0002_submission_problem.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.2 on 2016-02-26 16:28 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('judge', '0001_initial'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AddField( 17 | model_name='submission', 18 | name='problem', 19 | field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='judge.Problem'), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /judge/migrations/0007_auto_20160405_1702.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.2 on 2016-04-05 17:02 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('judge', '0006_auto_20160405_1603'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='submission', 18 | name='submitter', 19 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='judge.Coder'), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /static/semantic/components/sticky.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Sticky 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.sticky{position:static;-webkit-transition:none;transition:none;z-index:800}.ui.sticky.bound{position:absolute;left:auto;right:auto}.ui.sticky.fixed{position:fixed;left:auto;right:auto}.ui.sticky.bound.top,.ui.sticky.fixed.top{top:0;bottom:auto}.ui.sticky.bound.bottom,.ui.sticky.fixed.bottom{top:auto;bottom:0}.ui.native.sticky{position:-webkit-sticky;position:-moz-sticky;position:-ms-sticky;position:-o-sticky;position:sticky} -------------------------------------------------------------------------------- /notes: -------------------------------------------------------------------------------- 1 | TODO: 2 | * sandbox for security, best option seems to be docker. 3 | * celery worker if I want to make it at least a little efficient 4 | * write code allowing the user to add a question 5 | * work on the UI 6 | 7 | Security: 8 | * Easiest is chroot, I think. 9 | * Docker is pretty easy also and better because chroot requires that 10 | the server runs as root which is not realistic. 11 | * There are other ways, SELinux and Apparmor but they seem difficult and time 12 | taking. 13 | 14 | Tasks: 15 | * Need to automate the task mechanism. 16 | * Maybe have to make some changes in the Database structure as well. 17 | 18 | UI: 19 | * Fix it. 20 | * Maybe use semantic, so that it looks cool. 21 | -------------------------------------------------------------------------------- /judge/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import patterns, url 2 | from judge import views 3 | 4 | urlpatterns = [ 5 | url(r'^$', views.index, name='index'), 6 | url(r'^register/$', views.register_user, name='register'), 7 | url(r'^logout/$', views.loguserout, name = 'loguserout'), 8 | url(r'^login/$', views.loguserin, name = 'loguserin'), 9 | url(r'^add-problem/$', views.add_problem, name = "add_problem"), 10 | url(r'^problems/$', views.all_problems, name = "all_problems"), 11 | url(r'^problems/(?P[\w\-]+)$', views.view_problem, name="view_prob"), 12 | url(r'^submit/(?P[\w\-]+)$', views.submit, name="submit"), 13 | url(r'^submission/(?P[\d]+)$', views.view_submission, name="view_sub"), 14 | ] 15 | -------------------------------------------------------------------------------- /judge/migrations/0003_auto_20160226_1636.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.2 on 2016-02-26 16:36 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('judge', '0002_submission_problem'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='submission', 17 | name='code', 18 | field=models.TextField(default=''), 19 | ), 20 | migrations.AddField( 21 | model_name='submission', 22 | name='lang', 23 | field=models.CharField(choices=[('C', 'GNU C'), ('CPP', 'GNU C++'), ('JAVA', 'Java 1.7'), ('PYTH', 'Python 2.7'), ('PYTH3', 'Python 3')], default='C', max_length=4), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /poj/urls.py: -------------------------------------------------------------------------------- 1 | """poj URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/1.9/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import url, include 17 | from django.contrib import admin 18 | 19 | urlpatterns = [ 20 | url(r'^admin/', admin.site.urls), 21 | url(r'^judge/', include('judge.urls')), 22 | ] 23 | -------------------------------------------------------------------------------- /static/semantic/package.js: -------------------------------------------------------------------------------- 1 | var 2 | where = 'client' // Adds files only to the client 3 | ; 4 | 5 | Package.describe({ 6 | name : 'semantic:ui-css', 7 | summary : 'Semantic UI - CSS Release of Semantic UI', 8 | version : '2.1.8', 9 | git : 'git://github.com/Semantic-Org/Semantic-UI-CSS.git', 10 | }); 11 | 12 | Package.onUse(function(api) { 13 | 14 | api.versionsFrom('1.0'); 15 | 16 | api.use('jquery', 'client'); 17 | 18 | api.addFiles([ 19 | // icons 20 | 'themes/default/assets/fonts/icons.eot', 21 | 'themes/default/assets/fonts/icons.svg', 22 | 'themes/default/assets/fonts/icons.ttf', 23 | 'themes/default/assets/fonts/icons.woff', 24 | 'themes/default/assets/fonts/icons.woff2', 25 | 26 | // flags 27 | 'themes/default/assets/images/flags.png', 28 | 29 | // release 30 | 'semantic.css', 31 | 'semantic.js' 32 | ], 'client'); 33 | 34 | }); 35 | -------------------------------------------------------------------------------- /templates/judge/submit.html: -------------------------------------------------------------------------------- 1 | {% extends 'judge/base.html' %} 2 | 3 | {% block body_block %} 4 |
5 | 6 |

Submit a Solution!

7 | 8 |
10 | {% csrf_token %} 11 |

12 |

16 |

18 |
19 | 20 |
21 |
22 | 23 | 27 | {% endblock %} 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /judge/migrations/0005_auto_20160321_1928.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.2 on 2016-03-21 19:28 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('judge', '0004_problem_num_tests'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AddField( 17 | model_name='problem', 18 | name='author', 19 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='judge.Coder'), 20 | ), 21 | migrations.AlterField( 22 | model_name='problem', 23 | name='code', 24 | field=models.CharField(max_length=20, unique=True), 25 | ), 26 | migrations.AlterField( 27 | model_name='problem', 28 | name='num_tests', 29 | field=models.IntegerField(default=1), 30 | ), 31 | ] 32 | -------------------------------------------------------------------------------- /judge/migrations/0011_auto_20160522_1751.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.2 on 2016-05-22 17:51 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('judge', '0010_submission_private'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='problem', 17 | name='num_ce', 18 | field=models.IntegerField(default=0), 19 | ), 20 | migrations.AlterField( 21 | model_name='problem', 22 | name='time_limit', 23 | field=models.IntegerField(default=1), 24 | ), 25 | migrations.AlterField( 26 | model_name='submission', 27 | name='status', 28 | field=models.CharField(choices=[('NT', 'Not tested'), ('CE', 'Compile Error'), ('TL', 'Time Limit Exceeded'), ('RE', 'Runtime Error'), ('AC', 'Accepted')], default='NT', max_length=2), 29 | ), 30 | ] 31 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2016 Param Singh 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | -------------------------------------------------------------------------------- /static/semantic/components/tab.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Tab 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.tab{display:none}.ui.tab.active,.ui.tab.open{display:block}.ui.tab.loading{position:relative;overflow:hidden;display:block;min-height:250px}.ui.tab.loading *{position:relative!important;left:-10000px!important}.ui.tab.loading.segment:before,.ui.tab.loading:before{position:absolute;content:'';top:100px;left:50%;margin:-1.25em 0 0 -1.25em;width:2.5em;height:2.5em;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.tab.loading.segment:after,.ui.tab.loading:after{position:absolute;content:'';top:100px;left:50%;margin:-1.25em 0 0 -1.25em;width:2.5em;height:2.5em;-webkit-animation:button-spin .6s linear;animation:button-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent} -------------------------------------------------------------------------------- /templates/judge/register.html: -------------------------------------------------------------------------------- 1 | {% extends 'judge/base.html' %} 2 | 3 | {% block title %} Register {% endblock %} 4 | 5 | {% block body_block %} 6 |
7 |

Register with POJ!

8 | 9 | {% if registered %} 10 | Thank you for registering! 11 | {% else %} 12 |
14 | {% csrf_token %} 15 |

Username

16 |
17 |
18 | 19 |
20 |
21 | 22 | 23 | 24 |
Password
25 | 26 |
27 |
28 | 29 |
30 |
31 |
32 | 33 | 34 |
35 |
36 |
37 | {% endif %} 38 | {% endblock %} 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /judge/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from judge.models import Coder, Problem, TestCase, Submission 3 | from django.contrib.auth.models import User 4 | 5 | class UserForm(forms.ModelForm): 6 | password = forms.CharField(widget=forms.PasswordInput()) 7 | class Meta: 8 | model = User 9 | fields = {'username', 'password'} 10 | 11 | class ProblemForm(forms.ModelForm): 12 | name = forms.CharField() 13 | code = forms.CharField() 14 | statement = forms.CharField(widget = forms.Textarea) 15 | time_limit = forms.IntegerField() 16 | source = forms.CharField() 17 | input1 = forms.FileField() 18 | output1 = forms.FileField() 19 | 20 | class Meta: 21 | model = Problem 22 | fields = ['name', 'code', 'statement', 'time_limit', 'source', 'input1', 'output1'] 23 | 24 | 25 | class SubmissionForm(forms.ModelForm): 26 | langs = [("C", "C"), ("CPP", "C++"), ("JAVA", "Java"), ("PYTH", "python"), ("PYTH3", "python 3")] 27 | lang = forms.ChoiceField(choices = langs) 28 | code = forms.CharField(widget = forms.Textarea) 29 | 30 | class Meta: 31 | model = Submission 32 | fields = ['lang', 'code'] 33 | -------------------------------------------------------------------------------- /static/semantic/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Semantic Org 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /judge/migrations/0008_auto_20160405_1704.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.2 on 2016-04-05 17:04 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('judge', '0007_auto_20160405_1702'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='submission', 18 | name='problem', 19 | field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='judge.Problem'), 20 | ), 21 | migrations.AlterField( 22 | model_name='unevaluatedsubmission', 23 | name='problem', 24 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='judge.Problem'), 25 | ), 26 | migrations.AlterField( 27 | model_name='unevaluatedsubmission', 28 | name='submitter', 29 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='judge.Coder'), 30 | ), 31 | ] 32 | -------------------------------------------------------------------------------- /static/semantic/components/rail.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Rail 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.rail{position:absolute;top:0;width:300px;height:100%;font-size:1rem}.ui.left.rail{left:auto;right:100%;padding:0 2rem 0 0;margin:0 2rem 0 0}.ui.right.rail{left:100%;right:auto;padding:0 0 0 2rem;margin:0 0 0 2rem}.ui.left.internal.rail{left:0;right:auto;padding:0 0 0 2rem;margin:0 0 0 2rem}.ui.right.internal.rail{left:auto;right:0;padding:0 2rem 0 0;margin:0 2rem 0 0}.ui.dividing.rail{width:302.5px}.ui.left.dividing.rail{padding:0 2.5rem 0 0;margin:0 2.5rem 0 0;border-right:1px solid rgba(34,36,38,.15)}.ui.right.dividing.rail{border-left:1px solid rgba(34,36,38,.15);padding:0 0 0 2.5rem;margin:0 0 0 2.5rem}.ui.close.rail{width:301px}.ui.close.left.rail{padding:0 1em 0 0;margin:0 1em 0 0}.ui.close.right.rail{padding:0 0 0 1em;margin:0 0 0 1em}.ui.very.close.rail{width:300.5px}.ui.very.close.left.rail{padding:0 .5em 0 0;margin:0 .5em 0 0}.ui.very.close.right.rail{padding:0 0 0 .5em;margin:0 0 0 .5em}.ui.attached.left.rail,.ui.attached.right.rail{padding:0;margin:0} -------------------------------------------------------------------------------- /static/semantic/components/breadcrumb.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Breadcrumb 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.breadcrumb{line-height:1;display:inline-block;margin:0;vertical-align:middle}.ui.breadcrumb:first-child{margin-top:0}.ui.breadcrumb:last-child{margin-bottom:0}.ui.breadcrumb .divider{display:inline-block;opacity:.7;margin:0 .21428571rem;font-size:.92857143em;color:rgba(0,0,0,.4);vertical-align:baseline}.ui.breadcrumb a{color:#4183c4}.ui.breadcrumb a:hover{color:#1e70bf}.ui.breadcrumb .icon.divider{font-size:.85714286em;vertical-align:baseline}.ui.breadcrumb a.section{cursor:pointer}.ui.breadcrumb .section{display:inline-block;margin:0;padding:0}.ui.breadcrumb.segment{display:inline-block;padding:.71428571em 1em}.ui.breadcrumb .active.section{font-weight:700}.ui.mini.breadcrumb{font-size:.71428571rem}.ui.tiny.breadcrumb{font-size:.85714286rem}.ui.small.breadcrumb{font-size:.92857143rem}.ui.breadcrumb{font-size:1rem}.ui.large.breadcrumb{font-size:1.14285714rem}.ui.big.breadcrumb{font-size:1.28571429rem}.ui.huge.breadcrumb{font-size:1.42857143rem}.ui.massive.breadcrumb{font-size:1.71428571rem} -------------------------------------------------------------------------------- /static/semantic/components/video.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.0.0 - Video 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2014 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.video{background-color:#ddd;position:relative;max-width:100%;padding-bottom:56.25%;height:0;overflow:hidden}.ui.video .placeholder{background-color:#333}.ui.video .play{cursor:pointer;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%;background:0 0;-webkit-transition:background .2s ease;transition:background .2s ease}.ui.video .play.icon:before{position:absolute;top:50%;left:50%;z-index:11;-webkit-transform:translateX(-50%)translateY(-50%);-ms-transform:translateX(-50%)translateY(-50%);transform:translateX(-50%)translateY(-50%);color:rgba(255,255,255,.7);font-size:7rem;text-shadow:2px 2px 0 rgba(0,0,0,.15);-webkit-transition:color .2s ease;transition:color .2s ease}.ui.video .placeholder{position:absolute;top:0;left:0;display:block;width:100%;height:100%}.ui.video .embed embed,.ui.video .embed iframe,.ui.video .embed object{position:absolute;border:none;width:100%;height:100%;top:0;left:0;margin:0;padding:0}.ui.video .play:hover{background:0 0}.ui.video .play:hover:before{color:#fff}.ui.active.video .placeholder,.ui.active.video .play{display:none}.ui.active.video .embed{display:inline} -------------------------------------------------------------------------------- /templates/judge/login.html: -------------------------------------------------------------------------------- 1 | {% extends 'judge/base.html' %} 2 | 3 | {% block title %} Login {% endblock %} 4 | 5 | {% block body_block %} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |
16 |
17 |
18 | {% csrf_token %} 19 |
20 | 21 |
22 | 23 | 24 |
25 |
26 | 27 |
28 | 29 | 30 |
31 |
32 | 33 |
34 |
35 | 36 |
37 | 38 | 39 |
40 | Or 41 |
42 |
43 | 47 |
48 | 49 |
50 | 51 | {% endblock %} 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # poj 2 | 3 | POJ is an online judge. I couldn't think of a better name. 4 | 5 | It is written in Python3 and Django. It uses Docker and Celery for submission 6 | evaluation. Docker makes sure each submission is run in a seperate container, 7 | while Celery makes it all asynchronous. The message broker we're using for 8 | Celery here is redis. 9 | 10 | The front-end uses Semantic UI. 11 | 12 | Any pull requests would be welcome! 13 | 14 | ## Setup 15 | 16 | Clone the repository 17 | 18 | git clone https://github.com/paramsingh/poj.git 19 | 20 | cd into the cloned directory and setup a new virtualenv there 21 | 22 | cd poj/ 23 | virtualenv . 24 | 25 | Activate the newly created virtualenv and install all the required dependencies in it using pip 26 | 27 | source bin/activate 28 | pip install -r requirements.txt 29 | 30 | Install docker for your distribution and create an image named 'poj' using the dockerfile in 'poj/docker' 31 | 32 | cd docker 33 | docker build -t poj . 34 | 35 | Create a new database. 36 | 37 | python3 manage.py migrate 38 | 39 | Create an admin user 40 | 41 | python3 manage.py createsuperuser 42 | 43 | Run the development server, the redis server, the celery worker and scheduler, each in a different terminal. 44 | 45 | python3 manage.py runserver 46 | redis-server 47 | celery -A poj worker -l info 48 | celery -A poj beat -l info 49 | 50 | The site should be accessible at `localhost:8000/judge`. 51 | 52 | -------------------------------------------------------------------------------- /judge/migrations/0006_auto_20160405_1603.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.2 on 2016-04-05 16:03 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('judge', '0005_auto_20160321_1928'), 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='UnevaluatedSubmission', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('lang', models.CharField(choices=[('C', 'GNU C'), ('CPP', 'GNU C++'), ('JAVA', 'Java 1.7'), ('PYTH', 'Python 2.7'), ('PYTH3', 'Python 3')], default='C', max_length=4)), 21 | ('code', models.TextField(default='')), 22 | ('created', models.DateTimeField(auto_now_add=True)), 23 | ('problem', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='judge.Problem')), 24 | ('submitter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='judge.Coder')), 25 | ], 26 | ), 27 | migrations.AddField( 28 | model_name='submission', 29 | name='unevaluated', 30 | field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='judge.UnevaluatedSubmission'), 31 | ), 32 | ] 33 | -------------------------------------------------------------------------------- /static/semantic/components/nag.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Nag 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.nag{display:none;opacity:.95;position:relative;top:0;left:0;z-index:999;min-height:0;width:100%;margin:0;padding:.75em 1em;background:#555;box-shadow:0 1px 2px 0 rgba(0,0,0,.2);font-size:1rem;text-align:center;color:rgba(0,0,0,.87);border-radius:0 0 .28571429rem .28571429rem;-webkit-transition:.2s background ease;transition:.2s background ease}a.ui.nag{cursor:pointer}.ui.nag>.title{display:inline-block;margin:0 .5em;color:#fff}.ui.nag>.close.icon{cursor:pointer;opacity:.4;position:absolute;top:50%;right:1em;font-size:1em;margin:-.5em 0 0;color:#fff;-webkit-transition:opacity .2s ease;transition:opacity .2s ease}.ui.nag:hover{background:#555;opacity:1}.ui.nag .close:hover{opacity:1}.ui.overlay.nag{position:absolute;display:block}.ui.fixed.nag{position:fixed}.ui.bottom.nag,.ui.bottom.nags{border-radius:.28571429rem .28571429rem 0 0;top:auto;bottom:0}.ui.inverted.nag,.ui.inverted.nags .nag{background-color:#f3f4f5;color:rgba(0,0,0,.85)}.ui.inverted.nag .close,.ui.inverted.nag .title,.ui.inverted.nags .nag .close,.ui.inverted.nags .nag .title{color:rgba(0,0,0,.4)}.ui.nags .nag{border-radius:0!important}.ui.nags .nag:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.bottom.nags .nag:last-child{border-radius:.28571429rem .28571429rem 0 0} -------------------------------------------------------------------------------- /judge/migrations/0009_auto_20160522_1549.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.2 on 2016-05-22 15:49 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('judge', '0008_auto_20160405_1704'), 13 | ] 14 | 15 | operations = [ 16 | migrations.RemoveField( 17 | model_name='unevaluatedsubmission', 18 | name='problem', 19 | ), 20 | migrations.RemoveField( 21 | model_name='unevaluatedsubmission', 22 | name='submitter', 23 | ), 24 | migrations.RemoveField( 25 | model_name='submission', 26 | name='unevaluated', 27 | ), 28 | migrations.AddField( 29 | model_name='coder', 30 | name='problems_ac', 31 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='problems_ac', to='judge.Problem'), 32 | ), 33 | migrations.RemoveField( 34 | model_name='coder', 35 | name='problems_tried', 36 | ), 37 | migrations.AddField( 38 | model_name='coder', 39 | name='problems_tried', 40 | field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='problems_tried', to='judge.Problem'), 41 | ), 42 | migrations.DeleteModel( 43 | name='UnevaluatedSubmission', 44 | ), 45 | ] 46 | -------------------------------------------------------------------------------- /static/semantic/components/sticky.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Sticky 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Sticky 15 | *******************************/ 16 | 17 | .ui.sticky { 18 | position: static; 19 | -webkit-transition: none; 20 | transition: none; 21 | z-index: 800; 22 | } 23 | 24 | 25 | /******************************* 26 | States 27 | *******************************/ 28 | 29 | 30 | /* Bound */ 31 | .ui.sticky.bound { 32 | position: absolute; 33 | left: auto; 34 | right: auto; 35 | } 36 | 37 | /* Fixed */ 38 | .ui.sticky.fixed { 39 | position: fixed; 40 | left: auto; 41 | right: auto; 42 | } 43 | 44 | /* Bound/Fixed Position */ 45 | .ui.sticky.bound.top, 46 | .ui.sticky.fixed.top { 47 | top: 0px; 48 | bottom: auto; 49 | } 50 | .ui.sticky.bound.bottom, 51 | .ui.sticky.fixed.bottom { 52 | top: auto; 53 | bottom: 0px; 54 | } 55 | 56 | 57 | /******************************* 58 | Types 59 | *******************************/ 60 | 61 | .ui.native.sticky { 62 | position: -webkit-sticky; 63 | position: -moz-sticky; 64 | position: -ms-sticky; 65 | position: -o-sticky; 66 | position: sticky; 67 | } 68 | 69 | 70 | /******************************* 71 | Theme Overrides 72 | *******************************/ 73 | 74 | 75 | 76 | /******************************* 77 | Site Overrides 78 | *******************************/ 79 | 80 | -------------------------------------------------------------------------------- /static/semantic/components/site.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Site 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin);body,html{height:100%}html{font-size:14px}body{margin:0;padding:0;overflow-x:hidden;min-width:320px;background:#fff;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:14px;line-height:1.4285em;color:rgba(0,0,0,.87);font-smoothing:antialiased}h1,h2,h3,h4,h5{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;line-height:1.2857em;margin:calc(2rem - .14285em) 0 1rem;font-weight:700;padding:0}h1{min-height:1rem;font-size:2rem}h2{font-size:1.714rem}h3{font-size:1.28rem}h4{font-size:1.071rem}h5{font-size:1rem}h1:first-child,h2:first-child,h3:first-child,h4:first-child,h5:first-child,p:first-child{margin-top:0}h1:last-child,h2:last-child,h3:last-child,h4:last-child,h5:last-child,p:last-child{margin-bottom:0}p{margin:0 0 1em;line-height:1.4285em}a{color:#4183c4;text-decoration:none}a:hover{color:#1e70bf;text-decoration:none}::-webkit-selection{background-color:#cce2ff;color:rgba(0,0,0,.87)}::-moz-selection{background-color:#cce2ff;color:rgba(0,0,0,.87)}::selection{background-color:#cce2ff;color:rgba(0,0,0,.87)}input::-webkit-selection,textarea::-webkit-selection{background-color:rgba(100,100,100,.4);color:rgba(0,0,0,.87)}input::-moz-selection,textarea::-moz-selection{background-color:rgba(100,100,100,.4);color:rgba(0,0,0,.87)}input::selection,textarea::selection{background-color:rgba(100,100,100,.4);color:rgba(0,0,0,.87)} -------------------------------------------------------------------------------- /static/semantic/components/embed.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Video 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.embed{position:relative;max-width:100%;height:0;overflow:hidden;background:#dcddde;padding-bottom:56.25%}.ui.embed embed,.ui.embed iframe,.ui.embed object{position:absolute;border:none;width:100%;height:100%;top:0;left:0;margin:0;padding:0}.ui.embed>.embed{display:none}.ui.embed>.placeholder{position:absolute;cursor:pointer;top:0;left:0;display:block;width:100%;height:100%;background-color:radial-gradient(transparent 45%,rgba(0,0,0,.3))}.ui.embed>.icon{cursor:pointer;position:absolute;top:0;left:0;width:100%;height:100%;z-index:2}.ui.embed>.icon:after{position:absolute;top:0;left:0;width:100%;height:100%;z-index:3;content:'';background:-webkit-radial-gradient(transparent 45%,rgba(0,0,0,.3));background:radial-gradient(transparent 45%,rgba(0,0,0,.3));opacity:.5;-webkit-transition:opacity .5s ease;transition:opacity .5s ease}.ui.embed>.icon:before{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);color:#fff;font-size:6rem;text-shadow:0 2px 10px rgba(34,36,38,.2);-webkit-transition:opacity .5s ease,color .5s ease;transition:opacity .5s ease,color .5s ease;z-index:10}.ui.embed .icon:hover:after{background:-webkit-radial-gradient(transparent 45%,rgba(0,0,0,.3));background:radial-gradient(transparent 45%,rgba(0,0,0,.3));opacity:1}.ui.embed .icon:hover:before{color:#fff}.ui.active.embed>.icon,.ui.active.embed>.placeholder{display:none}.ui.active.embed>.embed{display:block}.ui.square.embed{padding-bottom:100%}.ui[class*="4:3"].embed{padding-bottom:75%}.ui[class*="16:9"].embed{padding-bottom:56.25%}.ui[class*="21:9"].embed{padding-bottom:42.85714286%} -------------------------------------------------------------------------------- /static/semantic/components/container.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Container 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.container{display:block;max-width:100%!important}@media only screen and (max-width:767px){.ui.container{width:auto!important;margin-left:1em!important;margin-right:1em!important}.ui.grid.container,.ui.relaxed.grid.container,.ui.very.relaxed.grid.container{width:auto!important}}@media only screen and (min-width:768px) and (max-width:991px){.ui.container{width:723px;margin-left:auto!important;margin-right:auto!important}.ui.grid.container{width:calc(723px + 2rem)!important}.ui.relaxed.grid.container{width:calc(723px + 3rem)!important}.ui.very.relaxed.grid.container{width:calc(723px + 5rem)!important}}@media only screen and (min-width:992px) and (max-width:1199px){.ui.container{width:933px;margin-left:auto!important;margin-right:auto!important}.ui.grid.container{width:calc(933px + 2rem)!important}.ui.relaxed.grid.container{width:calc(933px + 3rem)!important}.ui.very.relaxed.grid.container{width:calc(933px + 5rem)!important}}@media only screen and (min-width:1200px){.ui.container{width:1127px;margin-left:auto!important;margin-right:auto!important}.ui.grid.container{width:calc(1127px + 2rem)!important}.ui.relaxed.grid.container{width:calc(1127px + 3rem)!important}.ui.very.relaxed.grid.container{width:calc(1127px + 5rem)!important}}.ui.text.container{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;max-width:700px!important;line-height:1.5;font-size:1.14285714rem}.ui.fluid.container{width:100%}.ui[class*="left aligned"].container{text-align:left}.ui[class*="center aligned"].container{text-align:center}.ui[class*="right aligned"].container{text-align:right}.ui.justified.container{text-align:justify;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto} -------------------------------------------------------------------------------- /static/semantic/components/shape.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Shape 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.shape{position:relative;vertical-align:top;display:inline-block;-webkit-perspective:2000px;perspective:2000px;-webkit-transition:-webkit-transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out;transition:transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out}.ui.shape .sides{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.ui.shape .side{opacity:1;width:100%;margin:0!important;-webkit-backface-visibility:hidden;backface-visibility:hidden;display:none}.ui.shape .side *{-webkit-backface-visibility:visible!important;backface-visibility:visible!important}.ui.cube.shape .side{min-width:15em;height:15em;padding:2em;background-color:#e6e6e6;color:rgba(0,0,0,.87);box-shadow:0 0 2px rgba(0,0,0,.3)}.ui.cube.shape .side>.content{width:100%;height:100%;display:table;text-align:center;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ui.cube.shape .side>.content>div{display:table-cell;vertical-align:middle;font-size:2em}.ui.text.shape.animating .sides{position:static}.ui.text.shape .side{white-space:nowrap}.ui.text.shape .side>*{white-space:normal}.ui.loading.shape{position:absolute;top:-9999px;left:-9999px}.ui.shape .animating.side{position:absolute;top:0;left:0;display:block;z-index:100}.ui.shape .hidden.side{opacity:.6}.ui.shape.animating .sides{position:absolute;-webkit-transition:-webkit-transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out;transition:transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out}.ui.shape.animating .side{-webkit-transition:opacity .6s ease-in-out;transition:opacity .6s ease-in-out}.ui.shape .active.side{display:block} -------------------------------------------------------------------------------- /static/semantic/components/ad.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Ad 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2013 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.ad{display:block;overflow:hidden;margin:1em 0}.ui.ad:first-child,.ui.ad:last-child{margin:0}.ui.ad iframe{margin:0;padding:0;border:none;overflow:hidden}.ui.leaderboard.ad{width:728px;height:90px}.ui[class*="medium rectangle"].ad{width:300px;height:250px}.ui[class*="large rectangle"].ad{width:336px;height:280px}.ui[class*="half page"].ad{width:300px;height:600px}.ui.square.ad{width:250px;height:250px}.ui[class*="small square"].ad{width:200px;height:200px}.ui[class*="small rectangle"].ad{width:180px;height:150px}.ui[class*="vertical rectangle"].ad{width:240px;height:400px}.ui.button.ad{width:120px;height:90px}.ui[class*="square button"].ad{width:125px;height:125px}.ui[class*="small button"].ad{width:120px;height:60px}.ui.skyscraper.ad{width:120px;height:600px}.ui[class*="wide skyscraper"].ad{width:160px}.ui.banner.ad{width:468px;height:60px}.ui[class*="vertical banner"].ad{width:120px;height:240px}.ui[class*="top banner"].ad{width:930px;height:180px}.ui[class*="half banner"].ad{width:234px;height:60px}.ui[class*="large leaderboard"].ad{width:970px;height:90px}.ui.billboard.ad{width:970px;height:250px}.ui.panorama.ad{width:980px;height:120px}.ui.netboard.ad{width:580px;height:400px}.ui[class*="large mobile banner"].ad{width:320px;height:100px}.ui[class*="mobile leaderboard"].ad{width:320px;height:50px}.ui.mobile.ad{display:none}@media only screen and (max-width:767px){.ui.mobile.ad{display:block}}.ui.centered.ad{margin-left:auto;margin-right:auto}.ui.test.ad{position:relative;background:#545454}.ui.test.ad:after{position:absolute;top:50%;left:50%;width:100%;text-align:center;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);content:'Ad';color:#fff;font-size:1em;font-weight:700}.ui.mobile.test.ad:after{font-size:.85714286em}.ui.test.ad[data-text]:after{content:attr(data-text)} -------------------------------------------------------------------------------- /templates/judge/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% load staticfiles %} 4 | 5 | 6 | 7 | POJ - {% block title %} {% endblock %} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 46 |
47 |
48 |
49 |
50 | 51 |
52 |
53 | 54 |
55 | {% block body_block %} {% endblock %} 56 |
57 | 58 | 59 | 60 |
61 |
62 | 63 |
64 |
65 |
66 |
67 | 68 |
69 |
70 | 71 | 72 | 73 |
74 |
75 | 76 |
77 |
78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /static/semantic/components/tab.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Tab 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | UI Tabs 15 | *******************************/ 16 | 17 | .ui.tab { 18 | display: none; 19 | } 20 | 21 | 22 | /******************************* 23 | States 24 | *******************************/ 25 | 26 | 27 | /*-------------------- 28 | Active 29 | ---------------------*/ 30 | 31 | .ui.tab.active, 32 | .ui.tab.open { 33 | display: block; 34 | } 35 | 36 | /*-------------------- 37 | Loading 38 | ---------------------*/ 39 | 40 | .ui.tab.loading { 41 | position: relative; 42 | overflow: hidden; 43 | display: block; 44 | min-height: 250px; 45 | } 46 | .ui.tab.loading * { 47 | position: relative !important; 48 | left: -10000px !important; 49 | } 50 | .ui.tab.loading:before, 51 | .ui.tab.loading.segment:before { 52 | position: absolute; 53 | content: ''; 54 | top: 100px; 55 | left: 50%; 56 | margin: -1.25em 0em 0em -1.25em; 57 | width: 2.5em; 58 | height: 2.5em; 59 | border-radius: 500rem; 60 | border: 0.2em solid rgba(0, 0, 0, 0.1); 61 | } 62 | .ui.tab.loading:after, 63 | .ui.tab.loading.segment:after { 64 | position: absolute; 65 | content: ''; 66 | top: 100px; 67 | left: 50%; 68 | margin: -1.25em 0em 0em -1.25em; 69 | width: 2.5em; 70 | height: 2.5em; 71 | -webkit-animation: button-spin 0.6s linear; 72 | animation: button-spin 0.6s linear; 73 | -webkit-animation-iteration-count: infinite; 74 | animation-iteration-count: infinite; 75 | border-radius: 500rem; 76 | border-color: #767676 transparent transparent; 77 | border-style: solid; 78 | border-width: 0.2em; 79 | box-shadow: 0px 0px 0px 1px transparent; 80 | } 81 | 82 | 83 | /******************************* 84 | Tab Overrides 85 | *******************************/ 86 | 87 | 88 | 89 | /******************************* 90 | User Overrides 91 | *******************************/ 92 | 93 | -------------------------------------------------------------------------------- /static/semantic/components/reset.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Reset 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */*,:after,:before{box-sizing:inherit}html{box-sizing:border-box;font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}input[type=text],input[type=email],input[type=search],input[type=password]{-webkit-appearance:none;-moz-appearance:none}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} -------------------------------------------------------------------------------- /static/semantic/components/dimmer.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Dimmer 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.dimmable{position:relative}.ui.dimmer{display:none;position:absolute;top:0!important;left:0!important;width:100%;height:100%;text-align:center;vertical-align:middle;background-color:rgba(0,0,0,.85);opacity:0;line-height:1;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-transition:background-color .5s linear;transition:background-color .5s linear;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;will-change:opacity;z-index:1000}.ui.dimmer>.content{width:100%;height:100%;display:table;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ui.dimmer>.content>*{display:table-cell;vertical-align:middle;color:#fff}.ui.segment>.ui.dimmer{border-radius:inherit!important}.animating.dimmable:not(body),.dimmed.dimmable:not(body){overflow:hidden}.dimmed.dimmable>.ui.animating.dimmer,.dimmed.dimmable>.ui.visible.dimmer,.ui.active.dimmer{display:block;opacity:1}.ui.disabled.dimmer{width:0!important;height:0!important}.ui.page.dimmer{position:fixed;-webkit-transform-style:'';transform-style:'';-webkit-perspective:2000px;perspective:2000px;-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center}body.animating.in.dimmable,body.dimmed.dimmable{overflow:hidden}body.dimmable>.dimmer{position:fixed}.blurring.dimmable>:not(.dimmer){-webkit-filter:blur(0) grayscale(0);filter:blur(0) grayscale(0);-webkit-transition:800ms -webkit-filter ease,800ms filter ease;transition:800ms filter ease}.blurring.dimmed.dimmable>:not(.dimmer){-webkit-filter:blur(5px) grayscale(.7);filter:blur(5px) grayscale(.7)}.blurring.dimmable>.dimmer{background-color:rgba(0,0,0,.6)}.blurring.dimmable>.inverted.dimmer{background-color:rgba(255,255,255,.6)}.ui.dimmer>.top.aligned.content>*{vertical-align:top}.ui.dimmer>.bottom.aligned.content>*{vertical-align:bottom}.ui.inverted.dimmer{background-color:rgba(255,255,255,.85)}.ui.inverted.dimmer>.content>*{color:#fff}.ui.simple.dimmer{display:block;overflow:hidden;opacity:1;width:0;height:0;z-index:-100;background-color:transparent}.dimmed.dimmable>.ui.simple.dimmer{overflow:visible;opacity:1;width:100%;height:100%;background-color:rgba(0,0,0,.85);z-index:1}.ui.simple.inverted.dimmer{background-color:rgba(255,255,255,0)}.dimmed.dimmable>.ui.simple.inverted.dimmer{background-color:rgba(255,255,255,.85)} -------------------------------------------------------------------------------- /static/semantic/components/comment.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Comment 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.comments{margin:1.5em 0;max-width:650px}.ui.comments:first-child{margin-top:0}.ui.comments:last-child{margin-bottom:0}.ui.comments .comment{position:relative;background:0 0;margin:.5em 0 0;padding:.5em 0 0;border:none;border-top:none;line-height:1.2}.ui.comments .comment:first-child{margin-top:0;padding-top:0}.ui.comments .comment .comments{margin:0 0 .5em .5em;padding:1em 0 1em 1em}.ui.comments .comment .comments:before{position:absolute;top:0;left:0}.ui.comments .comment .comments .comment{border:none;border-top:none;background:0 0}.ui.comments .comment .avatar{display:block;width:2.5em;height:auto;float:left;margin:.2em 0 0}.ui.comments .comment .avatar img,.ui.comments .comment img.avatar{display:block;margin:0 auto;width:100%;height:100%;border-radius:.25rem}.ui.comments .comment>.content{display:block}.ui.comments .comment>.avatar~.content{margin-left:3.5em}.ui.comments .comment .author{font-size:1em;color:rgba(0,0,0,.87);font-weight:700}.ui.comments .comment a.author{cursor:pointer}.ui.comments .comment a.author:hover{color:#1e70bf}.ui.comments .comment .metadata{display:inline-block;margin-left:.5em;color:rgba(0,0,0,.4);font-size:.875em}.ui.comments .comment .metadata>*{display:inline-block;margin:0 .5em 0 0}.ui.comments .comment .metadata>:last-child{margin-right:0}.ui.comments .comment .text{margin:.25em 0 .5em;font-size:1em;word-wrap:break-word;color:rgba(0,0,0,.87);line-height:1.3}.ui.comments .comment .actions{font-size:.875em}.ui.comments .comment .actions a{cursor:pointer;display:inline-block;margin:0 .75em 0 0;color:rgba(0,0,0,.4)}.ui.comments .comment .actions a:last-child{margin-right:0}.ui.comments .comment .actions a.active,.ui.comments .comment .actions a:hover{color:rgba(0,0,0,.8)}.ui.comments>.reply.form{margin-top:1em}.ui.comments .comment .reply.form{width:100%;margin-top:1em}.ui.comments .reply.form textarea{font-size:1em;height:12em}.ui.collapsed.comments,.ui.comments .collapsed.comment,.ui.comments .collapsed.comments{display:none}.ui.threaded.comments .comment .comments{margin:-1.5em 0 -1em 1.25em;padding:3em 0 2em 2.25em;box-shadow:-1px 0 0 rgba(34,36,38,.15)}.ui.minimal.comments .comment .actions{opacity:0;position:absolute;top:0;right:0;left:auto;-webkit-transition:opacity .2s ease;transition:opacity .2s ease;-webkit-transition-delay:.1s;transition-delay:.1s}.ui.minimal.comments .comment>.content:hover>.actions{opacity:1}.ui.small.comments{font-size:.9em}.ui.comments{font-size:1em}.ui.large.comments{font-size:1.1em}.ui.huge.comments{font-size:1.2em} -------------------------------------------------------------------------------- /static/semantic/components/breadcrumb.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Breadcrumb 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Breadcrumb 15 | *******************************/ 16 | 17 | .ui.breadcrumb { 18 | line-height: 1; 19 | display: inline-block; 20 | margin: 0em 0em; 21 | vertical-align: middle; 22 | } 23 | .ui.breadcrumb:first-child { 24 | margin-top: 0em; 25 | } 26 | .ui.breadcrumb:last-child { 27 | margin-bottom: 0em; 28 | } 29 | 30 | 31 | /******************************* 32 | Content 33 | *******************************/ 34 | 35 | 36 | /* Divider */ 37 | .ui.breadcrumb .divider { 38 | display: inline-block; 39 | opacity: 0.7; 40 | margin: 0em 0.21428571rem 0em; 41 | font-size: 0.92857143em; 42 | color: rgba(0, 0, 0, 0.4); 43 | vertical-align: baseline; 44 | } 45 | 46 | /* Link */ 47 | .ui.breadcrumb a { 48 | color: #4183c4; 49 | } 50 | .ui.breadcrumb a:hover { 51 | color: #1e70bf; 52 | } 53 | 54 | /* Icon Divider */ 55 | .ui.breadcrumb .icon.divider { 56 | font-size: 0.85714286em; 57 | vertical-align: baseline; 58 | } 59 | 60 | /* Section */ 61 | .ui.breadcrumb a.section { 62 | cursor: pointer; 63 | } 64 | .ui.breadcrumb .section { 65 | display: inline-block; 66 | margin: 0em; 67 | padding: 0em; 68 | } 69 | 70 | /* Loose Coupling */ 71 | .ui.breadcrumb.segment { 72 | display: inline-block; 73 | padding: 0.71428571em 1em; 74 | } 75 | 76 | 77 | /******************************* 78 | States 79 | *******************************/ 80 | 81 | .ui.breadcrumb .active.section { 82 | font-weight: bold; 83 | } 84 | 85 | 86 | /******************************* 87 | Variations 88 | *******************************/ 89 | 90 | .ui.mini.breadcrumb { 91 | font-size: 0.71428571rem; 92 | } 93 | .ui.tiny.breadcrumb { 94 | font-size: 0.85714286rem; 95 | } 96 | .ui.small.breadcrumb { 97 | font-size: 0.92857143rem; 98 | } 99 | .ui.breadcrumb { 100 | font-size: 1rem; 101 | } 102 | .ui.large.breadcrumb { 103 | font-size: 1.14285714rem; 104 | } 105 | .ui.big.breadcrumb { 106 | font-size: 1.28571429rem; 107 | } 108 | .ui.huge.breadcrumb { 109 | font-size: 1.42857143rem; 110 | } 111 | .ui.massive.breadcrumb { 112 | font-size: 1.71428571rem; 113 | } 114 | 115 | 116 | /******************************* 117 | Theme Overrides 118 | *******************************/ 119 | 120 | 121 | 122 | /******************************* 123 | Site Overrides 124 | *******************************/ 125 | 126 | -------------------------------------------------------------------------------- /static/semantic/components/rail.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Rail 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Rails 15 | *******************************/ 16 | 17 | .ui.rail { 18 | position: absolute; 19 | top: 0%; 20 | width: 300px; 21 | height: 100%; 22 | } 23 | .ui.left.rail { 24 | left: auto; 25 | right: 100%; 26 | padding: 0em 2rem 0em 0em; 27 | margin: 0em 2rem 0em 0em; 28 | } 29 | .ui.right.rail { 30 | left: 100%; 31 | right: auto; 32 | padding: 0em 0em 0em 2rem; 33 | margin: 0em 0em 0em 2rem; 34 | } 35 | 36 | 37 | /******************************* 38 | Variations 39 | *******************************/ 40 | 41 | 42 | /*-------------- 43 | Internal 44 | ---------------*/ 45 | 46 | .ui.left.internal.rail { 47 | left: 0%; 48 | right: auto; 49 | padding: 0em 0em 0em 2rem; 50 | margin: 0em 0em 0em 2rem; 51 | } 52 | .ui.right.internal.rail { 53 | left: auto; 54 | right: 0%; 55 | padding: 0em 2rem 0em 0em; 56 | margin: 0em 2rem 0em 0em; 57 | } 58 | 59 | /*-------------- 60 | Dividing 61 | ---------------*/ 62 | 63 | .ui.dividing.rail { 64 | width: 302.5px; 65 | } 66 | .ui.left.dividing.rail { 67 | padding: 0em 2.5rem 0em 0em; 68 | margin: 0em 2.5rem 0em 0em; 69 | border-right: 1px solid rgba(34, 36, 38, 0.15); 70 | } 71 | .ui.right.dividing.rail { 72 | border-left: 1px solid rgba(34, 36, 38, 0.15); 73 | padding: 0em 0em 0em 2.5rem; 74 | margin: 0em 0em 0em 2.5rem; 75 | } 76 | 77 | /*-------------- 78 | Distance 79 | ---------------*/ 80 | 81 | .ui.close.rail { 82 | width: 301px; 83 | } 84 | .ui.close.left.rail { 85 | padding: 0em 1em 0em 0em; 86 | margin: 0em 1em 0em 0em; 87 | } 88 | .ui.close.right.rail { 89 | padding: 0em 0em 0em 1em; 90 | margin: 0em 0em 0em 1em; 91 | } 92 | .ui.very.close.rail { 93 | width: 300.5px; 94 | } 95 | .ui.very.close.left.rail { 96 | padding: 0em 0.5em 0em 0em; 97 | margin: 0em 0.5em 0em 0em; 98 | } 99 | .ui.very.close.right.rail { 100 | padding: 0em 0em 0em 0.5em; 101 | margin: 0em 0em 0em 0.5em; 102 | } 103 | 104 | /*-------------- 105 | Attached 106 | ---------------*/ 107 | 108 | .ui.attached.left.rail, 109 | .ui.attached.right.rail { 110 | padding: 0em; 111 | margin: 0em; 112 | } 113 | 114 | /*-------------- 115 | Sizing 116 | ---------------*/ 117 | 118 | .ui.rail { 119 | font-size: 1rem; 120 | } 121 | 122 | 123 | /******************************* 124 | Theme Overrides 125 | *******************************/ 126 | 127 | 128 | 129 | /******************************* 130 | Site Overrides 131 | *******************************/ 132 | 133 | -------------------------------------------------------------------------------- /static/semantic/components/video.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.0.0 - Video 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2014 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Video 15 | *******************************/ 16 | 17 | .ui.video { 18 | background-color: #dddddd; 19 | position: relative; 20 | max-width: 100%; 21 | padding-bottom: 56.25%; 22 | height: 0px; 23 | overflow: hidden; 24 | } 25 | 26 | /*-------------- 27 | Content 28 | ---------------*/ 29 | 30 | 31 | /* Placeholder Image */ 32 | .ui.video .placeholder { 33 | background-color: #333333; 34 | } 35 | 36 | /* Play Icon Overlay */ 37 | .ui.video .play { 38 | cursor: pointer; 39 | position: absolute; 40 | top: 0px; 41 | left: 0px; 42 | z-index: 10; 43 | width: 100%; 44 | height: 100%; 45 | background: transparent; 46 | -webkit-transition: background 0.2s ease; 47 | transition: background 0.2s ease; 48 | } 49 | .ui.video .play.icon:before { 50 | position: absolute; 51 | top: 50%; 52 | left: 50%; 53 | z-index: 11; 54 | -webkit-transform: translateX(-50%) translateY(-50%); 55 | -ms-transform: translateX(-50%) translateY(-50%); 56 | transform: translateX(-50%) translateY(-50%); 57 | color: rgba(255, 255, 255, 0.7); 58 | font-size: 7rem; 59 | text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15); 60 | -webkit-transition: color 0.2s ease; 61 | transition: color 0.2s ease; 62 | } 63 | .ui.video .placeholder { 64 | position: absolute; 65 | top: 0px; 66 | left: 0px; 67 | display: block; 68 | width: 100%; 69 | height: 100%; 70 | } 71 | 72 | /* IFrame Embed */ 73 | .ui.video .embed iframe, 74 | .ui.video .embed embed, 75 | .ui.video .embed object { 76 | position: absolute; 77 | border: none; 78 | width: 100%; 79 | height: 100%; 80 | top: 0px; 81 | left: 0px; 82 | margin: 0em; 83 | padding: 0em; 84 | } 85 | 86 | 87 | /******************************* 88 | States 89 | *******************************/ 90 | 91 | 92 | /*-------------- 93 | Hover 94 | ---------------*/ 95 | 96 | .ui.video .play:hover { 97 | background: rgba(0, 0, 0, 0); 98 | } 99 | .ui.video .play:hover:before { 100 | color: #ffffff; 101 | } 102 | 103 | /*-------------- 104 | Active 105 | ---------------*/ 106 | 107 | .ui.active.video .play, 108 | .ui.active.video .placeholder { 109 | display: none; 110 | } 111 | .ui.active.video .embed { 112 | display: inline; 113 | } 114 | 115 | 116 | /******************************* 117 | Video Overrides 118 | *******************************/ 119 | 120 | 121 | 122 | /******************************* 123 | Site Overrides 124 | *******************************/ 125 | 126 | -------------------------------------------------------------------------------- /static/semantic/components/colorize.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.0.0 - Colorize 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | !function(e,n,i,t){"use strict";e.fn.colorize=function(n){var i=e.isPlainObject(n)?e.extend(!0,{},e.fn.colorize.settings,n):e.extend({},e.fn.colorize.settings),o=arguments||!1;return e(this).each(function(n){var a,r,c,s,d,g,u,l,m=e(this),f=e("")[0],h=e("")[0],p=e("")[0],v=new Image,w=i.colors,b=(i.paths,i.namespace),y=i.error,C=m.data("module-"+b);return l={checkPreconditions:function(){return l.debug("Checking pre-conditions"),!e.isPlainObject(w)||e.isEmptyObject(w)?(l.error(y.undefinedColors),!1):!0},async:function(e){i.async?setTimeout(e,0):e()},getMetadata:function(){l.debug("Grabbing metadata"),s=m.data("image")||i.image||t,d=m.data("name")||i.name||n,g=i.width||m.width(),u=i.height||m.height(),(0===g||0===u)&&l.error(y.undefinedSize)},initialize:function(){l.debug("Initializing with colors",w),l.checkPreconditions()&&l.async(function(){l.getMetadata(),l.canvas.create(),l.draw.image(function(){l.draw.colors(),l.canvas.merge()}),m.data("module-"+b,l)})},redraw:function(){l.debug("Redrawing image"),l.async(function(){l.canvas.clear(),l.draw.colors(),l.canvas.merge()})},change:{color:function(e,n){return l.debug("Changing color",e),w[e]===t?(l.error(y.missingColor),!1):(w[e]=n,void l.redraw())}},canvas:{create:function(){l.debug("Creating canvases"),f.width=g,f.height=u,h.width=g,h.height=u,p.width=g,p.height=u,a=f.getContext("2d"),r=h.getContext("2d"),c=p.getContext("2d"),m.append(f),a=m.children("canvas")[0].getContext("2d")},clear:function(e){l.debug("Clearing canvas"),c.fillStyle="#FFFFFF",c.fillRect(0,0,g,u)},merge:function(){return e.isFunction(a.blendOnto)?(a.putImageData(r.getImageData(0,0,g,u),0,0),void c.blendOnto(a,"multiply")):void l.error(y.missingPlugin)}},draw:{image:function(e){l.debug("Drawing image"),e=e||function(){},s?(v.src=s,v.onload=function(){r.drawImage(v,0,0),e()}):(l.error(y.noImage),e())},colors:function(){l.debug("Drawing color overlays",w),e.each(w,function(e,n){i.onDraw(c,d,e,n)})}},debug:function(e,n){i.debug&&(n!==t?console.info(i.name+": "+e,n):console.info(i.name+": "+e))},error:function(e){console.warn(i.name+": "+e)},invoke:function(n,o,a){var r;return a=a||Array.prototype.slice.call(arguments,2),"string"==typeof n&&C!==t&&(n=n.split("."),e.each(n,function(n,t){return e.isPlainObject(C[t])?(C=C[t],!0):e.isFunction(C[t])?(r=C[t],!0):(l.error(i.error.method),!1)})),e.isFunction(r)?r.apply(o,a):!1}},C!==t&&o?("invoke"==o[0]&&(o=Array.prototype.slice.call(o,1)),l.invoke(o[0],this,Array.prototype.slice.call(o,1))):void l.initialize()}),this},e.fn.colorize.settings={name:"Image Colorizer",debug:!0,namespace:"colorize",onDraw:function(e,n,i,t){},async:!0,colors:{},metadata:{image:"image",name:"name"},error:{noImage:"No tracing image specified",undefinedColors:"No default colors specified.",missingColor:"Attempted to change color that does not exist",missingPlugin:"Blend onto plug-in must be included",undefinedHeight:"The width or height of image canvas could not be automatically determined. Please specify a height."}}}(jQuery,window,document); -------------------------------------------------------------------------------- /static/semantic/components/nag.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Nag 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Nag 15 | *******************************/ 16 | 17 | .ui.nag { 18 | display: none; 19 | opacity: 0.95; 20 | position: relative; 21 | top: 0em; 22 | left: 0px; 23 | z-index: 999; 24 | min-height: 0em; 25 | width: 100%; 26 | margin: 0em; 27 | padding: 0.75em 1em; 28 | background: #555555; 29 | box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.2); 30 | font-size: 1rem; 31 | text-align: center; 32 | color: rgba(0, 0, 0, 0.87); 33 | border-radius: 0em 0em 0.28571429rem 0.28571429rem; 34 | -webkit-transition: 0.2s background ease; 35 | transition: 0.2s background ease; 36 | } 37 | a.ui.nag { 38 | cursor: pointer; 39 | } 40 | .ui.nag > .title { 41 | display: inline-block; 42 | margin: 0em 0.5em; 43 | color: #ffffff; 44 | } 45 | .ui.nag > .close.icon { 46 | cursor: pointer; 47 | opacity: 0.4; 48 | position: absolute; 49 | top: 50%; 50 | right: 1em; 51 | font-size: 1em; 52 | margin: -0.5em 0em 0em; 53 | color: #ffffff; 54 | -webkit-transition: opacity 0.2s ease; 55 | transition: opacity 0.2s ease; 56 | } 57 | 58 | 59 | /******************************* 60 | States 61 | *******************************/ 62 | 63 | 64 | /* Hover */ 65 | .ui.nag:hover { 66 | background: #555555; 67 | opacity: 1; 68 | } 69 | .ui.nag .close:hover { 70 | opacity: 1; 71 | } 72 | 73 | 74 | /******************************* 75 | Variations 76 | *******************************/ 77 | 78 | 79 | /*-------------- 80 | Static 81 | ---------------*/ 82 | 83 | .ui.overlay.nag { 84 | position: absolute; 85 | display: block; 86 | } 87 | 88 | /*-------------- 89 | Fixed 90 | ---------------*/ 91 | 92 | .ui.fixed.nag { 93 | position: fixed; 94 | } 95 | 96 | /*-------------- 97 | Bottom 98 | ---------------*/ 99 | 100 | .ui.bottom.nags, 101 | .ui.bottom.nag { 102 | border-radius: 0.28571429rem 0.28571429rem 0em 0em; 103 | top: auto; 104 | bottom: 0em; 105 | } 106 | 107 | /*-------------- 108 | White 109 | ---------------*/ 110 | 111 | .ui.inverted.nags .nag, 112 | .ui.inverted.nag { 113 | background-color: #f3f4f5; 114 | color: rgba(0, 0, 0, 0.85); 115 | } 116 | .ui.inverted.nags .nag .close, 117 | .ui.inverted.nags .nag .title, 118 | .ui.inverted.nag .close, 119 | .ui.inverted.nag .title { 120 | color: rgba(0, 0, 0, 0.4); 121 | } 122 | 123 | 124 | /******************************* 125 | Groups 126 | *******************************/ 127 | 128 | .ui.nags .nag { 129 | border-radius: 0em !important; 130 | } 131 | .ui.nags .nag:last-child { 132 | border-radius: 0em 0em 0.28571429rem 0.28571429rem; 133 | } 134 | .ui.bottom.nags .nag:last-child { 135 | border-radius: 0.28571429rem 0.28571429rem 0em 0em; 136 | } 137 | 138 | 139 | /******************************* 140 | Theme Overrides 141 | *******************************/ 142 | 143 | 144 | 145 | /******************************* 146 | User Overrides 147 | *******************************/ 148 | 149 | -------------------------------------------------------------------------------- /static/semantic/components/loader.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Loader 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.loader{display:none;position:absolute;top:50%;left:50%;margin:0;text-align:center;z-index:1000;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.ui.loader:before{position:absolute;content:'';top:0;left:50%;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.loader:after{position:absolute;content:'';top:0;left:50%;-webkit-animation:loader .6s linear;animation:loader .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent}@-webkit-keyframes loader{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes loader{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ui.loader:after,.ui.loader:before{width:2.2585em;height:2.2585em;margin:0 0 0 -1.12925em}.ui.mini.loader:after,.ui.mini.loader:before{width:1.2857em;height:1.2857em;margin:0 0 0 -.64285em}.ui.small.loader:after,.ui.small.loader:before{width:1.7142em;height:1.7142em;margin:0 0 0 -.8571em}.ui.large.loader:after,.ui.large.loader:before{width:4.5714em;height:4.5714em;margin:0 0 0 -2.2857em}.ui.dimmer .loader{display:block}.ui.dimmer .ui.loader{color:rgba(255,255,255,.9)}.ui.dimmer .ui.loader:before{border-color:rgba(255,255,255,.15)}.ui.dimmer .ui.loader:after{border-color:#fff transparent transparent}.ui.inverted.dimmer .ui.loader{color:rgba(0,0,0,.87)}.ui.inverted.dimmer .ui.loader:before{border-color:rgba(0,0,0,.1)}.ui.inverted.dimmer .ui.loader:after{border-color:#767676 transparent transparent}.ui.text.loader{width:auto!important;height:auto!important;text-align:center;font-style:normal}.ui.indeterminate.loader:after{-webkit-animation-direction:reverse;animation-direction:reverse;-webkit-animation-duration:1.2s;animation-duration:1.2s}.ui.loader.active,.ui.loader.visible{display:block}.ui.loader.disabled,.ui.loader.hidden{display:none}.ui.inverted.dimmer .ui.mini.loader,.ui.mini.loader{width:1.2857em;height:1.2857em;font-size:.71428571em}.ui.inverted.dimmer .ui.small.loader,.ui.small.loader{width:1.7142em;height:1.7142em;font-size:.92857143em}.ui.inverted.dimmer .ui.loader,.ui.loader{width:2.2585em;height:2.2585em;font-size:1em}.ui.inverted.dimmer .ui.loader.large,.ui.loader.large{width:4.5714em;height:4.5714em;font-size:1.14285714em}.ui.mini.text.loader{min-width:1.2857em;padding-top:1.99998571em}.ui.small.text.loader{min-width:1.7142em;padding-top:2.42848571em}.ui.text.loader{min-width:2.2585em;padding-top:2.97278571em}.ui.large.text.loader{min-width:4.5714em;padding-top:5.28568571em}.ui.inverted.loader{color:rgba(255,255,255,.9)}.ui.inverted.loader:before{border-color:rgba(255,255,255,.15)}.ui.inverted.loader:after{border-top-color:#fff}.ui.inline.loader{position:relative;vertical-align:middle;margin:0;left:0;top:0;-webkit-transform:none;-ms-transform:none;transform:none}.ui.inline.loader.active,.ui.inline.loader.visible{display:inline-block}.ui.centered.inline.loader.active,.ui.centered.inline.loader.visible{display:block;margin-left:auto;margin-right:auto} -------------------------------------------------------------------------------- /static/semantic/components/image.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Image 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.image{position:relative;display:inline-block;vertical-align:middle;max-width:100%;background-color:transparent}img.ui.image{display:block}.ui.image img,.ui.image svg{display:block;max-width:100%;height:auto}.ui.hidden.image,.ui.hidden.images{display:none}.ui.disabled.image,.ui.disabled.images{cursor:default;opacity:.45}.ui.inline.image,.ui.inline.image img,.ui.inline.image svg{display:inline-block}.ui.top.aligned.image,.ui.top.aligned.image img,.ui.top.aligned.image svg,.ui.top.aligned.images .image{display:inline-block;vertical-align:top}.ui.middle.aligned.image,.ui.middle.aligned.image img,.ui.middle.aligned.image svg,.ui.middle.aligned.images .image{display:inline-block;vertical-align:middle}.ui.bottom.aligned.image,.ui.bottom.aligned.image img,.ui.bottom.aligned.image svg,.ui.bottom.aligned.images .image{display:inline-block;vertical-align:bottom}.ui.rounded.image,.ui.rounded.image>*,.ui.rounded.images .image,.ui.rounded.images .image>*{border-radius:.3125em}.ui.bordered.image img,.ui.bordered.image svg,.ui.bordered.images .image,.ui.bordered.images img,.ui.bordered.images svg,img.ui.bordered.image{border:1px solid rgba(0,0,0,.1)}.ui.circular.image,.ui.circular.images{overflow:hidden}.ui.circular.image,.ui.circular.image>*,.ui.circular.images .image,.ui.circular.images .image>*{border-radius:500rem}.ui.fluid.image,.ui.fluid.image img,.ui.fluid.image svg,.ui.fluid.images,.ui.fluid.images img,.ui.fluid.images svg{display:block;width:100%;height:auto}.ui.avatar.image,.ui.avatar.image img,.ui.avatar.image svg,.ui.avatar.images .image,.ui.avatar.images img,.ui.avatar.images svg{margin-right:.25em;display:inline-block;width:2em;height:2em;border-radius:500rem}.ui.spaced.image{display:inline-block!important;margin-left:.5em;margin-right:.5em}.ui[class*="left spaced"].image{margin-left:.5em;margin-right:0}.ui[class*="right spaced"].image{margin-left:0;margin-right:.5em}.ui.floated.image,.ui.floated.images{float:left;margin-right:1em;margin-bottom:1em}.ui.right.floated.image,.ui.right.floated.images{float:right;margin-right:0;margin-bottom:1em;margin-left:1em}.ui.floated.image:last-child,.ui.floated.images:last-child{margin-bottom:0}.ui.centered.image,.ui.centered.images{margin-left:auto;margin-right:auto}.ui.mini.image,.ui.mini.images .image,.ui.mini.images img,.ui.mini.images svg{width:35px;height:auto;font-size:.71428571rem}.ui.tiny.image,.ui.tiny.images .image,.ui.tiny.images img,.ui.tiny.images svg{width:80px;height:auto;font-size:.85714286rem}.ui.small.image,.ui.small.images .image,.ui.small.images img,.ui.small.images svg{width:150px;height:auto;font-size:.92857143rem}.ui.medium.image,.ui.medium.images .image,.ui.medium.images img,.ui.medium.images svg{width:300px;height:auto;font-size:1rem}.ui.large.image,.ui.large.images .image,.ui.large.images img,.ui.large.images svg{width:450px;height:auto;font-size:1.14285714rem}.ui.big.image,.ui.big.images .image,.ui.big.images img,.ui.big.images svg{width:600px;height:auto;font-size:1.28571429rem}.ui.huge.image,.ui.huge.images .image,.ui.huge.images img,.ui.huge.images svg{width:800px;height:auto;font-size:1.42857143rem}.ui.massive.image,.ui.massive.images .image,.ui.massive.images img,.ui.massive.images svg{width:960px;height:auto;font-size:1.71428571rem}.ui.images{font-size:0;margin:0 -.25rem}.ui.images .image,.ui.images img,.ui.images svg{display:inline-block;margin:0 .25rem .5rem} -------------------------------------------------------------------------------- /static/semantic/components/site.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Site 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Page 15 | *******************************/ 16 | 17 | @import url('https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin'); 18 | html, 19 | body { 20 | height: 100%; 21 | } 22 | html { 23 | font-size: 14px; 24 | } 25 | body { 26 | margin: 0px; 27 | padding: 0px; 28 | overflow-x: hidden; 29 | min-width: 320px; 30 | background: #ffffff; 31 | font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; 32 | font-size: 14px; 33 | line-height: 1.4285em; 34 | color: rgba(0, 0, 0, 0.87); 35 | font-smoothing: antialiased; 36 | } 37 | 38 | 39 | /******************************* 40 | Headers 41 | *******************************/ 42 | 43 | h1, 44 | h2, 45 | h3, 46 | h4, 47 | h5 { 48 | font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; 49 | line-height: 1.2857em; 50 | margin: calc(2rem - 0.14285em ) 0em 1rem; 51 | font-weight: bold; 52 | padding: 0em; 53 | } 54 | h1 { 55 | min-height: 1rem; 56 | font-size: 2rem; 57 | } 58 | h2 { 59 | font-size: 1.714rem; 60 | } 61 | h3 { 62 | font-size: 1.28rem; 63 | } 64 | h4 { 65 | font-size: 1.071rem; 66 | } 67 | h5 { 68 | font-size: 1rem; 69 | } 70 | h1:first-child, 71 | h2:first-child, 72 | h3:first-child, 73 | h4:first-child, 74 | h5:first-child { 75 | margin-top: 0em; 76 | } 77 | h1:last-child, 78 | h2:last-child, 79 | h3:last-child, 80 | h4:last-child, 81 | h5:last-child { 82 | margin-bottom: 0em; 83 | } 84 | 85 | 86 | /******************************* 87 | Text 88 | *******************************/ 89 | 90 | p { 91 | margin: 0em 0em 1em; 92 | line-height: 1.4285em; 93 | } 94 | p:first-child { 95 | margin-top: 0em; 96 | } 97 | p:last-child { 98 | margin-bottom: 0em; 99 | } 100 | 101 | /*------------------- 102 | Links 103 | --------------------*/ 104 | 105 | a { 106 | color: #4183c4; 107 | text-decoration: none; 108 | } 109 | a:hover { 110 | color: #1e70bf; 111 | text-decoration: none; 112 | } 113 | 114 | 115 | /******************************* 116 | Highlighting 117 | *******************************/ 118 | 119 | 120 | /* Site */ 121 | ::-webkit-selection { 122 | background-color: #cce2ff; 123 | color: rgba(0, 0, 0, 0.87); 124 | } 125 | ::-moz-selection { 126 | background-color: #cce2ff; 127 | color: rgba(0, 0, 0, 0.87); 128 | } 129 | ::selection { 130 | background-color: #cce2ff; 131 | color: rgba(0, 0, 0, 0.87); 132 | } 133 | 134 | /* Form */ 135 | textarea::-webkit-selection, 136 | input::-webkit-selection { 137 | background-color: rgba(100, 100, 100, 0.4); 138 | color: rgba(0, 0, 0, 0.87); 139 | } 140 | textarea::-moz-selection, 141 | input::-moz-selection { 142 | background-color: rgba(100, 100, 100, 0.4); 143 | color: rgba(0, 0, 0, 0.87); 144 | } 145 | textarea::selection, 146 | input::selection { 147 | background-color: rgba(100, 100, 100, 0.4); 148 | color: rgba(0, 0, 0, 0.87); 149 | } 150 | 151 | 152 | /******************************* 153 | Global Overrides 154 | *******************************/ 155 | 156 | 157 | 158 | /******************************* 159 | Site Overrides 160 | *******************************/ 161 | 162 | -------------------------------------------------------------------------------- /judge/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.2 on 2016-02-26 16:21 3 | from __future__ import unicode_literals 4 | 5 | from django.conf import settings 6 | from django.db import migrations, models 7 | import django.db.models.deletion 8 | import judge.models 9 | 10 | 11 | class Migration(migrations.Migration): 12 | 13 | initial = True 14 | 15 | dependencies = [ 16 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 17 | ] 18 | 19 | operations = [ 20 | migrations.CreateModel( 21 | name='Coder', 22 | fields=[ 23 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 24 | ('link', models.URLField()), 25 | ('score', models.DecimalField(decimal_places=3, default=0, max_digits=100)), 26 | ('rank', models.IntegerField(default=-1)), 27 | ], 28 | ), 29 | migrations.CreateModel( 30 | name='Problem', 31 | fields=[ 32 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 33 | ('name', models.CharField(max_length=255)), 34 | ('code', models.CharField(max_length=128, unique=True)), 35 | ('link', models.URLField()), 36 | ('statement', models.TextField()), 37 | ('num_submissions', models.IntegerField(default=0)), 38 | ('num_accepted', models.IntegerField(default=0)), 39 | ('num_wa', models.IntegerField(default=0)), 40 | ('num_re', models.IntegerField(default=0)), 41 | ('num_tle', models.IntegerField(default=0)), 42 | ('date_added', models.DateTimeField(auto_now_add=True)), 43 | ('time_limit', models.IntegerField(default=1000)), 44 | ('source', models.CharField(max_length=255)), 45 | ], 46 | ), 47 | migrations.CreateModel( 48 | name='Submission', 49 | fields=[ 50 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 51 | ('status', models.CharField(choices=[('NT', 'Not tested'), ('CE', 'Compile Error'), ('TS', 'Tested')], default='NT', max_length=2)), 52 | ('created', models.DateTimeField(auto_now_add=True)), 53 | ('submitter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='judge.Coder')), 54 | ], 55 | ), 56 | migrations.CreateModel( 57 | name='TestCase', 58 | fields=[ 59 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 60 | ('input_file', models.FileField(upload_to=judge.models.in_upload_path)), 61 | ('output_file', models.FileField(upload_to=judge.models.out_upload_path)), 62 | ('problem', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='judge.Problem')), 63 | ], 64 | ), 65 | migrations.AddField( 66 | model_name='coder', 67 | name='problems_tried', 68 | field=models.ManyToManyField(related_name='problems_tried', to='judge.Problem'), 69 | ), 70 | migrations.AddField( 71 | model_name='coder', 72 | name='user', 73 | field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), 74 | ), 75 | ] 76 | -------------------------------------------------------------------------------- /judge/models.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | 3 | from django.db import models 4 | from django.contrib.auth.models import User 5 | 6 | def in_upload_path(instance, filename): 7 | """ Function to return upload path for test case input file""" 8 | return "/".join(["testcases", str(instance.problem.id)]) + ".in" 9 | 10 | 11 | def out_upload_path(instance, filename): 12 | """ Function to return upload path for test case output file""" 13 | return "/".join(["testcases", str(instance.problem.id)]) + ".out" 14 | 15 | 16 | # Model for users 17 | class Coder(models.Model): 18 | user = models.OneToOneField(User) 19 | link = models.URLField() 20 | score = models.DecimalField(default = 0, decimal_places = 3, max_digits = 100) 21 | rank = models.IntegerField(default = -1) 22 | problems_tried = models.ForeignKey('Problem', null = True, related_name = "problems_tried") 23 | problems_ac = models.ForeignKey('Problem', null = True, related_name = "problems_ac") 24 | 25 | def __unicode__(self): 26 | return self.user.username 27 | 28 | 29 | # Model for the Problems to be uploaded on the judge 30 | class Problem(models.Model): 31 | # Problem name (example: life, the universe and everything) 32 | name = models.CharField(max_length=255) 33 | # Problem code (example: TEST) 34 | code = models.CharField(max_length=20, unique = True) 35 | # Problem link (example: poj.com/problems/TEST) 36 | link = models.URLField() 37 | # Problem statement 38 | statement = models.TextField() 39 | 40 | num_submissions = models.IntegerField(default = 0) # number of submissions 41 | num_ac = models.IntegerField(default = 0) # number of accepted submissions 42 | num_wa = models.IntegerField(default = 0) # number of wrong answers 43 | num_re = models.IntegerField(default = 0) # number of runtime errors 44 | num_tle = models.IntegerField(default = 0) # number of tles 45 | num_ce = models.IntegerField(default = 0) 46 | date_added = models.DateTimeField(auto_now_add = True) # When added 47 | time_limit = models.IntegerField(default=1) # Time Limit 48 | source = models.CharField(max_length=255) 49 | num_tests = models.IntegerField(default = 1) 50 | 51 | author = models.ForeignKey('Coder', null = True) 52 | 53 | def __unicode__(self): 54 | return self.code 55 | 56 | 57 | # Model for Test Cases 58 | class TestCase(models.Model): 59 | problem = models.ForeignKey(Problem) 60 | input_file = models.FileField(upload_to=in_upload_path) 61 | output_file = models.FileField(upload_to=out_upload_path) 62 | 63 | def __unicode__(self): 64 | return self.problem.code 65 | 66 | LANGUAGES = ( 67 | ("C", "GNU C"), 68 | ("CPP", "GNU C++"), 69 | ) 70 | 71 | 72 | # Model for problem submissions 73 | class Submission(models.Model): 74 | STATUSES = ( 75 | ("NT", "Not tested"), 76 | ("CE", "Compile Error"), 77 | ("TL", "Time Limit Exceeded"), 78 | ("RE", "Runtime Error"), 79 | ("AC", "Accepted") 80 | ) 81 | submitter = models.ForeignKey(Coder, null = True) 82 | problem = models.ForeignKey(Problem, default = None, null = True) 83 | status = models.CharField(max_length = 2, default = "NT", choices = STATUSES) 84 | lang = models.CharField(max_length = 4, default = "C", choices = LANGUAGES) 85 | code = models.TextField(default="") 86 | created = models.DateTimeField(auto_now_add=True) 87 | private = models.BooleanField(default = True) -------------------------------------------------------------------------------- /static/semantic/components/feed.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Feed 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.feed{margin:1em 0}.ui.feed:first-child{margin-top:0}.ui.feed:last-child{margin-bottom:0}.ui.feed>.event{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;width:100%;padding:.21428571rem 0;margin:0;background:0 0;border-top:none}.ui.feed>.event:first-child{border-top:0;padding-top:0}.ui.feed>.event:last-child{padding-bottom:0}.ui.feed>.event>.label{display:block;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:2.5em;height:auto;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;text-align:left}.ui.feed>.event>.label .icon{opacity:1;font-size:1.5em;width:100%;padding:.25em;background:0 0;border:none;border-radius:none;color:rgba(0,0,0,.6)}.ui.feed>.event>.label img{width:100%;height:auto;border-radius:500rem}.ui.feed>.event>.label+.content{margin:.5em 0 .35714286em 1.14285714em}.ui.feed>.event>.content{display:block;-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;text-align:left;word-wrap:break-word}.ui.feed>.event:last-child>.content{padding-bottom:0}.ui.feed>.event>.content a{cursor:pointer}.ui.feed>.event>.content .date{margin:-.5rem 0 0;padding:0;font-weight:400;font-size:1em;font-style:normal;color:rgba(0,0,0,.4)}.ui.feed>.event>.content .summary{margin:0;font-size:1em;font-weight:700;color:rgba(0,0,0,.87)}.ui.feed>.event>.content .summary img{display:inline-block;width:auto;height:10em;margin:-.25em .25em 0 0;border-radius:.25em;vertical-align:middle}.ui.feed>.event>.content .user{display:inline-block;font-weight:700;margin-right:0;vertical-align:baseline}.ui.feed>.event>.content .user img{margin:-.25em .25em 0 0;width:auto;height:10em;vertical-align:middle}.ui.feed>.event>.content .summary>.date{display:inline-block;float:none;font-weight:400;font-size:.85714286em;font-style:normal;margin:0 0 0 .5em;padding:0;color:rgba(0,0,0,.4)}.ui.feed>.event>.content .extra{margin:.5em 0 0;background:0 0;padding:0;color:rgba(0,0,0,.87)}.ui.feed>.event>.content .extra.images img{display:inline-block;margin:0 .25em 0 0;width:6em}.ui.feed>.event>.content .extra.text{padding:0;border-left:none;font-size:1em;max-width:500px;line-height:1.4285em}.ui.feed>.event>.content .meta{display:inline-block;font-size:.85714286em;margin:.5em 0 0;background:0 0;border:none;border-radius:0;box-shadow:none;padding:0;color:rgba(0,0,0,.6)}.ui.feed>.event>.content .meta>*{position:relative;margin-left:.75em}.ui.feed>.event>.content .meta>:after{content:'';color:rgba(0,0,0,.2);top:0;left:-1em;opacity:1;position:absolute;vertical-align:top}.ui.feed>.event>.content .meta .like{color:'';-webkit-transition:.2s color ease;transition:.2s color ease}.ui.feed>.event>.content .meta .like:hover .icon{color:#ff2733}.ui.feed>.event>.content .meta .active.like .icon{color:#ef404a}.ui.feed>.event>.content .meta>:first-child{margin-left:0}.ui.feed>.event>.content .meta>:first-child::after{display:none}.ui.feed>.event>.content .meta a,.ui.feed>.event>.content .meta>.icon{cursor:pointer;opacity:1;color:rgba(0,0,0,.5);-webkit-transition:color .1s ease;transition:color .1s ease}.ui.feed>.event>.content .meta a:hover,.ui.feed>.event>.content .meta a:hover .icon,.ui.feed>.event>.content .meta>.icon:hover{color:rgba(0,0,0,.95)}.ui.small.feed{font-size:.92857143rem}.ui.feed{font-size:1rem}.ui.large.feed{font-size:1.14285714rem} -------------------------------------------------------------------------------- /static/semantic/components/container.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Container 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Container 15 | *******************************/ 16 | 17 | 18 | /* All Sizes */ 19 | .ui.container { 20 | display: block; 21 | max-width: 100% !important; 22 | } 23 | 24 | /* Mobile */ 25 | @media only screen and (max-width: 767px) { 26 | .ui.container { 27 | width: auto !important; 28 | margin-left: 1em !important; 29 | margin-right: 1em !important; 30 | } 31 | .ui.grid.container { 32 | width: auto !important; 33 | } 34 | .ui.relaxed.grid.container { 35 | width: auto !important; 36 | } 37 | .ui.very.relaxed.grid.container { 38 | width: auto !important; 39 | } 40 | } 41 | 42 | /* Tablet */ 43 | @media only screen and (min-width: 768px) and (max-width: 991px) { 44 | .ui.container { 45 | width: 723px; 46 | margin-left: auto !important; 47 | margin-right: auto !important; 48 | } 49 | .ui.grid.container { 50 | width: calc( 723px + 2rem ) !important; 51 | } 52 | .ui.relaxed.grid.container { 53 | width: calc( 723px + 3rem ) !important; 54 | } 55 | .ui.very.relaxed.grid.container { 56 | width: calc( 723px + 5rem ) !important; 57 | } 58 | } 59 | 60 | /* Small Monitor */ 61 | @media only screen and (min-width: 992px) and (max-width: 1199px) { 62 | .ui.container { 63 | width: 933px; 64 | margin-left: auto !important; 65 | margin-right: auto !important; 66 | } 67 | .ui.grid.container { 68 | width: calc( 933px + 2rem ) !important; 69 | } 70 | .ui.relaxed.grid.container { 71 | width: calc( 933px + 3rem ) !important; 72 | } 73 | .ui.very.relaxed.grid.container { 74 | width: calc( 933px + 5rem ) !important; 75 | } 76 | } 77 | 78 | /* Large Monitor */ 79 | @media only screen and (min-width: 1200px) { 80 | .ui.container { 81 | width: 1127px; 82 | margin-left: auto !important; 83 | margin-right: auto !important; 84 | } 85 | .ui.grid.container { 86 | width: calc( 1127px + 2rem ) !important; 87 | } 88 | .ui.relaxed.grid.container { 89 | width: calc( 1127px + 3rem ) !important; 90 | } 91 | .ui.very.relaxed.grid.container { 92 | width: calc( 1127px + 5rem ) !important; 93 | } 94 | } 95 | 96 | 97 | /******************************* 98 | Types 99 | *******************************/ 100 | 101 | 102 | /* Text Container */ 103 | .ui.text.container { 104 | font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; 105 | max-width: 700px !important; 106 | line-height: 1.5; 107 | } 108 | .ui.text.container { 109 | font-size: 1.14285714rem; 110 | } 111 | 112 | /* Fluid */ 113 | .ui.fluid.container { 114 | width: 100%; 115 | } 116 | 117 | 118 | /******************************* 119 | Variations 120 | *******************************/ 121 | 122 | .ui[class*="left aligned"].container { 123 | text-align: left; 124 | } 125 | .ui[class*="center aligned"].container { 126 | text-align: center; 127 | } 128 | .ui[class*="right aligned"].container { 129 | text-align: right; 130 | } 131 | .ui.justified.container { 132 | text-align: justify; 133 | -webkit-hyphens: auto; 134 | -moz-hyphens: auto; 135 | -ms-hyphens: auto; 136 | hyphens: auto; 137 | } 138 | 139 | 140 | /******************************* 141 | Theme Overrides 142 | *******************************/ 143 | 144 | 145 | 146 | /******************************* 147 | Site Overrides 148 | *******************************/ 149 | 150 | -------------------------------------------------------------------------------- /static/semantic/components/shape.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Shape 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Shape 15 | *******************************/ 16 | 17 | .ui.shape { 18 | position: relative; 19 | vertical-align: top; 20 | display: inline-block; 21 | -webkit-perspective: 2000px; 22 | perspective: 2000px; 23 | -webkit-transition: -webkit-transform 0.6s ease-in-out, left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out; 24 | transition: transform 0.6s ease-in-out, left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out; 25 | } 26 | .ui.shape .sides { 27 | -webkit-transform-style: preserve-3d; 28 | transform-style: preserve-3d; 29 | } 30 | .ui.shape .side { 31 | opacity: 1; 32 | width: 100%; 33 | margin: 0em !important; 34 | -webkit-backface-visibility: hidden; 35 | backface-visibility: hidden; 36 | } 37 | .ui.shape .side { 38 | display: none; 39 | } 40 | .ui.shape .side * { 41 | -webkit-backface-visibility: visible !important; 42 | backface-visibility: visible !important; 43 | } 44 | 45 | 46 | /******************************* 47 | Types 48 | *******************************/ 49 | 50 | .ui.cube.shape .side { 51 | min-width: 15em; 52 | height: 15em; 53 | padding: 2em; 54 | background-color: #e6e6e6; 55 | color: rgba(0, 0, 0, 0.87); 56 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.3); 57 | } 58 | .ui.cube.shape .side > .content { 59 | width: 100%; 60 | height: 100%; 61 | display: table; 62 | text-align: center; 63 | -webkit-user-select: text; 64 | -moz-user-select: text; 65 | -ms-user-select: text; 66 | user-select: text; 67 | } 68 | .ui.cube.shape .side > .content > div { 69 | display: table-cell; 70 | vertical-align: middle; 71 | font-size: 2em; 72 | } 73 | 74 | 75 | /******************************* 76 | Variations 77 | *******************************/ 78 | 79 | .ui.text.shape.animating .sides { 80 | position: static; 81 | } 82 | .ui.text.shape .side { 83 | white-space: nowrap; 84 | } 85 | .ui.text.shape .side > * { 86 | white-space: normal; 87 | } 88 | 89 | 90 | /******************************* 91 | States 92 | *******************************/ 93 | 94 | 95 | /*-------------- 96 | Loading 97 | ---------------*/ 98 | 99 | .ui.loading.shape { 100 | position: absolute; 101 | top: -9999px; 102 | left: -9999px; 103 | } 104 | 105 | /*-------------- 106 | Animating 107 | ---------------*/ 108 | 109 | .ui.shape .animating.side { 110 | position: absolute; 111 | top: 0px; 112 | left: 0px; 113 | display: block; 114 | z-index: 100; 115 | } 116 | .ui.shape .hidden.side { 117 | opacity: 0.6; 118 | } 119 | 120 | /*-------------- 121 | CSS 122 | ---------------*/ 123 | 124 | .ui.shape.animating .sides { 125 | position: absolute; 126 | } 127 | .ui.shape.animating .sides { 128 | -webkit-transition: -webkit-transform 0.6s ease-in-out, left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out; 129 | transition: transform 0.6s ease-in-out, left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out; 130 | } 131 | .ui.shape.animating .side { 132 | -webkit-transition: opacity 0.6s ease-in-out; 133 | transition: opacity 0.6s ease-in-out; 134 | } 135 | 136 | /*-------------- 137 | Active 138 | ---------------*/ 139 | 140 | .ui.shape .active.side { 141 | display: block; 142 | } 143 | 144 | 145 | /******************************* 146 | Theme Overrides 147 | *******************************/ 148 | 149 | 150 | 151 | /******************************* 152 | User Overrides 153 | *******************************/ 154 | 155 | -------------------------------------------------------------------------------- /static/semantic/components/embed.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Video 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Types 15 | *******************************/ 16 | 17 | .ui.embed { 18 | position: relative; 19 | max-width: 100%; 20 | height: 0px; 21 | overflow: hidden; 22 | background: #dcddde; 23 | padding-bottom: 56.25%; 24 | } 25 | 26 | /*----------------- 27 | Embedded Content 28 | ------------------*/ 29 | 30 | .ui.embed iframe, 31 | .ui.embed embed, 32 | .ui.embed object { 33 | position: absolute; 34 | border: none; 35 | width: 100%; 36 | height: 100%; 37 | top: 0px; 38 | left: 0px; 39 | margin: 0em; 40 | padding: 0em; 41 | } 42 | 43 | /*----------------- 44 | Embed 45 | ------------------*/ 46 | 47 | .ui.embed > .embed { 48 | display: none; 49 | } 50 | 51 | /*-------------- 52 | Placeholder 53 | ---------------*/ 54 | 55 | .ui.embed > .placeholder { 56 | position: absolute; 57 | cursor: pointer; 58 | top: 0px; 59 | left: 0px; 60 | display: block; 61 | width: 100%; 62 | height: 100%; 63 | background-color: radial-gradient(transparent 45%, rgba(0, 0, 0, 0.3)); 64 | } 65 | 66 | /*-------------- 67 | Icon 68 | ---------------*/ 69 | 70 | .ui.embed > .icon { 71 | cursor: pointer; 72 | position: absolute; 73 | top: 0px; 74 | left: 0px; 75 | width: 100%; 76 | height: 100%; 77 | z-index: 2; 78 | } 79 | .ui.embed > .icon:after { 80 | position: absolute; 81 | top: 0%; 82 | left: 0%; 83 | width: 100%; 84 | height: 100%; 85 | z-index: 3; 86 | content: ''; 87 | background: -webkit-radial-gradient(transparent 45%, rgba(0, 0, 0, 0.3)); 88 | background: radial-gradient(transparent 45%, rgba(0, 0, 0, 0.3)); 89 | opacity: 0.5; 90 | -webkit-transition: opacity 0.5s ease; 91 | transition: opacity 0.5s ease; 92 | } 93 | .ui.embed > .icon:before { 94 | position: absolute; 95 | top: 50%; 96 | left: 50%; 97 | z-index: 4; 98 | -webkit-transform: translateX(-50%) translateY(-50%); 99 | -ms-transform: translateX(-50%) translateY(-50%); 100 | transform: translateX(-50%) translateY(-50%); 101 | color: #ffffff; 102 | font-size: 6rem; 103 | text-shadow: 0px 2px 10px rgba(34, 36, 38, 0.2); 104 | -webkit-transition: opacity 0.5s ease, color 0.5s ease; 105 | transition: opacity 0.5s ease, color 0.5s ease; 106 | z-index: 10; 107 | } 108 | 109 | 110 | /******************************* 111 | States 112 | *******************************/ 113 | 114 | 115 | /*-------------- 116 | Hover 117 | ---------------*/ 118 | 119 | .ui.embed .icon:hover:after { 120 | background: -webkit-radial-gradient(transparent 45%, rgba(0, 0, 0, 0.3)); 121 | background: radial-gradient(transparent 45%, rgba(0, 0, 0, 0.3)); 122 | opacity: 1; 123 | } 124 | .ui.embed .icon:hover:before { 125 | color: #ffffff; 126 | } 127 | 128 | /*-------------- 129 | Active 130 | ---------------*/ 131 | 132 | .ui.active.embed > .icon, 133 | .ui.active.embed > .placeholder { 134 | display: none; 135 | } 136 | .ui.active.embed > .embed { 137 | display: block; 138 | } 139 | 140 | 141 | /******************************* 142 | Video Overrides 143 | *******************************/ 144 | 145 | 146 | 147 | /******************************* 148 | Site Overrides 149 | *******************************/ 150 | 151 | 152 | 153 | /******************************* 154 | Variations 155 | *******************************/ 156 | 157 | .ui.square.embed { 158 | padding-bottom: 100%; 159 | } 160 | .ui[class*="4:3"].embed { 161 | padding-bottom: 75%; 162 | } 163 | .ui[class*="16:9"].embed { 164 | padding-bottom: 56.25%; 165 | } 166 | .ui[class*="21:9"].embed { 167 | padding-bottom: 42.85714286%; 168 | } 169 | -------------------------------------------------------------------------------- /poj/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for poj project. 3 | 4 | Generated by 'django-admin startproject' using Django 1.9.2. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.9/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/1.9/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = '(sov^=yyyo#0uw#)!hzls6g9$sf2tjd8-s$e&v2zsa-0wmnrjx' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'judge', 41 | ] 42 | 43 | MIDDLEWARE_CLASSES = [ 44 | 'django.middleware.security.SecurityMiddleware', 45 | 'django.contrib.sessions.middleware.SessionMiddleware', 46 | 'django.middleware.common.CommonMiddleware', 47 | 'django.middleware.csrf.CsrfViewMiddleware', 48 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 49 | 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 50 | 'django.contrib.messages.middleware.MessageMiddleware', 51 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 52 | ] 53 | 54 | ROOT_URLCONF = 'poj.urls' 55 | 56 | TEMPLATES = [ 57 | { 58 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 59 | 'DIRS': [os.path.join(BASE_DIR, 'templates')], 60 | 'APP_DIRS': True, 61 | 'OPTIONS': { 62 | 'context_processors': [ 63 | 'django.template.context_processors.debug', 64 | 'django.template.context_processors.request', 65 | 'django.contrib.auth.context_processors.auth', 66 | 'django.contrib.messages.context_processors.messages', 67 | ], 68 | }, 69 | }, 70 | ] 71 | 72 | WSGI_APPLICATION = 'poj.wsgi.application' 73 | 74 | 75 | # Database 76 | # https://docs.djangoproject.com/en/1.9/ref/settings/#databases 77 | 78 | DATABASES = { 79 | 'default': { 80 | 'ENGINE': 'django.db.backends.sqlite3', 81 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 82 | } 83 | } 84 | 85 | 86 | # Password validation 87 | # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators 88 | 89 | AUTH_PASSWORD_VALIDATORS = [ 90 | { 91 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 92 | }, 93 | { 94 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 95 | }, 96 | { 97 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 98 | }, 99 | { 100 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 101 | }, 102 | ] 103 | 104 | 105 | # Internationalization 106 | # https://docs.djangoproject.com/en/1.9/topics/i18n/ 107 | 108 | LANGUAGE_CODE = 'en-us' 109 | 110 | TIME_ZONE = 'UTC' 111 | 112 | USE_I18N = True 113 | 114 | USE_L10N = True 115 | 116 | USE_TZ = True 117 | 118 | 119 | # Static files (CSS, JavaScript, Images) 120 | # https://docs.djangoproject.com/en/1.9/howto/static-files/ 121 | 122 | STATIC_URL = '/static/' 123 | STATICFILES_DIRS = ( 124 | os.path.join(BASE_DIR, 'static'), 125 | ) 126 | 127 | # Celery stuff 128 | BROKER_URL = 'redis://localhost:6379' 129 | CELERY_RESULT_BACKEND = 'redis://localhost:6379' 130 | CELERY_ACCEPT_CONTENT = ['application/json'] 131 | CELERY_TASK_SERIALIZER = 'json' 132 | CELERY_RESULT_SERIALIZER = 'json' 133 | CELERY_TIMEZONE = 'Asia/Kolkata' 134 | -------------------------------------------------------------------------------- /static/semantic/components/popup.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Popup 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.popup{display:none;position:absolute;top:0;right:0;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;z-index:1900;border:1px solid #d4d4d5;line-height:1.4285em;max-width:250px;background:#fff;padding:.833em 1em;font-weight:400;font-style:normal;color:rgba(0,0,0,.87);border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.08);margin:0}.ui.popup>.header{padding:0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1.125em;line-height:1.2;font-weight:700}.ui.popup>.header+.content{padding-top:.5em}.ui.popup:before{position:absolute;content:'';width:.75em;height:.75em;background:#fff;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);z-index:2;box-shadow:1px 1px 0 0 #bababc}.ui.top.popup{margin:0 0 .75em}.ui.top.left.popup{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom}.ui.top.center.popup{-webkit-transform-origin:center bottom;-ms-transform-origin:center bottom;transform-origin:center bottom}.ui.top.right.popup{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom}.ui.left.center.popup{margin:0 .75em 0 0;-webkit-transform-origin:right 50%;-ms-transform-origin:right 50%;transform-origin:right 50%}.ui.right.center.popup{margin:0 0 0 .75em;-webkit-transform-origin:left 50%;-ms-transform-origin:left 50%;transform-origin:left 50%}.ui.bottom.popup{margin:.75em 0 0}.ui.bottom.left.popup{-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top}.ui.bottom.center.popup{-webkit-transform-origin:center top;-ms-transform-origin:center top;transform-origin:center top}.ui.bottom.right.popup{-webkit-transform-origin:right top;-ms-transform-origin:right top;transform-origin:right top;margin-right:0}.ui.bottom.center.popup:before{margin-left:-.325em;top:-.325em;left:50%;right:auto;bottom:auto;box-shadow:-1px -1px 0 0 #bababc}.ui.bottom.left.popup{margin-left:0}.ui.bottom.left.popup:before{top:-.325em;left:1em;right:auto;bottom:auto;margin-left:0;box-shadow:-1px -1px 0 0 #bababc}.ui.bottom.right.popup:before{top:-.325em;right:1em;bottom:auto;left:auto;margin-left:0;box-shadow:-1px -1px 0 0 #bababc}.ui.top.center.popup:before{top:auto;right:auto;bottom:-.325em;left:50%;margin-left:-.325em}.ui.top.left.popup{margin-left:0}.ui.top.left.popup:before{bottom:-.325em;left:1em;top:auto;right:auto;margin-left:0}.ui.top.right.popup{margin-right:0}.ui.top.right.popup:before{bottom:-.325em;right:1em;top:auto;left:auto;margin-left:0}.ui.left.center.popup:before{top:50%;right:-.325em;bottom:auto;left:auto;margin-top:-.325em;box-shadow:1px -1px 0 0 #bababc}.ui.right.center.popup:before{top:50%;left:-.325em;bottom:auto;right:auto;margin-top:-.325em;box-shadow:-1px 1px 0 0 #bababc}.ui.bottom.popup:before,.ui.left.center.popup:before,.ui.right.center.popup:before,.ui.top.popup:before{background:#fff}.ui.inverted.bottom.popup:before,.ui.inverted.left.center.popup:before,.ui.inverted.right.center.popup:before,.ui.inverted.top.popup:before{background:#1b1c1d}.ui.popup>.ui.grid:not(.padded){width:calc(100% + 1.75rem);margin:-.7rem -.875rem}.ui.loading.popup{display:block;visibility:hidden;z-index:-1}.ui.animating.popup,.ui.visible.popup{display:block}.ui.visible.popup{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.ui.basic.popup:before{display:none}.ui.wide.popup{max-width:350px}.ui[class*="very wide"].popup{max-width:550px}@media only screen and (max-width:767px){.ui.wide.popup,.ui[class*="very wide"].popup{max-width:250px}}.ui.fluid.popup{width:100%;max-width:none}.ui.inverted.popup{background:#1b1c1d;color:#fff;border:none;box-shadow:none}.ui.inverted.popup .header{background-color:none;color:#fff}.ui.inverted.popup:before{background-color:#1b1c1d;box-shadow:none!important}.ui.flowing.popup{max-width:none}.ui.mini.popup{font-size:.71428571rem}.ui.tiny.popup{font-size:.85714286rem}.ui.small.popup{font-size:.92857143rem}.ui.popup{font-size:1rem}.ui.large.popup{font-size:1.14285714rem}.ui.huge.popup{font-size:1.42857143rem} -------------------------------------------------------------------------------- /static/semantic/components/dimmer.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Dimmer 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Dimmer 15 | *******************************/ 16 | 17 | .dimmable { 18 | position: relative; 19 | } 20 | .ui.dimmer { 21 | display: none; 22 | position: absolute; 23 | top: 0em !important; 24 | left: 0em !important; 25 | width: 100%; 26 | height: 100%; 27 | text-align: center; 28 | vertical-align: middle; 29 | background-color: rgba(0, 0, 0, 0.85); 30 | opacity: 0; 31 | line-height: 1; 32 | -webkit-animation-fill-mode: both; 33 | animation-fill-mode: both; 34 | -webkit-animation-duration: 0.5s; 35 | animation-duration: 0.5s; 36 | -webkit-transition: background-color 0.5s linear; 37 | transition: background-color 0.5s linear; 38 | -webkit-user-select: none; 39 | -moz-user-select: none; 40 | -ms-user-select: none; 41 | user-select: none; 42 | will-change: opacity; 43 | z-index: 1000; 44 | } 45 | 46 | /* Dimmer Content */ 47 | .ui.dimmer > .content { 48 | width: 100%; 49 | height: 100%; 50 | display: table; 51 | -webkit-user-select: text; 52 | -moz-user-select: text; 53 | -ms-user-select: text; 54 | user-select: text; 55 | } 56 | .ui.dimmer > .content > * { 57 | display: table-cell; 58 | vertical-align: middle; 59 | color: #ffffff; 60 | } 61 | 62 | /* Loose Coupling */ 63 | .ui.segment > .ui.dimmer { 64 | border-radius: inherit !important; 65 | } 66 | 67 | 68 | /******************************* 69 | States 70 | *******************************/ 71 | 72 | .animating.dimmable:not(body), 73 | .dimmed.dimmable:not(body) { 74 | overflow: hidden; 75 | } 76 | .dimmed.dimmable > .ui.animating.dimmer, 77 | .dimmed.dimmable > .ui.visible.dimmer, 78 | .ui.active.dimmer { 79 | display: block; 80 | opacity: 1; 81 | } 82 | .ui.disabled.dimmer { 83 | width: 0 !important; 84 | height: 0 !important; 85 | } 86 | 87 | 88 | /******************************* 89 | Variations 90 | *******************************/ 91 | 92 | 93 | /*-------------- 94 | Page 95 | ---------------*/ 96 | 97 | .ui.page.dimmer { 98 | position: fixed; 99 | -webkit-transform-style: ''; 100 | transform-style: ''; 101 | -webkit-perspective: 2000px; 102 | perspective: 2000px; 103 | -webkit-transform-origin: center center; 104 | -ms-transform-origin: center center; 105 | transform-origin: center center; 106 | } 107 | body.animating.in.dimmable, 108 | body.dimmed.dimmable { 109 | overflow: hidden; 110 | } 111 | body.dimmable > .dimmer { 112 | position: fixed; 113 | } 114 | 115 | /*-------------- 116 | Blurring 117 | ---------------*/ 118 | 119 | .blurring.dimmable > :not(.dimmer) { 120 | -webkit-filter: blur(0px) grayscale(0); 121 | filter: blur(0px) grayscale(0); 122 | -webkit-transition: 800ms -webkit-filter ease, 800ms filter ease; 123 | transition: 800ms filter ease; 124 | } 125 | .blurring.dimmed.dimmable > :not(.dimmer) { 126 | -webkit-filter: blur(5px) grayscale(0.7); 127 | filter: blur(5px) grayscale(0.7); 128 | } 129 | 130 | /* Dimmer Color */ 131 | .blurring.dimmable > .dimmer { 132 | background-color: rgba(0, 0, 0, 0.6); 133 | } 134 | .blurring.dimmable > .inverted.dimmer { 135 | background-color: rgba(255, 255, 255, 0.6); 136 | } 137 | 138 | /*-------------- 139 | Aligned 140 | ---------------*/ 141 | 142 | .ui.dimmer > .top.aligned.content > * { 143 | vertical-align: top; 144 | } 145 | .ui.dimmer > .bottom.aligned.content > * { 146 | vertical-align: bottom; 147 | } 148 | 149 | /*-------------- 150 | Inverted 151 | ---------------*/ 152 | 153 | .ui.inverted.dimmer { 154 | background-color: rgba(255, 255, 255, 0.85); 155 | } 156 | .ui.inverted.dimmer > .content > * { 157 | color: #ffffff; 158 | } 159 | 160 | /*-------------- 161 | Simple 162 | ---------------*/ 163 | 164 | 165 | /* Displays without javascript */ 166 | .ui.simple.dimmer { 167 | display: block; 168 | overflow: hidden; 169 | opacity: 1; 170 | width: 0%; 171 | height: 0%; 172 | z-index: -100; 173 | background-color: rgba(0, 0, 0, 0); 174 | } 175 | .dimmed.dimmable > .ui.simple.dimmer { 176 | overflow: visible; 177 | opacity: 1; 178 | width: 100%; 179 | height: 100%; 180 | background-color: rgba(0, 0, 0, 0.85); 181 | z-index: 1; 182 | } 183 | .ui.simple.inverted.dimmer { 184 | background-color: rgba(255, 255, 255, 0); 185 | } 186 | .dimmed.dimmable > .ui.simple.inverted.dimmer { 187 | background-color: rgba(255, 255, 255, 0.85); 188 | } 189 | 190 | 191 | /******************************* 192 | Theme Overrides 193 | *******************************/ 194 | 195 | 196 | 197 | /******************************* 198 | User Overrides 199 | *******************************/ 200 | 201 | -------------------------------------------------------------------------------- /static/semantic/components/rating.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Rating 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | !function(e,n,t,i){"use strict";e.fn.rating=function(n){var t,a=e(this),o=a.selector||"",r=(new Date).getTime(),s=[],l=arguments[0],c="string"==typeof l,u=[].slice.call(arguments,1);return a.each(function(){var g,m=e.isPlainObject(n)?e.extend(!0,{},e.fn.rating.settings,n):e.extend({},e.fn.rating.settings),d=m.namespace,f=m.className,v=m.metadata,p=m.selector,b=(m.error,"."+d),h="module-"+d,y=this,x=e(this).data(h),R=e(this),C=R.find(p.icon);g={initialize:function(){g.verbose("Initializing rating module",m),0===C.length&&g.setup.layout(),m.interactive?g.enable():g.disable(),g.set.rating(g.get.initialRating()),g.instantiate()},instantiate:function(){g.verbose("Instantiating module",m),x=g,R.data(h,g)},destroy:function(){g.verbose("Destroying previous instance",x),g.remove.events(),R.removeData(h)},refresh:function(){C=R.find(p.icon)},setup:{layout:function(){var n=g.get.maxRating(),t=e.fn.rating.settings.templates.icon(n);g.debug("Generating icon html dynamically"),R.html(t),g.refresh()}},event:{mouseenter:function(){var n=e(this);n.nextAll().removeClass(f.selected),R.addClass(f.selected),n.addClass(f.selected).prevAll().addClass(f.selected)},mouseleave:function(){R.removeClass(f.selected),C.removeClass(f.selected)},click:function(){var n=e(this),t=g.get.rating(),i=C.index(n)+1,a="auto"==m.clearable?1===C.length:m.clearable;a&&t==i?g.clearRating():g.set.rating(i)}},clearRating:function(){g.debug("Clearing current rating"),g.set.rating(0)},bind:{events:function(){g.verbose("Binding events"),R.on("mouseenter"+b,p.icon,g.event.mouseenter).on("mouseleave"+b,p.icon,g.event.mouseleave).on("click"+b,p.icon,g.event.click)}},remove:{events:function(){g.verbose("Removing events"),R.off(b)}},enable:function(){g.debug("Setting rating to interactive mode"),g.bind.events(),R.removeClass(f.disabled)},disable:function(){g.debug("Setting rating to read-only mode"),g.remove.events(),R.addClass(f.disabled)},get:{initialRating:function(){return R.data(v.rating)!==i?(R.removeData(v.rating),R.data(v.rating)):m.initialRating},maxRating:function(){return R.data(v.maxRating)!==i?(R.removeData(v.maxRating),R.data(v.maxRating)):m.maxRating},rating:function(){var e=C.filter("."+f.active).length;return g.verbose("Current rating retrieved",e),e}},set:{rating:function(e){var n=e-1>=0?e-1:0,t=C.eq(n);R.removeClass(f.selected),C.removeClass(f.selected).removeClass(f.active),e>0&&(g.verbose("Setting current rating to",e),t.prevAll().andSelf().addClass(f.active)),m.onRate.call(y,e)}},setting:function(n,t){if(g.debug("Changing setting",n,t),e.isPlainObject(n))e.extend(!0,m,n);else{if(t===i)return m[n];m[n]=t}},internal:function(n,t){if(e.isPlainObject(n))e.extend(!0,g,n);else{if(t===i)return g[n];g[n]=t}},debug:function(){m.debug&&(m.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,m.name+":"),g.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),g.verbose.apply(console,arguments)))},error:function(){g.error=Function.prototype.bind.call(console.error,console,m.name+":"),g.error.apply(console,arguments)},performance:{log:function(e){var n,t,i;m.performance&&(n=(new Date).getTime(),i=r||n,t=n-i,r=n,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":t})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var n=m.name+":",t=0;r=!1,clearTimeout(g.performance.timer),e.each(s,function(e,n){t+=n["Execution Time"]}),n+=" "+t+"ms",o&&(n+=" '"+o+"'"),a.length>1&&(n+=" ("+a.length+")"),(console.group!==i||console.table!==i)&&s.length>0&&(console.groupCollapsed(n),console.table?console.table(s):e.each(s,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(n,a,o){var r,s,l,c=x;return a=a||u,o=y||o,"string"==typeof n&&c!==i&&(n=n.split(/[\. ]/),r=n.length-1,e.each(n,function(t,a){var o=t!=r?a+n[t+1].charAt(0).toUpperCase()+n[t+1].slice(1):n;if(e.isPlainObject(c[o])&&t!=r)c=c[o];else{if(c[o]!==i)return s=c[o],!1;if(!e.isPlainObject(c[a])||t==r)return c[a]!==i?(s=c[a],!1):!1;c=c[a]}})),e.isFunction(s)?l=s.apply(o,a):s!==i&&(l=s),e.isArray(t)?t.push(l):t!==i?t=[t,l]:l!==i&&(t=l),s}},c?(x===i&&g.initialize(),g.invoke(l)):(x!==i&&x.invoke("destroy"),g.initialize())}),t!==i?t:this},e.fn.rating.settings={name:"Rating",namespace:"rating",debug:!1,verbose:!1,performance:!0,initialRating:0,interactive:!0,maxRating:4,clearable:"auto",onRate:function(e){},error:{method:"The method you called is not defined",noMaximum:"No maximum rating specified. Cannot generate HTML automatically"},metadata:{rating:"rating",maxRating:"maxRating"},className:{active:"active",disabled:"disabled",selected:"selected",loading:"loading"},selector:{icon:".icon"},templates:{icon:function(e){for(var n=1,t="";e>=n;)t+='',n++;return t}}}}(jQuery,window,document); -------------------------------------------------------------------------------- /static/semantic/components/ad.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Ad 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2013 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Advertisement 15 | *******************************/ 16 | 17 | .ui.ad { 18 | display: block; 19 | overflow: hidden; 20 | margin: 1em 0em; 21 | } 22 | .ui.ad:first-child { 23 | margin: 0em; 24 | } 25 | .ui.ad:last-child { 26 | margin: 0em; 27 | } 28 | .ui.ad iframe { 29 | margin: 0em; 30 | padding: 0em; 31 | border: none; 32 | overflow: hidden; 33 | } 34 | 35 | /*-------------- 36 | Common 37 | ---------------*/ 38 | 39 | 40 | /* Leaderboard */ 41 | .ui.leaderboard.ad { 42 | width: 728px; 43 | height: 90px; 44 | } 45 | 46 | /* Medium Rectangle */ 47 | .ui[class*="medium rectangle"].ad { 48 | width: 300px; 49 | height: 250px; 50 | } 51 | 52 | /* Large Rectangle */ 53 | .ui[class*="large rectangle"].ad { 54 | width: 336px; 55 | height: 280px; 56 | } 57 | 58 | /* Half Page */ 59 | .ui[class*="half page"].ad { 60 | width: 300px; 61 | height: 600px; 62 | } 63 | 64 | /*-------------- 65 | Square 66 | ---------------*/ 67 | 68 | 69 | /* Square */ 70 | .ui.square.ad { 71 | width: 250px; 72 | height: 250px; 73 | } 74 | 75 | /* Small Square */ 76 | .ui[class*="small square"].ad { 77 | width: 200px; 78 | height: 200px; 79 | } 80 | 81 | /*-------------- 82 | Rectangle 83 | ---------------*/ 84 | 85 | 86 | /* Small Rectangle */ 87 | .ui[class*="small rectangle"].ad { 88 | width: 180px; 89 | height: 150px; 90 | } 91 | 92 | /* Vertical Rectangle */ 93 | .ui[class*="vertical rectangle"].ad { 94 | width: 240px; 95 | height: 400px; 96 | } 97 | 98 | /*-------------- 99 | Button 100 | ---------------*/ 101 | 102 | .ui.button.ad { 103 | width: 120px; 104 | height: 90px; 105 | } 106 | .ui[class*="square button"].ad { 107 | width: 125px; 108 | height: 125px; 109 | } 110 | .ui[class*="small button"].ad { 111 | width: 120px; 112 | height: 60px; 113 | } 114 | 115 | /*-------------- 116 | Skyscrapers 117 | ---------------*/ 118 | 119 | 120 | /* Skyscraper */ 121 | .ui.skyscraper.ad { 122 | width: 120px; 123 | height: 600px; 124 | } 125 | 126 | /* Wide Skyscraper */ 127 | .ui[class*="wide skyscraper"].ad { 128 | width: 160px; 129 | } 130 | 131 | /*-------------- 132 | Banners 133 | ---------------*/ 134 | 135 | 136 | /* Banner */ 137 | .ui.banner.ad { 138 | width: 468px; 139 | height: 60px; 140 | } 141 | 142 | /* Vertical Banner */ 143 | .ui[class*="vertical banner"].ad { 144 | width: 120px; 145 | height: 240px; 146 | } 147 | 148 | /* Top Banner */ 149 | .ui[class*="top banner"].ad { 150 | width: 930px; 151 | height: 180px; 152 | } 153 | 154 | /* Half Banner */ 155 | .ui[class*="half banner"].ad { 156 | width: 234px; 157 | height: 60px; 158 | } 159 | 160 | /*-------------- 161 | Boards 162 | ---------------*/ 163 | 164 | 165 | /* Leaderboard */ 166 | .ui[class*="large leaderboard"].ad { 167 | width: 970px; 168 | height: 90px; 169 | } 170 | 171 | /* Billboard */ 172 | .ui.billboard.ad { 173 | width: 970px; 174 | height: 250px; 175 | } 176 | 177 | /*-------------- 178 | Panorama 179 | ---------------*/ 180 | 181 | 182 | /* Panorama */ 183 | .ui.panorama.ad { 184 | width: 980px; 185 | height: 120px; 186 | } 187 | 188 | /*-------------- 189 | Netboard 190 | ---------------*/ 191 | 192 | 193 | /* Netboard */ 194 | .ui.netboard.ad { 195 | width: 580px; 196 | height: 400px; 197 | } 198 | 199 | /*-------------- 200 | Mobile 201 | ---------------*/ 202 | 203 | 204 | /* Large Mobile Banner */ 205 | .ui[class*="large mobile banner"].ad { 206 | width: 320px; 207 | height: 100px; 208 | } 209 | 210 | /* Mobile Leaderboard */ 211 | .ui[class*="mobile leaderboard"].ad { 212 | width: 320px; 213 | height: 50px; 214 | } 215 | 216 | 217 | /******************************* 218 | Types 219 | *******************************/ 220 | 221 | 222 | /* Mobile Sizes */ 223 | .ui.mobile.ad { 224 | display: none; 225 | } 226 | @media only screen and (max-width: 767px) { 227 | .ui.mobile.ad { 228 | display: block; 229 | } 230 | } 231 | 232 | 233 | /******************************* 234 | Variations 235 | *******************************/ 236 | 237 | .ui.centered.ad { 238 | margin-left: auto; 239 | margin-right: auto; 240 | } 241 | .ui.test.ad { 242 | position: relative; 243 | background: #545454; 244 | } 245 | .ui.test.ad:after { 246 | position: absolute; 247 | top: 50%; 248 | left: 50%; 249 | width: 100%; 250 | text-align: center; 251 | -webkit-transform: translateX(-50%) translateY(-50%); 252 | -ms-transform: translateX(-50%) translateY(-50%); 253 | transform: translateX(-50%) translateY(-50%); 254 | content: 'Ad'; 255 | color: #ffffff; 256 | font-size: 1em; 257 | font-weight: bold; 258 | } 259 | .ui.mobile.test.ad:after { 260 | font-size: 0.85714286em; 261 | } 262 | .ui.test.ad[data-text]:after { 263 | content: attr(data-text); 264 | } 265 | 266 | 267 | /******************************* 268 | Theme Overrides 269 | *******************************/ 270 | 271 | 272 | 273 | /******************************* 274 | User Variable Overrides 275 | *******************************/ 276 | 277 | -------------------------------------------------------------------------------- /judge/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, get_object_or_404 2 | from django.http import HttpResponse, HttpResponseRedirect 3 | from django.contrib.auth.decorators import login_required 4 | from django.contrib.auth import authenticate, login, logout 5 | from judge.models import Problem, Submission, Coder, TestCase 6 | from judge.forms import UserForm, ProblemForm, SubmissionForm 7 | from judge.tasks import evaluate_submission 8 | 9 | 10 | def index(request): 11 | return render(request, "judge/index.html") 12 | 13 | 14 | def register_user(request): 15 | registered = False 16 | if request.method == 'POST': 17 | user_form = UserForm(data=request.POST) 18 | if user_form.is_valid(): 19 | # save the user to the db 20 | u = user_form.save() 21 | u.set_password(u.password) 22 | u.save() 23 | 24 | coder = Coder(user = u) 25 | coder.link = "/judge/users/%s" % (u.username) 26 | coder.score = 0 27 | # calculation of rank in the beginning 28 | coder.rank = -1 29 | for k in Coder.objects.all(): 30 | coder.rank = max(coder.rank, k.rank) 31 | coder.save() 32 | registered = True 33 | else: 34 | print(user_form.errors) 35 | else: 36 | user_form = UserForm() 37 | return render(request, "judge/register.html", {"user_form": user_form, "registered": registered}) 38 | 39 | 40 | def loguserin(request): 41 | # if form has been filled and sent by the user 42 | if request.method == 'POST': 43 | # get the username and password 44 | username = request.POST.get('username') 45 | password = request.POST.get('password') 46 | # authenticate the user using django's in built authenticate function 47 | user = authenticate(username=username, password=password) 48 | if user: # if the user exists log her in and redirect back to home page 49 | login(request, user) 50 | return HttpResponseRedirect('/judge/') 51 | else: # otherwise redirect to a page showing an error 52 | print("Invalid login details: {}, {}".format(username, password)) 53 | return HttpResponse("Invalid Login Details") 54 | else: 55 | return render(request, "judge/login.html", {}) 56 | 57 | 58 | def loguserout(request): 59 | if request.user.is_authenticated: 60 | logout(request) 61 | return HttpResponseRedirect("/judge/") 62 | 63 | 64 | def add_problem(request): 65 | # if user is not logged in, throw him to a sign-in page 66 | if not request.user.is_authenticated: 67 | return HttpResponseRedirect("/judge/login/") 68 | else: 69 | if request.method == 'POST': 70 | problem_form = ProblemForm(request.POST, request.FILES) 71 | if problem_form.is_valid(): 72 | # save a new problem 73 | problem = problem_form.save() 74 | problem.link = "/judge/problems/%s" % (problem.code) 75 | problem.author = Coder.objects.get(user = request.user) 76 | problem.save() 77 | # link the added test case to the problem and save the test case to db 78 | test = TestCase(problem = problem, input_file = request.FILES['input1'], 79 | output_file = request.FILES['output1']) 80 | test.save() 81 | return HttpResponseRedirect("/judge/") 82 | else: 83 | # instantiate a new ProblemForm and then render the addproblem page 84 | problem_form = ProblemForm() 85 | return render(request, "judge/addproblem.html", {"problem_form": problem_form}) 86 | 87 | def view_problem(request, pid): 88 | problem = get_object_or_404(Problem, code = pid) 89 | payload = {"problem":problem} 90 | return render(request, "judge/problem.html", payload) 91 | 92 | def all_problems(request): 93 | problems = Problem.objects.all() 94 | return render(request, "judge/all.html", {"problems":problems}) 95 | 96 | def submit(request, pid): 97 | if not request.user.is_authenticated: 98 | return HttpResponseRedirect('/judge/login/') 99 | else: 100 | if request.method == 'POST': 101 | sub_form = SubmissionForm(request.POST) 102 | if sub_form.is_valid(): 103 | sub = sub_form.save() 104 | sub.problem = Problem.objects.get(code = pid) 105 | print(sub.problem.code) 106 | sub.submitter = Coder.objects.get(user = request.user) 107 | print(sub.submitter) 108 | sub.save() 109 | evaluate_submission.delay(sub.id) 110 | return HttpResponseRedirect('/judge/submission/{}'.format(sub.id)) 111 | else: 112 | sub_form = SubmissionForm() 113 | payload = {"sub_form":sub_form, "pid":pid} 114 | return render(request, "judge/submit.html", payload) 115 | 116 | def view_submission(request, submission_id): 117 | required_sub = get_object_or_404(Submission, id = int(submission_id)) 118 | if not required_sub.private or (required_sub.private and required_sub.submitter.user.username == request.user.username): 119 | return render(request, "judge/submission.html", {"submission": required_sub}) 120 | else: 121 | return HttpResponseRedirect('/judge/') 122 | 123 | -------------------------------------------------------------------------------- /static/semantic/components/nag.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Nag 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | !function(e,o,t,n){"use strict";e.fn.nag=function(t){var i,s=e(this),a=s.selector||"",r=(new Date).getTime(),c=[],l=arguments[0],g="string"==typeof l,u=[].slice.call(arguments,1);return s.each(function(){{var s,d=e.isPlainObject(t)?e.extend(!0,{},e.fn.nag.settings,t):e.extend({},e.fn.nag.settings),m=(d.className,d.selector),f=d.error,p=d.namespace,h="."+p,b=p+"-module",v=e(this),y=(v.find(m.close),e(d.context?d.context:"body")),k=this,S=v.data(b);o.requestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||o.msRequestAnimationFrame||function(e){setTimeout(e,0)}}s={initialize:function(){s.verbose("Initializing element"),v.on("click"+h,m.close,s.dismiss).data(b,s),d.detachable&&v.parent()[0]!==y[0]&&v.detach().prependTo(y),d.displayTime>0&&setTimeout(s.hide,d.displayTime),s.show()},destroy:function(){s.verbose("Destroying instance"),v.removeData(b).off(h)},show:function(){s.should.show()&&!v.is(":visible")&&(s.debug("Showing nag",d.animation.show),"fade"==d.animation.show?v.fadeIn(d.duration,d.easing):v.slideDown(d.duration,d.easing))},hide:function(){s.debug("Showing nag",d.animation.hide),"fade"==d.animation.show?v.fadeIn(d.duration,d.easing):v.slideUp(d.duration,d.easing)},onHide:function(){s.debug("Removing nag",d.animation.hide),v.remove(),d.onHide&&d.onHide()},dismiss:function(e){d.storageMethod&&s.storage.set(d.key,d.value),s.hide(),e.stopImmediatePropagation(),e.preventDefault()},should:{show:function(){return d.persist?(s.debug("Persistent nag is set, can show nag"),!0):s.storage.get(d.key)!=d.value.toString()?(s.debug("Stored value is not set, can show nag",s.storage.get(d.key)),!0):(s.debug("Stored value is set, cannot show nag",s.storage.get(d.key)),!1)}},get:{storageOptions:function(){var e={};return d.expires&&(e.expires=d.expires),d.domain&&(e.domain=d.domain),d.path&&(e.path=d.path),e}},clear:function(){s.storage.remove(d.key)},storage:{set:function(t,i){var a=s.get.storageOptions();if("localstorage"==d.storageMethod&&o.localStorage!==n)o.localStorage.setItem(t,i),s.debug("Value stored using local storage",t,i);else if("sessionstorage"==d.storageMethod&&o.sessionStorage!==n)o.sessionStorage.setItem(t,i),s.debug("Value stored using session storage",t,i);else{if(e.cookie===n)return void s.error(f.noCookieStorage);e.cookie(t,i,a),s.debug("Value stored using cookie",t,i,a)}},get:function(t,i){var a;return"localstorage"==d.storageMethod&&o.localStorage!==n?a=o.localStorage.getItem(t):"sessionstorage"==d.storageMethod&&o.sessionStorage!==n?a=o.sessionStorage.getItem(t):e.cookie!==n?a=e.cookie(t):s.error(f.noCookieStorage),("undefined"==a||"null"==a||a===n||null===a)&&(a=n),a},remove:function(t){var i=s.get.storageOptions();"localstorage"==d.storageMethod&&o.localStorage!==n?o.localStorage.removeItem(t):"sessionstorage"==d.storageMethod&&o.sessionStorage!==n?o.sessionStorage.removeItem(t):e.cookie!==n?e.removeCookie(t,i):s.error(f.noStorage)}},setting:function(o,t){if(s.debug("Changing setting",o,t),e.isPlainObject(o))e.extend(!0,d,o);else{if(t===n)return d[o];d[o]=t}},internal:function(o,t){if(e.isPlainObject(o))e.extend(!0,s,o);else{if(t===n)return s[o];s[o]=t}},debug:function(){d.debug&&(d.performance?s.performance.log(arguments):(s.debug=Function.prototype.bind.call(console.info,console,d.name+":"),s.debug.apply(console,arguments)))},verbose:function(){d.verbose&&d.debug&&(d.performance?s.performance.log(arguments):(s.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),s.verbose.apply(console,arguments)))},error:function(){s.error=Function.prototype.bind.call(console.error,console,d.name+":"),s.error.apply(console,arguments)},performance:{log:function(e){var o,t,n;d.performance&&(o=(new Date).getTime(),n=r||o,t=o-n,r=o,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":t})),clearTimeout(s.performance.timer),s.performance.timer=setTimeout(s.performance.display,500)},display:function(){var o=d.name+":",t=0;r=!1,clearTimeout(s.performance.timer),e.each(c,function(e,o){t+=o["Execution Time"]}),o+=" "+t+"ms",a&&(o+=" '"+a+"'"),(console.group!==n||console.table!==n)&&c.length>0&&(console.groupCollapsed(o),console.table?console.table(c):e.each(c,function(e,o){console.log(o.Name+": "+o["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(o,t,a){var r,c,l,g=S;return t=t||u,a=k||a,"string"==typeof o&&g!==n&&(o=o.split(/[\. ]/),r=o.length-1,e.each(o,function(t,i){var a=t!=r?i+o[t+1].charAt(0).toUpperCase()+o[t+1].slice(1):o;if(e.isPlainObject(g[a])&&t!=r)g=g[a];else{if(g[a]!==n)return c=g[a],!1;if(!e.isPlainObject(g[i])||t==r)return g[i]!==n?(c=g[i],!1):(s.error(f.method,o),!1);g=g[i]}})),e.isFunction(c)?l=c.apply(a,t):c!==n&&(l=c),e.isArray(i)?i.push(l):i!==n?i=[i,l]:l!==n&&(i=l),c}},g?(S===n&&s.initialize(),s.invoke(l)):(S!==n&&S.invoke("destroy"),s.initialize())}),i!==n?i:this},e.fn.nag.settings={name:"Nag",debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",storageMethod:"cookie",key:"nag",value:"dismiss",error:{noCookieStorage:"$.cookie is not included. A storage solution is required.",noStorage:"Neither $.cookie or store is defined. A storage solution is required for storing state",method:"The method you called is not defined."},className:{bottom:"bottom",fixed:"fixed"},selector:{close:".close.icon"},speed:500,easing:"easeOutQuad",onHide:function(){}}}(jQuery,window,document); -------------------------------------------------------------------------------- /static/semantic/components/item.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Item 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.items>.item{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:1em 0;width:100%;min-height:0;background:0 0;padding:0;border:none;border-radius:0;box-shadow:none;-webkit-transition:box-shadow .1s ease;transition:box-shadow .1s ease;z-index:''}.ui.items>.item a{cursor:pointer}.ui.items{margin:1.5em 0}.ui.items:first-child{margin-top:0!important}.ui.items:last-child{margin-bottom:0!important}.ui.items>.item:after{display:block;content:' ';height:0;clear:both;overflow:hidden;visibility:hidden}.ui.items>.item:first-child{margin-top:0}.ui.items>.item:last-child{margin-bottom:0}.ui.items>.item>.image{position:relative;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;display:block;float:none;margin:0;padding:0;max-height:'';-webkit-align-self:top;-ms-flex-item-align:top;align-self:top}.ui.items>.item>.image>img{display:block;width:100%;height:auto;border-radius:.125rem;border:none}.ui.items>.item>.image:only-child>img{border-radius:0}.ui.items>.item>.content{display:block;-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;background:0 0;margin:0;padding:0;box-shadow:none;font-size:1em;border:none;border-radius:0}.ui.items>.item>.content:after{display:block;content:' ';height:0;clear:both;overflow:hidden;visibility:hidden}.ui.items>.item>.image+.content{min-width:0;width:auto;display:block;margin-left:0;-webkit-align-self:top;-ms-flex-item-align:top;align-self:top;padding-left:1.5em}.ui.items>.item>.content>.header{display:inline-block;margin:-.21425em 0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-weight:700;color:rgba(0,0,0,.85)}.ui.items>.item>.content>.header:not(.ui){font-size:1.28571429em}.ui.items>.item [class*="left floated"]{float:left}.ui.items>.item [class*="right floated"]{float:right}.ui.items>.item .content img{-webkit-align-self:middle;-ms-flex-item-align:middle;align-self:middle;width:''}.ui.items>.item .avatar img,.ui.items>.item img.avatar{width:'';height:'';border-radius:500rem}.ui.items>.item>.content>.description{margin-top:.6em;max-width:auto;font-size:1em;line-height:1.4285em;color:rgba(0,0,0,.87)}.ui.items>.item>.content p{margin:0 0 .5em}.ui.items>.item>.content p:last-child{margin-bottom:0}.ui.items>.item .meta{margin:.5em 0;font-size:1em;line-height:1em;color:rgba(0,0,0,.6)}.ui.items>.item .meta *{margin-right:.3em}.ui.items>.item .meta :last-child{margin-right:0}.ui.items>.item .meta [class*="right floated"]{margin-right:0;margin-left:.3em}.ui.items>.item>.content a:not(.ui){color:'';-webkit-transition:color .1s ease;transition:color .1s ease}.ui.items>.item>.content a:not(.ui):hover{color:''}.ui.items>.item>.content>a.header{color:rgba(0,0,0,.85)}.ui.items>.item>.content>a.header:hover{color:#1e70bf}.ui.items>.item .meta>a:not(.ui){color:rgba(0,0,0,.4)}.ui.items>.item .meta>a:not(.ui):hover{color:rgba(0,0,0,.87)}.ui.items>.item>.content .favorite.icon{cursor:pointer;opacity:.75;-webkit-transition:color .1s ease;transition:color .1s ease}.ui.items>.item>.content .favorite.icon:hover{opacity:1;color:#ffb70a}.ui.items>.item>.content .active.favorite.icon{color:#ffe623}.ui.items>.item>.content .like.icon{cursor:pointer;opacity:.75;-webkit-transition:color .1s ease;transition:color .1s ease}.ui.items>.item>.content .like.icon:hover{opacity:1;color:#ff2733}.ui.items>.item>.content .active.like.icon{color:#ff2733}.ui.items>.item .extra{display:block;position:relative;background:0 0;margin:.5rem 0 0;width:100%;padding:0;top:0;left:0;color:rgba(0,0,0,.4);box-shadow:none;-webkit-transition:color .1s ease;transition:color .1s ease;border-top:none}.ui.items>.item .extra>*{margin:.25rem .5rem .25rem 0}.ui.items>.item .extra>[class*="right floated"]{margin:.25rem 0 .25rem .5rem}.ui.items>.item .extra:after{display:block;content:' ';height:0;clear:both;overflow:hidden;visibility:hidden}.ui.items>.item>.image:not(.ui){width:175px}@media only screen and (min-width:768px) and (max-width:991px){.ui.items>.item{margin:1em 0}.ui.items>.item>.image:not(.ui){width:150px}.ui.items>.item>.image+.content{display:block;padding:0 0 0 1em}}@media only screen and (max-width:767px){.ui.items>.item{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin:2em 0}.ui.items>.item>.image{display:block;margin-left:auto;margin-right:auto}.ui.items>.item>.image,.ui.items>.item>.image>img{max-width:100%!important;width:auto!important;max-height:250px!important}.ui.items>.item>.image+.content{display:block;padding:1.5em 0 0}}.ui.items>.item>.image+[class*="top aligned"].content{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.ui.items>.item>.image+[class*="middle aligned"].content{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.ui.items>.item>.image+[class*="bottom aligned"].content{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end}.ui.relaxed.items>.item{margin:1.5em 0}.ui[class*="very relaxed"].items>.item{margin:2em 0}.ui.divided.items>.item{border-top:1px solid rgba(34,36,38,.15);margin:0;padding:1em 0}.ui.divided.items>.item:first-child{border-top:none;margin-top:0!important;padding-top:0!important}.ui.divided.items>.item:last-child{margin-bottom:0!important;padding-bottom:0!important}.ui.relaxed.divided.items>.item{margin:0;padding:1.5em 0}.ui[class*="very relaxed"].divided.items>.item{margin:0;padding:2em 0}.ui.items a.item:hover,.ui.link.items>.item:hover{cursor:pointer}.ui.items a.item:hover .content .header,.ui.link.items>.item:hover .content .header{color:#1e70bf}.ui.items>.item{font-size:1em} -------------------------------------------------------------------------------- /static/semantic/components/visit.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.0.0 - Visit 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | !function(e,t,i,n){"use strict";e.visit=e.fn.visit=function(i){var o,r=e(e.isFunction(this)?t:this),s=r.selector||"",a=(new Date).getTime(),c=[],u=arguments[0],l="string"==typeof u,d=[].slice.call(arguments,1);return r.each(function(){var g,m=e.isPlainObject(i)?e.extend(!0,{},e.fn.visit.settings,i):e.extend({},e.fn.visit.settings),f=m.error,p=m.namespace,v=p+"-module",h=e(this),b=e(),y=this,k=h.data(v);g={initialize:function(){m.count?g.store(m.key.count,m.count):m.id?g.add.id(m.id):m.increment&&"increment"!==l&&g.increment(),g.add.display(h),g.instantiate()},instantiate:function(){g.verbose("Storing instance of visit module",g),k=g,h.data(v,g)},destroy:function(){g.verbose("Destroying instance"),h.removeData(v)},increment:function(e){var t=g.get.count(),i=+t+1;e?g.add.id(e):(i>m.limit&&!m.surpass&&(i=m.limit),g.debug("Incrementing visits",i),g.store(m.key.count,i))},decrement:function(e){var t=g.get.count(),i=+t-1;e?g.remove.id(e):(g.debug("Removing visit"),g.store(m.key.count,i))},get:{count:function(){return+g.retrieve(m.key.count)||0},idCount:function(e){return e=e||g.get.ids(),e.length},ids:function(e){var t=[];return e=e||g.retrieve(m.key.ids),"string"==typeof e&&(t=e.split(m.delimiter)),g.verbose("Found visited ID list",t),t},storageOptions:function(e){var t={};return m.expires&&(t.expires=m.expires),m.domain&&(t.domain=m.domain),m.path&&(t.path=m.path),t}},has:{visited:function(t,i){var o=!1;return i=i||g.get.ids(),t!==n&&i&&e.each(i,function(e,i){i==t&&(o=!0)}),o}},set:{count:function(e){g.store(m.key.count,e)},ids:function(e){g.store(m.key.ids,e)}},reset:function(){g.store(m.key.count,0),g.store(m.key.ids,null)},add:{id:function(e){var t=g.retrieve(m.key.ids),i=t===n||""===t?e:t+m.delimiter+e;g.has.visited(e)?g.debug("Unique content already visited, not adding visit",e,t):e===n?g.debug("ID is not defined"):(g.debug("Adding visit to unique content",e),g.store(m.key.ids,i)),g.set.count(g.get.idCount())},display:function(t){var i=e(t);i.length>0&&!e.isWindow(i[0])&&(g.debug("Updating visit count for element",i),b=b.length>0?b.add(i):i)}},remove:{id:function(t){var i=g.get.ids(),o=[];t!==n&&i!==n&&(g.debug("Removing visit to unique content",t,i),e.each(i,function(e,i){i!==t&&o.push(i)}),o=o.join(m.delimiter),g.store(m.key.ids,o)),g.set.count(g.get.idCount())}},check:{limit:function(e){e=e||g.get.count(),m.limit&&(e>=m.limit&&(g.debug("Pages viewed exceeded limit, firing callback",e,m.limit),m.onLimit.call(y,e)),g.debug("Limit not reached",e,m.limit),m.onChange.call(y,e)),g.update.display(e)}},update:{display:function(e){e=e||g.get.count(),b.length>0&&(g.debug("Updating displayed view count",b),b.html(e))}},store:function(i,o){var r=g.get.storageOptions(o);if("localstorage"==m.storageMethod&&t.localStorage!==n)t.localStorage.setItem(i,o),g.debug("Value stored using local storage",i,o);else{if(e.cookie===n)return void g.error(f.noCookieStorage);e.cookie(i,o,r),g.debug("Value stored using cookie",i,o,r)}i==m.key.count&&g.check.limit(o)},retrieve:function(i,o){var r;return"localstorage"==m.storageMethod&&t.localStorage!==n?r=t.localStorage.getItem(i):e.cookie!==n?r=e.cookie(i):g.error(f.noCookieStorage),("undefined"==r||"null"==r||r===n||null===r)&&(r=n),r},setting:function(t,i){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(i===n)return m[t];m[t]=i}},internal:function(t,i){return g.debug("Changing internal",t,i),i===n?g[t]:void(e.isPlainObject(t)?e.extend(!0,g,t):g[t]=i)},debug:function(){m.debug&&(m.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,m.name+":"),g.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),g.verbose.apply(console,arguments)))},error:function(){g.error=Function.prototype.bind.call(console.error,console,m.name+":"),g.error.apply(console,arguments)},performance:{log:function(e){var t,i,n;m.performance&&(t=(new Date).getTime(),n=a||t,i=t-n,a=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":i})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var t=m.name+":",i=0;a=!1,clearTimeout(g.performance.timer),e.each(c,function(e,t){i+=t["Execution Time"]}),t+=" "+i+"ms",s&&(t+=" '"+s+"'"),r.length>1&&(t+=" ("+r.length+")"),(console.group!==n||console.table!==n)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,i,r){var s,a,c,u=k;return i=i||d,r=y||r,"string"==typeof t&&u!==n&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(i,o){var r=i!=s?o+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(e.isPlainObject(u[r])&&i!=s)u=u[r];else{if(u[r]!==n)return a=u[r],!1;if(!e.isPlainObject(u[o])||i==s)return u[o]!==n?(a=u[o],!1):!1;u=u[o]}})),e.isFunction(a)?c=a.apply(r,i):a!==n&&(c=a),e.isArray(o)?o.push(c):o!==n?o=[o,c]:c!==n&&(o=c),a}},l?(k===n&&g.initialize(),g.invoke(u)):(k!==n&&k.invoke("destroy"),g.initialize())}),o!==n?o:this},e.fn.visit.settings={name:"Visit",debug:!1,verbose:!1,performance:!0,namespace:"visit",increment:!1,surpass:!1,count:!1,limit:!1,delimiter:"&",storageMethod:"localstorage",key:{count:"visit-count",ids:"visit-ids"},expires:30,domain:!1,path:"/",onLimit:function(){},onChange:function(){},error:{method:"The method you called is not defined",missingPersist:"Using the persist setting requires the inclusion of PersistJS",noCookieStorage:"The default storage cookie requires $.cookie to be included."}}}(jQuery,window,document); -------------------------------------------------------------------------------- /static/semantic/components/message.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Message 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.message{position:relative;min-height:1em;margin:1em 0;background:#f8f8f9;padding:1em 1.5em;line-height:1.4285em;color:rgba(0,0,0,.87);-webkit-transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;transition:opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;border-radius:.28571429rem;box-shadow:0 0 0 1px rgba(34,36,38,.22) inset,0 0 0 0 transparent}.ui.message:first-child{margin-top:0}.ui.message:last-child{margin-bottom:0}.ui.message .header{display:block;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-weight:700;margin:-.14285em 0 0}.ui.message .header:not(.ui){font-size:1.14285714em}.ui.message p{opacity:.85;margin:.75em 0}.ui.message p:first-child{margin-top:0}.ui.message p:last-child{margin-bottom:0}.ui.message .header+p{margin-top:.25em}.ui.message .list:not(.ui){text-align:left;padding:0;opacity:.85;list-style-position:inside;margin:.5em 0 0}.ui.message .list:not(.ui):first-child{margin-top:0}.ui.message .list:not(.ui):last-child{margin-bottom:0}.ui.message .list:not(.ui) li{position:relative;list-style-type:none;margin:0 0 .3em 1em;padding:0}.ui.message .list:not(.ui) li:before{position:absolute;content:'•';left:-1em;height:100%;vertical-align:baseline}.ui.message .list:not(.ui) li:last-child{margin-bottom:0}.ui.message>.icon{margin-right:.6em}.ui.message>.close.icon{cursor:pointer;position:absolute;margin:0;top:.78575em;right:.5em;opacity:.7;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.ui.message>.close.icon:hover{opacity:1}.ui.message>:first-child{margin-top:0}.ui.message>:last-child{margin-bottom:0}.ui.dropdown .menu>.message{margin:0 -1px}.ui.visible.visible.visible.visible.message{display:block}.ui.icon.visible.visible.visible.visible.message{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.ui.hidden.hidden.hidden.hidden.message{display:none}.ui.compact.message{display:inline-block}.ui.attached.message{margin-bottom:-1px;border-radius:.28571429rem .28571429rem 0 0;box-shadow:0 0 0 1px rgba(34,36,38,.15) inset;margin-left:-1px;margin-right:-1px}.ui.attached+.ui.attached.message:not(.top):not(.bottom){margin-top:-1px;border-radius:0}.ui.bottom.attached.message{margin-top:-1px;border-radius:0 0 .28571429rem .28571429rem;box-shadow:0 0 0 1px rgba(34,36,38,.15) inset,0 1px 2px 0 rgba(34,36,38,.15)}.ui.bottom.attached.message:not(:last-child){margin-bottom:1em}.ui.attached.icon.message{width:auto}.ui.icon.message{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.ui.icon.message>.icon:not(.close){display:block;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;line-height:1;vertical-align:middle;font-size:3em;opacity:.8}.ui.icon.message>.content{display:block;-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;vertical-align:middle}.ui.icon.message .icon:not(.close)+.content{padding-left:0}.ui.icon.message .circular.icon{width:1em}.ui.floating.message{box-shadow:0 0 0 1px rgba(34,36,38,.22) inset,0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.08)}.ui.positive.message{background-color:#fcfff5;color:#2c662d}.ui.attached.positive.message,.ui.positive.message{box-shadow:0 0 0 1px #a3c293 inset,0 0 0 0 transparent}.ui.positive.message .header{color:#1a531b}.ui.negative.message{background-color:#fff6f6;color:#9f3a38}.ui.attached.negative.message,.ui.negative.message{box-shadow:0 0 0 1px #e0b4b4 inset,0 0 0 0 transparent}.ui.negative.message .header{color:#912d2b}.ui.info.message{background-color:#f8ffff;color:#276f86}.ui.attached.info.message,.ui.info.message{box-shadow:0 0 0 1px #a9d5de inset,0 0 0 0 transparent}.ui.info.message .header{color:#0e566c}.ui.warning.message{background-color:#fffaf3;color:#573a08}.ui.attached.warning.message,.ui.warning.message{box-shadow:0 0 0 1px #c9ba9b inset,0 0 0 0 transparent}.ui.warning.message .header{color:#794b02}.ui.error.message{background-color:#fff6f6;color:#9f3a38}.ui.attached.error.message,.ui.error.message{box-shadow:0 0 0 1px #e0b4b4 inset,0 0 0 0 transparent}.ui.error.message .header{color:#912d2b}.ui.success.message{background-color:#fcfff5;color:#2c662d}.ui.attached.success.message,.ui.success.message{box-shadow:0 0 0 1px #a3c293 inset,0 0 0 0 transparent}.ui.success.message .header{color:#1a531b}.ui.black.message,.ui.inverted.message{background-color:#1b1c1d;color:rgba(255,255,255,.9)}.ui.red.message{background-color:#ffe8e6;color:#db2828}.ui.red.message .header{color:#c82121}.ui.orange.message{background-color:#ffedde;color:#f2711c}.ui.orange.message .header{color:#e7640d}.ui.yellow.message{background-color:#fff8db;color:#b58105}.ui.yellow.message .header{color:#9c6f04}.ui.olive.message{background-color:#fbfdef;color:#8abc1e}.ui.olive.message .header{color:#7aa61a}.ui.green.message{background-color:#e5f9e7;color:#1ebc30}.ui.green.message .header{color:#1aa62a}.ui.teal.message{background-color:#e1f7f7;color:#10a3a3}.ui.teal.message .header{color:#0e8c8c}.ui.blue.message{background-color:#dff0ff;color:#2185d0}.ui.blue.message .header{color:#1e77ba}.ui.violet.message{background-color:#eae7ff;color:#6435c9}.ui.violet.message .header{color:#5a30b5}.ui.purple.message{background-color:#f6e7ff;color:#a333c8}.ui.purple.message .header{color:#922eb4}.ui.pink.message{background-color:#ffe3fb;color:#e03997}.ui.pink.message .header{color:#dd238b}.ui.brown.message{background-color:#f1e2d3;color:#a5673f}.ui.brown.message .header{color:#935b38}.ui.small.message{font-size:.92857143em}.ui.message{font-size:1em}.ui.large.message{font-size:1.14285714em}.ui.huge.message{font-size:1.42857143em}.ui.massive.message{font-size:1.71428571em} -------------------------------------------------------------------------------- /static/semantic/components/search.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Search 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.search{position:relative}.ui.search>.prompt{margin:0;outline:0;-webkit-appearance:none;-webkit-tap-highlight-color:rgba(255,255,255,0);text-shadow:none;font-style:normal;font-weight:400;line-height:1.2142em;padding:.67861429em 1em;font-size:1em;background:#fff;border:1px solid rgba(34,36,38,.15);color:rgba(0,0,0,.87);box-shadow:0 0 0 0 transparent inset;-webkit-transition:background-color .1s ease,color .1s ease,box-shadow .1s ease,border-color .1s ease;transition:background-color .1s ease,color .1s ease,box-shadow .1s ease,border-color .1s ease}.ui.search .prompt{border-radius:500rem}.ui.search .prompt~.search.icon{cursor:pointer}.ui.search>.results{display:none;position:absolute;top:100%;left:0;-webkit-transform-origin:center top;-ms-transform-origin:center top;transform-origin:center top;background:#fff;margin-top:.5em;width:18em;border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.08);border:1px solid #d4d4d5;z-index:998}.ui.search>.results>:first-child{border-radius:.28571429rem .28571429rem 0 0}.ui.search>.results>:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.search>.results .result{cursor:pointer;display:block;overflow:hidden;font-size:1em;padding:.85714286em 1.14285714em;color:rgba(0,0,0,.87);line-height:1.33;border-bottom:1px solid rgba(34,36,38,.1)}.ui.search>.results .result:last-child{border-bottom:none!important}.ui.search>.results .result .image{float:right;overflow:hidden;background:0 0;width:5em;height:3em;border-radius:.25em}.ui.search>.results .result .image img{display:block;width:auto;height:100%}.ui.search>.results .result .image+.content{margin:0 6em 0 0}.ui.search>.results .result .title{margin:-.14285em 0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-weight:700;font-size:1em;color:rgba(0,0,0,.85)}.ui.search>.results .result .description{margin-top:0;font-size:.92857143em;color:rgba(0,0,0,.4)}.ui.search>.results .result .price{float:right;color:#21ba45}.ui.search>.results>.message{padding:1em}.ui.search>.results>.message .header{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1rem;font-weight:700;color:rgba(0,0,0,.87)}.ui.search>.results>.message .description{margin-top:.25rem;font-size:1em;color:rgba(0,0,0,.87)}.ui.search>.results>.action{display:block;border-top:none;background:#f3f4f5;padding:.92857143em 1em;color:rgba(0,0,0,.87);font-weight:700;text-align:center}.ui.search>.prompt:focus{border-color:rgba(34,36,38,.35);background:#fff;color:rgba(0,0,0,.95)}.ui.loading.search .input>i.icon:before{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.loading.search .input>i.icon:after{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;-webkit-animation:button-spin .6s linear;animation:button-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent}.ui.category.search>.results .category .result:hover,.ui.search>.results .result:hover{background:#f9fafb}.ui.search .action:hover{background:#e0e0e0}.ui.category.search>.results .category.active{background:#f3f4f5}.ui.category.search>.results .category.active>.name{color:rgba(0,0,0,.87)}.ui.category.search>.results .category .result.active,.ui.search>.results .result.active{position:relative;border-left-color:rgba(34,36,38,.1);background:#f3f4f5;box-shadow:none}.ui.search>.results .result.active .description,.ui.search>.results .result.active .title{color:rgba(0,0,0,.85)}.ui.search.selection .prompt{border-radius:.28571429rem}.ui.search.selection>.icon.input>.remove.icon{pointer-events:none;position:absolute;left:auto;opacity:0;color:'';top:0;right:0;-webkit-transition:color .1s ease,opacity .1s ease;transition:color .1s ease,opacity .1s ease}.ui.search.selection>.icon.input>.active.remove.icon{cursor:pointer;opacity:.8;pointer-events:auto}.ui.search.selection>.icon.input:not([class*="left icon"])>.icon~.remove.icon{right:1.85714em}.ui.search.selection>.icon.input>.remove.icon:hover{opacity:1;color:#db2828}.ui.category.search .results{width:28em}.ui.category.search>.results .category{background:#f3f4f5;box-shadow:none;border-bottom:1px solid rgba(34,36,38,.1);-webkit-transition:background .1s ease,border-color .1s ease;transition:background .1s ease,border-color .1s ease}.ui.category.search>.results .category:last-child{border-bottom:none}.ui.category.search>.results .category:first-child .name+.result{border-radius:0 .28571429rem 0 0}.ui.category.search>.results .category .result{background:#fff;margin-left:100px;border-left:1px solid rgba(34,36,38,.15);border-bottom:1px solid rgba(34,36,38,.1);-webkit-transition:background .1s ease,border-color .1s ease;transition:background .1s ease,border-color .1s ease;padding:.85714286em 1.14285714em}.ui.category.search>.results .category:last-child .result:last-child{border-radius:0 0 .28571429rem;border-bottom:none}.ui.category.search>.results .category>.name{width:100px;background:0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1em;float:1em;float:left;padding:.4em 1em;font-weight:700;color:rgba(0,0,0,.4)}.ui[class*="left aligned"].search>.results{right:auto;left:0}.ui[class*="right aligned"].search>.results{right:0;left:auto}.ui.fluid.search .results{width:100%}.ui.mini.search{font-size:.71428571em}.ui.small.search{font-size:.92857143em}.ui.search{font-size:1em}.ui.large.search{font-size:1.14285714em}.ui.big.search{font-size:1.28571429em}.ui.huge.search{font-size:1.42857143em}.ui.massive.search{font-size:1.71428571em} -------------------------------------------------------------------------------- /static/semantic/components/video.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.0.0 - Video 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2014 Contributorss 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | !function(e,o,t,n){"use strict";e.fn.video=function(t){{var a,i=e(this),r=i.selector||"",l=(new Date).getTime(),c=[],u=arguments[0],s="string"==typeof u,m=[].slice.call(arguments,1);o.requestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||o.msRequestAnimationFrame||function(e){setTimeout(e,0)}}return i.each(function(){var d,p=e.isPlainObject(t)?e.extend(!0,{},e.fn.video.settings,t):e.extend({},e.fn.video.settings),f=p.selector,g=p.className,h=p.error,v=p.metadata,b=p.namespace,y=p.templates,w="."+b,x="module-"+b,F=(e(o),e(this)),C=F.find(f.placeholder),E=F.find(f.playButton),T=F.find(f.embed),A=this,P=F.data(x);d={initialize:function(){d.debug("Initializing video"),d.create(),F.on("click"+w,f.placeholder,d.play).on("click"+w,f.playButton,d.play),d.instantiate()},instantiate:function(){d.verbose("Storing instance of module",d),P=d,F.data(x,d)},create:function(){var e=F.data(v.image),o=y.video(e);F.html(o),d.refresh(),e||d.play(),d.debug("Creating html for video element",o)},destroy:function(){d.verbose("Destroying previous instance of video"),d.reset(),F.removeData(x).off(w)},refresh:function(){d.verbose("Refreshing selector cache"),C=F.find(f.placeholder),E=F.find(f.playButton),T=F.find(f.embed)},change:function(e,o,t){d.debug("Changing video to ",e,o,t),F.data(v.source,e).data(v.id,o).data(v.url,t),p.onChange()},reset:function(){d.debug("Clearing video embed and showing placeholder"),F.removeClass(g.active),T.html(" "),C.show(),p.onReset()},play:function(){d.debug("Playing video");var e=F.data(v.source)||!1,o=F.data(v.url)||!1,t=F.data(v.id)||!1;T.html(d.generate.html(e,t,o)),F.addClass(g.active),p.onPlay()},get:{source:function(e){return"string"!=typeof e?!1:-1!==e.search("youtube.com")?"youtube":-1!==e.search("vimeo.com")?"vimeo":!1},id:function(e){return e.match(p.regExp.youtube)?e.match(p.regExp.youtube)[1]:e.match(p.regExp.vimeo)?e.match(p.regExp.vimeo)[2]:!1}},generate:{html:function(e,o,t){d.debug("Generating embed html");var n;return e=e||p.source,o=o||p.id,e&&o||t?(e&&o||(e=d.get.source(t),o=d.get.id(t)),"vimeo"==e?n='':"youtube"==e&&(n='')):d.error(h.noVideo),n},url:function(e){var o=p.api?1:0,t="auto"===p.autoplay?F.data("image")!==n:p.autoplay,a=p.hd?1:0,i=p.showUI?1:0,r=p.showUI?0:1,l="";return"vimeo"==e&&(l="api="+o+"&title="+i+"&byline="+i+"&portrait="+i+"&autoplay="+t,p.color&&(l+="&color="+p.color)),"ustream"==e?(l="autoplay="+t,p.color&&(l+="&color="+p.color)):"youtube"==e&&(l="enablejsapi="+o+"&autoplay="+t+"&autohide="+r+"&hq="+a+"&modestbranding=1",p.color&&(l+="&color="+p.color)),l}},setting:function(o,t){if(d.debug("Changing setting",o,t),e.isPlainObject(o))e.extend(!0,p,o);else{if(t===n)return p[o];p[o]=t}},internal:function(o,t){if(e.isPlainObject(o))e.extend(!0,d,o);else{if(t===n)return d[o];d[o]=t}},debug:function(){p.debug&&(p.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,p.name+":"),d.debug.apply(console,arguments)))},verbose:function(){p.verbose&&p.debug&&(p.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),d.verbose.apply(console,arguments)))},error:function(){d.error=Function.prototype.bind.call(console.error,console,p.name+":"),d.error.apply(console,arguments)},performance:{log:function(e){var o,t,n;p.performance&&(o=(new Date).getTime(),n=l||o,t=o-n,l=o,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:A,"Execution Time":t})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,500)},display:function(){var o=p.name+":",t=0;l=!1,clearTimeout(d.performance.timer),e.each(c,function(e,o){t+=o["Execution Time"]}),o+=" "+t+"ms",r&&(o+=" '"+r+"'"),i.length>1&&(o+=" ("+i.length+")"),(console.group!==n||console.table!==n)&&c.length>0&&(console.groupCollapsed(o),console.table?console.table(c):e.each(c,function(e,o){console.log(o.Name+": "+o["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(o,t,i){var r,l,c,u=P;return t=t||m,i=A||i,"string"==typeof o&&u!==n&&(o=o.split(/[\. ]/),r=o.length-1,e.each(o,function(t,a){var i=t!=r?a+o[t+1].charAt(0).toUpperCase()+o[t+1].slice(1):o;if(e.isPlainObject(u[i])&&t!=r)u=u[i];else{if(u[i]!==n)return l=u[i],!1;if(!e.isPlainObject(u[a])||t==r)return u[a]!==n?(l=u[a],!1):(d.error(h.method,o),!1);u=u[a]}})),e.isFunction(l)?c=l.apply(i,t):l!==n&&(c=l),e.isArray(a)?a.push(c):a!==n?a=[a,c]:c!==n&&(a=c),l}},s?(P===n&&d.initialize(),d.invoke(u)):(P!==n&&P.invoke("destroy"),d.initialize())}),a!==n?a:this},e.fn.video.settings={name:"Video",namespace:"video",debug:!1,verbose:!1,performance:!0,metadata:{id:"id",image:"image",source:"source",url:"url"},source:!1,url:!1,id:!1,aspectRatio:16/9,onPlay:function(){},onReset:function(){},onChange:function(){},onPause:function(){},onStop:function(){},width:"auto",height:"auto",autoplay:"auto",color:"#442359",hd:!0,showUI:!1,api:!0,regExp:{youtube:/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,vimeo:/http:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/},error:{noVideo:"No video specified",method:"The method you called is not defined"},className:{active:"active"},selector:{embed:".embed",placeholder:".placeholder",playButton:".play"}},e.fn.video.settings.templates={video:function(e){var o="";return e&&(o+=''),o+='
'}}}(jQuery,window,document); -------------------------------------------------------------------------------- /static/semantic/components/divider.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Divider 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.divider{margin:1rem 0;line-height:1;height:0;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:rgba(0,0,0,.85);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;font-size:1rem}.ui.divider:not(.vertical):not(.horizontal){border-top:1px solid rgba(34,36,38,.15);border-bottom:1px solid rgba(255,255,255,.1)}.ui.grid>.column+.divider,.ui.grid>.row>.column+.divider{left:auto}.ui.horizontal.divider{display:table;white-space:nowrap;height:auto;margin:'';overflow:hidden;line-height:1;text-align:center}.ui.horizontal.divider:after,.ui.horizontal.divider:before{content:'';display:table-cell;position:relative;top:50%;width:50%;background-repeat:no-repeat;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABaAAAAACCAYAAACuTHuKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1OThBRDY4OUNDMTYxMUU0OUE3NUVGOEJDMzMzMjE2NyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1OThBRDY4QUNDMTYxMUU0OUE3NUVGOEJDMzMzMjE2NyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU5OEFENjg3Q0MxNjExRTQ5QTc1RUY4QkMzMzMyMTY3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU5OEFENjg4Q0MxNjExRTQ5QTc1RUY4QkMzMzMyMTY3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+VU513gAAADVJREFUeNrs0DENACAQBDBIWLGBJQby/mUcJn5sJXQmOQMAAAAAAJqt+2prAAAAAACg2xdgANk6BEVuJgyMAAAAAElFTkSuQmCC)}.ui.horizontal.divider:before{background-position:right 1em top 50%}.ui.horizontal.divider:after{background-position:left 1em top 50%}.ui.vertical.divider{position:absolute;z-index:2;top:50%;left:50%;margin:0;padding:0;width:auto;height:50%;line-height:0;text-align:center;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.ui.vertical.divider:after,.ui.vertical.divider:before{position:absolute;left:50%;content:'';z-index:3;border-left:1px solid rgba(34,36,38,.15);border-right:1px solid rgba(255,255,255,.1);width:0;height:calc(100% - 1rem)}.ui.vertical.divider:before{top:-100%}.ui.vertical.divider:after{top:auto;bottom:0}@media only screen and (max-width:767px){.ui.grid .stackable.row .ui.vertical.divider,.ui.stackable.grid .ui.vertical.divider{display:table;white-space:nowrap;height:auto;margin:'';overflow:hidden;line-height:1;text-align:center;position:static;top:0;left:0;-webkit-transform:none;-ms-transform:none;transform:none}.ui.grid .stackable.row .ui.vertical.divider:after,.ui.grid .stackable.row .ui.vertical.divider:before,.ui.stackable.grid .ui.vertical.divider:after,.ui.stackable.grid .ui.vertical.divider:before{left:0;border-left:none;border-right:none;content:'';display:table-cell;position:relative;top:50%;width:50%;background-repeat:no-repeat}.ui.grid .stackable.row .ui.vertical.divider:before,.ui.stackable.grid .ui.vertical.divider:before{background-position:right 1em top 50%}.ui.grid .stackable.row .ui.vertical.divider:after,.ui.stackable.grid .ui.vertical.divider:after{background-position:left 1em top 50%}}.ui.divider>.icon{margin:0;font-size:1rem;height:1em;vertical-align:middle}.ui.hidden.divider{border-color:transparent!important}.ui.hidden.divider:after,.ui.hidden.divider:before{display:none}.ui.divider.inverted,.ui.horizontal.inverted.divider,.ui.vertical.inverted.divider{color:#fff}.ui.divider.inverted,.ui.divider.inverted:after,.ui.divider.inverted:before{border-top-color:rgba(34,36,38,.15)!important;border-left-color:rgba(34,36,38,.15)!important;border-bottom-color:rgba(255,255,255,.15)!important;border-right-color:rgba(255,255,255,.15)!important}.ui.fitted.divider{margin:0}.ui.clearing.divider{clear:both}.ui.section.divider{margin-top:2rem;margin-bottom:2rem}@media only screen and (max-width:767px){.ui.grid .stackable.row .ui.vertical.divider:after,.ui.grid .stackable.row .ui.vertical.divider:before,.ui.stackable.grid .ui.vertical.divider:after,.ui.stackable.grid .ui.vertical.divider:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABaAAAAACCAYAAACuTHuKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1OThBRDY4OUNDMTYxMUU0OUE3NUVGOEJDMzMzMjE2NyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1OThBRDY4QUNDMTYxMUU0OUE3NUVGOEJDMzMzMjE2NyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU5OEFENjg3Q0MxNjExRTQ5QTc1RUY4QkMzMzMyMTY3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU5OEFENjg4Q0MxNjExRTQ5QTc1RUY4QkMzMzMyMTY3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+VU513gAAADVJREFUeNrs0DENACAQBDBIWLGBJQby/mUcJn5sJXQmOQMAAAAAAJqt+2prAAAAAACg2xdgANk6BEVuJgyMAAAAAElFTkSuQmCC)}} -------------------------------------------------------------------------------- /static/semantic/components/comment.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Comment 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Standard 15 | *******************************/ 16 | 17 | 18 | /*-------------- 19 | Comments 20 | ---------------*/ 21 | 22 | .ui.comments { 23 | margin: 1.5em 0em; 24 | max-width: 650px; 25 | } 26 | .ui.comments:first-child { 27 | margin-top: 0em; 28 | } 29 | .ui.comments:last-child { 30 | margin-bottom: 0em; 31 | } 32 | 33 | /*-------------- 34 | Comment 35 | ---------------*/ 36 | 37 | .ui.comments .comment { 38 | position: relative; 39 | background: none; 40 | margin: 0.5em 0em 0em; 41 | padding: 0.5em 0em 0em; 42 | border: none; 43 | border-top: none; 44 | line-height: 1.2; 45 | } 46 | .ui.comments .comment:first-child { 47 | margin-top: 0em; 48 | padding-top: 0em; 49 | } 50 | 51 | /*-------------------- 52 | Nested Comments 53 | ---------------------*/ 54 | 55 | .ui.comments .comment .comments { 56 | margin: 0em 0em 0.5em 0.5em; 57 | padding: 1em 0em 1em 1em; 58 | } 59 | .ui.comments .comment .comments:before { 60 | position: absolute; 61 | top: 0px; 62 | left: 0px; 63 | } 64 | .ui.comments .comment .comments .comment { 65 | border: none; 66 | border-top: none; 67 | background: none; 68 | } 69 | 70 | /*-------------- 71 | Avatar 72 | ---------------*/ 73 | 74 | .ui.comments .comment .avatar { 75 | display: block; 76 | width: 2.5em; 77 | height: auto; 78 | float: left; 79 | margin: 0.2em 0em 0em; 80 | } 81 | .ui.comments .comment img.avatar, 82 | .ui.comments .comment .avatar img { 83 | display: block; 84 | margin: 0em auto; 85 | width: 100%; 86 | height: 100%; 87 | border-radius: 0.25rem; 88 | } 89 | 90 | /*-------------- 91 | Content 92 | ---------------*/ 93 | 94 | .ui.comments .comment > .content { 95 | display: block; 96 | } 97 | 98 | /* If there is an avatar move content over */ 99 | .ui.comments .comment > .avatar ~ .content { 100 | margin-left: 3.5em; 101 | } 102 | 103 | /*-------------- 104 | Author 105 | ---------------*/ 106 | 107 | .ui.comments .comment .author { 108 | font-size: 1em; 109 | color: rgba(0, 0, 0, 0.87); 110 | font-weight: bold; 111 | } 112 | .ui.comments .comment a.author { 113 | cursor: pointer; 114 | } 115 | .ui.comments .comment a.author:hover { 116 | color: #1e70bf; 117 | } 118 | 119 | /*-------------- 120 | Metadata 121 | ---------------*/ 122 | 123 | .ui.comments .comment .metadata { 124 | display: inline-block; 125 | margin-left: 0.5em; 126 | color: rgba(0, 0, 0, 0.4); 127 | font-size: 0.875em; 128 | } 129 | .ui.comments .comment .metadata > * { 130 | display: inline-block; 131 | margin: 0em 0.5em 0em 0em; 132 | } 133 | .ui.comments .comment .metadata > :last-child { 134 | margin-right: 0em; 135 | } 136 | 137 | /*-------------------- 138 | Comment Text 139 | ---------------------*/ 140 | 141 | .ui.comments .comment .text { 142 | margin: 0.25em 0em 0.5em; 143 | font-size: 1em; 144 | word-wrap: break-word; 145 | color: rgba(0, 0, 0, 0.87); 146 | line-height: 1.3; 147 | } 148 | 149 | /*-------------------- 150 | User Actions 151 | ---------------------*/ 152 | 153 | .ui.comments .comment .actions { 154 | font-size: 0.875em; 155 | } 156 | .ui.comments .comment .actions a { 157 | cursor: pointer; 158 | display: inline-block; 159 | margin: 0em 0.75em 0em 0em; 160 | color: rgba(0, 0, 0, 0.4); 161 | } 162 | .ui.comments .comment .actions a:last-child { 163 | margin-right: 0em; 164 | } 165 | .ui.comments .comment .actions a.active, 166 | .ui.comments .comment .actions a:hover { 167 | color: rgba(0, 0, 0, 0.8); 168 | } 169 | 170 | /*-------------------- 171 | Reply Form 172 | ---------------------*/ 173 | 174 | .ui.comments > .reply.form { 175 | margin-top: 1em; 176 | } 177 | .ui.comments .comment .reply.form { 178 | width: 100%; 179 | margin-top: 1em; 180 | } 181 | .ui.comments .reply.form textarea { 182 | font-size: 1em; 183 | height: 12em; 184 | } 185 | 186 | 187 | /******************************* 188 | State 189 | *******************************/ 190 | 191 | .ui.collapsed.comments, 192 | .ui.comments .collapsed.comments, 193 | .ui.comments .collapsed.comment { 194 | display: none; 195 | } 196 | 197 | 198 | /******************************* 199 | Variations 200 | *******************************/ 201 | 202 | 203 | /*-------------------- 204 | Threaded 205 | ---------------------*/ 206 | 207 | .ui.threaded.comments .comment .comments { 208 | margin: -1.5em 0 -1em 1.25em; 209 | padding: 3em 0em 2em 2.25em; 210 | box-shadow: -1px 0px 0px rgba(34, 36, 38, 0.15); 211 | } 212 | 213 | /*-------------------- 214 | Minimal 215 | ---------------------*/ 216 | 217 | .ui.minimal.comments .comment .actions { 218 | opacity: 0; 219 | position: absolute; 220 | top: 0px; 221 | right: 0px; 222 | left: auto; 223 | -webkit-transition: opacity 0.2s ease; 224 | transition: opacity 0.2s ease; 225 | -webkit-transition-delay: 0.1s; 226 | transition-delay: 0.1s; 227 | } 228 | .ui.minimal.comments .comment > .content:hover > .actions { 229 | opacity: 1; 230 | } 231 | 232 | /*-------------------- 233 | Sizes 234 | ---------------------*/ 235 | 236 | .ui.small.comments { 237 | font-size: 0.9em; 238 | } 239 | .ui.comments { 240 | font-size: 1em; 241 | } 242 | .ui.large.comments { 243 | font-size: 1.1em; 244 | } 245 | .ui.huge.comments { 246 | font-size: 1.2em; 247 | } 248 | 249 | 250 | /******************************* 251 | Theme Overrides 252 | *******************************/ 253 | 254 | 255 | 256 | /******************************* 257 | User Variable Overrides 258 | *******************************/ 259 | 260 | -------------------------------------------------------------------------------- /static/semantic/components/reveal.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Reveal 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.reveal{display:inherit;position:relative!important;font-size:0!important}.ui.reveal>.visible.content{position:absolute!important;top:0!important;left:0!important;z-index:3!important;-webkit-transition:all .5s ease .1s;transition:all .5s ease .1s}.ui.reveal>.hidden.content{position:relative!important;z-index:2!important}.ui.active.reveal .visible.content,.ui.reveal:hover .visible.content{z-index:4!important}.ui.slide.reveal{position:relative!important;overflow:hidden!important;white-space:nowrap}.ui.slide.reveal>.content{display:block;width:100%;float:left;margin:0;-webkit-transition:-webkit-transform .5s ease .1s;transition:transform .5s ease .1s}.ui.slide.reveal>.visible.content{position:relative!important}.ui.slide.reveal>.hidden.content{position:absolute!important;left:0!important;width:100%!important;-webkit-transform:translateX(100%)!important;-ms-transform:translateX(100%)!important;transform:translateX(100%)!important}.ui.slide.active.reveal>.visible.content,.ui.slide.reveal:hover>.visible.content{-webkit-transform:translateX(-100%)!important;-ms-transform:translateX(-100%)!important;transform:translateX(-100%)!important}.ui.slide.active.reveal>.hidden.content,.ui.slide.reveal:hover>.hidden.content,.ui.slide.right.reveal>.visible.content{-webkit-transform:translateX(0)!important;-ms-transform:translateX(0)!important;transform:translateX(0)!important}.ui.slide.right.reveal>.hidden.content{-webkit-transform:translateX(-100%)!important;-ms-transform:translateX(-100%)!important;transform:translateX(-100%)!important}.ui.slide.right.active.reveal>.visible.content,.ui.slide.right.reveal:hover>.visible.content{-webkit-transform:translateX(100%)!important;-ms-transform:translateX(100%)!important;transform:translateX(100%)!important}.ui.slide.right.active.reveal>.hidden.content,.ui.slide.right.reveal:hover>.hidden.content{-webkit-transform:translateX(0)!important;-ms-transform:translateX(0)!important;transform:translateX(0)!important}.ui.slide.up.reveal>.hidden.content{-webkit-transform:translateY(100%)!important;-ms-transform:translateY(100%)!important;transform:translateY(100%)!important}.ui.slide.up.active.reveal>.visible.content,.ui.slide.up.reveal:hover>.visible.content{-webkit-transform:translateY(-100%)!important;-ms-transform:translateY(-100%)!important;transform:translateY(-100%)!important}.ui.slide.up.active.reveal>.hidden.content,.ui.slide.up.reveal:hover>.hidden.content{-webkit-transform:translateY(0)!important;-ms-transform:translateY(0)!important;transform:translateY(0)!important}.ui.slide.down.reveal>.hidden.content{-webkit-transform:translateY(-100%)!important;-ms-transform:translateY(-100%)!important;transform:translateY(-100%)!important}.ui.slide.down.active.reveal>.visible.content,.ui.slide.down.reveal:hover>.visible.content{-webkit-transform:translateY(100%)!important;-ms-transform:translateY(100%)!important;transform:translateY(100%)!important}.ui.slide.down.active.reveal>.hidden.content,.ui.slide.down.reveal:hover>.hidden.content{-webkit-transform:translateY(0)!important;-ms-transform:translateY(0)!important;transform:translateY(0)!important}.ui.fade.reveal>.visible.content{opacity:1}.ui.fade.active.reveal>.visible.content,.ui.fade.reveal:hover>.visible.content{opacity:0}.ui.move.reveal{position:relative!important;overflow:hidden!important;white-space:nowrap}.ui.move.reveal>.content{display:block;float:left;margin:0;-webkit-transition:-webkit-transform .5s cubic-bezier(.175,.885,.32,1) .1s;transition:transform .5s cubic-bezier(.175,.885,.32,1) .1s}.ui.move.reveal>.visible.content{position:relative!important}.ui.move.reveal>.hidden.content{position:absolute!important;left:0!important;width:100%!important}.ui.move.active.reveal>.visible.content,.ui.move.reveal:hover>.visible.content{-webkit-transform:translateX(-100%)!important;-ms-transform:translateX(-100%)!important;transform:translateX(-100%)!important}.ui.move.right.active.reveal>.visible.content,.ui.move.right.reveal:hover>.visible.content{-webkit-transform:translateX(100%)!important;-ms-transform:translateX(100%)!important;transform:translateX(100%)!important}.ui.move.up.active.reveal>.visible.content,.ui.move.up.reveal:hover>.visible.content{-webkit-transform:translateY(-100%)!important;-ms-transform:translateY(-100%)!important;transform:translateY(-100%)!important}.ui.move.down.active.reveal>.visible.content,.ui.move.down.reveal:hover>.visible.content{-webkit-transform:translateY(100%)!important;-ms-transform:translateY(100%)!important;transform:translateY(100%)!important}.ui.rotate.reveal>.visible.content{-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)}.ui.rotate.reveal>.visible.content,.ui.rotate.right.reveal>.visible.content{-webkit-transform-origin:bottom right;-ms-transform-origin:bottom right;transform-origin:bottom right}.ui.rotate.active.reveal>.visible.conten,.ui.rotate.reveal:hover>.visible.content,.ui.rotate.right.active.reveal>.visible.content,.ui.rotate.right.reveal:hover>.visible.content{-webkit-transform:rotate(110deg);-ms-transform:rotate(110deg);transform:rotate(110deg)}.ui.rotate.left.reveal>.visible.content{-webkit-transform-origin:bottom left;-ms-transform-origin:bottom left;transform-origin:bottom left}.ui.rotate.left.active.reveal>.visible.content,.ui.rotate.left.reveal:hover>.visible.content{-webkit-transform:rotate(-110deg);-ms-transform:rotate(-110deg);transform:rotate(-110deg)}.ui.disabled.reveal:hover>.visible.visible.content{position:static!important;display:block!important;opacity:1!important;top:0!important;left:0!important;right:auto!important;bottom:auto!important;-webkit-transform:none!important;-ms-transform:none!important;transform:none!important}.ui.disabled.reveal:hover>.hidden.hidden.content{display:none!important}.ui.visible.reveal{overflow:visible}.ui.instant.reveal>.content{-webkit-transition-delay:0s!important;transition-delay:0s!important}.ui.reveal>.content{font-size:1rem!important} -------------------------------------------------------------------------------- /static/semantic/components/site.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Site 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | !function(e,n,o,t){e.site=e.fn.site=function(i){var s,r,a=(new Date).getTime(),c=[],u=arguments[0],l="string"==typeof u,m=[].slice.call(arguments,1),d=e.isPlainObject(i)?e.extend(!0,{},e.site.settings,i):e.extend({},e.site.settings),f=d.namespace,g=d.error,b="module-"+f,p=e(o),v=p,h=this,y=v.data(b);return s={initialize:function(){s.instantiate()},instantiate:function(){s.verbose("Storing instance of site",s),y=s,v.data(b,s)},normalize:function(){s.fix.console(),s.fix.requestAnimationFrame()},fix:{console:function(){s.debug("Normalizing window.console"),(console===t||console.log===t)&&(s.verbose("Console not available, normalizing events"),s.disable.console()),("undefined"==typeof console.group||"undefined"==typeof console.groupEnd||"undefined"==typeof console.groupCollapsed)&&(s.verbose("Console group not available, normalizing events"),n.console.group=function(){},n.console.groupEnd=function(){},n.console.groupCollapsed=function(){}),"undefined"==typeof console.markTimeline&&(s.verbose("Mark timeline not available, normalizing events"),n.console.markTimeline=function(){})},consoleClear:function(){s.debug("Disabling programmatic console clearing"),n.console.clear=function(){}},requestAnimationFrame:function(){s.debug("Normalizing requestAnimationFrame"),n.requestAnimationFrame===t&&(s.debug("RequestAnimationFrame not available, normalizing event"),n.requestAnimationFrame=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||n.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(n){return e.fn[n]!==t&&e.fn[n].settings!==t},enabled:{modules:function(n){var o=[];return n=n||d.modules,e.each(n,function(e,n){s.moduleExists(n)&&o.push(n)}),o}},disabled:{modules:function(n){var o=[];return n=n||d.modules,e.each(n,function(e,n){s.moduleExists(n)||o.push(n)}),o}},change:{setting:function(n,o,i,r){i="string"==typeof i?"all"===i?d.modules:[i]:i||d.modules,r=r!==t?r:!0,e.each(i,function(t,i){var a,c=s.moduleExists(i)?e.fn[i].settings.namespace||!1:!0;s.moduleExists(i)&&(s.verbose("Changing default setting",n,o,i),e.fn[i].settings[n]=o,r&&c&&(a=e(":data(module-"+c+")"),a.length>0&&(s.verbose("Modifying existing settings",a),a[i]("setting",n,o))))})},settings:function(n,o,i){o="string"==typeof o?[o]:o||d.modules,i=i!==t?i:!0,e.each(o,function(o,t){var r;s.moduleExists(t)&&(s.verbose("Changing default setting",n,t),e.extend(!0,e.fn[t].settings,n),i&&f&&(r=e(":data(module-"+f+")"),r.length>0&&(s.verbose("Modifying existing settings",r),r[t]("setting",n))))})}},enable:{console:function(){s.console(!0)},debug:function(e,n){e=e||d.modules,s.debug("Enabling debug for modules",e),s.change.setting("debug",!0,e,n)},verbose:function(e,n){e=e||d.modules,s.debug("Enabling verbose debug for modules",e),s.change.setting("verbose",!0,e,n)}},disable:{console:function(){s.console(!1)},debug:function(e,n){e=e||d.modules,s.debug("Disabling debug for modules",e),s.change.setting("debug",!1,e,n)},verbose:function(e,n){e=e||d.modules,s.debug("Disabling verbose debug for modules",e),s.change.setting("verbose",!1,e,n)}},console:function(e){if(e){if(y.cache.console===t)return void s.error(g.console);s.debug("Restoring console function"),n.console=y.cache.console}else s.debug("Disabling console function"),y.cache.console=n.console,n.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}}},destroy:function(){s.verbose("Destroying previous site for",v),v.removeData(b)},cache:{},setting:function(n,o){if(e.isPlainObject(n))e.extend(!0,d,n);else{if(o===t)return d[n];d[n]=o}},internal:function(n,o){if(e.isPlainObject(n))e.extend(!0,s,n);else{if(o===t)return s[n];s[n]=o}},debug:function(){d.debug&&(d.performance?s.performance.log(arguments):(s.debug=Function.prototype.bind.call(console.info,console,d.name+":"),s.debug.apply(console,arguments)))},verbose:function(){d.verbose&&d.debug&&(d.performance?s.performance.log(arguments):(s.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),s.verbose.apply(console,arguments)))},error:function(){s.error=Function.prototype.bind.call(console.error,console,d.name+":"),s.error.apply(console,arguments)},performance:{log:function(e){var n,o,t;d.performance&&(n=(new Date).getTime(),t=a||n,o=n-t,a=n,c.push({Element:h,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":o})),clearTimeout(s.performance.timer),s.performance.timer=setTimeout(s.performance.display,500)},display:function(){var n=d.name+":",o=0;a=!1,clearTimeout(s.performance.timer),e.each(c,function(e,n){o+=n["Execution Time"]}),n+=" "+o+"ms",(console.group!==t||console.table!==t)&&c.length>0&&(console.groupCollapsed(n),console.table?console.table(c):e.each(c,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(n,o,i){var a,c,u,l=y;return o=o||m,i=h||i,"string"==typeof n&&l!==t&&(n=n.split(/[\. ]/),a=n.length-1,e.each(n,function(o,i){var r=o!=a?i+n[o+1].charAt(0).toUpperCase()+n[o+1].slice(1):n;if(e.isPlainObject(l[r])&&o!=a)l=l[r];else{if(l[r]!==t)return c=l[r],!1;if(!e.isPlainObject(l[i])||o==a)return l[i]!==t?(c=l[i],!1):(s.error(g.method,n),!1);l=l[i]}})),e.isFunction(c)?u=c.apply(i,o):c!==t&&(u=c),e.isArray(r)?r.push(u):r!==t?r=[r,u]:u!==t&&(r=u),c}},l?(y===t&&s.initialize(),s.invoke(u)):(y!==t&&s.destroy(),s.initialize()),r!==t?r:this},e.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","rating","shape","sidebar","state","sticky","tab","transition","visit","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(n){return function(o){return!!e.data(o,n)}}):function(n,o,t){return!!e.data(n,t[3])}})}(jQuery,window,document); -------------------------------------------------------------------------------- /judge/tasks.py: -------------------------------------------------------------------------------- 1 | from celery.decorators import task 2 | from judge.models import Coder, Submission, Problem, TestCase 3 | import subprocess 4 | import os 5 | 6 | @task(name="evaluate_submission") 7 | def evaluate_submission(sub_id): 8 | try: 9 | submission = Submission.objects.get(pk = sub_id) 10 | except: 11 | print("Submission with id = {} not found".format(sub_id)) 12 | return 13 | username = submission.submitter.user.username 14 | cur_problem = submission.problem 15 | cur_problem.num_submissions += 1 16 | tc = TestCase.objects.get(problem = cur_problem) 17 | ## this is real spaghetti code written in 2 hours 18 | # input_filename and output_filename only contain the file names such as 1.in, 2.out etc 19 | # tc.input_file.name on the other hand contains testcases/ (example: testcases/1.in) 20 | input_filename = tc.input_file.name.split("/")[1] 21 | output_filename = tc.output_file.name.split("/")[1] 22 | print("input = {}, output = {}".format(input_filename, output_filename)) 23 | 24 | 25 | # first create a new docker container of the image poj with memory limit 256M so 26 | # user code does not kill the server 27 | container_id = subprocess.check_output(["docker", "run", "-it", "-m","256M","-d", "poj"]) 28 | # decode bytestring to utf-8 and remove the last newline from docker output 29 | container_id = container_id.decode('utf-8') 30 | print(container_id) 31 | container_id = container_id[:len(container_id)-1] 32 | 33 | # this list can be appended to any command to make it run in container_id 34 | docker_lst = ["docker", "exec", container_id] 35 | # first we'll copy our test case input and output files to the docker container 36 | # for this first we create a folder called testcases in the container 37 | # then move on to two docker cp commands 38 | subprocess.call(["docker", "exec", container_id, "mkdir", "testcases"]) 39 | subprocess.call(["docker", "cp", tc.input_file.name, "{}:/{}".format(container_id, input_filename)]) 40 | subprocess.call(["docker", "cp", tc.output_file.name, "{}:/{}".format(container_id, output_filename)]) 41 | 42 | # the timeout_lst list makes sure that the user code does not run over the time limit 43 | # it makes use of the standard unix timeout command 44 | tl = cur_problem.time_limit 45 | timeout_lst = ["timeout", str(tl)] 46 | 47 | filename = '' # filename contains the name of the file which will contain the user's source code 48 | compiler = '' 49 | if submission.lang == "C": 50 | filename = "{}.{}.c".format(username, sub_id) 51 | compiler = 'gcc' 52 | elif submission.lang == "CPP": 53 | filename = "{}.{}.cpp".format(username, sub_id) 54 | compiler = 'g++' 55 | 56 | executable = "{}.{}.out".format(username, sub_id) 57 | 58 | # converting the user's submitted code into a file that can be compiled here 59 | # file will be stored in submissions/ 60 | print("creating a file for the submitted source code") 61 | user_code = open("submissions/{}".format(filename), "w+") 62 | print(submission.code, file = user_code) 63 | user_code.close() 64 | print("file creation completed") 65 | print("copying file to docker container") 66 | subprocess.call(["docker", "cp", "submissions/{}".format(filename), "{}:/{}".format(container_id, filename)]) 67 | print("trying to compile submission") 68 | compiled = subprocess.call(docker_lst + [compiler, filename, "-lm", "-o", executable]) 69 | if compiled != 0: 70 | print("submission didn't compile") 71 | submission.status = "CE" 72 | cur_problem.num_ce += 1 73 | cur_problem.save() 74 | submission.save() 75 | else: 76 | print("submission compiled successfully") 77 | print("running the submission") 78 | user_output_filename = "{}.{}.output".format(username, sub_id) 79 | # okay this is what we do while judging 80 | # first we have a script call run.py which calls the compiled executable with appropriate input 81 | # we run this script inside our docker container 82 | # the script prints the output of the timeout command that it runs 83 | # timeout returns 124 if the program has timed out 84 | # we read this input and then make judgement accordingly 85 | options_lst = ["python3", "run.py", executable, input_filename, user_output_filename, str(tl)] 86 | print(docker_lst + options_lst) 87 | subprocess.call(["docker", "cp", "run.py", "{}:/run.py".format(container_id)]) 88 | run_code = subprocess.check_output(docker_lst + options_lst) 89 | print(run_code) 90 | run_code = int(run_code.decode("utf-8")) 91 | if run_code == 124: 92 | # time limit exceeded 93 | print("time limit exceeded") 94 | submission.status = "TL" 95 | submission.save() 96 | cur_problem.num_tle += 1 97 | cur_problem.save() 98 | elif run_code != 0: 99 | # run time error 100 | print("run time error") 101 | submission.status = "RE" 102 | submission.save() 103 | cur_problem.num_re += 1 104 | cur_problem.save() 105 | else: 106 | print("code ran in time, now have to check with output") 107 | # will use diff for that, diff returns 0 if no differences, non zero if there are 108 | # differences or if something bad happens 109 | subprocess.call(["docker", "cp", "{}:/{}".format(container_id, user_output_filename), "outputs/{}".format(user_output_filename)]) 110 | differences = subprocess.call(["diff", "outputs/{}".format(user_output_filename), tc.output_file.name]) 111 | if not differences: 112 | # output is correct, done 113 | submission.status = "AC" 114 | submission.save() 115 | cur_problem.num_ac += 1 116 | cur_problem.save() 117 | else: 118 | submission.status = "WA" 119 | submission.save() 120 | cur_problem.num_wa += 1 121 | cur_problem.save() 122 | os.remove("submissions/{}".format(filename)) 123 | 124 | subprocess.call(["docker", "stop", container_id]) 125 | -------------------------------------------------------------------------------- /static/semantic/components/accordion.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Accordion 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.accordion,.ui.accordion .accordion{max-width:100%}.ui.accordion .accordion{margin:1em 0 0;padding:0}.ui.accordion .accordion .title,.ui.accordion .title{cursor:pointer}.ui.accordion .title:not(.ui){padding:.5em 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1em;color:rgba(0,0,0,.87)}.ui.accordion .accordion .title~.content,.ui.accordion .title~.content{display:none}.ui.accordion:not(.styled) .accordion .title~.content:not(.ui),.ui.accordion:not(.styled) .title~.content:not(.ui){margin:'';padding:.5em 0 1em}.ui.accordion:not(.styled) .title~.content:not(.ui):last-child{padding-bottom:0}.ui.accordion .accordion .title .dropdown.icon,.ui.accordion .title .dropdown.icon{display:inline-block;float:none;opacity:1;width:1.25em;height:1em;margin:0 .25rem 0 0;padding:0;font-size:1em;-webkit-transition:-webkit-transform .1s ease,opacity .1s ease;transition:transform .1s ease,opacity .1s ease;vertical-align:baseline;-webkit-transform:none;-ms-transform:none;transform:none}.ui.accordion.menu .item .title{display:block;padding:0}.ui.accordion.menu .item .title>.dropdown.icon{float:right;margin:.21425em 0 0 1em;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.ui.accordion .ui.header .dropdown.icon{font-size:1em;margin:0 .25rem 0 0}.ui.accordion .accordion .active.title .dropdown.icon,.ui.accordion .active.title .dropdown.icon,.ui.accordion.menu .item .active.title>.dropdown.icon{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.ui.styled.accordion{width:600px}.ui.styled.accordion,.ui.styled.accordion .accordion{border-radius:.28571429rem;background:#fff;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),0 0 0 1px rgba(34,36,38,.15)}.ui.styled.accordion .accordion .title,.ui.styled.accordion .title{margin:0;padding:.75em 1em;color:rgba(0,0,0,.4);font-weight:700;border-top:1px solid rgba(34,36,38,.15);-webkit-transition:background .1s ease,color .1s ease;transition:background .1s ease,color .1s ease}.ui.styled.accordion .accordion .title:first-child,.ui.styled.accordion>.title:first-child{border-top:none}.ui.styled.accordion .accordion .content,.ui.styled.accordion .content{margin:0;padding:.5em 1em 1.5em}.ui.styled.accordion .accordion .content{padding:.5em 1em 1.5em}.ui.styled.accordion .accordion .active.title,.ui.styled.accordion .accordion .title:hover,.ui.styled.accordion .active.title,.ui.styled.accordion .title:hover{background:0 0;color:rgba(0,0,0,.87)}.ui.styled.accordion .accordion .active.title,.ui.styled.accordion .active.title{background:0 0;color:rgba(0,0,0,.95)}.ui.accordion .accordion .active.content,.ui.accordion .active.content{display:block}.ui.fluid.accordion,.ui.fluid.accordion .accordion{width:100%}.ui.inverted.accordion .title:not(.ui){color:rgba(255,255,255,.9)}@font-face{font-family:Accordion;src:url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMggjB5AAAAC8AAAAYGNtYXAPfOIKAAABHAAAAExnYXNwAAAAEAAAAWgAAAAIZ2x5Zryj6HgAAAFwAAAAyGhlYWT/0IhHAAACOAAAADZoaGVhApkB5wAAAnAAAAAkaG10eAJuABIAAAKUAAAAGGxvY2EAjABWAAACrAAAAA5tYXhwAAgAFgAAArwAAAAgbmFtZfC1n04AAALcAAABPHBvc3QAAwAAAAAEGAAAACAAAwIAAZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADw2gHg/+D/4AHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADgAAAAKAAgAAgACAAEAIPDa//3//wAAAAAAIPDZ//3//wAB/+MPKwADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQASAEkAtwFuABMAADc0PwE2FzYXFh0BFAcGJwYvASY1EgaABQgHBQYGBQcIBYAG2wcGfwcBAQcECf8IBAcBAQd/BgYAAAAAAQAAAEkApQFuABMAADcRNDc2MzIfARYVFA8BBiMiJyY1AAUGBwgFgAYGgAUIBwYFWwEACAUGBoAFCAcFgAYGBQcAAAABAAAAAQAAqWYls18PPPUACwIAAAAAAM/9o+4AAAAAz/2j7gAAAAAAtwFuAAAACAACAAAAAAAAAAEAAAHg/+AAAAIAAAAAAAC3AAEAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAQAAAAC3ABIAtwAAAAAAAAAKABQAHgBCAGQAAAABAAAABgAUAAEAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEADAAAAAEAAAAAAAIADgBAAAEAAAAAAAMADAAiAAEAAAAAAAQADABOAAEAAAAAAAUAFgAMAAEAAAAAAAYABgAuAAEAAAAAAAoANABaAAMAAQQJAAEADAAAAAMAAQQJAAIADgBAAAMAAQQJAAMADAAiAAMAAQQJAAQADABOAAMAAQQJAAUAFgAMAAMAAQQJAAYADAA0AAMAAQQJAAoANABaAHIAYQB0AGkAbgBnAFYAZQByAHMAaQBvAG4AIAAxAC4AMAByAGEAdABpAG4AZ3JhdGluZwByAGEAdABpAG4AZwBSAGUAZwB1AGwAYQByAHIAYQB0AGkAbgBnAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('truetype'),url(data:application/font-woff;charset=utf-8;base64,d09GRk9UVE8AAASwAAoAAAAABGgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAAAS0AAAEtFpovuE9TLzIAAAIkAAAAYAAAAGAIIweQY21hcAAAAoQAAABMAAAATA984gpnYXNwAAAC0AAAAAgAAAAIAAAAEGhlYWQAAALYAAAANgAAADb/0IhHaGhlYQAAAxAAAAAkAAAAJAKZAedobXR4AAADNAAAABgAAAAYAm4AEm1heHAAAANMAAAABgAAAAYABlAAbmFtZQAAA1QAAAE8AAABPPC1n05wb3N0AAAEkAAAACAAAAAgAAMAAAEABAQAAQEBB3JhdGluZwABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeLa/iU+HQFHQAAAHkPHQAAAH4RHQAAAAkdAAABJBIABwEBBw0PERQZHnJhdGluZ3JhdGluZ3UwdTF1MjB1RjBEOXVGMERBAAACAYkABAAGAQEEBwoNVp38lA78lA78lA77lA773Z33bxWLkI2Qj44I9xT3FAWOj5CNkIuQi4+JjoePiI2Gi4YIi/uUBYuGiYeHiIiHh4mGi4aLho2Ijwj7FPcUBYeOiY+LkAgO+92L5hWL95QFi5CNkI6Oj4+PjZCLkIuQiY6HCPcU+xQFj4iNhouGi4aJh4eICPsU+xQFiIeGiYaLhouHjYePiI6Jj4uQCA74lBT4lBWLDAoAAAAAAwIAAZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADw2gHg/+D/4AHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADgAAAAKAAgAAgACAAEAIPDa//3//wAAAAAAIPDZ//3//wAB/+MPKwADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAEAADfYOJZfDzz1AAsCAAAAAADP/aPuAAAAAM/9o+4AAAAAALcBbgAAAAgAAgAAAAAAAAABAAAB4P/gAAACAAAAAAAAtwABAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAEAAAAAtwASALcAAAAAUAAABgAAAAAADgCuAAEAAAAAAAEADAAAAAEAAAAAAAIADgBAAAEAAAAAAAMADAAiAAEAAAAAAAQADABOAAEAAAAAAAUAFgAMAAEAAAAAAAYABgAuAAEAAAAAAAoANABaAAMAAQQJAAEADAAAAAMAAQQJAAIADgBAAAMAAQQJAAMADAAiAAMAAQQJAAQADABOAAMAAQQJAAUAFgAMAAMAAQQJAAYADAA0AAMAAQQJAAoANABaAHIAYQB0AGkAbgBnAFYAZQByAHMAaQBvAG4AIAAxAC4AMAByAGEAdABpAG4AZ3JhdGluZwByAGEAdABpAG4AZwBSAGUAZwB1AGwAYQByAHIAYQB0AGkAbgBnAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('woff');font-weight:400;font-style:normal}.ui.accordion .accordion .title .dropdown.icon,.ui.accordion .title .dropdown.icon{font-family:Accordion;line-height:1;-webkit-backface-visibility:hidden;backface-visibility:hidden;font-weight:400;font-style:normal;text-align:center}.ui.accordion .accordion .title .dropdown.icon:before,.ui.accordion .title .dropdown.icon:before{content:'\f0da'} -------------------------------------------------------------------------------- /static/semantic/components/modal.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.7 - Modal 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.modal{display:none;position:fixed;z-index:1001;top:50%;left:50%;text-align:left;background:#fff;border:none;box-shadow:1px 3px 3px 0 rgba(0,0,0,.2),1px 3px 15px 2px rgba(0,0,0,.2);-webkit-transform-origin:50% 25%;-ms-transform-origin:50% 25%;transform-origin:50% 25%;border-radius:.28571429rem;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;will-change:top,left,margin,transform,opacity}.ui.modal>.icon:first-child+*,.ui.modal>:first-child:not(.icon){border-top-left-radius:.28571429rem;border-top-right-radius:.28571429rem}.ui.modal>:last-child{border-bottom-left-radius:.28571429rem;border-bottom-right-radius:.28571429rem}.ui.modal>.close{cursor:pointer;position:absolute;top:-2.5rem;right:-2.5rem;z-index:1;opacity:.8;font-size:1.25em;color:#fff;width:2.25rem;height:2.25rem;padding:.625rem 0 0}.ui.modal>.close:hover{opacity:1}.ui.modal>.header{display:block;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;background:#fff;margin:0;padding:1.25rem 1.5rem;box-shadow:none;color:rgba(0,0,0,.85);border-bottom:1px solid rgba(34,36,38,.15)}.ui.modal>.header:not(.ui){font-size:1.42857143rem;line-height:1.2857em;font-weight:700}.ui.modal>.content{display:block;width:100%;font-size:1em;line-height:1.4;padding:1.5rem;background:#fff}.ui.modal>.image.content{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.ui.modal>.content>.image{display:block;-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;width:'';-webkit-align-self:top;-ms-flex-item-align:top;align-self:top}.ui.modal>[class*="top aligned"]{-webkit-align-self:top;-ms-flex-item-align:top;align-self:top}.ui.modal>[class*="middle aligned"]{-webkit-align-self:middle;-ms-flex-item-align:middle;align-self:middle}.ui.modal>[class*=stretched]{-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch}.ui.modal>.content>.description{display:block;-webkit-box-flex:1;-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;min-width:0;-webkit-align-self:top;-ms-flex-item-align:top;align-self:top}.ui.modal>.content>.icon+.description,.ui.modal>.content>.image+.description{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;min-width:'';width:auto;padding-left:2em}.ui.modal>.content>.image>i.icon{margin:0;opacity:1;width:auto;line-height:1;font-size:8rem}.ui.modal>.actions{background:#f9fafb;padding:1rem;border-top:1px solid rgba(34,36,38,.15);text-align:right}.ui.modal .actions>.button{margin-left:.75em}@media only screen and (max-width:767px){.ui.modal{width:95%;margin:0 0 0 -47.5%}}@media only screen and (min-width:768px){.ui.modal{width:88%;margin:0 0 0 -44%}}@media only screen and (min-width:992px){.ui.modal{width:850px;margin:0 0 0 -425px}}@media only screen and (min-width:1200px){.ui.modal{width:900px;margin:0 0 0 -450px}}@media only screen and (min-width:1920px){.ui.modal{width:950px;margin:0 0 0 -475px}}@media only screen and (max-width:991px){.ui.modal>.header{padding-right:2.25rem}.ui.modal>.close{top:1.0535rem;right:1rem;color:rgba(0,0,0,.87)}}@media only screen and (max-width:767px){.ui.modal>.header{padding:.75rem 2.25rem .75rem 1rem!important}.ui.modal>.content{display:block;padding:1rem!important}.ui.modal>.close{top:.5rem!important;right:.5rem!important}.ui.modal .image.content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.ui.modal .content>.image{display:block;max-width:100%;margin:0 auto!important;text-align:center;padding:0 0 1rem!important}.ui.modal>.content>.image>i.icon{font-size:5rem;text-align:center}.ui.modal .content>.description{display:block;width:100%!important;margin:0!important;padding:1rem 0!important;box-shadow:none}.ui.modal>.actions{padding:1rem 1rem 0!important}.ui.modal .actions>.button,.ui.modal .actions>.buttons{margin-bottom:1rem}}.ui.inverted.dimmer>.ui.modal{box-shadow:1px 3px 10px 2px rgba(0,0,0,.2)}.ui.basic.modal{background-color:transparent;border:none;border-radius:0;box-shadow:none!important;color:#fff}.ui.basic.modal>.actions,.ui.basic.modal>.content,.ui.basic.modal>.header{background-color:transparent}.ui.basic.modal>.header{color:#fff}.ui.basic.modal>.close{top:1rem;right:1.5rem}.ui.inverted.dimmer>.basic.modal{color:rgba(0,0,0,.87)}.ui.inverted.dimmer>.ui.basic.modal>.header{color:rgba(0,0,0,.85)}.ui.active.modal{display:block}.scrolling.dimmable.dimmed{overflow:hidden}.scrolling.dimmable.dimmed>.dimmer{overflow:auto;-webkit-overflow-scrolling:touch}.scrolling.dimmable>.dimmer{position:fixed}.modals.dimmer .ui.scrolling.modal{position:static!important;margin:3.5rem auto!important}.scrolling.undetached.dimmable.dimmed{overflow:auto;-webkit-overflow-scrolling:touch}.scrolling.undetached.dimmable.dimmed>.dimmer{overflow:hidden}.scrolling.undetached.dimmable .ui.scrolling.modal{position:absolute;left:50%;margin-top:3.5rem!important}.undetached.dimmable.dimmed>.pusher{z-index:auto}@media only screen and (max-width:991px){.ui.basic.modal>.close{color:#fff}.modals.dimmer .ui.scrolling.modal{margin-top:1rem!important;margin-bottom:1rem!important}}.ui.fullscreen.modal{width:95%!important;left:2.5%!important;margin:1em auto}.ui.fullscreen.scrolling.modal{left:0!important}.ui.fullscreen.modal>.header{padding-right:2.25rem}.ui.fullscreen.modal>.close{top:1.0535rem;right:1rem;color:rgba(0,0,0,.87)}.ui.modal{font-size:1rem}.ui.small.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767px){.ui.small.modal{width:95%;margin:0 0 0 -47.5%}}@media only screen and (min-width:768px){.ui.small.modal{width:70.4%;margin:0 0 0 -35.2%}}@media only screen and (min-width:992px){.ui.small.modal{width:680px;margin:0 0 0 -340px}}@media only screen and (min-width:1200px){.ui.small.modal{width:720px;margin:0 0 0 -360px}}@media only screen and (min-width:1920px){.ui.small.modal{width:760px;margin:0 0 0 -380px}}.ui.large.modal>.header{font-size:1.6em}@media only screen and (max-width:767px){.ui.large.modal{width:95%;margin:0 0 0 -47.5%}}@media only screen and (min-width:768px){.ui.large.modal{width:88%;margin:0 0 0 -44%}}@media only screen and (min-width:992px){.ui.large.modal{width:1020px;margin:0 0 0 -510px}}@media only screen and (min-width:1200px){.ui.large.modal{width:1080px;margin:0 0 0 -540px}}@media only screen and (min-width:1920px){.ui.large.modal{width:1140px;margin:0 0 0 -570px}} --------------------------------------------------------------------------------