File tree 5 files changed +41
-37
lines changed
5 files changed +41
-37
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ import { LitElement , html } from '../../deps/lit/lit-core.min.js' ;
2
+ import { getNx } from '../../../scripts/utils.js' ;
3
+
4
+ // Styles
5
+ const { default : getStyle } = await import ( `${ getNx ( ) } /utils/styles.js` ) ;
6
+ const STYLE = await getStyle ( import . meta. url ) ;
7
+
8
+ class DaMedia extends LitElement {
9
+ static properties = { } ;
10
+
11
+ connectedCallback ( ) {
12
+ super . connectedCallback ( ) ;
13
+ this . shadowRoot . adoptedStyleSheets = [ STYLE ] ;
14
+ document . title = `View ${ this . details . name } - Dark Alley` ;
15
+ }
16
+
17
+ render ( ) {
18
+ return html `
19
+ < div class ="da-content ">
20
+ < img src ="${ this . details . contentUrl } " width ="900 " height ="600 " />
21
+ </ div >
22
+ ` ;
23
+ }
24
+ }
25
+
26
+ customElements . define ( 'da-media' , DaMedia ) ;
Original file line number Diff line number Diff line change
1
+ import getPathDetails from '../shared/pathDetails.js' ;
2
+
3
+ import '../edit/da-title/da-title.js' ;
4
+ import './da-media.js' ;
5
+
6
+ export default function init ( el ) {
7
+ const details = getPathDetails ( ) ;
8
+
9
+ const daTitle = document . createElement ( 'da-title' ) ;
10
+ const daMedia = document . createElement ( 'da-media' ) ;
11
+
12
+ daTitle . details = details ;
13
+ daMedia . details = details ;
14
+ el . append ( daTitle , daMedia ) ;
15
+ }
You can’t perform that action at this time.
0 commit comments