Add `rtfm` theme and set it as current.

portnov [2008-06-21 17:28:02]
Add `rtfm` theme and set it as current.
Filename
media/css/rtfm.css
media/img/header.png
settings.py
templates/themes/rtfm/base.html
diff --git a/media/css/rtfm.css b/media/css/rtfm.css
new file mode 100644
index 0000000..1d54da4
--- /dev/null
+++ b/media/css/rtfm.css
@@ -0,0 +1,383 @@
+
+body {
+  font-family: Arial,Helvetica,sans-serif;
+  padding: 0;
+  margin: 0;
+}
+
+a {
+  text-decoration: none;
+  color: #c10a09;
+}
+
+a:hover {
+  text-decoration: underline;
+}
+
+blockquote {
+  border: 1px #ddd solid;
+  border-left: 3px #fba double;
+  padding: 1ex;
+  margin-left: 1em;
+}
+
+table {
+  width: 100%;
+}
+
+td {
+  border-right: 1px #ddd dashed;
+  border-bottom: 1px #ddd solid;
+  padding: 0.6ex;
+}
+
+tr:hover {
+  background: #fafafa;
+}
+
+table.form {
+  margin: 0;
+  padding: 0;
+}
+
+table.form th {
+  width: 6em;
+  text-align: right;
+  vertical-align: top;
+}
+
+table.form td {
+  border: none;
+}
+
+table.form td input {
+  width: 100%;
+}
+
+form {
+  padding: 1ex;
+  border: 1px #eee solid;
+}
+
+form p {
+  text-align: right;
+  margin: 0;
+  padding: 0;
+}
+
+pre {
+  border: 1px #ddd solid;
+  border-left: 3px #fba double;
+  background: #fafafa;
+  overflow: hidden;
+  padding: 1ex;
+}
+
+input,textarea,select {
+  border: 1px #fba solid;
+}
+
+input:focus {
+  border: 1px blue solid;
+}
+
+textarea {
+  width: 100%;
+}
+
+h1,h2,h3,h4 {
+  color: #6c0707;
+}
+
+h1 {
+  margin: 0;
+  padding: 0.5ex;
+}
+
+#body {
+  padding: 0;
+}
+
+#header {
+  background: #fc9a8b url(/media/img/header.png) repeat-x;
+  min-height: 120px;
+  height: 120px;
+  padding: 0;
+  position: relative;
+}
+
+#header h1 {
+  padding-top: 1em;
+  padding-left: 1em;
+  font-weight: normal;
+}
+
+#header h1 a {
+  color: white;
+}
+
+#login-message {
+  padding: 0.5ex 1ex;
+  position: absolute;
+  left: 1em;
+  bottom: 0;
+}
+
+#main {
+  margin-left: 13em;
+  padding: 1em;
+  border-left: 1px #fba solid;
+}
+
+#blocks {
+  width: 12em;
+  float: left;
+/*   border-right: 1px #fba solid;*/
+  border-bottom: 1px #fba solid;
+  border-right: 1px #fba solid;
+  background: #fafafa;
+  padding: 1ex;
+  margin-right: 1ex;
+}
+
+ul.menu {
+  background: #ffffc0;
+  text-align: right;
+  display: inline;
+  margin: 0;
+  border-top: 1px #fba solid;
+  padding: 0.5ex 1em;
+  position: absolute;
+  right: 0;
+  bottom: 0;
+}
+
+ul.menu li {
+  list-style: none;
+  display: inline;
+  padding-left: 1em;
+}
+
+ul.project-menu {
+  border-bottom: 1px #fba solid;
+  text-align: right;
+  float: right;
+  font-size: small;
+  padding: 0.5ex 1em;
+  margin: 0;
+}
+
+ul.project-menu li {
+  list-style: none;
+  display: inline;
+  padding-left: 1em;
+}
+
+ul.errorlist {
+  background: #fcc;
+}
+
+.links {
+  float: right;
+  text-align: right;
+  font-size: small;
+}
+
+.links a {
+  padding-left: 1em;
+}
+
+.project-link {
+  float: right;
+  text-align: right;
+}
+
+.project {
+  width: 100%;
+  border-bottom: 1px #fba solid;
+  margin-bottom: 2ex;
+}
+
+.block-last_comments ul {
+  padding-left: 1em;
+}
+
+.comment {
+  border: 1px #fba solid;
+  margin-bottom: 1em;
+  padding: 1ex;
+}
+
+div.comment-title {
+  margin-top: 0;
+  border-bottom: 1px #fba solid;
+}
+
+p.date {
+  font-size: small;
+  text-align: right;
+}
+
+span.k,span.ow {
+  font-weight: bold;
+  color: #11c;
+}
+
+span.mi {
+  color: #c11;
+}
+
+span.s {
+  color: #f44;
+}
+
+span.nb {
+  color: #181;
+}
+
+.codehilite tr, .codehilite td {
+  border: none;
+}
+
+.codehilite td.linenos {
+  width: 2em;
+  max-width: 2em;
+}
+
+.codehilite td.linenos pre {
+  background: white;
+  border: none;
+}
+
+
+
+div.pager {
+  border-top: 1px #fba solid;
+  text-align: center;
+  padding-top: 0.5ex;
+}
+
+span.pager {
+  padding: 0.5ex 0.5em;
+}
+
+.pager-other {
+  border: 1px #091 solid;
+  background: #eee;
+}
+
+.pager-current {
+  border: 1px #fba solid;
+  border-top: 1px white solid;
+  background: white;
+}
+
+.bug-priority {
+  text-align: right;
+  float: right;
+  max-width: 15em;
+  border: 1px #fba solid;
+  padding: 0.5ex;
+  font-size: small;
+}
+
+.bug-priority p {
+  margin: 0;
+}
+
+.bug {
+  border: 1px #ddd solid;
+  padding: 1ex;
+  margin-bottom: 1ex;
+}
+
+.bug-state-1 {
+  background: #ccf;
+}
+
+.bug-state-2 {
+  background: #fcc;
+}
+
+.bug-state-3 {
+  background: #ffc;
+}
+
+.bug-state-4 {
+  background: #cfc;
+}
+
+.bug-state-5 {
+  background: #ccc;
+}
+
+.request {
+  border: 1px #ddd solid;
+  padding: 1ex;
+  margin-bottom: 1em;
+}
+
+.request-state-1 {
+  background: #eee;
+}
+
+.request-state-2 {
+  background: #fda;
+}
+
+.request-state-3 {
+  background: #ffc;
+}
+
+.request-state-4 {
+  background: #cfc;
+}
+
+.task {
+  border: 1px #ddd solid;
+  padding: 1ex;
+}
+
+.task-state-0 {
+  background: #fee;
+}
+
+.task-state-1 {
+  background: #ffd;
+}
+
+.task-state-2 {
+  background: #dfd;
+}
+
+.report {
+  border: 1px #ddd solid;
+  padding: 1ex;
+  margin-bottom: 1em;
+}
+
+.related-tasks {
+  border: 1px #fba solid;
+  text-align: right;
+  float: right;
+  background: white;
+  padding: 0.5ex;
+}
+
+.git-tags {
+  border-left: 1px #fba solid;
+  float: right;
+  padding: 1em;
+}
+
+.diff-add {
+  color: blue;
+}
+
+.diff-del {
+  color: red;
+}
+
+.diff-at {
+  color: green;
+}
diff --git a/media/img/header.png b/media/img/header.png
new file mode 100644
index 0000000..580680e
Binary files /dev/null and b/media/img/header.png differ
diff --git a/settings.py b/settings.py
index 21f5395..0eeb094 100644
--- a/settings.py
+++ b/settings.py
@@ -96,7 +96,7 @@ INSTALLED_APPS = (
     'pygit',
 )

