als-layout 0.4.7 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/layout.js +3 -3
  2. package/package.json +1 -1
package/layout.js CHANGED
@@ -29,11 +29,11 @@ class Layout {
29
29
  }
30
30
 
31
31
  template(n=this.n,tab=this.tab) {
32
- let {rootUrl='',favicon,title,header,body,footer,styles} = this
32
+ let {rootUrl='',favicon,title,header,body,footer,styles,htmlAtts=[],bodyAtts=[]} = this
33
33
  let {footerScripts,headerScripts} = this.buildScripts()
34
34
  let links = this.buildLinks()
35
35
  let template = /*html*/`<!DOCTYPE html>`+n
36
- template +=/*html*/`<html lang="${this.lang}">`+n
36
+ template +=/*html*/`<html lang="${this.lang}"${htmlAtts.join(' ')}>`+n
37
37
  template +=/*html*/`<head>`+n
38
38
  template += links ? links+n : ''
39
39
  template += styles ? /*html*/`<style>${styles}</style>`+n : ''
@@ -43,7 +43,7 @@ class Layout {
43
43
  template += favicon ? tab+/*html*/`<link rel="icon" href="${rootUrl}${favicon}" type="image/x-icon" >`+n : ''
44
44
  template += title ? tab+/*html*/`<title>${title || ''}</title>`+n : ''
45
45
  template +=/*html*/`</head>`+n
46
- template += /*html*/`<body>`+n
46
+ template += /*html*/`<body${ bodyAtts.join(' ')}>`+n
47
47
  template += header ? tab+header+n : ''
48
48
  template += tab+body+n
49
49
  template += footer ? tab+footer+n : ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "als-layout",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Create html layout",
5
5
  "main": "layout.js",
6
6
  "keywords": [],