jekyll-theme-pirati 1.2.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -17
  3. data/_data/menu.yml +53 -0
  4. data/_includes/candidate_badge.html +6 -15
  5. data/_includes/footer.html +92 -12
  6. data/_includes/head.html +24 -25
  7. data/_includes/header.html +14 -14
  8. data/_includes/js/main.html +71 -14
  9. data/_includes/menu.html +43 -51
  10. data/_includes/people/profile_badge.html +1 -3
  11. data/_includes/right-bar/bar_cal.html +4 -6
  12. data/_includes/right-bar/bar_fb.html +3 -3
  13. data/_includes/right-bar/bar_garant.html +3 -2
  14. data/_includes/right-bar/bar_people.html +21 -18
  15. data/_includes/right-bar/bar_person_contact.html +11 -55
  16. data/_includes/right-bar/rbar.html +3 -3
  17. data/_layouts/komunalni-volby.html +9 -7
  18. data/_sass/_base.scss +114 -1
  19. data/_sass/_settings.scss +1 -1
  20. data/_sass/components/BasicPage.scss +6 -1
  21. data/_sass/components/hero.scss +2 -2
  22. data/_sass/components/icon.scss +5 -1
  23. data/_sass/components/program.scss +5 -1
  24. data/_sass/components/top-bar.scss +236 -491
  25. data/_sass/components/top-sub-nav.scss +1 -1
  26. data/_sass/objects/media.scss +46 -38
  27. data/_sass/utilities/utilities.scss +6 -6
  28. data/assets/css/main.scss +40 -106
  29. data/assets/js/apps.js +8 -0
  30. data/assets/js/apps/scroll-top/ScrollTop.vue +83 -0
  31. data/assets/js/apps/scroll-top/index.js +9 -0
  32. data/assets/js/apps/site-search/SiteSearch.vue +85 -0
  33. data/assets/js/apps/site-search/SiteSearchItemTemplate.vue +29 -0
  34. data/assets/js/apps/site-search/index.js +14 -0
  35. data/assets/js/index.js +52 -0
  36. metadata +9 -91
  37. data/_includes/js/custom.js +0 -245
  38. data/_includes/js/fb.js +0 -15
  39. data/_includes/js/piwik.js +0 -11
  40. data/_includes/js/tw.js +0 -15
  41. data/_includes/people/item.html +0 -49
  42. data/_includes/people/list-2col.html +0 -24
  43. data/_includes/people/list-group.html +0 -12
  44. data/_includes/title/title_header.html +0 -9
  45. data/_sass/components/scroll-top.scss +0 -32
  46. data/_sass/components/welcome-header.scss +0 -188
  47. data/_sass/foundation/_global.scss +0 -638
  48. data/_sass/foundation/components/_accordion-menu.scss +0 -32
  49. data/_sass/foundation/components/_accordion.scss +0 -129
  50. data/_sass/foundation/components/_badge.scss +0 -55
  51. data/_sass/foundation/components/_breadcrumbs.scss +0 -95
  52. data/_sass/foundation/components/_button-group.scss +0 -195
  53. data/_sass/foundation/components/_button.scss +0 -265
  54. data/_sass/foundation/components/_callout.scss +0 -105
  55. data/_sass/foundation/components/_close-button.scss +0 -61
  56. data/_sass/foundation/components/_drilldown.scss +0 -79
  57. data/_sass/foundation/components/_dropdown-menu.scss +0 -221
  58. data/_sass/foundation/components/_dropdown.scss +0 -65
  59. data/_sass/foundation/components/_flex-video.scss +0 -63
  60. data/_sass/foundation/components/_flex.scss +0 -28
  61. data/_sass/foundation/components/_float.scss +0 -27
  62. data/_sass/foundation/components/_label.scss +0 -55
  63. data/_sass/foundation/components/_media-object.scss +0 -115
  64. data/_sass/foundation/components/_menu-icon.scss +0 -9
  65. data/_sass/foundation/components/_menu.scss +0 -314
  66. data/_sass/foundation/components/_off-canvas.scss +0 -177
  67. data/_sass/foundation/components/_orbit.scss +0 -193
  68. data/_sass/foundation/components/_pagination.scss +0 -162
  69. data/_sass/foundation/components/_progress-bar.scss +0 -64
  70. data/_sass/foundation/components/_reveal.scss +0 -172
  71. data/_sass/foundation/components/_slider.scss +0 -133
  72. data/_sass/foundation/components/_sticky.scss +0 -38
  73. data/_sass/foundation/components/_switch.scss +0 -232
  74. data/_sass/foundation/components/_table.scss +0 -234
  75. data/_sass/foundation/components/_tabs.scss +0 -165
  76. data/_sass/foundation/components/_thumbnail.scss +0 -54
  77. data/_sass/foundation/components/_title-bar.scss +0 -89
  78. data/_sass/foundation/components/_tooltip.scss +0 -104
  79. data/_sass/foundation/components/_top-bar.scss +0 -168
  80. data/_sass/foundation/components/_visibility.scss +0 -132
  81. data/_sass/foundation/forms/_checkbox.scss +0 -40
  82. data/_sass/foundation/forms/_error.scss +0 -84
  83. data/_sass/foundation/forms/_fieldset.scss +0 -54
  84. data/_sass/foundation/forms/_forms.scss +0 -34
  85. data/_sass/foundation/forms/_help-text.scss +0 -30
  86. data/_sass/foundation/forms/_input-group.scss +0 -128
  87. data/_sass/foundation/forms/_label.scss +0 -48
  88. data/_sass/foundation/forms/_meter.scss +0 -109
  89. data/_sass/foundation/forms/_progress.scss +0 -85
  90. data/_sass/foundation/forms/_range.scss +0 -144
  91. data/_sass/foundation/forms/_select.scss +0 -67
  92. data/_sass/foundation/forms/_text.scss +0 -163
  93. data/_sass/foundation/foundation.scss +0 -102
  94. data/_sass/foundation/grid/_classes.scss +0 -151
  95. data/_sass/foundation/grid/_column.scss +0 -126
  96. data/_sass/foundation/grid/_flex-grid.scss +0 -274
  97. data/_sass/foundation/grid/_grid.scss +0 -60
  98. data/_sass/foundation/grid/_gutter.scss +0 -34
  99. data/_sass/foundation/grid/_layout.scss +0 -51
  100. data/_sass/foundation/grid/_position.scss +0 -73
  101. data/_sass/foundation/grid/_row.scss +0 -95
  102. data/_sass/foundation/grid/_size.scss +0 -24
  103. data/_sass/foundation/settings/_settings.scss +0 -567
  104. data/_sass/foundation/typography/_alignment.scss +0 -22
  105. data/_sass/foundation/typography/_base.scss +0 -443
  106. data/_sass/foundation/typography/_helpers.scss +0 -77
  107. data/_sass/foundation/typography/_print.scss +0 -77
  108. data/_sass/foundation/typography/_typography.scss +0 -28
  109. data/_sass/foundation/util/_breakpoint.scss +0 -275
  110. data/_sass/foundation/util/_color.scss +0 -60
  111. data/_sass/foundation/util/_flex.scss +0 -68
  112. data/_sass/foundation/util/_mixins.scss +0 -235
  113. data/_sass/foundation/util/_selector.scss +0 -40
  114. data/_sass/foundation/util/_unit.scss +0 -90
  115. data/_sass/foundation/util/_util.scss +0 -11
  116. data/_sass/foundation/util/_value.scss +0 -107
  117. data/_sass/jquery-ui.scss +0 -1311
  118. data/_sass/main.scss +0 -41
  119. data/_sass/minima.scss +0 -51
  120. data/_sass/minima/_base.scss +0 -254
  121. data/_sass/minima/_layout.scss +0 -255
  122. data/_sass/minima/_syntax-highlighting.scss +0 -71
  123. data/_sass/scroll-top.scss +0 -31
  124. data/assets/js/common-libs.min.js +0 -1
  125. data/assets/js/custom.min.js +0 -1
  126. data/assets/snippet/profile.html +0 -19
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <div>
3
+ <strong>{{ item.label }}</strong>
4
+ <em>{{ item.value }}</em>
5
+ </div>
6
+ </template>
7
+
8
+ <script>
9
+ export default {
10
+ props: {
11
+ item: { required: true },
12
+ searchText: { required: true }
13
+ }
14
+ }
15
+ </script>
16
+
17
+ <style lang="scss" scoped>
18
+ @import 'settings';
19
+
20
+ strong {
21
+ display: block;
22
+ }
23
+
24
+ em {
25
+ color: $dark-gray;
26
+ }
27
+ </style>
28
+
29
+
@@ -0,0 +1,14 @@
1
+ import Vue from 'vue';
2
+ import Autocomplete from 'v-autocomplete';
3
+ import VueResource from 'vue-resource';
4
+ import SiteSearch from './SiteSearch.vue';
5
+
6
+ Vue.use(Autocomplete);
7
+ Vue.use(VueResource);
8
+
9
+ const appFactory = (el, attrs) => {
10
+ // Bootstrap Vue.js.
11
+ new Vue({el, render: h => h(SiteSearch, {attrs})});
12
+ };
13
+
14
+ export default appFactory;
@@ -0,0 +1,52 @@
1
+ import { foundation } from 'foundation-sites/js/foundation.core';
2
+
3
+ import 'foundation-sites/js/foundation.util.mediaQuery';
4
+ import 'foundation-sites/js/foundation.util.motion';
5
+ import 'foundation-sites/js/foundation.util.keyboard';
6
+
7
+ import 'foundation-sites/js/foundation.accordion';
8
+ import 'foundation-sites/js/foundation.interchange';
9
+ import 'foundation-sites/js/foundation.responsiveMenu';
10
+ import 'foundation-sites/js/foundation.responsiveToggle';
11
+
12
+ Foundation.Interchange.SPECIAL_QUERIES['medium down'] = 'screen and (max-width: 63.9375em)';
13
+
14
+
15
+ import Apps from './apps';
16
+
17
+ /**
18
+ * Bootstrap Vue.js application at given Element instance.
19
+ *
20
+ * App properties are passed via data attributes, like:
21
+ *
22
+ * <div class="__vue-root" data-message="Hello" data-app="SomeApp"></div>
23
+ *
24
+ * @param {Element} el DOM Element
25
+ */
26
+ function renderVueAppElement(el) {
27
+ const attrs = {...el.dataset};
28
+
29
+ if (! attrs.app) {
30
+ console.warn(el, 'Cannot bootstrap: missing data-app');
31
+ return;
32
+ }
33
+
34
+ const app = Apps[attrs.app];
35
+
36
+ if (! app) {
37
+ console.warn(el, `Cannot bootstrap: unknown app ${attrs.app}`);
38
+ return;
39
+ }
40
+
41
+ return app(el, attrs);
42
+ }
43
+
44
+ function init(event) {
45
+ // Initialize Foundation, jQuery is exposed automatically from webpack.
46
+ $(document).foundation();
47
+
48
+ // Initialize Vue.js apps.
49
+ document.querySelectorAll('.__vue-root').forEach(renderVueAppElement);
50
+ }
51
+
52
+ document.addEventListener('DOMContentLoaded', init);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-pirati
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jitka Novotná
@@ -60,6 +60,7 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - README.md
63
+ - _data/menu.yml
63
64
  - _includes/accordeon/accordeon-column.html
