Update picture viewer.
authorRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Fri, 10 Jan 2014 15:58:04 +0000 (16:58 +0100)
committerRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Fri, 10 Jan 2014 15:58:04 +0000 (16:58 +0100)
17 files changed:
apps/catalogue/templates/catalogue/book_text.html
apps/catalogue/templates/catalogue/viewer_base.html [new file with mode: 0644]
apps/lesmianator/templates/lesmianator/poem.html
apps/picture/templates/picture/picture_list_thumb.html
apps/picture/templates/picture/picture_short.html
apps/picture/templates/picture/picture_viewer.html
apps/wolnelektury_core/static/css/master.picture.css
apps/wolnelektury_core/static/js/book_text/menu.js
apps/wolnelektury_core/static/js/picture.js
apps/wolnelektury_core/static/scss/book_text.scss
apps/wolnelektury_core/static/scss/book_text/body.scss
apps/wolnelektury_core/static/scss/book_text/menu.scss
apps/wolnelektury_core/static/scss/main.scss
apps/wolnelektury_core/static/scss/main/base.scss
apps/wolnelektury_core/static/scss/main/book_box.scss
apps/wolnelektury_core/static/scss/main/picture_box.scss [new file with mode: 0644]
wolnelektury/settings/static.py

index b18fba4..e4ed91f 100644 (file)
-<!DOCTYPE html>
+{% extends "catalogue/viewer_base.html" %}
 {% load i18n %}
-{% load static from staticfiles %}
-{% load chunks compressed catalogue_tags %}
+{% load catalogue_tags %}
 {% load thumbnail %}
-<html class="no-js">
-    <head>
-        <meta charset="utf-8">
-        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-        <title>{{ book.pretty_title }} :: {% trans "Wolne Lektury" %}</title>
-        <link rel="icon" href="{% static "img/favicon.png" %}" type="image/x-icon" />
-        {% compressed_css "book_text" %}
-    </head>
-    <body>
-        <a href="#" id="menu-toggle-on"></a>
-        <nav id="menu"><ul>
-            <li><a href="#" id="menu-toggle-off"></a></li>
-
-            <li><a href="/">
-                <img src="{% static 'img/logo-neon.png' %}" width="80"
-                    alt="Wolne Lektury"
-                    title="Wolne Lektury">
-            </a></li>
-
-            <li><a href="{{ book.get_absolute_url }}" id="menu-book" data-box="book-short">
-                <img src="{% thumbnail book.cover '80x111' as thumb %}{{ thumb.url }}{% empty %}{{ book.cover.url }}{% endthumbnail %}"
-                    width="80" height="111"
-                    alt="{{ book.pretty_title }}"
-                    title="{{ book.pretty_title }}">
-            </a></li>
-
-            {% if book.other_versions.exists %}
-                <li id="menu-other"><a href="#" data-box="other">
-                    <span class="label">{% trans "Other versions" %}</span>
+
+
+{% block title %}{{ book.pretty_title }}{% endblock %}
+
+
+{% block menu %}
+<li><a href="{{ book.get_absolute_url }}" id="menu-book" data-box="book-short">
+    <img src="{% thumbnail book.cover '80x111' as thumb %}{{ thumb.url }}{% empty %}{{ book.cover.url }}{% endthumbnail %}"
+        width="80" height="111"
+        alt="{{ book.pretty_title }}"
+        title="{{ book.pretty_title }}">
+</a></li>
+
+{% if book.other_versions.exists %}
+    <li id="menu-other"><a href="#" data-box="other">
+        <span class="label">{% trans "Other versions" %}</span>
+    </a>
+    </li>
+{% endif %}
+
+<li id="menu-toc"><a href="#" data-box="toc">
+    <span class="label">{% trans "Table of contents" %}</span>
+</a></li>
+
+<li id="menu-themes"><a href="#" data-box="themes">
+    <span class="label">{% trans "Themes" %}</span>
+</a></li>
+
+<li id="menu-settings"><a href="#" data-box="settings">
+    <span class="label">{% trans "Settings" %}</span>
+</a></li>
+
+<li id="menu-nota_red"><a href="#" data-box="nota_red">
+    <span class="label">{% trans "Edit. note" %}</span>
+</a></li>
+
+<li id="menu-info"><a href="#info" data-box="info">
+    <span class="label">{% trans "Infobox" %}</span>
+</a></li>
+{% endblock menu %}
+
+
+
+{% block big-pane %}
+<div id="big-pane" style="">
+
+<article id="main-text">
+{{ book.html_file.read|safe }}
+</article>
+
+<article id="other-text">
+    <a class="other-text-close" href="#">{% trans "Close" %}</a>
+    <div id="other-text-waiter">{% trans "Please wait..." %}</div>
+    <div id="other-text-body" style="display: none;"></div>
+</article>
+{% endblock big-pane %}
+
+
+
+
+
+{% block footer %}
+<div id="info" class="box">
+    {% book_info book %}
+</div>
+
+{% if book.other_versions.exists %}
+<div class="box" id="other">
+    <h2>{% trans "Other versions of the book" %}</h2>
+    <a class="other-text-close" href="#">{% trans "Close the other version" %}</a>
+    <ul>
+    {% spaceless %}
+    {% for other_version in book.other_versions %}
+        <li><a class="display-other" 
+            data-other="{{ other_version.html_file.url }}"
+            href="{% url 'book_text' other_version.slug %}">
+                {% book_mini other_version with_link=False %}
                 </a>
