diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 76 | ||||
-rw-r--r-- | templates/favicon.html | 5 | ||||
-rw-r--r-- | templates/index.html | 50 | ||||
-rw-r--r-- | templates/navbar.html | 49 | ||||
-rw-r--r-- | templates/registration/activate.html | 24 | ||||
-rw-r--r-- | templates/registration/activation_complete.html | 22 | ||||
-rw-r--r-- | templates/registration/activation_email.txt | 14 | ||||
-rw-r--r-- | templates/registration/activation_email_subject.txt | 1 | ||||
-rw-r--r-- | templates/registration/registration_closed.html | 19 | ||||
-rw-r--r-- | templates/registration/registration_complete.html | 27 | ||||
-rw-r--r-- | templates/registration/registration_form.html | 25 | ||||
-rw-r--r-- | templates/test.html | 3 |
12 files changed, 315 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..81766a4 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,76 @@ +{% extends 'bootstrap3/bootstrap3.html' %} + +{% comment %} +'base.html' for skaschool +based on 'django-bootstrap3' + +Weitian LI <liweitianux@gmail.com> +2014/04/19 +{% endcomment %} + +{% load bootstrap3 %} +{% load url from future %} +{% load staticfiles %} + +{# title #} +{% block bootstrap3_title %} + {% block title %}(title){% endblock %} +{% endblock %} + +{# bootstrap3_extra_head #} +{% block bootstrap3_extra_head %} + {# custom css #} + {% block custom_css %} + <link href="{% static 'css/base.css' %}" rel="stylesheet"> + {# css_extra #} + {% block css_extra %}{% endblock %} + {% endblock %} {# custom_css #} + {# add favicon #} + {% block favicon %} + {% include 'favicon.html' %} + {% endblock %} +{% endblock %} + +{# body #} +{% block bootstrap3_content %} + {# add block page #} + {% block page %} + {# message #} + {% block message %} + {# show 'django.contrib.messages' in Bootstrap alert containers #} + {% bootstrap_messages %} + {% endblock %} {# message #} + {# header #} + {% block header %} + <header role="banner"> + {# navigation bar #} + {% block navbar %} + {% include 'navbar.html' %} + {% endblock %} {# navbar #} + {# header_extra #} + {% block header_extra %}{% endblock %} + </header> + {% endblock %} {# header #} + {# main #} + {% block main %} + <main role="main"> + {# sidebar #} + {% block sidebar %}{% endblock %} + {# content #} + {% block content %}{% endblock %} + </main> + {% endblock %} {# main #} + {# footer #} + {% block footer %}{% endblock %} + {% endblock page %} {# page #} +{% endblock %} {# bootstrap3_content #} + +{# bootstrap3_extra_scripts #} +{% block bootstrap3_extra_script %} + {# extra javascript files #} + {% block js_extra %}{% endblock %} + {# custom script (e.g. built-in js code) #} + {% block custom_script %}{% endblock %} +{% endblock %} {# bootstrap3_extra_script #} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/templates/favicon.html b/templates/favicon.html new file mode 100644 index 0000000..e6a0255 --- /dev/null +++ b/templates/favicon.html @@ -0,0 +1,5 @@ +{# Favicons: to be included in 'base.html' #} +{% load staticfiles %} +<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{% static 'images/apple-touch-icon-144-precomposed.png' %}"> +<link rel="shortcut icon" href="{% static 'images/favicon.png' %}"> +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..6b57b80 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,50 @@ +{% extends 'base.html' %} +{% load staticfiles %} +{% load url from future %} + +{# index page for skaschool #} + +{% block title %} +首页 | 2014 SKA Summer School +{% endblock %} + +{% block css_extra %} + <link href="{% static 'css/index.css' %}" rel="stylesheet"> +{% endblock %} + +{% block content %} + <div class="container"> + <h1>第二届 中国SKA暑期学校</h1> + <h1>暨 中国-新西兰联合SKA暑期学校</h1> + <h2>China-New Zealand Joint SKA Summer School</h2> + + <br> + <p class="lead"> + 上海,2014,6月28日-7月5日 <br> + June 28 - July 05, 2014, Shanghai + </p> + + <br> + <p> + <a href="#" class="btn btn-outline-inverse btn-lg">了解更多</a> + <a href="{% url 'registration_register' %}" class="btn btn-outline-inverse btn-lg">注册参加</a> + </p> + </div> +{% endblock %} {# content #} + +{% block footer %} + <footer class="container" role="contentinfo"> + <p>Brought to you by: <strong>Weitian LI</strong>.</p> + <ul class="masthead-links"> + <li>Powered by:</li> + <li><a href="https://www.djangoproject.com/">Django</a></li> + <li><a href="http://getbootstrap.com/">Bootstrap</a></li> + </ul> + </footer> +{% endblock %} + +{% block js_extra %} + <script src="{% static 'js/index.js' %}" type="text/javascript"></script> +{% endblock %} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/templates/navbar.html b/templates/navbar.html new file mode 100644 index 0000000..6296c6c --- /dev/null +++ b/templates/navbar.html @@ -0,0 +1,49 @@ +{# navbar: to be included in 'base.html' #} +{% load url from future %} +{% load staticfiles %} +<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> + <div class="container"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ska-navbar-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="{% url 'index' %}">SKA暑期学校</a> + </div> <!-- navbar-header --> + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="ska-navbar-collapse"> + <ul class="nav navbar-nav"> + <li><a href="#">介绍</a></li> + <li><a href="#">通知</a></li> + <li><a href="#">日程</a></li> + <li><a href="#">组委会</a></li> + <li><a href="#">交通/食宿</a></li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">更多 <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="#">下载</a></li> + <li><a href="#">赞助方</a></li> + <li><a href="#">联系方式</a></li> + <li class="divider"></li> + <li><a href="#">关于</a></li> + </ul> + </li> + </ul> + <ul class="nav navbar-nav navbar-right"> + <!-- <li><a href="#">English</a></li> --> + {% if user.is_authenticated %} + <li><a href="{% url 'profile' %}" class="navbar-link">{{ user.username }}</a></li> + <li><div><a href="{% url 'logout' %}" class="btn btn-default navbar-btn">退出</a></div></li> + {% else %} + <!-- wrap 'navbar-btn' within 'div' --> + <li><div><a href="{% url 'registration_register' %}" class="btn btn-default navbar-btn">注册</a></div></li> + <li><div><a href="{% url 'login' %}" class="btn btn-primary navbar-btn">登录</a></div></li> + {% endif %} + </ul> + </div> <!-- /.navbar-collapse --> + </div> <!-- /.container--> +</nav> +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/templates/registration/activate.html b/templates/registration/activate.html new file mode 100644 index 0000000..113d1b3 --- /dev/null +++ b/templates/registration/activate.html @@ -0,0 +1,24 @@ +{% extends 'base.html' %} +{% load staticfiles %} +{% load url from future %} +{% load bootstrap3 %} + +{# step 3. activating ... #} +{% comment %} +Note: This page is showed when activation failed. + Otherwise, it will be redirect to 'registration_activation_complete' +{% endcomment %} + +{% block title %} +激活失败 | 2014 SKA Summer School +{% endblock %} + +{% block content %} + <div class="container"> + <h2>激活失败</h2> + <p class="lead">Oops, 激活您的账户时遇到一点小问题,请检查激活链接是否正确并且没有过期……</p> + <p>如果您还是不能激活账户,请直接与我们联系:<a href="mailto:skaschool2014@163.com"><code>skaschool2014@163.com</code></a></p> + </div> +{% endblock %} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/templates/registration/activation_complete.html b/templates/registration/activation_complete.html new file mode 100644 index 0000000..d27622a --- /dev/null +++ b/templates/registration/activation_complete.html @@ -0,0 +1,22 @@ +{% extends 'base.html' %} +{% load staticfiles %} +{% load url from future %} +{% load bootstrap3 %} + +{# step 4. activation complete #} + +{% block title %} +成功激活 | 2014 SKA Summer School +{% endblock %} + +{% block content %} + <div class="container"> + <h2>成功激活</h2> + <p class="lead">您已成功激活账户。</p> + + <br> + <p><a href="{% url 'login' %}" class="btn btn-primary">登录</a></p> + </div> +{% endblock %} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/templates/registration/activation_email.txt b/templates/registration/activation_email.txt new file mode 100644 index 0000000..0667fa0 --- /dev/null +++ b/templates/registration/activation_email.txt @@ -0,0 +1,14 @@ +Hello, + +Please follow the link below to activate your account at +"2014 SKA Summer School"({{ site }}). + +http://{{ site }}/accounts/activate/{{ activation_key }} + +Note: this link will expire in {{ expiration_days }} days. + + +Best regards. + +2014 SKA Summer School Team + diff --git a/templates/registration/activation_email_subject.txt b/templates/registration/activation_email_subject.txt new file mode 100644 index 0000000..215f006 --- /dev/null +++ b/templates/registration/activation_email_subject.txt @@ -0,0 +1 @@ +激活您的账户 diff --git a/templates/registration/registration_closed.html b/templates/registration/registration_closed.html new file mode 100644 index 0000000..7368c71 --- /dev/null +++ b/templates/registration/registration_closed.html @@ -0,0 +1,19 @@ +{% extends 'base.html' %} +{% load staticfiles %} +{% load url from future %} + +{# registration closed #} + +{% block title %} +注册已关闭 | 2014 SKA Summer School +{% endblock %} + +{% block content %} + <div class="container"> + <h2>注册已关闭</h2> + <p class="lead">很抱歉,暑期学校注册已经关闭。</p> + <p>如果您有需要,请与我们联系:<a href="mailto:skaschool2014@163.com"><code>skaschool2014@163.com</code></a></p> + </div> +{% endblock %} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/templates/registration/registration_complete.html b/templates/registration/registration_complete.html new file mode 100644 index 0000000..553a154 --- /dev/null +++ b/templates/registration/registration_complete.html @@ -0,0 +1,27 @@ +{% extends 'base.html' %} +{% load staticfiles %} +{% load url from future %} +{% load bootstrap3 %} + +{# step 2. registration complete #} + +{% block title %} +注册完成 | 2014 SKA Summer School +{% endblock %} + +{% block content %} + <div class="container"> + <h2>注册完成</h2> + <p class="lead"> + 您已顺利完成注册。我们已向您注册使用的邮箱发送了激活邮件,请留意查收,并使用其中的链接激活账户。 + </p> + + <br> + <p> + 还未收到激活邮件? + <a href="#" class="btn btn-default">重新发送激活邮件</a> + </p> + </div> +{% endblock %} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/templates/registration/registration_form.html b/templates/registration/registration_form.html new file mode 100644 index 0000000..31316fe --- /dev/null +++ b/templates/registration/registration_form.html @@ -0,0 +1,25 @@ +{% extends 'base.html' %} +{% load staticfiles %} +{% load url from future %} +{% load bootstrap3 %} + +{# step 1. registration #} + +{% block title %} +注册 | 2014 SKA Summer School +{% endblock %} + +{% block content %} + <div class="container"> + <h2>注册账户</h2> + <br> + + <form role="form" class="form-horizontal" method="post"> + {% csrf_token %} + {% bootstrap_form form layout='horizontal' %} + {% buttons submit='提交' reset='重置' layout='horizontal' %}{% endbuttons %} + </form> + </div> +{% endblock %} + +{# vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #} diff --git a/templates/test.html b/templates/test.html new file mode 100644 index 0000000..85ec3e6 --- /dev/null +++ b/templates/test.html @@ -0,0 +1,3 @@ +{% extends 'base.html' %} + +{# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=htmldjango.html: #} |