Permalink
Browse files

Dashboard

  • Loading branch information...
1 parent f1fb061 commit a03566a0f6ba921a05a88d046c058d4d3485cd85 @piumosso piumosso committed Jul 31, 2011
@@ -0,0 +1,29 @@
+/**
+ * Dashboard
+ *
+ * @package djangodocs
+ * @version 1.0
+ * @author Artem Golikov <art@futurecolors.ru>
+ * @copyright Future Colors
+ */
+
+
+/**
+ * @section Dashboard
+ */
+
+.b-dashboard {}
+.b-dashboard__section {
+ display: inline-block;
+ width: 24%;
+ vertical-align: top;
+}
+.b-dashboard__section-link {
+ font-size: 160%;
+}
+.b-dashboard__item {
+ padding-left: 2em;
+}
+.b-dashboard__item-link {
+ font-size: 120%;
+}
@@ -1,4 +1,6 @@
{% extends 'livedocs/layout/layout.html' %}
+
+
{% block meta %}
<noscript>
<meta http-equiv="refresh" content="0; url={{ default_version_url }}">
@@ -10,4 +12,5 @@
</script>
{% endblock %}
-{% block search %}{% endblock %}
+
+{% block search %}{% endblock %}
@@ -33,6 +33,7 @@
<link rel="stylesheet" href="{{STATIC_URL}}css/version.css" type="text/css">
<link rel="stylesheet" href="{{STATIC_URL}}css/results.css" type="text/css">
<link rel="stylesheet" href="{{STATIC_URL}}css/contents.css" type="text/css">
+ <link rel="stylesheet" href="{{STATIC_URL}}css/dashboard.css" type="text/css">
{% endcompress %}
</head>
@@ -1,10 +1,13 @@
{% extends body_template %}
+
+
{% load toc %}
+
{% block layout %}
<div id="js-content">
{% block search %}
- {% include 'livedocs/_search_form.html' %}
+ {% include 'livedocs/_search_form.html' %}
{% endblock %}
<div id="js-main-content" class="l-wrapper l-header-spacer b-section">
<aside class="l-results b-results">
@@ -17,10 +20,8 @@
{% toc %}
{% endblock %}
</aside>
- <section class="l-content b-content">
- {% block content %}
- {% endblock %}
- </section>
+ {% block content %}{% endblock %}
+ {% block dashboard %}{% endblock %}
</div>
</div>
{% endblock %}
@@ -1,18 +1,46 @@
{% extends 'livedocs/layout/layout.html' %}
+
+
{% load mptt_tags %}
+
{% block title %} {{ title|striptags }} {% endblock %}
-{% block content %}
- {% if item_descendants %}
- {% recursetree item_descendants %}
- <h1>{{ node.title }}</h1>
- {{ node.content|safe }}
- {% if not node.is_leaf_node %}
- {{ children }}
+{% block content %}
+ <section class="l-content b-content">
+ {% if item_descendants %}
+ {% recursetree item_descendants %}
+ <h1>{{ node.title }}</h1>
+ {{ node.content|safe }}
+ {% if not node.is_leaf_node %}
+ {{ children }}
+ {% endif %}
+ {% endrecursetree %}
{% endif %}
- {% endrecursetree %}
- {% endif %}
-
-{% endblock %}
+ </section>
+{% endblock %}
+
+
+{% block dashboard %}
+ {% comment %}
+ <section class="b-dashboard">
+ {% for root_item in root_items %}
+ <div class="b-dashboard__section">
+ <a href="{{ root_item.get_absolute_url }}"
+ class="b-dashboard__section-link">
+ {{ root_item.title }}
+ </a>
+ {% for secondary_item in root_item.get_children %}
+ <div class="b-dashboard__item">
+ <a href="{{ secondary_item.get_absolute_url }}"
+ class="b-dashboard__item-link">
+ {{ secondary_item.title }}
+ </a>
+ </div>
+ {% endfor %}
+ </div>
+ {% endfor %}
+ </section>
+ {% endcomment %}
+{% endblock %}
@@ -115,6 +115,9 @@ def get(self, request, *args, **kwargs):
else:
context['title'] = 'No results'
+ dashboard_root_item = Item.objects.get(path='index', version__name=context['current_version'])
+ context['root_items'] = dashboard_root_item.get_descendants()
+
return context

0 comments on commit a03566a

Please sign in to comment.