Skip to content

Commit

Permalink
add gtm
Browse files Browse the repository at this point in the history
  • Loading branch information
martyanovandrey committed Apr 19, 2024
1 parent b45ffca commit 30234e8
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 27 deletions.
24 changes: 22 additions & 2 deletions docs/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7589,7 +7589,7 @@
}
.playground {
width: 1328px;
margin-top: 30px;
margin-top: 20px;
}
@media (max-width: 1328px) {
.playground {
Expand Down Expand Up @@ -24616,18 +24616,32 @@ span.CodeMirror-selectedtext {
width: 100%;
box-shadow: inset 0 -1px 0 var(--g-color-line-generic);
}
.header__tab {
height: 100%;
font-size: var(--g-text-body-2-font-size);
}
.header__tabs {
height: 100%;
}
.wrapper {
display: flex;
justify-content: space-between;
align-items: center;
gap: 30px;
height: 100%;
width: 1328px;
}
.wrapper > .g-tabs_direction_horizontal {
box-shadow: none;
}
.link {
outline: none;
}
.text {
font-size: var(--g-text-body-2-font-size);
}
.documentation {
margin-left: auto;
}

/* src/index.css */
.g-root {
Expand Down Expand Up @@ -28519,6 +28533,9 @@ h6 {
}

/* src/overrides.scss */
.g-root {
--g-tabs-item-height: 100%;
}
.g-root .pc-control-panel.pc-control-panel {
border-top: none;
}
Expand All @@ -28533,6 +28550,9 @@ h6 {
.g-root .pc-device-emulation-mobile__frame_device_mobile {
height: 100%;
}
.g-root .g-tabs__item-title {
font-size: var(--g-text-body-2-font-size);
}
/*! Bundled license information:

@gravity-ui/page-constructor/build/esm/grid/styles/bootstrap.css:
Expand Down
4 changes: 2 additions & 2 deletions docs/index.css.map

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-D84DCCD2');</script>
<!-- End Google Tag Manager -->
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<title>playground</title>
<link rel="stylesheet" type="text/css" href="/playground/index.css"/>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-D84DCCD2"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div id="app" class="app"></div>
<script src="index.js"></script>
</body>
Expand Down
39 changes: 19 additions & 20 deletions docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -334658,22 +334658,26 @@ sequenceDiagram
init_buffer2();
init_process2();
var import_jsx_runtime6 = __toESM2(require_jsx_runtime());
function Header2() {
function Header2({ activeTab, items, handleSetInputAreaTabActive }) {
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "header", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "wrapper", children: [
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Link2, { href: "/playground", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: "https://storage.yandexcloud.net/diplodoc-www-assets/navigation/diplodoc-logo.svg" }) }),
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Link2, { href: "https://diplodoc.com/docs/ru/", view: "primary", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text", children: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044F" }) })
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
Tabs,
{
className: "header__tabs",
activeTab,
items,
onSelectTab: handleSetInputAreaTabActive,
wrapTo: (item, node) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "header__tab", children: node })
}
),
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Link2, { href: "https://diplodoc.com/docs/ru/", view: "primary", className: "documentation", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text", children: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044F" }) })
] }) });
}
var Header_default2 = Header2;

// src/app/index.tsx
var import_jsx_runtime7 = __toESM2(require_jsx_runtime());
var App2 = () => {
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Header_default2, {}),
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Playground, { persistRestore: true })
] });
};
var mode = {
["SPLIT_VIEW" /* SPLIT */]: {
title: "Split view",
Expand All @@ -334688,7 +334692,7 @@ sequenceDiagram
node: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PageConstructorEditor_default, {})
}
};
function Playground(props) {
var App2 = () => {
const urlMode = restore("mode");
const [items, activeTab, handleSetInputAreaTabActive] = useTabs({
items: Object.entries(mode).map(([key5, value]) => ({
Expand All @@ -334697,18 +334701,13 @@ sequenceDiagram
})),
initial: mode[urlMode] ? urlMode : "SPLIT_VIEW" /* SPLIT */
});
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "playground", children: [
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
Tabs,
{
className: "tabs",
activeTab,
items,
onSelectTab: handleSetInputAreaTabActive
}
),
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "editor", children: mode[activeTab].node })
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Header_default2, { items, activeTab, handleSetInputAreaTabActive }),
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Playground, { persistRestore: true, children: mode[activeTab].node })
] });
};
function Playground({ children }) {
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "playground", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "editor", children }) });
}

// src/index.tsx
Expand Down
6 changes: 3 additions & 3 deletions docs/index.js.map

Large diffs are not rendered by default.

0 comments on commit 30234e8

Please sign in to comment.