Commit 4492d21ab5f056a3b9516ed4c163c9f4ff3c9faf

Authored by janek37
1 parent 7d9ee46d

winietka

--HG--
branch : beta
common/static/css/reader.css
... ... @@ -264,4 +264,81 @@ dl.notation-list dt {
264 264 float: left;
265 265 clear: left;
266 266 width: 50px;
  267 +}
  268 +
  269 +
  270 +/* splash */
  271 +
  272 +#splash-overlay {
  273 + display: none;
  274 + position: fixed;
  275 + top: 0;
  276 + left: 0;
  277 + height: 100%;
  278 + width: 100%;
  279 + z-index: 51;
  280 +}
  281 +
  282 +#splash {
  283 + border: 2px solid orange;
  284 + width: 800px;
  285 + height: 530px;
  286 + background: white url('../images/sgjp100.png') no-repeat 50px 70px;
  287 + position: fixed;
  288 + top: 50%;
  289 + left: 50%;
  290 + margin-top: -265px;
  291 + margin-left: -400px;
  292 +}
  293 +
  294 +#splash-content {
  295 + margin-top: 70px;
  296 + margin-left: 190px;
  297 +}
  298 +
  299 +#splash-content .author {
  300 + font-size: 20px;
  301 + margin-right: 8px;
  302 +}
  303 +
  304 +#splash-content h1 {
  305 + font-weight: inherit;
  306 + font-size: 45px;
  307 +}
  308 +
  309 +#splash-content p {
  310 + font-size: 20px;
  311 +}
  312 +
  313 +#splash-footer {
  314 + position: absolute;
  315 + bottom: 50px;
  316 + margin-right: 140px;
  317 +}
  318 +
  319 +#splash-footer p {
  320 + font-size: 11px;
  321 +}
  322 +
  323 +#splash-button {
  324 + position: absolute;
  325 + bottom: 55px;
  326 + right: 55px;
  327 + width: 65px;
  328 + height: 35px;
  329 + border: 2px solid black;
  330 + background-color: gray;
  331 + color: white;
  332 + text-align: center;
  333 + cursor: pointer;
  334 +}
  335 +
  336 +#splash-button span {
  337 + vertical-align: middle;
  338 + font-size: 18px;
  339 + padding-top: 17px;
  340 +}
  341 +
  342 +.show-splash {
  343 + cursor: pointer;
267 344 }
268 345 \ No newline at end of file
... ...
common/static/js/lib/js.cookie-2.0.4.min.js 0 → 100644
  1 +/*! js-cookie v2.0.4 | MIT */
  2 +!function(a){if("function"==typeof define&&define.amd)define(a);else if("object"==typeof exports)module.exports=a();else{var b=window.Cookies,c=window.Cookies=a();c.noConflict=function(){return window.Cookies=b,c}}}(function(){function a(){for(var a=0,b={};a<arguments.length;a++){var c=arguments[a];for(var d in c)b[d]=c[d]}return b}function b(c){function d(b,e,f){var g;if(arguments.length>1){if(f=a({path:"/"},d.defaults,f),"number"==typeof f.expires){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}try{g=JSON.stringify(e),/^[\{\[]/.test(g)&&(e=g)}catch(i){}return e=encodeURIComponent(String(e)),e=e.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(String(b)),b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),b=b.replace(/[\(\)]/g,escape),document.cookie=[b,"=",e,f.expires&&"; expires="+f.expires.toUTCString(),f.path&&"; path="+f.path,f.domain&&"; domain="+f.domain,f.secure?"; secure":""].join("")}b||(g={});for(var j=document.cookie?document.cookie.split("; "):[],k=/(%[0-9A-Z]{2})+/g,l=0;l<j.length;l++){var m=j[l].split("="),n=m[0].replace(k,decodeURIComponent),o=m.slice(1).join("=");'"'===o.charAt(0)&&(o=o.slice(1,-1));try{if(o=c&&c(o,n)||o.replace(k,decodeURIComponent),this.json)try{o=JSON.parse(o)}catch(i){}if(b===n){g=o;break}b||(g[n]=o)}catch(i){}}return g}return d.get=d.set=d,d.getJSON=function(){return d.apply({json:!0},[].slice.call(arguments))},d.defaults={},d.remove=function(b,c){d(b,"",a(c,{expires:-1}))},d.withConverter=b,d}return b()});
0 3 \ No newline at end of file
... ...
common/static/js/reader.js
1   -/* global, layout, slickgrid */
  1 +/* global, layout, slickgrid, Cookies */
2 2  
3 3 layout.content_height = function() {
4 4 "use strict";
... ... @@ -22,12 +22,22 @@ layout.left_width = 340;
22 22  
23 23 $(function() {
24 24 "use strict";
25   - $('#branding').hover(
26   - function() {
27   -
28   - },
29   - function() {
30   -
31   - }
32   - );
  25 + var splash_hidden = Cookies.get('splash');
  26 + var splash_overlay = $('#splash-overlay');
  27 + if (splash_hidden) {
  28 + // przedłużamy
  29 + Cookies.set('splash', 'hidden', {expires: 365});
  30 + } else {
  31 + splash_overlay.show();
  32 + }
  33 + splash_overlay.add('#splash-button').click(function() {
  34 + splash_overlay.hide();
  35 + Cookies.set('splash', 'hidden', {expires: 365});
  36 + });
  37 + $('#splash').click(function(event) {
  38 + event.stopPropagation();
  39 + });
  40 + $('.show-splash').click(function() {
  41 + splash_overlay.show();
  42 + });
33 43 });
34 44 \ No newline at end of file
... ...
common/templates/base.html
... ... @@ -8,6 +8,8 @@
8 8 <link rel="shortcut icon" href="{% version_static 'images/sgjpicon.png' %}"
9 9 type="image/x-icon"/>
10 10 <script type="text/javascript"
  11 + src="{% version_static 'js/lib/js.cookie-2.0.4.min.js' %}"></script>
  12 + <script type="text/javascript"
11 13 src="{% version_static 'js/lib/jquery-1.10.2.js' %}"></script>
12 14 <script type="text/javascript"
13 15 src="{% version_static 'js/lib/jquery.json-2.2.min.js' %}"></script>
... ... @@ -52,9 +54,6 @@
52 54  
53 55 <body>
54 56  
55   -<!-- Container -->
56   -<!--div id="container"-->
57   -
58 57 <!-- Header -->
59 58 <div id="header">
60 59 {% block header %}
... ... @@ -104,15 +103,11 @@
104 103 </div>
105 104 <!-- END Content -->
106 105  
107   -{% block footer %}
108   - <div id="footer"></div>{% endblock %}
109 106 {% block modal_elements %}{% endblock %}
110 107 {# if debug #}
111 108 <iframe id="debug">
112 109 </iframe>
113 110 {# endif #}
114   -<!--/div-->
115   -<!-- END Container -->
116 111  
117 112 </body>
118 113 </html>
... ...
common/templates/reader_base.html
... ... @@ -22,6 +22,7 @@
22 22 <p class="subitem"><a href="{% url 'about' %}#osoby">{% trans 'team' %}</a></p>
23 23 <p class="subitem"><a href="{% url 'about' %}#historia">{% trans 'history' %}</a></p>
24 24 <p class="subitem"><a href="{% url 'about' %}#liczby">{% trans 'numbers' %}</a></p>
  25 + <p class="subitem show-splash">{% trans 'splash screen' %}</p>
25 26 </div>
26 27 </div>
27 28 <div id="settings-menu-container">
... ... @@ -51,4 +52,34 @@
51 52 {% csrf_token %}
52 53 <input type="hidden" value="" name="language" id="language" />
53 54 </form>
  55 +{% endblock %}
  56 +
  57 +{% block modal_elements %}
  58 + <div id="splash-overlay">
  59 + <div id="splash">
  60 + <div id="splash-content">
  61 + <span class="author">Zygmunt&nbsp;Saloni</span>
  62 + <span class="author">Marcin&nbsp;Woliński</span>
  63 + <span class="author">Robert&nbsp;Wołosz</span>
  64 + <span class="author">Włodzimierz&nbsp;Gruszczyński</span>
  65 + <span class="author">Danuta&nbsp;Skowrońska</span>
  66 + <h1>Słownik gramatyczny<br>języka polskiego</h1>
  67 + <p>Wydanie III online</p>
  68 + <p>Warszawa 2015</p>
  69 + <div id="splash-footer">
  70 + <p>
  71 + Projekt został sfinansowany ze środków Narodowego Centrum Nauki
  72 + przyznanych na podstawie decyzji numer DEC-2011/01/B/HS2/04695.
  73 + </p>
  74 + <p>
  75 + Uwaga: strona używa tzw. ciasteczek (ang. cookie),
  76 + które są konieczne do działania aplikacji.
  77 + </p>
  78 + </div>
  79 + </div>
  80 + <div id="splash-button">
  81 + <span>OK</span>
  82 + </div>
  83 + </div>
  84 + </div>
54 85 {% endblock %}
55 86 \ No newline at end of file
... ...
dictionary/templates/reader_view.html
... ... @@ -49,6 +49,7 @@
49 49 {% endblock %}
50 50  
51 51 {% block modal_elements %}
  52 + {{ block.super }}
52 53 <div id="choose-columns-dialog" title="{% trans 'Choose columns' %}">
53 54 <select id="column-list" multiple=multiple></select>
54 55 </div>
... ...
patterns/templates/pattern_reader_view.html
... ... @@ -39,6 +39,7 @@
39 39 {% endblock %}
40 40  
41 41 {% block modal_elements %}
  42 + {{ block.super }}
42 43 <div id="choose-columns-dialog" title="{% trans 'Choose columns' %}">
43 44 <select id="column-list" multiple=multiple></select>
44 45 </div>
... ...