base.html 3.91 KB
Newer Older
Dudás Ádám committed
1 2 3 4 5 6
<!DOCTYPE html>
{% load i18n %}
{% get_current_language as lang %}
<html lang="{{lang}}">
<head>
    <title>{% block title %}IK Cloud{% endblock %}</title>
7
    <link href='http://fonts.googleapis.com/css?family=Metrophobic' rel='stylesheet' type='text/css'>
Dudás Ádám committed
8 9
    <link rel="stylesheet" href="/static/style.css" />
    <link rel="icon" type="image/png" href="/static/favicon.png" />
10 11 12 13
    <link rel="icon" type="image/png" href="one/static/favicon.png">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script src="/static/jquery.min.js"></script>
    <script type="text/javascript">
Őry Máté committed
14
$(function(){
Danyi Bence committed
15 16 17
    $('.wm .summary').each(function(){
      this.originalHeight=parseInt($(this).next('.details').css('height'));
    })
18 19
    var toggleDetails=function(){
      if($(this).next('.details').is(':hidden')){
Bence Dnyi committed
20
            $(this).next('.details')
Őry Máté committed
21 22 23
                .css('height',0)
                .css('padding','0px 5px')
                .show()
Danyi Bence committed
24
                .animate({height:this.originalHeight,paddingTop:15,paddingBottom:15},700);
Őry Máté committed
25 26
        } else {
            var that=this;
Bence Dnyi committed
27
            $(this).next('.details')
Danyi Bence committed
28 29
              //2*15px paddingot le kell vonni, a jQuery szar
                .css('height',this.originalHeight-30)
Őry Máté committed
30 31
                .css('padding','15px 5px')
                .animate({height:0,paddingTop:0,paddingBottom:0},700,function(){
Bence Dnyi committed
32
                $(that).next('.details').hide();
Őry Máté committed
33 34
            });
        }
35 36
    }
    $('.wm .summary').click(toggleDetails);
37 38 39 40 41 42 43 44 45
    $('#load-more-files').click(function(){
        $('.actions', this).show();
        var that=this;
        setTimeout(function(){
            $(that).prev('li').slideDown(500,function(){
                $('.actions', that).hide();
            });
        },2000);
    })
46 47 48
    $('#new-wm-button').click(function(){
      $('#modal').show();
      $('#modal-container').html($('#new-wm').html());
49 50 51 52
      $('#modal-container .wm .summary').each(function(){
        this.originalHeight=parseInt($(this).next('.details').css('height'));
      })
      $('#modal-container .wm .summary').click(toggleDetails);
53 54 55 56
    });
    $('#shadow').click(function(){
      $('#modal').hide();
    })
Őry Máté committed
57 58
})
        </script>
Dudás Ádám committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105

    {{ form.media }}
    {% block js %}{% endblock %}
</head>

<body>
    <div id="header">
        {% block login %}
            <div id="loginblock"><p>
               {% if user.is_authenticated %}
                   Bejelentkezve: {{ user.username }}.
                   <a href="/logout/">Kijelentkezés</a>.
                   {% if user.is_staff %}
                   <a href="/admin/">Admin</a>.
                   {% endif %}
               {% else %}
                   <a href="/login/">Bejelentkezés</a>.
               {% endif %}
               <!--{% if lang == 'hu' %}
               <a href="/language/en-US/">In English</a>.
               {% else %}
               <a href="/language/hu/">Magyarul</a>.
                   {% if autolang %}
                   <p style="position: absolute; top: 40px; right: 1em;" class="triangle-border top">Böngészője kifejezetten angol tartalmat kért.<br/>A <a href="/language/hu/">magyar változat</a> részletesebb és frissebb!</p>
                   {% endif %}
               {% endif %}-->
               </p>
           </div>
        {% endblock %}
        {% block header %}
            {% block header_title %}
            <h1><a href="/">IK Cloud</a></h1>
            {% endblock %}
        {% endblock %}
    </div>

    {% block messages %}
        {% if messages %}
        <ul class="messagelist">{% for message in messages %}
          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
        {% endfor %}</ul>
        {% endif %}
    {% endblock messages %}

    <div id="content">
        {% block content %}{% endblock %}
    </div>
Bence Dnyi committed
106 107 108 109 110
    <div id="modal" style="display: none">
        <div id="shadow"></div>
        <div id="modal-container">
        </div>
    </div>
Dudás Ádám committed
111 112
</body>
</html>