Commit 2e792518 authored by svilayphiou's avatar svilayphiou

Merge branch 'master' of git.constantvzw.org:osp.tools.ethertoff

parents b8c48d7c 589cf2ef
......@@ -41,6 +41,7 @@ Requires Django 1.5
First create and install a virtual environment [1]. Then:
pip install "django<1.6" south Markdown html5tidy python-dateutil rdflib pytz
pip install https://github.com/devjones/PyEtherpadLite/archive/master.zip
pip install https://github.com/aleray/markdown-figures/archive/master.zip
mkdir -p ~/src/
cd ~/src
......
import re
import os
import sys
from random import randint
from datetime import datetime
......@@ -10,8 +9,6 @@ from etherpadlite.models import Pad, PadAuthor, PadServer
from django.contrib.auth.models import AnonymousUser
from django.contrib.sites.models import get_current_site
is_eye = re.compile(r'Yeux_\d+\.png')
number_of_eyes = len([eye for eye in os.listdir(os.path.join(MEDIA_ROOT, 'images', 'eyes')) if is_eye.match(eye)])
class EthertoffError(Exception):
pass
......@@ -24,13 +21,6 @@ def site_name(request):
# project_name? wiki_name?
return { 'site_name' : current_site.name }
def eyes(request):
hash = {}
if 'admin' in request.path or number_of_eyes == 0:
return hash
n = randint(1, number_of_eyes)
hash['EYES'] = 'Yeux_%02d.png' % n
return hash
def pads(request):
hash = {}
......
......@@ -115,7 +115,6 @@ TEMPLATE_DIRS = (
TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + (
"relearn.context_processors.site_name",
"relearn.context_processors.eyes",
"relearn.context_processors.pads",
"relearn.context_processors.local",
)
......
......@@ -371,7 +371,8 @@ h1, h2, h3, h4, h5, h6 {
/* AN EXAMPLE TO AVOID PAGE BREAK INSIDE,
* HERE NO PARAGRAPH WILL BE CUT,
* BUT YOU MIGHT WANT TO DEACTIVATE THIS */
p {
/*-webkit-region-break-inside: avoid;*/
figure,
img {
-webkit-region-break-inside: avoid;
}
......@@ -3,8 +3,8 @@
{% load i18n %}
{% block extra_styles %}
<link rel="stylesheet/less" href="/css/" type="text/css" media="screen">
<link rel="stylesheet/less" href="/css-print/" type="text/css" media="print">
<link rel="stylesheet/less" href="{% url 'css' %}" type="text/css" media="screen">
<link rel="stylesheet/less" href="{% url 'css-print' %}" type="text/css" media="print">
{% endblock %}
{% block title %}
......
......@@ -12,15 +12,7 @@
<p class="authors">{{ meta.authors|natural_join:'et' }}</p>
{% endif %}
<h1>
{% ifequal pad.display_name|slugify "00md" %}
<a href="{% url 'home' %}"><img src="{{ MEDIA_URL }}images/eyes/{{ left_eye }}" alt="{{ site_name }}" /></a>
{% endifequal %}
{{ meta.title.0|default:pad.display_slug }}
{% ifequal pad.display_name|slugify "00md" %}
<a href="{% url 'home' %}"><img src="{{ MEDIA_URL }}images/eyes/{{ right_eye }}" alt="{{ site_name }}" /></a>
{% endifequal %}
</h1>
</header>
{% endblock %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment