Import bootstrap CSS for docs

This commit is contained in:
nathan 2024-09-09 10:20:46 -06:00
parent 26b1431c31
commit c43681b57b
4 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,6 @@
EGroupware uses icons provided by [Bootrap Icons](icons.getbootstrap.com), as well as some of our own. You can add your
own images in as well.
```html:preview
<et2-image src="heart-fill"></et2-image>
```

View File

@ -13,6 +13,7 @@ import {Et2Widget} from "../Et2Widget/Et2Widget";
import {et2_IDetachedDOM} from "../et2_core_interfaces"; import {et2_IDetachedDOM} from "../et2_core_interfaces";
import {property} from "lit/decorators/property.js"; import {property} from "lit/decorators/property.js";
import {customElement} from "lit/decorators/custom-element.js"; import {customElement} from "lit/decorators/custom-element.js";
import "../../jsapi/egw_images.js";
@customElement("et2-image") @customElement("et2-image")
export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM
@ -198,7 +199,7 @@ export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM
{ {
return img_href; return img_href;
} }
let src = this.egw()?.image(img_href); let src = this.egw() && typeof this.egw().image == "function" ? this.egw()?.image(img_href) : "";
if(src) if(src)
{ {
return src; return src;

View File

@ -42,6 +42,7 @@
<link rel="stylesheet" href="{{ assetUrl('styles/etemplate2.css') }}" /> <link rel="stylesheet" href="{{ assetUrl('styles/etemplate2.css') }}" />
<!-- Breaks page scrolling <link rel="stylesheet" href="{{ assetUrl('styles/monochrome.css') }}" /> --> <!-- Breaks page scrolling <link rel="stylesheet" href="{{ assetUrl('styles/monochrome.css') }}" /> -->
<script src="{{ assetUrl('scripts/sub/dir/etemplate/etemplate2.js') }}" type="module" id="egw_script_id"></script> <script src="{{ assetUrl('scripts/sub/dir/etemplate/etemplate2.js') }}" type="module" id="egw_script_id"></script>
<link rel="stylesheet" href="{{assetUrl("styles/bootstrap-icons.min.css")}}" />
{# Set the initial theme and menu states here to prevent flashing #} {# Set the initial theme and menu states here to prevent flashing #}
<script> <script>

View File

@ -77,6 +77,7 @@ module.exports = function (eleventyConfig)
// Etemplate2 // Etemplate2
eleventyConfig.addPassthroughCopy({"../../chunks": "assets/scripts/chunks"}); eleventyConfig.addPassthroughCopy({"../../chunks": "assets/scripts/chunks"});
eleventyConfig.addPassthroughCopy({"../../api/js/etemplate/etemplate2.js": "assets/scripts/sub/dir/etemplate/etemplate2.js"}); eleventyConfig.addPassthroughCopy({"../../api/js/etemplate/etemplate2.js": "assets/scripts/sub/dir/etemplate/etemplate2.js"});
eleventyConfig.addPassthroughCopy({"../../node_modules/bootstrap-icons/font/bootstrap-icons.min.css": "assets/styles/bootstrap-icons.min.css"});
//eleventyConfig.addPassthroughCopy({"../../vendor/**/*min.js": "assets/scripts/vendor/"}); //eleventyConfig.addPassthroughCopy({"../../vendor/**/*min.js": "assets/scripts/vendor/"});
//eleventyConfig.addPassthroughCopy("../dist/etemplate2.js", "assets/scripts/etemplate2.js"); //eleventyConfig.addPassthroughCopy("../dist/etemplate2.js", "assets/scripts/etemplate2.js");