64
65
  - _includes/accordeon/accordeon.html
65
66
  - _includes/articles/featured_article.html
@@ -79,15 +80,8 @@ files:
79
80
  - _includes/icon-github.svg
80
81
  - _includes/icon-twitter.html
81
82
  - _includes/icon-twitter.svg
82
- - _includes/js/custom.js
83
- - _includes/js/fb.js
84
83
  - _includes/js/main.html
85
- - _includes/js/piwik.js
86
- - _includes/js/tw.js
87
84
  - _includes/menu.html
88
- - _includes/people/item.html
89
- - _includes/people/list-2col.html
90
- - _includes/people/list-group.html
91
85
  - _includes/people/list_2col.html
92
86
  - _includes/people/list_group.html
93
87
  - _includes/people/profile_badge.html
@@ -111,7 +105,6 @@ files:
111
105
  - _includes/right-bar/rbar_profiles.html
112
106
  - _includes/social.html
113
107
  - _includes/submenu.html
114
- - _includes/title/title_header.html
115
108
  - _layouts/blank.html
116
109
  - _layouts/compress.html
117
110
  - _layouts/contacts.html
@@ -142,98 +135,19 @@ files:
142
135
  - _sass/components/pagination.scss
143
136
  - _sass/components/pripoj-se.scss
