mirror of
https://github.com/wassname/template.git
synced 2026-08-17 11:28:02 +08:00
Design changes
This commit is contained in:
@@ -5,13 +5,29 @@ const T = Template('d-article', `
|
||||
<style></style>
|
||||
`, false);
|
||||
|
||||
|
||||
// export function addInferableTags(dom, frontMatter) {
|
||||
// const title = frontMatter.title;
|
||||
// if (title) {
|
||||
// const titleTag = document.querySelector()
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
export class Article extends T(HTMLElement) {
|
||||
|
||||
// constructor() {
|
||||
// super();
|
||||
// }
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
new MutationObserver( (mutations) => {
|
||||
for (const mutation of mutations) {
|
||||
for (const addedNode of mutation.addedNodes) {
|
||||
if (addedNode.nodeName === 'HR') {
|
||||
console.warn('Use of <hr> tags in distill articles is discouraged!');
|
||||
}
|
||||
}
|
||||
}
|
||||
}).observe(this, {childList: true});
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
for (const [functionName, callback] of Object.entries(Controller.listeners)) {
|
||||
|
||||
Reference in New Issue
Block a user