-THEME = 'default'
+THEME = 'rtfm'

 SHOW_BLOCKS = dict(
     last_comments = dict(),
diff --git a/templates/themes/rtfm/base.html b/templates/themes/rtfm/base.html
new file mode 100644
index 0000000..bc27fe3
--- /dev/null
+++ b/templates/themes/rtfm/base.html
@@ -0,0 +1,77 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="ru">
+  <head>
+    <title>
+      {% block title %}
+      {% endblock %}
+    </title>
+    <meta name='author' content='Portnov'>
+    {% block head %}
+    <link rel='stylesheet' type='text/css' href='/media/css/rtfm.css'/>
+    <link rel="stylesheet" type="text/css" href="/media/js/markitup/skins/markitup/style.css" />
+    <link rel="stylesheet" type="text/css" href="/media/js/markitup/sets/markdown/style.css" />
+    <link rel="alternate" title="Последние комментарии" type="application/rss+xml" href="{% url mgmt.views.last_comments %}" />
+    <link rel="alternate" title="Баги" type="application/rss+xml" href="{% url mgmt.views.last_bugs %}" />
+    <link rel="alternate" title="Отчеты" type="application/rss+xml" href="{% url mgmt.views.last_reports %}" />
+    <script type="text/javascript" src="jquery.js"></script>
+    <script type="text/javascript" src="markitup/jquery.markitup.js"></script>
+    <script type="text/javascript" src="markitup/sets/markdown/set.js"></script>
+    <script type="text/javascript">
+       $(document).ready(function() {
+         $("textarea").markItUp(mySettings);
+        });
+    </script>
+    {% endblock %}
+  </head>
+  <body>
+
+  <div id='body'>
+    <div id='header'>
+      {%block header%}
+      <h1><a href='http://rtfm-mgn.ru/'>Компания RTFM</a>: <a href='/'>Проекты</a></h1>
+      {% if menu %}
+        <ul class='menu'>
+        {% for item in menu %}
+          <li>{{item|safe}}</li>
+        {% endfor %}
+        </ul>
+      {% endif %}
+      <div id='login-message'>
+        {{login_message}}
+      </div>
+
+      {%endblock%}
+    </div>
+
+    {% if blocks %}
+      <div id='blocks'>
+      {{blocks.last_comments|safe}}
+      {{chart|safe}}
+      </div>
+    {% endif %}
+
+    <div id='main'>
+      {% if project %}
+      <ul class='project-menu'>
+        <li><a href='{% url mgmt.views.project_documents project.id %}'>Документация</a></li>
+        <li><a href='{% url mgmt.views.project_bugs project.id %}'>Баги</a></li>
+        <li><a href='{% url mgmt.views.requests project.id %}'>Запросы функциональности</a></li>
+        <li><a href='{% url mgmt.views.project_tasks project.id %}'>Задания</a></li>
+      </ul>
+      {% endif %}
+      {% block main %}{% endblock %}
+    </div>
+
+    <div id='footer'>
+      {% block footer %}
+        <div class='debug'>
+        {% for msg in debug %}
+          {{msg}}
+        {% endfor %}
+        </div>
+      {% endblock %}
+    </div>
+  </div>
+
+  </body>
+</html>
ViewGit