-                </li>
-            {% endif %}
-
-            <li id="menu-toc"><a href="#" data-box="toc">
-                <span class="label">{% trans "Table of contents" %}</span>
-            </a></li>
-
-            <li id="menu-themes"><a href="#" data-box="themes">
-                <span class="label">{% trans "Themes" %}</span>
-            </a></li>
-
-            <li id="menu-settings"><a href="#" data-box="settings">
-                <span class="label">{% trans "Settings" %}</span>
-            </a></li>
-
-            <li id="menu-nota_red"><a href="#" data-box="nota_red">
-                <span class="label">{% trans "Edit. note" %}</span>
-            </a></li>
-
-            <li id="menu-info"><a href="#info" data-box="info">
-                <span class="label">{% trans "Infobox" %}</span>
-            </a></li>
-
-        </ul></nav>
-        <div id="big-pane">
-
-        <article id="main-text">
-            {{ book.html_file.read|safe }}
-        </article>
-
-
-        <article id="other-text">
-            <a class="other-text-close" href="#">{% trans "Close" %}</a>
-            <div id="other-text-waiter">{% trans "Please wait..." %}</div>
-            <div id="other-text-body" style="display: none;"></div>
-        </article>
-
-
-        <footer>
-
-            <div id="info" class="box">
-                {% book_info book %}
-            </div>
-
-            {% if book.other_versions.exists %}
-            <div class="box" id="other">
-                <h2>{% trans "Other versions of the book" %}</h2>
-                <a class="other-text-close" href="#">{% trans "Close the other version" %}</a>
-                <ul>
-                {% spaceless %}
-                {% for other_version in book.other_versions %}
-                    <li><a class="display-other" 
-                        data-other="{{ other_version.html_file.url }}"
-                        href="{% url 'book_text' other_version.slug %}">
-                            {% book_mini other_version with_link=False %}
-                            </a>
-                    </li>
-                {% endfor %}
-                {% endspaceless %}
-                </ul>
-            </div>
-            {% endif %}
-
-            <div class="box" id="settings">
-                <h2>{% trans "Settings" %}</h2>
-                <a href="#" class="settings-switch" id="settings-line-numbers" data-setting="always-hide-line-numbers">{% trans "Display line numbers" %}</a><br/>
-                <a href="#" class="settings-switch" id="settings-themes" data-setting="always-hide-themes">{% trans "Display themes" %}</a><br/>
-                <a href="#" class="settings-switch" id="settings-annotations" data-setting="no-annotations">{% trans "Display footnotes" %}</a><br/>
-            </div>
-
-            <div class="box" id="book-short">
-                {% book_short book %}
-            </div>
-
-            <div id="box-underlay"></div>
-
-            {# template #}
-            <div id="ajaxable-window" class='dialog-window'>
-                <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
-                <div class="target">
-                    <p><img src="{% static "img/indicator.gif" %}" alt="*"/> {% trans "Loading" %}</p>
-                </div>
-            </div>
-        </footer>
-
-        </div>
-
-        <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
-        <script type="text/javascript">
-            var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
-            var STATIC_URL = "{{ STATIC_URL }}";
-        </script>
-        {% compressed_js "book_text" %}
-        <script src="{% static "js/modernizr.custom.19652.js" %}"></script>
-    </body>
-</html>
+        </li>
+    {% endfor %}
+    {% endspaceless %}
+    </ul>
+</div>
+{% endif %}
+
+<div class="box" id="settings">
+    <h2>{% trans "Settings" %}</h2>
+    <a href="#" class="settings-switch" id="settings-line-numbers" data-setting="always-hide-line-numbers">{% trans "Display line numbers" %}</a><br/>
+    <a href="#" class="settings-switch" id="settings-themes" data-setting="always-hide-themes">{% trans "Display themes" %}</a><br/>
+    <a href="#" class="settings-switch" id="settings-annotations" data-setting="no-annotations">{% trans "Display footnotes" %}</a><br/>
+</div>
+
+<div class="box" id="book-short">
+    {% book_short book %}
+</div>
+{% endblock footer %}
diff --git a/apps/catalogue/templates/catalogue/viewer_base.html b/apps/catalogue/templates/catalogue/viewer_base.html
new file mode 100644 (file)
index 0000000..1092ead
--- /dev/null
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+{% load i18n %}
+{% load static from staticfiles %}
+{% load compressed %}
+<html class="no-js">
+    <head>
+        <meta charset="utf-8">
+        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+        <title>{% block title %}{% endblock %} :: {% trans "Wolne Lektury" %}</title>
+        <link rel="icon" href="{% static "img/favicon.png" %}" type="image/x-icon" />
+        {% compressed_css "book_text" %}
+        {% block extrahead %}{% endblock %}
+
+    </head>
+    <body id="{% block body-id %}reader{% endblock %}">
+        <nav id="no-menu"><ul>
+            <li><a href="#" id="menu-toggle-on"></a></li>
+            {% block no-menu-extra %}{% endblock %}
+        </ul></nav>
+
+        <nav id="menu"><ul>
+            <li><a href="#" id="menu-toggle-off"></a></li>
+
+            <li><a href="/">
+                <img src="{% static 'img/logo-neon.png' %}" width="80"
+                    alt="Wolne Lektury"
+                    title="Wolne Lektury">
+            </a></li>
+
+            {% block menu %}
+            {% endblock menu %}
+
+        </ul></nav>
+
+        {% block big-pane %}
+        <div id="big-pane">
+
+        {% block main %}
+        <article id="main-text">
+            {% block main-text %}{% endblock %}
+        </article>
+        {% endblock main %}
+        {% endblock big-pane %}
+
+
+        <footer>
+            {% block footer %}{% endblock %}
+
+            <div id="box-underlay"></div>
+
+            {# template #}
+            <div id="ajaxable-window" class='dialog-window'>
+                <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
+                <div class="target">
+                    <p><img src="{% static "img/indicator.gif" %}" alt="*"/> {% trans "Loading" %}</p>
+                </div>
+            </div>
+        </footer>
+
+        </div>
+
+        <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+        {% block js-dependencies %}{% endblock %}
+        <script type="text/javascript">
+            var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
+            var STATIC_URL = "{{ STATIC_URL }}";
+        </script>
+        {% compressed_js "book_text" %}
+
+        <script src="{% static "js/modernizr.custom.19652.js" %}"></script>
+        {% block extrabody %}{% endblock %}
+    </body>
+</html>
index 4a83f2d..4c4726f 100644 (file)
@@ -1,29 +1,24 @@
+{% extends "catalogue/viewer_base.html" %}
 {% load i18n %}
-{% load static from staticfiles %}
-{% load compressed %}
-<!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">
-    <head>
-        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
-        <title>{% block title %}WolneLektury.pl{% endblock %}</title>
-        <link rel="icon" href="{% static "img/favicon.png" %}" type="image/x-icon" />
-        {% compressed_css "book" %}
-    </head>
-    <body>
-        <div id="menu">
-            {% if shelf or not books %}
-                {# shelf or global mixing #}
-                <a href='' class='menu-link'>Twórzże się jeszcze raz!</a>
-            {% else %}{% if book %} 
-                <a href='{% url "poem_from_book" book.slug %}' class='menu-link'>Twórzże się jeszcze raz!</a>
-            {% endif %}{% endif %}
-            <span style='float: right'>Wolne Lektury przepuszczone przez mikser.</a>
-        </div>
-        <div id="header">
-            <a href="/"><img src="{% static "img/logo-220.png" %}" alt="Wolne Lektury" /></a>
-        </div>
-        <div id="book-text">
+
+
+{% block title %}Leśmianator{% endblock %}
+
+
+{% block menu %}
+    <li><a href='{% url 'lesmianator' %}'><span class="label">Wolne Lektury przepuszczone przez mikser.</span></a></li>
+    {% if shelf or not books %}
+        {# shelf or global mixing #}
+        <li><a href=''><span class='label'>Twórzże się jeszcze raz!</span></a></li>
+    {% else %}{% if book %} 
+        <li><a href='{% url "poem_from_book" book.slug %}'><span class='label'>Twórzże się jeszcze raz!</span></a></li>
+    {% endif %}{% endif %}
+{% endblock menu %}
+
+
+
+{% block main-text %}
+    <div id="book-text">
             <h1>
                 <span class="author">Leśmianator</span>
                 <span class="title">***</span>
@@ -66,6 +61,5 @@
             <div>
         </div>
         </div>
-        {{ piwik_tag|safe }}
-    </body>
-</html>
+    </div>
+{% endblock main-text %}
index 472a2ce..6a42d69 100644 (file)
@@ -21,7 +21,7 @@
     <div class="right-column" id="logo-space">
       {% block book_list_logos %}
       <a href="http://www.nck.pl">
-       <img style="float:right; width:200px" src="{% static "img/logo_nck_200horiz_trans.png" %}" alt="Narodowe Centrum Kultury" ></img></a>
+       <img style="float:right; width:200px; margin:1em" src="{% static "img/logo_nck_200horiz_trans.png" %}" alt="Narodowe Centrum Kultury" ></img></a>
       {% endblock %}
     </div>
 
@@ -29,7 +29,7 @@
 <div id="books-list">
   <ol class="work-list">{% spaceless %}
 {% for picture in book_list %}
-   <li class="Book-item">
+   <li class="Picture-item">
  {% picture_short picture %} 
    </li>
 {% endfor %}
index 080bd16..6095f44 100644 (file)
@@ -2,70 +2,74 @@
 {% load thumbnail %}
 {% load catalogue_tags social_tags %}
 {% load picture_tags %}
-
 <div class="{% block box-class %}book-box{% endblock %} picture">
-<div class="book-box-inner" style="position:relative">
+<div class="book-box-inner">
+<div class="book-left-column">
+
+<div class="book-box-body">
+
+        <div class="book-box-head">
+            <div class="author">
+                {% for tag in tags.author %}
+                    <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %},
+                {% endif %}{% endfor %}
+            </div>
+            <div class="title">
+                               {% if main_link %}<a href="{{ main_link }}">{% endif %}
+                                       {{ picture.title }}
+                           {% if main_link %}</a>{% endif %}
+                       </div>
+        </div>
+
+
+
   <div class="cover-area">
     {% block picture-view %}
-    <a href="{{ picture.get_absolute_url }}">
+    {% if main_link %}<a href="{{ main_link }}">{% endif %}
       {% thumbnail picture.image_file "216x288" crop="center" as thumb %}
       <img class="cover" src="{{thumb.url}}"/>
       {% endthumbnail %}
-    </a>
+    {% if main_link %}</a>{% endif %}
     {% endblock %}
      {# what about licensing icons here #}
   </div>
-    <div class="book-box-body">
-      
-        <div class="book-box-head">
-            <div class="mono author">
-            {% for author in tags.author %}
-                <a href="{% tag_url 'author' author.slug %}">{{ author }}</a>{% if not forloop.last %},{% endif %}
-            {% endfor %}
-            </div>
-            <div class="title"><a href="{{ picture.get_absolute_url }}">{{ picture.title }}</a></div>
-        </div>
+     
         <div class="tags">
             {% spaceless %}
 
-            <span class="mono"> {% trans "Epoch" %}:&nbsp;</span>
-            <span class="book-box-tag">
-                {% for tag in tags.epoch %}
-                    <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>{% if not forloop.last %},&nbsp;{% endif %}
+            <span class="category">
+            <span class="mono"> {% trans "Epoch" %}:</span>&nbsp;<span class="book-box-tag">
+               {% for tag in tags.epoch %}
+                       <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
+                       {% if not forloop.last %}<span>, </span>{% endif %}
                 {% endfor %}
-            </span>
+            </span></span>
 
-            <span class="mono"> {% trans "Kind" %}:&nbsp;</span>
-            <span class="book-box-tag">
-                {% for tag in tags.kind %}
-                    <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>{% if not forloop.last %},&nbsp;{% endif %}
+            <span class="category">
+            <span class="mono"> {% trans "Kind" %}:</span>&nbsp;<span class="book-box-tag">
+               {% for tag in tags.kind %}
+                       <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
+                       {% if not forloop.last %}<span>, </span>{% endif %}
                 {% endfor %}
-            </span>
+            </span></span>
 
-            <span class="mono"> {% trans "Genre" %}:&nbsp;</span>
-            <span class="book-box-tag">
-                {% for tag in tags.genre %}
-                    <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>{% if not forloop.last %},&nbsp;{% endif %}
+            <span class="category">
+            <span class="mono"> {% trans "Genre" %}:</span>&nbsp;<span class="book-box-tag">
+               {% for tag in tags.genre %}
+                       <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
+                       {% if not forloop.last %}<span>, </span>{% endif %}
                 {% endfor %}
-            </span>
+            </span></span>
 
             {% endspaceless %}
         </div>
     </div>
     <ul class="book-box-tools">
       <li class="book-box-read">
-        <a href="{% url 'picture_viewer' picture.slug %}" class="mono downarrow">{% trans "View online" %}</a>
+        <a href="{% url 'picture_viewer' picture.slug %}" class="downarrow">{% trans "View online" %}</a>
       </li>
       <li class="book-box-download">
-       <a href="{{picture.image_file.url}}" class="mono downarrow">{% trans "download original" %}</a>
-      </li>
-<!--      <li class="book-box-download hoverget">
-        <a class="mono downarrow hoverclick">{% trans "Download" %}</a>
-        <div class="book-box-formats mono">
-         {% if picture.image_file %}
-         <span><a href="{{ picture.image_file.url}}">JPG</a> {% trans "original" %}</span>
-         {% endif %}
-       </div>-->
+        <a href="{{picture.image_file.url}}" class="downarrow">{% trans "download original" %}</a>
       </li>
     </ul>
     {% block book-box-extra-info %}{% endblock %}
@@ -73,6 +77,7 @@
     {% endblock %}
     {% block right-column %}
     {% endblock %}
-    <div class="clearboth"/>
+    <div class="clearboth"></div>
+</div>
 </div>
 </div>
index 40cbd80..65b689d 100644 (file)
@@ -1,72 +1,80 @@
+{% extends "catalogue/viewer_base.html" %}
 {% load i18n %}
 {% load static from staticfiles %}
-{% load chunks compressed catalogue_tags %}
+{% load compressed catalogue_tags %}
 {% load thumbnail %}
-<!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">
-    <head>
-        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
-{# XXX było: picture.pretty_title #}
-        <title>{% trans "Wolne Lektury" %} :: {{ picture.title }}</title>
-        <link rel="icon" href="{% static "img/favicon.png" %}" type="image/x-icon" />
-        {% compressed_css "picture" %}
-        <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
-       <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
-        {% compressed_js "book" %}
-       <!-- old IE support -->
-
-    </head>
-    <body>
-        <div id="menu" class="moveright">
-            <ul>
-<!--                <li><a class="menu" href="#themes">{% trans "Themes" %}</a></li>
-                <li><a class="menu" href="#objects">{% trans "Objects" %}</a></li>-->
-               <!-- XXX do we have this? -->
-<!--                <li><a class="menu" href="#nota_red">{% trans "Edit. note" %}</a></li>-->
-                <li><a class="menu" href="#info">{% trans "Infobox" %}</a></li>
-                <li><a href="{{ picture.get_absolute_url }}">{% trans "Picture's page" %}</a></li>
-<!-- XXX -->
-                <li><a href="{{ picture.image_file.url }}">{% trans "Download" %}</a></li>
-            </ul>
-        </div>
-        <div id="info" class="moveright">
-         <div class="sponsors">
-           <a href="/"><img src="{% static "img/logo-220.png" %}" alt="Wolne Lektury" ></img>
-           </a>
-           <a href="http://www.nck.pl"><img src="{% static "img/logo_nck_200horiz_trans.png" %}" alt="Narodowe Centrum Kultury" ></img></a>
-         </div>
-            {% book_info picture %}
-        </div>
-       {{ picture.html_file.read|safe }}
 
-       <!-- main picture view -->
+
+{% block title %}{{ picture.pretty_title }}{% endblock %}
+
+
+{% block body-id %}picture-viewer{% endblock %}
+
+
+{% block js-dependencies %}
+    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
+{% endblock %}
+
+
+{% block no-menu-extra %}
+<li><a class="square button plus inactive" href="#">+<!--&#x2795;--><!-- heavy plus sign --></a></li><li><a class="square button minus inactive" href="#">-<!-- &#x2796;--><!-- heavy minus sign --></a></li>
+{% endblock %}
+
+
+{% block menu %}
+<li><a style="width: 50%;display: inline-block;" class="square button plus inactive" href="#">+<!--&#x2795;--><!-- heavy plus sign --></a><a style="width: 50%;display: inline-block;" class="square button minus inactive" href="#">-<!-- &#x2796;--><!-- heavy minus sign --></a></li>
+
+
+<li><a href="{{ picture.get_absolute_url }}" id="menu-book" data-box="book-short">
+    <img src="{% thumbnail picture.image_file '80x200' as thumb %}{{ thumb.url }}{% empty %}{{ picture.image_file.url }}{% endthumbnail %}"
+        width="80"
+        alt="{{ picture.pretty_title }}"
+        title="{{ picture.pretty_title }}">
+</a></li>
+
+
+<li><a href="#picture-objects" class="dropdown"><span class="label">{% trans "Objects" %}</span></a></li>
+<li><a href="#picture-themes" class="dropdown"><span class="label">{% trans "Themes" %}</span></a></li>
+
+
+<li id="menu-info"><a href="#info" data-box="info">
+    <span class="label">{% trans "Infobox" %}</span>
+</a></li>
+
+<li id="sponsors">
+    <a href="http://www.nck.pl"><img src="{% static "img/logo_nck.jpg" %}" alt="Narodowe Centrum Kultury" ></img></a>
+</li>
+
+{% endblock %}
+
+{% block main %}
        <div id="picture-view">
-         <ul class="toolbar">
-           <li class="square button plus inactive"><a href="#">+<!--&#x2795;--><!-- heavy plus sign --></a></li>
-           <li class="square button minus inactive"><a href="#">-<!-- &#x2796;--><!-- heavy minus sign --></a>
-           </li>
-           <li class="button"><a href="#picture-objects" class="dropdown">{% trans "Objects" %}</a></li>
-           <li class="button"><a href="#picture-themes" class="dropdown">{% trans "Themes" %}</a></li>
-         </ul>
          {% thumbnail picture.image_file "700x500" as pic %}
          <div class="picture-wrap {% if picture.image_file|is_portrait %}portrait{% endif %}" 
               data-original-width="{{picture.width}}" data-original-height="{{picture.height}}"
+           data-original-url="{{ picture.image_file.url }}"
               data-width="{{pic.width}}" data-height="{{pic.height}}" style="background-image: url('{{pic.url}}');  width: {{pic.width}}px; height: {{pic.height}}px;">
-           <img class="canvas loading original" src="{{ picture.image_file.url }}"/>
          </div>
          {% endthumbnail %}
        </div>
-        {{ piwik_tag|safe }}
-       <div id="spinner"></div>
-       <div id="sponsors">
-         <div>
+{% endblock %}
+
+
+{% block footer %}
+{{ picture.html_file.read|safe }}
+
+<div id="info" class="box">
+         <div class="sponsors">
            <a href="/"><img src="{% static "img/logo-220.png" %}" alt="Wolne Lektury" ></img>
-             </a>
-           </div>
-         <div>
-           <a href="http://www.nck.pl"><img src="{% static "img/logo_nck.jpg" %}" alt="Narodowe Centrum Kultury" ></img></a>
+           </a>
+           <a href="http://www.nck.pl"><img src="{% static "img/logo_nck_200horiz_trans.png" %}" alt="Narodowe Centrum Kultury" ></img></a>
          </div>
-       </div>
-    </body>
-</html
+
+    {% book_info picture %}
+</div>
+
+<div class="box Picture-item" id="book-short">
+    {{ picture.short_html }}
+</div>
+
+{% endblock %}
index 81bc698..43abda4 100644 (file)
@@ -1,6 +1,7 @@
 
 #picture-view {
-    width: 100%;
+    left: 0;
+    right: 0;
     position:absolute;
     top: 0;
     bottom: 0;
@@ -9,7 +10,7 @@
  
 #picture-view .picture-wrap {
     background-repeat: no-repeat;
-    margin: 3rem auto 1rem auto;
+    margin: 0 auto 0 auto;
     display: block;
     position: relative;
     z-index: 10;
 
 }
 
-
-.picture-wrap img.loading {
-    margin-left: -10000px;
-}
-
 .picture-wrap .mark {
     border: 2px solid rgba(200, 200, 200, 0.7);
     position: absolute;
 //    bottom: -1.5em;
 }
 
-
-.toolbar {
-    position: fixed;
-    //top: 1.5rem;
-    left: 0rem;
-    color: #FFF;
-    z-index: 99;
-    list-style: none; 
-    padding: 0;
-    margin: 0;
-    
-    background: #333;
-    opacity: 0.9;
-    width: 8rem;
-}
-
-.toolbar ul {
-    list-style: none;
-    padding: 0;
-    margin: 0;
-    font-size: 0.8rem;
-    background-color: #222;
-}
-
-.toolbar .button.inactive a:active,
-.toolbar .button.inactive a:link,
-.toolbar .button.inactive a:visited
+.button.inactive:active,
+.button.inactive:link,
+.button.inactive:visited
 {
     color: #606060 !important;
     cursor: not-allowed;
 }
 
-.toolbar .button a {
-    //background: #333;
-    //opacity: 0.9;
-    display: block;
-    height:1.5rem;
-
-    text-align: center;
-    color: #FFF;
-    padding: 0.2rem 0;
-    text-decoration: none;
-}
-
-.toolbar .button .dropdown-body a {
-    height: 1.2rem;
-    white-space: nowrap;
-}
-
-#picture-view .toolbar .button.square a {
-    width: 4rem; //1.5rem;
-    font-weight: bold;
-}
-
-li.button {
-    clear: both;
-}
-li.button.square {
-    clear: none;
-    float: left;
-}
-
-.toolbar .button a:link,
-.toolbar .button a:visited {
-    color: #FFF;
-}
-
-#picture-view .toolbar.button a:active {
-    color: yellow;
-}
-
-.moveright {
-    margin-left: 8rem !important;
-}
-
 #sponsors {
-    position: absolute;
-    display: block;
-    left: 0;
-    bottom: 0;
-    width: 8rem;
-
-    z-index:1;
-}
-#sponsors div {
-    z-index: 10;
+    margin-top: 3em;
 }