144
137
  - _sass/components/program.scss
145
- - _sass/components/scroll-top.scss
146
138
  - _sass/components/simple-accordion.scss
147
139
  - _sass/components/tag.scss
148
140
  - _sass/components/top-bar.scss
149
141
  - _sass/components/top-sub-nav.scss
150
142
  - _sass/components/vertical-navigation.scss
151
- - _sass/components/welcome-header.scss
152
143
  - _sass/components/widget-accordion.scss
153
144
  - _sass/components/widget-share-box.scss
154
145
  - _sass/components/widget-simple-text.scss
155
- - _sass/foundation/_global.scss
156
- - _sass/foundation/components/_accordion-menu.scss
157
- - _sass/foundation/components/_accordion.scss
158
- - _sass/foundation/components/_badge.scss
159
- - _sass/foundation/components/_breadcrumbs.scss
160
- - _sass/foundation/components/_button-group.scss
161
- - _sass/foundation/components/_button.scss
162
- - _sass/foundation/components/_callout.scss
163
- - _sass/foundation/components/_close-button.scss
164
- - _sass/foundation/components/_drilldown.scss
165
- - _sass/foundation/components/_dropdown-menu.scss
166
- - _sass/foundation/components/_dropdown.scss
167
- - _sass/foundation/components/_flex-video.scss
168
- - _sass/foundation/components/_flex.scss
169
- - _sass/foundation/components/_float.scss
170
- - _sass/foundation/components/_label.scss
171
- - _sass/foundation/components/_media-object.scss
172
- - _sass/foundation/components/_menu-icon.scss
173
- - _sass/foundation/components/_menu.scss
174
- - _sass/foundation/components/_off-canvas.scss
175
- - _sass/foundation/components/_orbit.scss
176
- - _sass/foundation/components/_pagination.scss
177
- - _sass/foundation/components/_progress-bar.scss
178
- - _sass/foundation/components/_reveal.scss
179
- - _sass/foundation/components/_slider.scss
180
- - _sass/foundation/components/_sticky.scss
181
- - _sass/foundation/components/_switch.scss
182
- - _sass/foundation/components/_table.scss
183
- - _sass/foundation/components/_tabs.scss
184
- - _sass/foundation/components/_thumbnail.scss
185
- - _sass/foundation/components/_title-bar.scss
186
- - _sass/foundation/components/_tooltip.scss
187
- - _sass/foundation/components/_top-bar.scss
188
- - _sass/foundation/components/_visibility.scss
189
- - _sass/foundation/forms/_checkbox.scss
190
- - _sass/foundation/forms/_error.scss
191
- - _sass/foundation/forms/_fieldset.scss
192
- - _sass/foundation/forms/_forms.scss
193
- - _sass/foundation/forms/_help-text.scss
194
- - _sass/foundation/forms/_input-group.scss
195
- - _sass/foundation/forms/_label.scss
196
- - _sass/foundation/forms/_meter.scss
197
- - _sass/foundation/forms/_progress.scss
198
- - _sass/foundation/forms/_range.scss
199
- - _sass/foundation/forms/_select.scss
200
- - _sass/foundation/forms/_text.scss
201
- - _sass/foundation/foundation.scss
202
- - _sass/foundation/grid/_classes.scss
203
- - _sass/foundation/grid/_column.scss
204
- - _sass/foundation/grid/_flex-grid.scss
205
- - _sass/foundation/grid/_grid.scss
206
- - _sass/foundation/grid/_gutter.scss
207
- - _sass/foundation/grid/_layout.scss
208
- - _sass/foundation/grid/_position.scss
209
- - _sass/foundation/grid/_row.scss
210
- - _sass/foundation/grid/_size.scss
211
- - _sass/foundation/settings/_settings.scss
212
- - _sass/foundation/typography/_alignment.scss
213
- - _sass/foundation/typography/_base.scss
214
- - _sass/foundation/typography/_helpers.scss
215
- - _sass/foundation/typography/_print.scss
216
- - _sass/foundation/typography/_typography.scss
217
- - _sass/foundation/util/_breakpoint.scss
218
- - _sass/foundation/util/_color.scss
219
- - _sass/foundation/util/_flex.scss
220
- - _sass/foundation/util/_mixins.scss
221
- - _sass/foundation/util/_selector.scss
222
- - _sass/foundation/util/_unit.scss
223
- - _sass/foundation/util/_util.scss
224
- - _sass/foundation/util/_value.scss
225
- - _sass/jquery-ui.scss
226
146
  - _sass/layouts/_cast.scss
