Skip to content
Snippets Groups Projects
Select Git revision
  • 8bf5bc1608a38ac5322238adc97666bc2456cb2c
  • main default protected
  • demo protected
  • master
  • icon-set-mapping
  • production protected
  • revert-62666d1a
  • favorites-and-recent-files
  • lit2
  • wc-part
  • mark-downloaded-files
  • feature/annotpdf-test
  • fix-zip-upload
  • config-cleanup
  • wip
  • app-shell-update
16 results

dbp-signature-verification.js

Blame
  • dbp-signature-verification.js 2.00 KiB
    import {createI18nInstance} from './i18n.js';
    import {css, html} from 'lit-element';
    import {ScopedElementsMixin} from '@open-wc/scoped-elements';
    import DBPSignatureLitElement from "./dbp-signature-lit-element";
    import * as commonUtils from '@dbp-toolkit/common/utils';
    import * as commonStyles from '@dbp-toolkit/common/styles';
    
    const i18n = createI18nInstance();
    
    class SignatureVerification extends ScopedElementsMixin(DBPSignatureLitElement) {
        constructor() {
            super();
            this.lang = i18n.language;
        }
    
        static get scopedElements() {
            return { };
        }
    
        static get properties() {
            return this.getProperties({
                lang: { type: String },
            });
        }
    
        update(changedProperties) {
            changedProperties.forEach((oldValue, propName) => {
                switch (propName) {
                    case "lang":
                        i18n.changeLanguage(this.lang);
                        break;
                }
            });
    
            super.update(changedProperties);
        }
    
        static get styles() {
            // language=css
            return css`
                ${commonStyles.getThemeCSS()}
                ${commonStyles.getGeneralCSS(false)}
    
                a {
                    border-bottom: 1px solid rgba(0,0,0,0.3);
                    padding: 0;
                }
    
                a:hover {
                    color: #fff;
                    background-color: #000;
                }
    
                h2:first-child {
                    margin-top: 0;
                }
    
                h2 {
                    margin-bottom: 10px;
                }
            `;
        }
    
        render() {
            return html`
                <h2>${i18n.t('signature-verification-extern.headline')}</h2>
                <p>
                    ${i18n.t('signature-verification-extern.description-text')}
                </p>
                <a target="_blank" rel="noopener" href="https://www.signatur.rtr.at/${this.lang}/vd/Pruefung">${i18n.t('signature-verification-extern.link-label')}</a>.
            `;
        }
    }
    
    commonUtils.defineCustomElement('dbp-signature-verification', SignatureVerification);