-
Notifications
You must be signed in to change notification settings - Fork 0
/
mcodeTemplate.html
275 lines (227 loc) · 8.15 KB
/
mcodeTemplate.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<!-- #region H E A D E R -->
<!-- copyright file="mcodeTemplate.html" company="MicroCODE Incorporated" Copyright © 2022 MicroCODE Incorporated Troy, MI author="Timothy J. McGuire" -->
<!-- #region P R E A M B L E -->
<!-- #region D O C U M E N T A T I O N -->
<!--
* Title: MicroCODE Common HTML Template
* Module: Modules (./mcodeTemplate.html)
* Customer: Internal
* Creator: MicroCODE Incorporated
* Date: March 2022
* Author: Timothy J McGuire
*
* Designed and Coded: 2022 MicroCODE Incorporated
*
* This software and related materials are the property of
* MicroCODE Incorporated and contain confidential and proprietary
* information. This software and related materials shall not be
* duplicated, disclosed to others, or used in any way without the
* written of MicroCODE Incorported.
*
*
* DESCRIPTION:
* ------------
*
* This module implements the MicroCODE's Common HTML Template.
* This file is copied to start all MicroCODE Web Pages.
*
*
* REFERENCES:
* -----------
*
* 1. MIT xPRO CSS Style Guide
* https://student.emeritus.org/courses/3291/files/2554233/download?wrap=1
*
* 2. Google HTML/CSS Style Guide
* https://google.github.io/styleguide/htmlcssguide.html
*
* 3. MicroCODE JavaScript Style Guide
* Local File: MCX-S02 (Internal JS Style Guide).docx
* https://github.com/MicroCODEIncorporated/JavaScriptSG
*
* 4. MicroCODE HTML-CSS Style Guide
* Local File: MCX-S03 (Internal HHTML-CSS Style Guide).docx
* https://github.com/MicroCODEIncorporated/HTML-CSS-SG
*
*
*
* DEMONSTRATION VIDEOS:
* --------------------
*
* 1. ...
*
*
*
* MODIFICATIONS:
* --------------
*
* Date: By-Group: Rev: Description:
*
* 04-Mar-2022 TJM-MCODE {0001} New file for starting all HTML files to maintain common structure.
* 21-Mar-2022 TJM-MCODE {0002} Added Buttons 4, 5; added Bootstrap Minimum Styles.
* 20-Spe-2022 TJM-MCODE {0003} Updated Fonts after creating www.mcode.com/brand page.
*
*
*
-->
<!-- #endregion -->
<!-- #endregion -->
<!-- #endregion -->
<!-- H T M L : page layout -->
<!DOCTYPE html>
<html lang="en">
<!-- #region C S S : visual styles -->
<!-- Popular Style Sheets from BOOTSTRAP -->
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<!-- Page Specific Styles -->
<style>
</style>
<!-- #endregion -->
<!-- #region H E A D E R -->
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible"
content="IE=edge">
<meta name="viewport"
content="width=120, initial-scale=1.0">
<title>MCODE: Template Page</title>
<!-- #region F O N T S -- our default fonts -->
<link rel="preconnect"
href="https://fonts.googleapis.com">
<link rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin>
<!-- FRANKLIN 100 'Thin' -->
<link href="https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@100&display=swap"
rel="stylesheet">
<!-- FRANKLIN 600 'Demi' -->
<link href="https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@600&display=swap"
rel="stylesheet">
<!-- MICHROMA (Eurostile) 400 'Normal' -->
<link href="https://fonts.googleapis.com/css2?family=Michroma:wght@400&display=swap"
rel="stylesheet">
<!-- QUESTRIAL 400 'Normal' -->
<link href="https://fonts.googleapis.com/css2?family=Questrial&display=swap"
rel="stylesheet">
<!-- #endregion -->
</head>
<!-- #endregion -->
<!-- #region B O D Y -->
<body>
<div class="col-2">
<p></p>
<button id="btnUI_Button1"
class="btn btn-primary">Button 1</button>
<p></p>
<button id="btnUI_Button2"
class="btn btn-primary">Button 2</button>
<p></p>
<button id="btnUI_Button3"
class="btn btn-primary">Button 3</button>
<p></p>
<button id="btnUI_Button4"
class="btn btn-primary">Button 4</button>
<p></p>
<button id="btnUI_Button5"
class="btn btn-primary">Button 5</button>
<p></p>
</div>
</body>
<!-- #endregion -->
<!-- #region D A T A B A S E : data source(s) -->
<!-- <script src="moduleData.js"></script> -->
<!-- #endregion -->
<!-- #region I M P O R T : shared JavaScript code -->
<!-- Include our common MicroCODE Client Library -->
<!-- <script src="moduleTemplate.js"></script> -->
<!-- #endregion -->
<!-- J A V A S C R I P T : page specific code -->
<script>
// #region P R I V A T E C O N S T A N T S
const NOT_IMPLEMENTED = ' is not implemented.';
const NOW_IMPLEMENTED = ' is now implemented.';
const CONSTANT_1 = 1; // Constant #1
const CONSTANT_2 = 2; // Constant #2
// #endregion
// #region P R I V A T E F I E L D S
let _privateField1 = 0;
let _privateField2 = [];
// #endregion
// #region P R I V A T E F U N C T I O N S
/**
* @function functionName() -- function description.
*
* @param {string} param1 parameter #1 description.
* @param {number} param2 parameter #2 description.
* @returns {object} description of return value.
*/
var functionName = function (param1, param2)
{
let value = null;
return value;
};
// #endregion
// #region C A L L B A C K S
/*
* callback*() - callback* description.
*/
function callbackNotImplemented(messageData)
{
// handle item manipulation...
return messageData + NOT_IMPLEMENTED;
}
// #endregion
// #region E V E N T H A N D L E R S
/*
* btnUI_*_Click() - event handlers for UI buttons.
*/
// Button #1 handler
function btnUI_Button1_Click(messageData1, callBack)
{
// Handle 'Click'...
console.log(callBack(messageData1));
}
// Button #2 handler
function btnUI_Button2_Click(messageData2, callBack)
{
// Handle 'Click'...
console.log(callBack(messageData2));
}
// Button #3 handler
function btnUI_Button3_Click(messageData3, callBack)
{
// Handle 'Click'...
console.log(callBack(messageData3));
}
// Button #4 handler
function btnUI_Button4_Click(messageData4, callBack)
{
// Handle 'Click'...
console.log(callBack(messageData4));
}
// Button #5 handler
function btnUI_Button5_Click(messageData5, callBack)
{
// Handle 'Click'...
console.log(callBack(messageData5));
}
// #endregion
// #region E X E C U T I O N
// Load data sources...
// Map Event Handlers...
document.getElementById("btnUI_Button1")
.addEventListener("click", () => {btnUI_Button1_Click('Button #1', callbackNotImplemented);});
document.getElementById("btnUI_Button2")
.addEventListener("click", () => {btnUI_Button2_Click('Button #2', callbackNotImplemented);});
document.getElementById("btnUI_Button3")
.addEventListener("click", () => {btnUI_Button3_Click('Button #3', callbackNotImplemented);});
document.getElementById("btnUI_Button4")
.addEventListener("click", () => {btnUI_Button4_Click('Button #4', callbackNotImplemented);});
document.getElementById("btnUI_Button5")
.addEventListener("click", () => {btnUI_Button5_Click('Button #5', callbackNotImplemented);});
// Set Timeout Events...
// Run Timed Events...
// #endregion
</script>
</html>