227
147
  - _sass/layouts/_kandidatka.scss
228
- - _sass/main.scss
229
- - _sass/minima.scss
230
- - _sass/minima/_base.scss
231
- - _sass/minima/_layout.scss
232
- - _sass/minima/_syntax-highlighting.scss
233
148
  - _sass/objects/media.scss
234
149
  - _sass/objects/section.scss
235
150
  - _sass/objects/space.scss
236
- - _sass/scroll-top.scss
237
151
  - _sass/utilities/utilities.scss
238
152
  - assets/css/main.scss
239
153
  - assets/favicon/apple-touch-icon-114x114.png
@@ -302,11 +216,15 @@ files:
302
216
  - assets/img/posts/obrazek.u.tohoto.postu.jpg
303
217
  - assets/img/tiles/lightGrey.png
304
218
  - assets/img/tiles/tableOfContent.png
305
- - assets/js/common-libs.min.js
306
- - assets/js/custom.min.js
219
+ - assets/js/apps.js
220
+ - assets/js/apps/scroll-top/ScrollTop.vue
221
+ - assets/js/apps/scroll-top/index.js
222
+ - assets/js/apps/site-search/SiteSearch.vue
223
+ - assets/js/apps/site-search/SiteSearchItemTemplate.vue
224
+ - assets/js/apps/site-search/index.js
225
+ - assets/js/index.js
307
226
  - assets/people/piratska-strana.png
