root / okeanos_site / templates / okeanos / intro.html @ 181c3c78
History | View | Annotate | Download (2.7 kB)
1 | 0768522a | Kostas Papadimitriou | {% extends "okeanos/base.html" %} |
---|---|---|---|
2 | 0768522a | Kostas Papadimitriou | {% load i18n %} |
3 | 0768522a | Kostas Papadimitriou | {% block extra_head %} |
4 | 0768522a | Kostas Papadimitriou | <style>
|
5 | 0768522a | Kostas Papadimitriou | body, html { |
6 | 0768522a | Kostas Papadimitriou | overflow: hidden; |
7 | 0768522a | Kostas Papadimitriou | background-color: #fff; |
8 | 0768522a | Kostas Papadimitriou | background-image: none; |
9 | 0768522a | Kostas Papadimitriou | } |
10 | 0768522a | Kostas Papadimitriou | .content { |
11 | 0768522a | Kostas Papadimitriou | margin: 0 auto; |
12 | 0768522a | Kostas Papadimitriou | height: 100%; |
13 | 0768522a | Kostas Papadimitriou | } |
14 | 0768522a | Kostas Papadimitriou | .intro-img { |
15 | 0768522a | Kostas Papadimitriou | cursor: pointer; |
16 | 0768522a | Kostas Papadimitriou | border: none; |
17 | 0768522a | Kostas Papadimitriou | position: absolute; |
18 | 0768522a | Kostas Papadimitriou | left:0; |
19 | 0768522a | Kostas Papadimitriou | right:0; |
20 | 0768522a | Kostas Papadimitriou | } |
21 | 0768522a | Kostas Papadimitriou | a { |
22 | 0768522a | Kostas Papadimitriou | border: none; |
23 | 0768522a | Kostas Papadimitriou | outline: none; |
24 | 0768522a | Kostas Papadimitriou | } |
25 | 0768522a | Kostas Papadimitriou | .fadeimg { |
26 | 0768522a | Kostas Papadimitriou | position: absolute; |
27 | 0768522a | Kostas Papadimitriou | display: none; |
28 | 0768522a | Kostas Papadimitriou | border: none; |
29 | 0d8ec7aa | Kostas Papadimitriou | left:0; |
30 | 0d8ec7aa | Kostas Papadimitriou | top:0; |
31 | 0768522a | Kostas Papadimitriou | } |
32 | 0768522a | Kostas Papadimitriou | .images { |
33 | 0768522a | Kostas Papadimitriou | width: 657px; |
34 | 0768522a | Kostas Papadimitriou | height: 590px; |
35 | 0768522a | Kostas Papadimitriou | position: absolute; |
36 | 0768522a | Kostas Papadimitriou | } |
37 | 0768522a | Kostas Papadimitriou | </style>
|
38 | 0768522a | Kostas Papadimitriou | |
39 | 0768522a | Kostas Papadimitriou | <script type="text/javascript"> |
40 | 0768522a | Kostas Papadimitriou | $(document).ready(function() {
|
41 | 0768522a | Kostas Papadimitriou | $(".content").css("width", "100%");
|
42 | 0768522a | Kostas Papadimitriou | var img = $(".images");
|
43 | 0768522a | Kostas Papadimitriou | var img_width = 657;
|
44 | 0768522a | Kostas Papadimitriou | var img_height = 590;
|
45 | 0768522a | Kostas Papadimitriou | |
46 | 0768522a | Kostas Papadimitriou | function recenter_img() {
|
47 | 0768522a | Kostas Papadimitriou | img.css("left", ($(window).width()/2 - img_width/2) + "px");
|
48 | 0768522a | Kostas Papadimitriou | img.css("top", ($(window).height()/2 - img_height/2) + "px");
|
49 | 0768522a | Kostas Papadimitriou | }
|
50 | 0768522a | Kostas Papadimitriou | recenter_img();
|
51 | 0768522a | Kostas Papadimitriou | $(window).resize(function(){
|
52 | 0768522a | Kostas Papadimitriou | recenter_img();
|
53 | 0768522a | Kostas Papadimitriou | });
|
54 | 0768522a | Kostas Papadimitriou | |
55 | 0768522a | Kostas Papadimitriou | function start_animation()
|
56 | 0768522a | Kostas Papadimitriou | {
|
57 | 0768522a | Kostas Papadimitriou | $(".fadeimg").fadeIn();
|
58 | 0768522a | Kostas Papadimitriou | $(".fadeimg").show();
|
59 | 0768522a | Kostas Papadimitriou | }
|
60 | 0768522a | Kostas Papadimitriou | |
61 | 0768522a | Kostas Papadimitriou | function stop_animation()
|
62 | 0768522a | Kostas Papadimitriou | {
|
63 | 0768522a | Kostas Papadimitriou | $(".fadeimg").fadeOut();
|
64 | 0768522a | Kostas Papadimitriou | }
|
65 | 0768522a | Kostas Papadimitriou |
|
66 | 0768522a | Kostas Papadimitriou | var capture = ".images";
|
67 | 0768522a | Kostas Papadimitriou | $(capture).mouseenter(function(){
|
68 | 0768522a | Kostas Papadimitriou | start_animation();
|
69 | 0768522a | Kostas Papadimitriou | })
|
70 | 0768522a | Kostas Papadimitriou | $(capture).mouseleave(function() {
|
71 | 0768522a | Kostas Papadimitriou | stop_animation();
|
72 | 0768522a | Kostas Papadimitriou | });
|
73 | 0768522a | Kostas Papadimitriou | $(capture).mouseup(function() {
|
74 | 0768522a | Kostas Papadimitriou | $(".intro-img").hide();
|
75 | 0768522a | Kostas Papadimitriou | window.location = $("a.intro-link").attr("href");
|
76 | 0768522a | Kostas Papadimitriou | });
|
77 | 0768522a | Kostas Papadimitriou | |
78 | 0768522a | Kostas Papadimitriou | $(".images").mousedown(function(){
|
79 | 0768522a | Kostas Papadimitriou | $(".intro-img").attr("src", "{{ OKEANOS_STATIC_URL }}images/okeanos-intro-logo3.png");
|
80 | 0768522a | Kostas Papadimitriou | $(".fadeimg").hide();
|
81 | 0768522a | Kostas Papadimitriou | });
|
82 | 0768522a | Kostas Papadimitriou | |
83 | 0768522a | Kostas Papadimitriou | $(".images").click(function(evn){
|
84 | 0768522a | Kostas Papadimitriou | // evn.preventDefault();
|
85 | 0768522a | Kostas Papadimitriou | // var to = $(window).width() + img_width + 100 + "px";
|
86 | 0768522a | Kostas Papadimitriou | // $(".images").animate({"left": to}, 1000, function(){window.location = $("a.intro-link").attr("href")});
|
87 | 0768522a | Kostas Papadimitriou | });
|
88 | 0768522a | Kostas Papadimitriou | });
|
89 | 0768522a | Kostas Papadimitriou | </script>
|
90 | 0768522a | Kostas Papadimitriou | {% endblock extra_head %} |
91 | 0768522a | Kostas Papadimitriou | |
92 | 0768522a | Kostas Papadimitriou | {% block main %} |
93 | 0768522a | Kostas Papadimitriou | <div class="content"> |
94 | 0768522a | Kostas Papadimitriou | <div class="images"> |
95 | 0768522a | Kostas Papadimitriou | <a class="intro-link" href="{{ OKEANOS_SITE_URL }}" title="{% trans "Okeanos " %}"> |
96 | 0768522a | Kostas Papadimitriou | <img class="intro-img" src="{{ OKEANOS_STATIC_URL }}images/okeanos-intro-logo1.png" alt="Sign in Okeanos project" /> |
97 | 0768522a | Kostas Papadimitriou | <img class="fadeimg" src="{{ OKEANOS_STATIC_URL }}images/okeanos-intro-logo2.png" /> |
98 | 0768522a | Kostas Papadimitriou | </a></div> |
99 | 0768522a | Kostas Papadimitriou | </div>
|
100 | 0768522a | Kostas Papadimitriou | {% endblock %} |