365 lines
11 KiB
JavaScript
365 lines
11 KiB
JavaScript
|
|
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
|
|
import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, v as validate_slots, c as validate_store, e as component_subscribe, o as onMount, g as globals, h as empty, n as noop, j as detach_dev, C as binding_callbacks, k as element, l as space, t as text, p as attr_dev, m as add_location, q as src_url_equal, D as set_style, u as append_dev, w as set_data_dev } from './index-42a25c61.js';
|
|
import { loadLocaleContent } from '../../../../../../../../../js/libraries/serverTools.js';
|
|
import { w as writable } from './index-a1c185ea.js';
|
|
|
|
/* src\landing-component.svelte generated by Svelte v3.52.0 */
|
|
|
|
const { Object: Object_1 } = globals;
|
|
const file = "src\\landing-component.svelte";
|
|
|
|
// (36:4) {#if Object.keys($content).length!=0}
|
|
function create_if_block(ctx) {
|
|
let div5;
|
|
let picture;
|
|
let source0;
|
|
let t0;
|
|
let source1;
|
|
let t1;
|
|
let img0;
|
|
let t2;
|
|
let div4;
|
|
let p0;
|
|
let t3_value = /*$content*/ ctx[2].top + "";
|
|
let t3;
|
|
let t4;
|
|
let div3;
|
|
let div0;
|
|
let h20;
|
|
let t5_value = /*$content*/ ctx[2].groupsTitle + "";
|
|
let t5;
|
|
let t6;
|
|
let img1;
|
|
let img1_src_value;
|
|
let t7;
|
|
let p1;
|
|
let t8_value = /*$content*/ ctx[2].groupsText + "";
|
|
let t8;
|
|
let t9;
|
|
let div1;
|
|
let h21;
|
|
let t10_value = /*$content*/ ctx[2].communitiesTitle + "";
|
|
let t10;
|
|
let t11;
|
|
let img2;
|
|
let img2_src_value;
|
|
let t12;
|
|
let p2;
|
|
let t13_value = /*$content*/ ctx[2].communitiesText + "";
|
|
let t13;
|
|
let t14;
|
|
let div2;
|
|
let h22;
|
|
let t15_value = /*$content*/ ctx[2].cooperativesTitle + "";
|
|
let t15;
|
|
let t16;
|
|
let img3;
|
|
let img3_src_value;
|
|
let t17;
|
|
let p3;
|
|
let t18_value = /*$content*/ ctx[2].cooperativesText + "";
|
|
let t18;
|
|
|
|
const block = {
|
|
c: function create() {
|
|
div5 = element("div");
|
|
picture = element("picture");
|
|
source0 = element("source");
|
|
t0 = space();
|
|
source1 = element("source");
|
|
t1 = space();
|
|
img0 = element("img");
|
|
t2 = space();
|
|
div4 = element("div");
|
|
p0 = element("p");
|
|
t3 = text(t3_value);
|
|
t4 = space();
|
|
div3 = element("div");
|
|
div0 = element("div");
|
|
h20 = element("h2");
|
|
t5 = text(t5_value);
|
|
t6 = space();
|
|
img1 = element("img");
|
|
t7 = space();
|
|
p1 = element("p");
|
|
t8 = text(t8_value);
|
|
t9 = space();
|
|
div1 = element("div");
|
|
h21 = element("h2");
|
|
t10 = text(t10_value);
|
|
t11 = space();
|
|
img2 = element("img");
|
|
t12 = space();
|
|
p2 = element("p");
|
|
t13 = text(t13_value);
|
|
t14 = space();
|
|
div2 = element("div");
|
|
h22 = element("h2");
|
|
t15 = text(t15_value);
|
|
t16 = space();
|
|
img3 = element("img");
|
|
t17 = space();
|
|
p3 = element("p");
|
|
t18 = text(t18_value);
|
|
attr_dev(source0, "srcset", "/img/crowd.webp");
|
|
add_location(source0, file, 38, 16, 855);
|
|
attr_dev(source1, "srcset", "/img/crowd.png");
|
|
add_location(source1, file, 39, 16, 906);
|
|
attr_dev(img0, "id", "crowd");
|
|
attr_dev(img0, "alt", "crowd");
|
|
add_location(img0, file, 40, 16, 956);
|
|
add_location(picture, file, 37, 12, 828);
|
|
add_location(p0, file, 44, 16, 1079);
|
|
add_location(h20, file, 47, 24, 1247);
|
|
attr_dev(img1, "id", "groups-img");
|
|
if (!src_url_equal(img1.src, img1_src_value = "/img/common/groups.svg")) attr_dev(img1, "src", img1_src_value);
|
|
attr_dev(img1, "alt", "groups");
|
|
add_location(img1, file, 48, 24, 1304);
|
|
add_location(p1, file, 49, 24, 1393);
|
|
add_location(div0, file, 46, 20, 1216);
|
|
add_location(h21, file, 52, 24, 1502);
|
|
attr_dev(img2, "id", "communities-img");
|
|
if (!src_url_equal(img2.src, img2_src_value = "/img/common/communities.svg")) attr_dev(img2, "src", img2_src_value);
|
|
attr_dev(img2, "alt", "communities");
|
|
add_location(img2, file, 53, 24, 1564);
|
|
add_location(p2, file, 54, 24, 1668);
|
|
add_location(div1, file, 51, 20, 1471);
|
|
add_location(h22, file, 57, 24, 1782);
|
|
attr_dev(img3, "id", "coops-img");
|
|
if (!src_url_equal(img3.src, img3_src_value = "/img/common/coops.svg")) attr_dev(img3, "src", img3_src_value);
|
|
attr_dev(img3, "alt", "coops");
|
|
add_location(img3, file, 58, 24, 1845);
|
|
add_location(p3, file, 59, 24, 1931);
|
|
add_location(div2, file, 56, 20, 1751);
|
|
attr_dev(div3, "id", "container-grid");
|
|
set_style(div3, "--grid-width", /*gridWidth*/ ctx[1]);
|
|
add_location(div3, file, 45, 16, 1118);
|
|
attr_dev(div4, "id", "text-container");
|
|
add_location(div4, file, 43, 12, 1036);
|
|
attr_dev(div5, "id", "container");
|
|
add_location(div5, file, 36, 8, 794);
|
|
},
|
|
m: function mount(target, anchor) {
|
|
insert_dev(target, div5, anchor);
|
|
append_dev(div5, picture);
|
|
append_dev(picture, source0);
|
|
append_dev(picture, t0);
|
|
append_dev(picture, source1);
|
|
append_dev(picture, t1);
|
|
append_dev(picture, img0);
|
|
append_dev(div5, t2);
|
|
append_dev(div5, div4);
|
|
append_dev(div4, p0);
|
|
append_dev(p0, t3);
|
|
append_dev(div4, t4);
|
|
append_dev(div4, div3);
|
|
append_dev(div3, div0);
|
|
append_dev(div0, h20);
|
|
append_dev(h20, t5);
|
|
append_dev(div0, t6);
|
|
append_dev(div0, img1);
|
|
append_dev(div0, t7);
|
|
append_dev(div0, p1);
|
|
append_dev(p1, t8);
|
|
append_dev(div3, t9);
|
|
append_dev(div3, div1);
|
|
append_dev(div1, h21);
|
|
append_dev(h21, t10);
|
|
append_dev(div1, t11);
|
|
append_dev(div1, img2);
|
|
append_dev(div1, t12);
|
|
append_dev(div1, p2);
|
|
append_dev(p2, t13);
|
|
append_dev(div3, t14);
|
|
append_dev(div3, div2);
|
|
append_dev(div2, h22);
|
|
append_dev(h22, t15);
|
|
append_dev(div2, t16);
|
|
append_dev(div2, img3);
|
|
append_dev(div2, t17);
|
|
append_dev(div2, p3);
|
|
append_dev(p3, t18);
|
|
/*div3_binding*/ ctx[5](div3);
|
|
},
|
|
p: function update(ctx, dirty) {
|
|
if (dirty & /*$content*/ 4 && t3_value !== (t3_value = /*$content*/ ctx[2].top + "")) set_data_dev(t3, t3_value);
|
|
if (dirty & /*$content*/ 4 && t5_value !== (t5_value = /*$content*/ ctx[2].groupsTitle + "")) set_data_dev(t5, t5_value);
|
|
if (dirty & /*$content*/ 4 && t8_value !== (t8_value = /*$content*/ ctx[2].groupsText + "")) set_data_dev(t8, t8_value);
|
|
if (dirty & /*$content*/ 4 && t10_value !== (t10_value = /*$content*/ ctx[2].communitiesTitle + "")) set_data_dev(t10, t10_value);
|
|
if (dirty & /*$content*/ 4 && t13_value !== (t13_value = /*$content*/ ctx[2].communitiesText + "")) set_data_dev(t13, t13_value);
|
|
if (dirty & /*$content*/ 4 && t15_value !== (t15_value = /*$content*/ ctx[2].cooperativesTitle + "")) set_data_dev(t15, t15_value);
|
|
if (dirty & /*$content*/ 4 && t18_value !== (t18_value = /*$content*/ ctx[2].cooperativesText + "")) set_data_dev(t18, t18_value);
|
|
|
|
if (dirty & /*gridWidth*/ 2) {
|
|
set_style(div3, "--grid-width", /*gridWidth*/ ctx[1]);
|
|
}
|
|
},
|
|
d: function destroy(detaching) {
|
|
if (detaching) detach_dev(div5);
|
|
/*div3_binding*/ ctx[5](null);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_if_block.name,
|
|
type: "if",
|
|
source: "(36:4) {#if Object.keys($content).length!=0}",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function create_fragment(ctx) {
|
|
let show_if = Object.keys(/*$content*/ ctx[2]).length != 0;
|
|
let if_block_anchor;
|
|
let if_block = show_if && create_if_block(ctx);
|
|
|
|
const block = {
|
|
c: function create() {
|
|
if (if_block) if_block.c();
|
|
if_block_anchor = empty();
|
|
this.c = noop;
|
|
},
|
|
l: function claim(nodes) {
|
|
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
|
},
|
|
m: function mount(target, anchor) {
|
|
if (if_block) if_block.m(target, anchor);
|
|
insert_dev(target, if_block_anchor, anchor);
|
|
},
|
|
p: function update(ctx, [dirty]) {
|
|
if (dirty & /*$content*/ 4) show_if = Object.keys(/*$content*/ ctx[2]).length != 0;
|
|
|
|
if (show_if) {
|
|
if (if_block) {
|
|
if_block.p(ctx, dirty);
|
|
} else {
|
|
if_block = create_if_block(ctx);
|
|
if_block.c();
|
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
}
|
|
} else if (if_block) {
|
|
if_block.d(1);
|
|
if_block = null;
|
|
}
|
|
},
|
|
i: noop,
|
|
o: noop,
|
|
d: function destroy(detaching) {
|
|
if (if_block) if_block.d(detaching);
|
|
if (detaching) detach_dev(if_block_anchor);
|
|
}
|
|
};
|
|
|
|
dispatch_dev("SvelteRegisterBlock", {
|
|
block,
|
|
id: create_fragment.name,
|
|
type: "component",
|
|
source: "",
|
|
ctx
|
|
});
|
|
|
|
return block;
|
|
}
|
|
|
|
function instance($$self, $$props, $$invalidate) {
|
|
let $content;
|
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
validate_slots('landing-component', slots, []);
|
|
let grid;
|
|
let gridWidth;
|
|
let loaded;
|
|
let content = writable({});
|
|
validate_store(content, 'content');
|
|
component_subscribe($$self, content, value => $$invalidate(2, $content = value));
|
|
|
|
function changeWidth(locale) {
|
|
if (locale == "ru") {
|
|
$$invalidate(1, gridWidth = "1.2fr 1.05fr 1fr");
|
|
} else {
|
|
$$invalidate(1, gridWidth = "1.2fr 1.1fr 1fr");
|
|
}
|
|
}
|
|
|
|
let locale = loadLocaleContent(content, "landing-component", loaded, changeWidth);
|
|
changeWidth(locale);
|
|
|
|
onMount(() => {
|
|
|
|
});
|
|
|
|
const writable_props = [];
|
|
|
|
Object_1.keys($$props).forEach(key => {
|
|
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<landing-component> was created with unknown prop '${key}'`);
|
|
});
|
|
|
|
function div3_binding($$value) {
|
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
grid = $$value;
|
|
$$invalidate(0, grid);
|
|
});
|
|
}
|
|
|
|
$$self.$capture_state = () => ({
|
|
onMount,
|
|
loadLocaleContent,
|
|
writable,
|
|
grid,
|
|
gridWidth,
|
|
loaded,
|
|
content,
|
|
changeWidth,
|
|
locale,
|
|
$content
|
|
});
|
|
|
|
$$self.$inject_state = $$props => {
|
|
if ('grid' in $$props) $$invalidate(0, grid = $$props.grid);
|
|
if ('gridWidth' in $$props) $$invalidate(1, gridWidth = $$props.gridWidth);
|
|
if ('loaded' in $$props) $$invalidate(3, loaded = $$props.loaded);
|
|
if ('content' in $$props) $$invalidate(4, content = $$props.content);
|
|
if ('locale' in $$props) locale = $$props.locale;
|
|
};
|
|
|
|
if ($$props && "$$inject" in $$props) {
|
|
$$self.$inject_state($$props.$$inject);
|
|
}
|
|
|
|
return [grid, gridWidth, $content, loaded, content, div3_binding];
|
|
}
|
|
|
|
class Landing_component extends SvelteElement {
|
|
constructor(options) {
|
|
super();
|
|
this.shadowRoot.innerHTML = `<style>@import '/css/common.css';#container-grid>div>h2{text-align:center}#groups-img,#communities-img,#coops-img{position:absolute;left:50%;transform:translate(-50%);z-index:0;opacity:0.2;height:8rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}#crowd{width:100%;margin-bottom:2rem}#container{margin:auto;max-width:1000px;margin-top:2rem;margin-bottom:5rem}#container>div>p{margin-bottom:1rem}#container p{text-align:justify}#container-grid{display:grid;grid-template-columns:var(--grid-width);grid-gap:4rem;margin-top:2rem}#container-grid>div{position:relative}#container-grid>div>p{position:relative;margin-top:5rem;z-index:2}@media only screen and (max-width: 1060px){#container-grid{display:grid;grid-template-columns:1fr;grid-gap:2rem}}</style>`;
|
|
|
|
init(
|
|
this,
|
|
{
|
|
target: this.shadowRoot,
|
|
props: attribute_to_object(this.attributes),
|
|
customElement: true
|
|
},
|
|
instance,
|
|
create_fragment,
|
|
safe_not_equal,
|
|
{},
|
|
null
|
|
);
|
|
|
|
if (options) {
|
|
if (options.target) {
|
|
insert_dev(options.target, this, options.anchor);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
customElements.define("landing-component", Landing_component);
|
|
|
|
export { Landing_component as default };
|