Skip to content

Commit 1c89e6f

Browse files
committed
Rename elements for clarity and consistency
1 parent 658fbd1 commit 1c89e6f

File tree

3 files changed

+25
-25
lines changed

3 files changed

+25
-25
lines changed

pages/components/components.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class InsertHTMLComponent extends HTMLElement {
1+
class InsertHTMLElement extends HTMLElement {
22
constructor(htmlPath) {
33
super();
44
this.htmlPath = htmlPath;
@@ -17,13 +17,13 @@ class InsertHTMLComponent extends HTMLElement {
1717
}
1818
}
1919

20-
class AboutComponent extends InsertHTMLComponent {
20+
class AboutElement extends InsertHTMLElement {
2121
constructor() {
2222
super("components/about.html");
2323
}
2424
}
2525

26-
class InChIToolsComponent extends InsertHTMLComponent {
26+
class InChIToolsElement extends InsertHTMLElement {
2727
constructor() {
2828
super("components/inchi-tools.html");
2929
}
@@ -36,7 +36,7 @@ class InChIToolsComponent extends InsertHTMLComponent {
3636
}
3737
}
3838

39-
class RInChIToolsComponent extends InsertHTMLComponent {
39+
class RInChIToolsElement extends InsertHTMLElement {
4040
constructor() {
4141
super("components/rinchi-tools.html");
4242
}
@@ -49,7 +49,7 @@ class RInChIToolsComponent extends InsertHTMLComponent {
4949
}
5050
}
5151

52-
class InChIVersionSelection extends HTMLElement {
52+
class InChIVersionSelectionElement extends HTMLElement {
5353
constructor() {
5454
super();
5555
this.onVersionChange = new Function(this.getAttribute("onVersionChange"));
@@ -90,7 +90,7 @@ class InChIVersionSelection extends HTMLElement {
9090
}
9191
}
9292

93-
class InChIOptionsComponent extends HTMLElement {
93+
class InChIOptionsElement extends HTMLElement {
9494
constructor() {
9595
super();
9696
}
@@ -203,7 +203,7 @@ class InChIOptionsComponent extends HTMLElement {
203203
);
204204
}
205205
}
206-
class InChIOptions106Component extends InChIOptionsComponent {
206+
class InChIOptions106Element extends InChIOptionsElement {
207207
constructor() {
208208
super();
209209
this.componentPaths = [
@@ -212,7 +212,7 @@ class InChIOptions106Component extends InChIOptionsComponent {
212212
];
213213
}
214214
}
215-
class InChIOptions107Component extends InChIOptionsComponent {
215+
class InChIOptions107Element extends InChIOptionsElement {
216216
constructor() {
217217
super();
218218
this.componentPaths = [
@@ -221,7 +221,7 @@ class InChIOptions107Component extends InChIOptionsComponent {
221221
];
222222
}
223223
}
224-
class InChIOptions107MoInComponent extends InChIOptionsComponent {
224+
class InChIOptions107MoInElement extends InChIOptionsElement {
225225
constructor() {
226226
super();
227227
this.componentPaths = [
@@ -232,10 +232,10 @@ class InChIOptions107MoInComponent extends InChIOptionsComponent {
232232
}
233233
}
234234

235-
customElements.define("inchi-about-component", AboutComponent);
236-
customElements.define("inchi-inchi-tools-component", InChIToolsComponent);
237-
customElements.define("inchi-rinchi-tools-component", RInChIToolsComponent);
238-
customElements.define("inchi-inchi-version-selection", InChIVersionSelection);
239-
customElements.define("inchi-options-106", InChIOptions106Component);
240-
customElements.define("inchi-options-107", InChIOptions107Component);
241-
customElements.define("inchi-options-107-moin", InChIOptions107MoInComponent);
235+
customElements.define("inchi-about", AboutElement);
236+
customElements.define("inchi-inchi-tools", InChIToolsElement);
237+
customElements.define("inchi-rinchi-tools", RInChIToolsElement);
238+
customElements.define("inchi-version-selection", InChIVersionSelectionElement);
239+
customElements.define("inchi-options-106", InChIOptions106Element);
240+
customElements.define("inchi-options-107", InChIOptions107Element);
241+
customElements.define("inchi-options-107-moin", InChIOptions107MoInElement);

pages/components/inchi-tools.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@
7474
</div>
7575
</div>
7676
<div class="col-xl-4 mt-auto">
77-
<inchi-inchi-version-selection
77+
<inchi-version-selection
7878
onVersionChange="onChangeInChIVersionTab1()"
79-
></inchi-inchi-version-selection>
79+
></inchi-version-selection>
8080
<div data-inchi-options></div>
8181
</div>
8282
</div>
@@ -148,9 +148,9 @@
148148
</div>
149149
</div>
150150
<div class="col-xl-4 mt-auto">
151-
<inchi-inchi-version-selection
151+
<inchi-version-selection
152152
onVersionChange="onChangeInChIVersionTab2()"
153-
></inchi-inchi-version-selection>
153+
></inchi-version-selection>
154154
<div data-inchi-options></div>
155155
</div>
156156
</div>
@@ -213,9 +213,9 @@
213213
</div>
214214
</div>
215215
<div class="col-xl-4 mt-auto">
216-
<inchi-inchi-version-selection
216+
<inchi-version-selection
217217
onVersionChange="onChangeInChIVersionTab3()"
218-
></inchi-inchi-version-selection>
218+
></inchi-version-selection>
219219
</div>
220220
</div>
221221
<div class="mt-2 border rounded bg-light" style="--bs-bg-opacity: 0.3">

pages/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ <h1 class="col-md-9 mt-auto">InChI Web Demo</h1>
118118
<!-- Contents of pills -->
119119
<div class="tab-content">
120120
<!-- InChI pill -->
121-
<inchi-inchi-tools-component></inchi-inchi-tools-component>
121+
<inchi-inchi-tools></inchi-inchi-tools>
122122

123123
<!-- RInChI pill -->
124-
<inchi-rinchi-tools-component></inchi-rinchi-tools-component>
124+
<inchi-rinchi-tools></inchi-rinchi-tools>
125125

126126
<!-- About pill -->
127-
<inchi-about-component></inchi-about-component>
127+
<inchi-about></inchi-about>
128128
</div>
129129
</div>
130130
</body>

0 commit comments

Comments
 (0)