-
 #sponsors img {
     width: 100%;
-    z-index: 10;
 }
 
 #spinner {
     height: 1em;
     z-index:10;
-}
\ No newline at end of file
+}
+
+.dropdown-body {
+    font-size: 0.8rem;
+    background-color: #444;
+}
+
index 79dc001..5bbc1a8 100644 (file)
@@ -6,6 +6,9 @@ function hide_menu_boxes() {
     $("#menu .active").each(function() {
         $(this).removeClass("active");
         $("#" + $(this).attr("data-box")).hide();
+        if ($(this).hasClass('dropdown')) {
+            $($(this).attr('href')).slideUp('fast');
+        }
     });
     $("#box-underlay").hide();
 }
@@ -64,7 +67,20 @@ $("#menu a").each(function() {
             }
         });
     }
-    else {
+    else if ($(this).hasClass('dropdown')) {
+        $(this).click(function(e) {
+            e.preventDefault();
+            var showing = $(this).hasClass("active");
+            hide_menu_boxes();
+            if (!showing) {
+                $("body").addClass("menu-showed");
+                $("#sponsors:not(:hidden)").fadeOut();
+                $(this).addClass("active");
+                $($(this).attr('href')).slideDown('fast');
+            }
+        });
+    }
+    else if (!$(this).hasClass('button')) {
         $(this).click(release_menu);
     }
 });
