-
Notifications
You must be signed in to change notification settings - Fork 29
/
default.html
98 lines (89 loc) · 2.67 KB
/
default.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
{% extends "desktop/blog/post_base.html" %}
{% load staticfiles %}
{% load current_site %}
{% block title %}
{{ flatpage.title }}
{% endblock %}
{% block headers %}
<!-- meta tags -->
<meta name="description" content="Flat page">
<meta name="author" content="Miguel González-Fierro">
<link rel="canonical" href="{% http_or_https %}{% current_site %}{{ flatpage.url }}">
{% endblock %}
{% block content %}
<!-- Page columnizer -->
<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>-->
<script src="{% static 'blog/js/jquery.min.js' %}" type="text/javascript"></script>
<script src="{% static 'blog/js/jquery.columnizer.min.js' %}" type="text/javascript" charset="utf-8"></script>
<script>
$(function () {
var content_height;
var page = 1;
function buildNewsletter() {
var content_lenght = $('#blogContent').contents().length
if ($('#blogContent').contents().length > 0) {
console.log("$('#blogContent').contents().length = ", content_lenght)
if (page == 1) {
content_height = 650;
$page = $(".page_title:first").clone().addClass("texto").css("display", "block");
}
else {
content_height = 1150;
$page = $(".page_template:first").clone().addClass("texto").css("display", "block");
}
$("body").append($page);
page++;
// here is the columnizer magic
$('#blogContent').columnize({
columns: 2,
target: ".texto:last .content",
overflow: {
height: content_height,
id: "#blogContent",
doneFunc: function () {
console.log("done with page", page - 1);
buildNewsletter();
}
}
});
}
else {
console.log("$('#blogContent').contents().length <= 0");
$("body").append($(".container-comments"));
$("body").append($(".footer"));
console.log("Page building finished");
}
}
buildNewsletter();
});
</script>
<!-- Page building -->
<div class="page_title">
<div class="container">
<div class="row">
<div class="three columns"> </div>
<div class="ten columns">
<h1 class="title" style="padding-bottom:1rem;padding-top:8rem;"> {{ flatpage.title }}</h1>
</div>
<div class="three columns"> </div>
</div>
<div class="row">
<div class="two columns"> </div>
<div class="twelve columns content"></div>
<div class="two columns"> </div>
</div>
</div>
</div>
<div class="page_template">
<div class="container">
<div class="row">
<div class="two columns"> </div>
<div class="twelve columns content"></div>
<div class="two columns"> </div>
</div>
</div>
</div>
<div id="blogContent" style="display: none">
{{ flatpage.content }}
</div>
{% endblock %}