static: fix codemirror css not being loaded

This commit is contained in:
Jens Langhammer 2020-11-22 21:25:58 +01:00
parent 82dd597881
commit ed72595ae0
5 changed files with 17 additions and 15 deletions

View File

@ -6,12 +6,6 @@
{% load passbook_is_active %} {% load passbook_is_active %}
{% load passbook_utils %} {% load passbook_utils %}
{% block head %}
{{ block.super }}
<link rel="stylesheet" href="{% static 'node_modules/codemirror/lib/codemirror.css' %}">
<link rel="stylesheet" href="{% static 'node_modules/codemirror/theme/monokai.css' %}">
{% endblock %}
{% block page_content %} {% block page_content %}
<pb-sidebar class="pf-c-page__sidebar" brandLogo="{{ config.passbook.branding.logo }}" {% if config.passbook.branding.title_show %} brandTitle="{{ config.passbook.branding.title }}" {% endif %}> <pb-sidebar class="pf-c-page__sidebar" brandLogo="{{ config.passbook.branding.logo }}" {% if config.passbook.branding.title_show %} brandTitle="{{ config.passbook.branding.title }}" {% endif %}>
</pb-sidebar> </pb-sidebar>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -40,7 +40,11 @@ export class SidebarBrand extends LitElement {
render() { render() {
return html` <a href="#/" class="pf-c-page__header-brand-link"> return html` <a href="#/" class="pf-c-page__header-brand-link">
<div class="pf-c-brand pb-brand"> <div class="pf-c-brand pb-brand">
<img src="${this.brandLogo}" alt="passbook icon" /> <img
src="${this.brandLogo}"
alt="passbook icon"
loading="lazy"
/>
${this.brandTitle ? html`<span>${this.brandTitle}</span>` : ""} ${this.brandTitle ? html`<span>${this.brandTitle}</span>` : ""}
</div> </div>
</a>`; </a>`;

View File

@ -11,6 +11,10 @@ import PF from "@patternfly/patternfly/patternfly.css";
import PFAddons from "@patternfly/patternfly/patternfly-addons.css"; import PFAddons from "@patternfly/patternfly/patternfly-addons.css";
// @ts-ignore // @ts-ignore
import PBGlobal from "../../passbook/passbook.css"; import PBGlobal from "../../passbook/passbook.css";
// @ts-ignore
import CodeMirrorStyle from "codemirror/lib/codemirror.css";
// @ts-ignore
import CodeMirrorTheme from "codemirror/theme/monokai.css";
export interface Route { export interface Route {
url: RegExp; url: RegExp;
@ -39,7 +43,7 @@ export class RouterOutlet extends LitElement {
defaultUrl?: string; defaultUrl?: string;
static get styles() { static get styles() {
return [PF, PFAddons, PBGlobal]; return [PF, PFAddons, PBGlobal, CodeMirrorStyle, CodeMirrorTheme];
} }
constructor() { constructor() {