index 174a9ff..7c5ff9c 100644 (file)
@@ -24,7 +24,7 @@
       self._zoom = 0;
       self._ratio = 1.0;
 
-      self.original = self.element.find('img.original').eq(0);
+      self.original = $('<img src="'+ self.element.attr('data-original-url') +'">');
       
       self._original_avaialble = self.ORIGINAL_LOADING;
       function original_loaded() {
 $(document).ready(function() {
   $.highlightFade.defaults.speed = 3000;
 
-  $('.toolbar a.dropdown').each(function() {
+  $('#menu .dropdown').each(function() {
     $t = $(this);
     $($t.attr('href')).hide().insertAfter(this);
   });
 
-  function closeDD() {
-    $(this).removeClass('selected');
-    $($(this).attr('href')).slideUp('fast');
-    
-  }
-  $('.toolbar a.dropdown').click(function(ev) {
-    $("#sponsors:not(:hidden)").fadeOut();
-    ev.preventDefault();
-    if ($(this).hasClass('selected')) {
-      closeDD.call(this);
-    } else {
-      $(this).addClass('selected');
-      $($(this).attr('href')).slideDown('fast');
-      $(this).parent().siblings(".button:has(.dropdown)").children(".dropdown").each(closeDD);
-    }
-  });
-
   $(".picture-wrap").pictureviewer({
-    plus_button: $(".toolbar .button.plus"),
-    minus_button: $(".toolbar .button.minus"),
+    plus_button: $(".button.plus"),
+    minus_button: $(".button.minus"),
     areas_links: $("#picture-objects a, #picture-themes a"),
   });
 
index 4459aa4..566ee48 100644 (file)
@@ -13,6 +13,7 @@
 @import "book_text/toc";
 
 @import "main/book_box";
+@import "main/picture_box";
 @import "book_text/book_box";
 
 @import "main/auth";
index 2454f0c..2f1710d 100644 (file)
@@ -6,6 +6,7 @@
     display: flex;
     flex-direction: row;
     justify-content: left;
+    position: relative;
     @include min-screen($W_BOOK_TEXT_MAX) {
         justify-content: center;
     }
     }
 }
 
+#picture-viewer #big-pane {
+    @include size(margin-left, $W_NONUMBERS_TINY);
+
+    @include min-screen($S_NONUMBERS_TINY_MAX) {
+        @include size(margin-left, $W_NONUMBERS);
+    }
+
+    @include min-screen($S_NUMBERS) {
+        @include size(margin-left, 44px);
+    }
+}
+
+@include min-screen($S_MENU) {
+    #picture-viewer #big-pane {
+        @include size(margin-left, $W_MENU);
+    }
+    .menu-hidden {
+        #big-pane {
+            margin-left: 44px;
+        }
+    }
+}
+
+
 
 
 /*
index ec6cc1e..1a55573 100644 (file)
     }
 }
 
-/* Button for showing menu */
-#menu-toggle-on {
-    @extend %menu-toggle;
+#no-menu {
     @include size(width, $W_NONUMBERS_TINY);
