Wiki with styling (#78)
* Adds Django wiki and integrates our template * Makes the wiki use lca2017 styling (to a point, anyway)
This commit is contained in:
parent
1df509cfbb
commit
3a686ab1a8
6 changed files with 141 additions and 2 deletions
|
@ -108,6 +108,7 @@ TEMPLATES = [
|
||||||
"account.context_processors.account",
|
"account.context_processors.account",
|
||||||
"pinax_theme_bootstrap.context_processors.theme",
|
"pinax_theme_bootstrap.context_processors.theme",
|
||||||
"symposion.reviews.context_processors.reviews",
|
"symposion.reviews.context_processors.reviews",
|
||||||
|
"sekizai.context_processors.sekizai",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -140,6 +141,7 @@ INSTALLED_APPS = [
|
||||||
"django.contrib.sessions",
|
"django.contrib.sessions",
|
||||||
"django.contrib.sites",
|
"django.contrib.sites",
|
||||||
"django.contrib.staticfiles",
|
"django.contrib.staticfiles",
|
||||||
|
"django.contrib.humanize",
|
||||||
|
|
||||||
# theme
|
# theme
|
||||||
"bootstrapform",
|
"bootstrapform",
|
||||||
|
@ -200,6 +202,18 @@ INSTALLED_APPS = [
|
||||||
"jquery",
|
"jquery",
|
||||||
"djangoformsetjs",
|
"djangoformsetjs",
|
||||||
|
|
||||||
|
# wiki
|
||||||
|
"django_nyt",
|
||||||
|
"mptt",
|
||||||
|
"sekizai",
|
||||||
|
"sorl.thumbnail",
|
||||||
|
"wiki",
|
||||||
|
"wiki.plugins.attachments",
|
||||||
|
"wiki.plugins.notifications",
|
||||||
|
"wiki.plugins.images",
|
||||||
|
"wiki.plugins.macros",
|
||||||
|
|
||||||
|
|
||||||
#testing
|
#testing
|
||||||
"django_nose",
|
"django_nose",
|
||||||
]
|
]
|
||||||
|
@ -298,6 +312,9 @@ TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
|
||||||
|
|
||||||
ADMIN_USERNAMES = []
|
ADMIN_USERNAMES = []
|
||||||
|
|
||||||
|
# Wiki settings
|
||||||
|
WIKI_CHECK_SLUG_URL_AVAILABLE = False
|
||||||
|
|
||||||
# Tell nose to measure coverage on the 'foo' and 'bar' apps
|
# Tell nose to measure coverage on the 'foo' and 'bar' apps
|
||||||
NOSE_ARGS = [
|
NOSE_ARGS = [
|
||||||
'--with-coverage',
|
'--with-coverage',
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<!--Meta tags-->
|
<!--Meta tags-->
|
||||||
<meta name="theme-color" content="#0c486c">
|
<meta name="theme-color" content="#0c486c">
|
||||||
{% block extra_style %}
|
{% block extra_style %}
|
||||||
<link rel="stylesheet" href="{% static 'css/site-0a247b924d.css' %}">
|
<link rel="stylesheet" href="{% static 'css/site-0a247b924d.css' %}">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<!--Twitter-->
|
<!--Twitter-->
|
||||||
|
|
36
pinaxcon/templates/wiki/base.html
Normal file
36
pinaxcon/templates/wiki/base.html
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{% extends "site_base_wagtail.html" %}
|
||||||
|
{% load sekizai_tags i18n wiki_tags static %}
|
||||||
|
|
||||||
|
{% block head_title %}
|
||||||
|
{% block wiki_pagetitle %}{% endblock %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
<link rel="stylesheet" href="{% static 'css/site-0a247b924d.css' %}">
|
||||||
|
<link href="{% static "css/wiki.css" %}" rel="stylesheet">
|
||||||
|
{{ block.super }}
|
||||||
|
<style>
|
||||||
|
.wiki {
|
||||||
|
font-size: 70%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock styles %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="l-content-page">
|
||||||
|
<div class="l-content-page--richtext">
|
||||||
|
<div class="wiki">
|
||||||
|
{% block wiki_breadcrumbs %}{% endblock %}
|
||||||
|
{% block wiki_contents %}{% endblock %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts_extra %}
|
||||||
|
{{ block.super }}
|
||||||
|
<script src="{% static "wiki/js/core.js" %}"></script>
|
||||||
|
<script src="{% static "wiki/bootstrap/js/bootstrap.min.js" %}"></script>
|
||||||
|
<!-- Optionally enable responsive features in IE8 -->
|
||||||
|
<script src="{% static "wiki/js/respond.min.js" %}"></script>
|
||||||
|
{% endblock %}
|
|
@ -6,6 +6,9 @@ from django.views.generic import TemplateView
|
||||||
from wagtail.wagtailadmin import urls as wagtailadmin_urls
|
from wagtail.wagtailadmin import urls as wagtailadmin_urls
|
||||||
from wagtail.wagtailcore import urls as wagtail_urls
|
from wagtail.wagtailcore import urls as wagtail_urls
|
||||||
|
|
||||||
|
from wiki.urls import get_pattern as get_wiki_pattern
|
||||||
|
from django_nyt.urls import get_pattern as get_nyt_pattern
|
||||||
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
|
||||||
import symposion.views
|
import symposion.views
|
||||||
|
@ -36,6 +39,10 @@ urlpatterns = [
|
||||||
url(r'^tickets/', include('registrasion.urls')),
|
url(r'^tickets/', include('registrasion.urls')),
|
||||||
url(r'^nested_admin/', include('nested_admin.urls')),
|
url(r'^nested_admin/', include('nested_admin.urls')),
|
||||||
|
|
||||||
|
# Wiki
|
||||||
|
url(r'^notifications/', get_nyt_pattern()),
|
||||||
|
url(r'^wiki/', get_wiki_pattern()),
|
||||||
|
|
||||||
# Default catch-all for wagtail pages.
|
# Default catch-all for wagtail pages.
|
||||||
url(r'^', include(wagtail_urls)),
|
url(r'^', include(wagtail_urls)),
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,9 @@ wagtail==1.6.2
|
||||||
pylibmc==1.5.1
|
pylibmc==1.5.1
|
||||||
raven==5.27.0
|
raven==5.27.0
|
||||||
|
|
||||||
|
#Wiki
|
||||||
|
wiki==0.1.2
|
||||||
|
|
||||||
# For testing
|
# For testing
|
||||||
django-nose==1.4.3
|
django-nose==1.4.3
|
||||||
coverage==4.0.3
|
coverage==4.0.3
|
||||||
|
|
76
static/dist/css/wiki.css
vendored
Normal file
76
static/dist/css/wiki.css
vendored
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
#div_id_title .asteriskField{display:none}
|
||||||
|
#id_title {font-size: 20px; height: 30px; padding: 6px; width: 98%;}
|
||||||
|
#id_summary {width: 98%; padding: 6px;}
|
||||||
|
|
||||||
|
h1#article-title {font-size: 2em; margin-top: -5px;}
|
||||||
|
|
||||||
|
#article_edit_form label {max-width: 100px;}
|
||||||
|
#article_edit_form .controls {margin-left: 120px;}
|
||||||
|
|
||||||
|
.form-horizontal label { font-size: 16px; font-weight: normal; color: #777;}
|
||||||
|
|
||||||
|
.settings-form label {min-width: 250px; font-size: inherit; font-weight: normal;}
|
||||||
|
.settings-form .controls {margin-left: 270px;}
|
||||||
|
.settings-form select {}
|
||||||
|
.settings-form .form-actions { padding-left: 270px; }
|
||||||
|
|
||||||
|
#attachment_form #id_description
|
||||||
|
{ width: 95% }
|
||||||
|
|
||||||
|
#edit_sidebar .accordion {margin-bottom: 5px;}
|
||||||
|
|
||||||
|
.wiki-article div.toc,
|
||||||
|
.wiki-article div.article-list {
|
||||||
|
margin: 10px 0;
|
||||||
|
background: #f9f9f9;
|
||||||
|
padding: 10px;
|
||||||
|
width: 300px;
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wiki-article a.linknotfound {color: #C87;}
|
||||||
|
|
||||||
|
.wiki-article pre {
|
||||||
|
max-width: 700px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=file] {float: none; width: auto;}
|
||||||
|
.asteriskField { font-size: 20px; margin-left: 5px;}
|
||||||
|
|
||||||
|
.notification-list .since {
|
||||||
|
font-size: 80%;
|
||||||
|
color: #CCC;
|
||||||
|
}
|
||||||
|
|
||||||
|
.directory-toolbar .filter-clear { margin-right: 10px; position: relative; top: 5px; }
|
||||||
|
|
||||||
|
.accordion-heading h3 {margin: 0;}
|
||||||
|
|
||||||
|
.breadcrumb .icon-bar {
|
||||||
|
display: block;
|
||||||
|
width: 18px;
|
||||||
|
height: 2px;
|
||||||
|
background-color: rgb(245, 245, 245);
|
||||||
|
border-radius: 1px 1px 1px 1px;
|
||||||
|
box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.25);
|
||||||
|
margin-top: 3px;
|
||||||
|
}
|
||||||
|
.breadcrumb .icon-bar:first-child{margin-top: 0;}
|
||||||
|
|
||||||
|
#navbar_wiki_search input.search-query {width: 80px;}
|
||||||
|
|
||||||
|
#article-menu
|
||||||
|
{
|
||||||
|
border-bottom: 1px solid #EEE;
|
||||||
|
}
|
||||||
|
|
||||||
|
#article-container
|
||||||
|
{
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wiki-footer
|
||||||
|
{
|
||||||
|
padding: 30px 0;
|
||||||
|
clear: both;
|
||||||
|
}
|
Loading…
Reference in a new issue