40 | ${ut('oldVersionAlert', {
41 | latestVersion: latestVersion.number,
42 | currentVersion: this._currentVersion,
43 | latestVersionUrl: genCurrentUrlForVersion(latestVersion.number),
44 | })}
45 |
46 | `;
47 | }
48 | }
49 |
50 | OldVersionAlert.styles = [
51 | mdCss,
52 | alertCss,
53 | css`
54 | a {
55 | color: inherit;
56 | }
57 | `,
58 | ];
59 |
--------------------------------------------------------------------------------
/docs-src/src/components/OneTimeDonations.js:
--------------------------------------------------------------------------------
1 | import { LitElement, html, css } from 'lit-element';
2 | import { t } from '../directives/i18n';
3 | import liqpayIcon from '../assets/payment-options/liqpay.svg';
4 | import liqpayQrCode from '../assets/payment-options/liqpay-qrcode.png';
5 | import monoIcon from '../assets/payment-options/monobank.png';
6 | import monoQrCode from '../assets/payment-options/monobank-qrcode.svg';
7 |
8 | const PAYMENT_OPTIONS = {
9 | liqpay: {
10 | icon: liqpayIcon,
11 | image: liqpayQrCode
12 | },
13 | mono: {
14 | icon: monoIcon,
15 | image: monoQrCode,
16 | }
17 | };
18 | const PAYMENT_NAMES = Object.keys(PAYMENT_OPTIONS);
19 |
20 | function renderPaymentOption(name) {
21 | const option = PAYMENT_OPTIONS[name];
22 |
23 | if (!option) {
24 | console.warn(`Cannot find configuration for ${name} payment option`);
25 | return null;
26 | }
27 |
28 | let content;
29 |
30 | if (option.image) {
31 | content = html`
70 | ${interpolate(this._page.title)}
71 |
72 | ${this.content(this._page, this.vars)}
73 |
74 | ${this.nav && this.nav.length ? this._renderNav() : ''}
75 | `;
76 | }
77 | }
78 |
79 | Page.styles = [
80 | pageCss,
81 | mdCss,
82 | codeCss,
83 | css`
84 | :host {
85 | display: block;
86 | }
87 |
88 | app-page-nav {
89 | margin-top: 20px;
90 | }
91 | `
92 | ];
93 |
--------------------------------------------------------------------------------
/docs-src/src/components/PageNav.js:
--------------------------------------------------------------------------------
1 | import { LitElement, html, css } from 'lit-element';
2 |
3 | export default class PageNav extends LitElement {
4 | static cName = 'app-page-nav';
5 | static properties = {
6 | next: { type: Object },
7 | prev: { type: Object },
8 | pageType: { type: String }
9 | };
10 |
11 | constructor() {
12 | super();
13 | this.next = null;
14 | this.prev = null;
15 | this.pageType = 'page';
16 | }
17 |
18 | _linkTo(type) {
19 | const page = this[type];
20 |
21 | if (!page) {
22 | return '';
23 | }
24 |
25 | return html`
26 |