-    position: fixed;
-    top: 0;
-    left: 0;
-    background: #191919;
-    color: #ddd;
-    text-align: center;
-    z-index: 100;
-    @include size(height, 44px);
 
     @include min-screen($S_NONUMBERS_TINY_MAX) {
         @include size(width, $W_NONUMBERS);
         @include size(width, 44px);
     }
 
-    &:before {
-        left: 5px;
-        right: 5px;
-        @include min-screen(240px) {
-            left: 8px;
-            right: 8px;
+    /* Button for showing menu */
+    #menu-toggle-on {
+        @extend %menu-toggle;
+        display: block;
+        background: #191919;
+        color: #ddd;
+        text-align: center;
+        z-index: 100;
+        @include size(height, 44px);
+        padding: 0;
+
+        &:before {
+            left: 5px;
+            right: 5px;
+            @include min-screen(240px) {
+                left: 8px;
+                right: 8px;
+            }
         }
     }
 }
 
 #menu {
     display: none;
-    z-index: 101;
-
     width: 80px;
+    height: 100%;
+}
+
+#menu, #no-menu {
+    z-index: 101;
     position: fixed;
     top: 0;
     left: 0;
     text-align: center;
-    background: #191919;
-    height: 100%;
-
     line-height: 1.1em;
+    background: #191919;
+    color: #ddd;
 
     ul {
         list-style: none;
 }
 
 /* body class for showing menu */