308
227
  - assets/people/ppp.jpg
309
- - assets/snippet/profile.html
310
228
  homepage: http://www.pirati.cz
311
229
  licenses:
312
230
  - MIT
@@ -1,245 +0,0 @@
1
- Foundation.Interchange.SPECIAL_QUERIES['medium down'] = 'screen and (max-width: 63.9375em)';
2
- $(document).foundation();
3
- $(document).on('replaced.zf.interchange', function(e)
4
- {
5
- $(this).foundation();
6
- });
7
- $("button[data-toggle]").on("click", function()
8
- {
9
- if ($(this).parent().hasClass("js-button-toggled"))
10
- {
11
- $(this).parent().removeClass("js-button-toggled");
12
- }
13
- else
14
- {
15
- $(this).parent().addClass("js-button-toggled");
16
- }
17
- });
18
- window.onload = function() {};
19
-
20
- /**
21
- * Choice n random items from collection
22
- * @param {collection} data - collection
23
- * @param {integer} n -number of choicen
24
- **/
25
- var choice_n_random = function(data, n) {
26
- n = (typeof n !== 'undefined') ? n : 3;
27
- var choice = [];
28
- while(true) {
29
- var value = data[Math.floor(Math.random()*data.length)];
30
- if(value.description) {
31
- choice.push(value);
32
- if(choice.length == n) {
33
- break;
34
- }
35
- }
36
- }
37
- return choice;
38
- };
39
-
40
- /**
41
- * Choice one person by uid
42
- * @param {collection} data
43
- * @param {string} uid
44
- **/
45
- var choice_person = function(data, uid, role) {
46
- role = (typeof role !== 'undefined') ? role : null;
47
- var person = null;
48
- var result = null;
49
- $.each(data, function(index, person){
50
- if(person.uid==uid) {
51
- result=person;
52
- result['role'] = role;
53
- return;
54
- }
55
- });
56
- if(result) {
57
- return [result];
58
- } else {
59
- return [{'name': uid, 'role': role}];
60
- }
61
- }
62
-
63
- /** @param {collection} data **/
64
- var choice_garant = function(data) { return choice_person(data, page_garant, 'garant'); };
65
- /** @param {collection} data **/
66
- var choice_leader = function(data) { return choice_person(data, page_leader, 'vedoucí týmu'); };
67
- /** @param {collection} data **/
68
- var choice_contact= function(data) { return choice_person(data, page_contact, 'kontaktní osoba'); };
69
-
70
- /**
71
- * Show people in the #people
72
- * @param {collection} data
73
- * @param {callback} who
74
- * @param {string} where - #id
75
- **/
76
- var show_people = function(data, who, where) {
77
- if(where.length) { /* Only if proper div exists */
78
- choice = who(data);
79
- $.get(snippet_profile, function (template) {
80
- var template=Handlebars.compile(template);
81
- $.each(choice, function(index, value) {
82
- var html = template(value);
83
- $(where).append(html);
84
- });
85
- }, 'html')
86
- }
87
- }
88
-
89
- /**
90
- * @param {collection} data
91
- **/
92
- var search = function(data) {
93
- $("#searchsub").click(function() {
94
- var exp = search.val();
95
- var url = "https://www.google.cz/?q=inurl:pirati.cz+" + exp;
96
- window.location.href = url;
97
- });
98
- $("#search").autocomplete({
99
- source: data,
100
- select: function( event, ui ) {
101
- window.location.href = ui.item.value;
102
- }
103
- });
104
- }
105
-
106
- var back_top = function() {
107
- $(window).scroll(function() {
108
- if ($(this).scrollTop() > 50 ) {
109
- $('.scrolltop:hidden').stop(true, true).fadeIn();
110
- } else {
111
- $('.scrolltop').stop(true, true).fadeOut();
112
- }
113
- });
114
- $(function(){
115
- $(".scroll").click(function(){
116
- $("html,body").animate(
117
- {scrollTop: $(".thetop").offset().top}, "1000");
118
- return false
119
- }
120
- )});
121
- }
122
-
123
- /**
124
- * @param {collection} data
125
- **/
126
- var show_relatives = function(data) {
127
- var ul = $("#relatives");
128
- if(ul.length) {
129
- var global_tags = data[0];
130
-
131
- if(!page_tags.length) {
132
- $('#relatives-box').hide();
133
- }
134
-
135
- $.each(page_tags, function(index, tag) {
136
- $.each(global_tags[tag], function(index, post) {
137
- if(post.url != page_url) {
138
- var li = $('<li/>').appendTo(ul);
139
- var a = $('<a/>').text(post.title).attr('href',post.url).appendTo(li);
140
- }
141
- });
142
- });
143
- }
144
- }
145
-
146
- /**
147
- * Make map of czech regions for pirati.cz/regiony
148
- * @param {collection} data
149
- **/
150
- var makemap = function(data) {
151
- var settings = data[0].settings;
152
-
153
- $(settings.id).width(settings.size.width);
154
- $(settings.id).height(settings.size.height);
155
- var R = Raphael(settings.id, settings.size.width, settings.size.height);
156
-
157
- $("#region-description>div").hide();
158
-
159
- var marked = null;
160
- var i = 0;
161
- var reg_list = $('#regions-list');
162
- var reg_list2 = $('#regions-list-2');
163
-
164
- var regions = data[0].regions;
165
- $.each(regions, function(index, region) {
166
- if(i < 7 ) {
167
- var li = $('<li/>').appendTo(reg_list);
168
- var span = $('<a/>').text(region.name).attr('href',region.url).appendTo(li);
169
- } else {
170
- var li2 = $('<li/>').appendTo(reg_list2);
171
- var span2 = $('<a/>').text(region.name).attr('href',region.url).appendTo(li2);
172
- }
173
- i++;
174
-
175
- var custom_attrs = {"title": region.name};
176
- var attrs = $.extend(settings.region_attrs, custom_attrs);
177
-
178
- if(settings.colors) {
179
- region.color = Raphael.getColor();
180
- } else {
181
- region.color = "#666";
182
- }
183
- var path_def = null;
184
- var reg_id = region.id;
185
-
186
- $.each(region.paths, function(index, path) {
187
- path = R.path(path).scale(
188
- settings.size.scale,
189
- settings.size.scale,
190
- 0,0).attr(attrs);
191
-
192
- var click = function() {
193
- window.open(region.url);
194
- };
195
- var dblclick = function() {
196
- window.open(region.url);
197
- };
198
- var over = function() {
199
- path.animate({fill: region.color}, 500).attr({'cursor': "pointer"});
200
- };
201
- var out = function() {
202
- path.animate({fill: "#333"}, 500);
203
- };
204
-
205
- path[0].onclick = click;
206
- path[0].ondblclick = dblclick;
207
- path[0].onmouseover = over;
208
- path[0].onmouseout = out;
209
- });
210
- });
211
- };
212
-
213
- $(function() {
214
- /* Search */
215
- $.get(api_search)
216
- .done(search)
217
- .fail(function(data) { console.log('Error in search:', data); });
218
-
219
- /* Back to top */
220
- back_top();
221
-
222
- /* People and garant */
223
- $.get(api_people)
224
- .done(function(data) {
225
- show_people(data, choice_n_random, $('#people'));
226
- show_people(data, choice_garant, $('#garant'));
227
- show_people(data, choice_leader, $('#leader'));
228
- show_people(data, choice_contact, $('#contact'));
229
- })
230
- .fail(function(data) { console.log('Error in relatives articles:', data); });
231
-
232
- /* Relatives */
233
- if($("#relatives").length) {
234
- $.get(api_tags)
235
- .done(function(data) { show_relatives(data) })
236
- .fail(function(data) { console.log('Error in relatives articles:', data); });
237
- }
238
-
239
- /* Regions */
240
- if($('#regions-map').length) {
241
- $.get(api_regions)
242
- .done(function(data) { makemap(data); })
243
- .fail(function(data) { console.log("Error: map"); });
244
- }
245
- });