-.menu-showed #menu {
-    display: block;
+.menu-showed {
+    #menu {
+        display: block;
+    }
+    #no-menu {
+        display: none;
+    }
 }
 
 /* menu showing by default */
     #menu {
         display: block;
     }
-    /* body class for hiding menu */
-    .menu-hidden #menu {
+    #no-menu {
         display: none;
     }
+    /* body class for hiding menu */
+    .menu-hidden {
+        #menu {
+            display: none;
+        }
+        #no-menu {
+            display: block;
+        }
+    }
 }
index bc1ef5f..5a48007 100644 (file)
@@ -16,6 +16,7 @@
 @import "main/main_content";
 @import "main/main_page";
 @import "main/menu";
+@import "main/picture_box";
 @import "main/search";
 @import "main/tag";
 
index d9d5237..1f1021a 100755 (executable)
@@ -52,6 +52,11 @@ h3 {
 
 .normal-text {
     line-height: 1.3em;
+    @include size(margin, 0 5px);
+
+    @media screen and (min-width: 62.5em) {
+        margin: 0;
+    }
 }
 
 .white-box {
index 4655a3c..cca6e4a 100755 (executable)
             position: relative;
             z-index: 101;
 
-            &.downarrow {
-                color: black;
-
-                @include min-screen($S_BOOK_SHORT_FULL) {
-                    color: #0D7E85;
+            @mixin downarrow {
+                color: #0D7E85;
+
+                &:before {
+                    content: url("/static/img/download.png");
+                    @include size(font-size, 25px);
+                    @include size(margin-right, 3.71px);
+                    vertical-align: middle;
+                    font-weight: normal;
+                    display: inline;
+                }
+            }
 
+            &.downarrow {
+                @include downarrow;
+                &.hoverclick {
+                    color: black;
                     &:before {
-                        content: url("/static/img/download.png");
-                        @include size(font-size, 25px);
-                        @include size(margin-right, 3.71px);
-                        vertical-align: middle;
-                        font-weight: normal;
+                        display: none;
+                    }
+
+                    @include min-screen($S_BOOK_SHORT_FULL) {
+                        @include downarrow;
                     }
                 }
             }
diff --git a/apps/wolnelektury_core/static/scss/main/picture_box.scss b/apps/wolnelektury_core/static/scss/main/picture_box.scss
new file mode 100644 (file)
index 0000000..26adc58
--- /dev/null
@@ -0,0 +1,33 @@
+.picture {
+    &.book-wide-box {
+        img.cover {
+            width: 53.5em;
+            height: auto;
+        }
+
+        .book-box-tools {
+            margin-left:  50em; // 535px image + 15px margin @ 11pt
+        }
+
+        .other-tools {
+            margin: 5em 0 0 0;
+        }
+        #theme-list-wrapper {
+            margin-left: 55em;
+        }
+    }
+
+    li.book-box-download {
+        width: 15em;
+    }
+}
+
+
+.work-list {
+    .Picture-item {
+        @include min-screen($S_BOOK_SHORT_FULL) {
+            display: inline-block;
+        }
+        vertical-align: top;
+    }
+}
index a6f5d1b..472b2e9 100644 (file)
@@ -44,6 +44,8 @@ PIPELINE_CSS = {
         'source_filenames': [
             'scss/book_text.scss',
             'css/new.book.css',
+
+            'css/master.picture.css',
         ],
         'output_filename': 'css/compressed/book_text.css',
     },
@@ -108,10 +110,10 @@ PIPELINE_JS = {
             'js/jquery.highlightfade.js',
             'js/book_text/other.js',
             'js/book.js',
-            'js/picture.js',
+
             'js/raphael-min.js',
-            'player/openplayer.js',
             'js/progressSpin.min.js',
+            'js/picture.js',
         ],
         'output_filename': 'js/book.min.js',
     },
@@ -122,6 +124,12 @@ PIPELINE_JS = {
             'js/book_text/*.js',
             'js/locale.js',
             'js/dialogs.js',
+
+            'js/jquery.highlightfade.js',
+            'js/raphael-min.js',
+            'player/openplayer.js',
+            'js/progressSpin.min.js',
+            'js/picture.js',
         ],
         'output_filename': 'js/book_text.js',
     },