@spirobel/mininext 0.2.7 → 0.2.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.
- package/dist/html.d.ts +2 -2
- package/dist/html.js +18 -17
- package/mininext/html.ts +18 -17
- package/package.json +1 -1
package/dist/html.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ export declare class DangerJsonInHtml extends HtmlString {
|
|
|
19
19
|
}
|
|
20
20
|
export declare const json: <X = undefined>(strings: TemplateStringsArray, ...values: JsonStringValues<X>[]) => JsonString;
|
|
21
21
|
export declare const dangerjson: <X = undefined>(strings: TemplateStringsArray, ...values: JsonStringValues<X>[]) => DangerJsonInHtml;
|
|
22
|
-
export declare const commonHead
|
|
23
|
-
export declare const cssReset
|
|
22
|
+
export declare const commonHead: HtmlString;
|
|
23
|
+
export declare const cssReset: HtmlString;
|
|
24
24
|
/**
|
|
25
25
|
* Set the default head for all pages. Can still be overwritten on a per page basis
|
|
26
26
|
* @param defaultHead - HtmlString
|
package/dist/html.js
CHANGED
|
@@ -103,30 +103,31 @@ function JsonTemplateProcessor(danger = false) {
|
|
|
103
103
|
}
|
|
104
104
|
export const json = JsonTemplateProcessor();
|
|
105
105
|
export const dangerjson = JsonTemplateProcessor(true);
|
|
106
|
-
export const commonHead =
|
|
107
|
-
|
|
106
|
+
export const commonHead = html ` <meta
|
|
107
|
+
name="viewport"
|
|
108
|
+
content="width=device-width, initial-scale=1.0"
|
|
109
|
+
/>
|
|
108
110
|
<script>
|
|
109
111
|
/* prevent form resubmission */
|
|
110
112
|
if (window.history.replaceState) {
|
|
111
113
|
window.history.replaceState(null, null, window.location.href);
|
|
112
114
|
}
|
|
113
115
|
</script>`;
|
|
114
|
-
export const cssReset =
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
116
|
+
export const cssReset = html ` <style>
|
|
117
|
+
/* CSS Reset */
|
|
118
|
+
* {
|
|
119
|
+
margin: 0;
|
|
120
|
+
padding: 0;
|
|
121
|
+
box-sizing: border-box;
|
|
122
|
+
}
|
|
122
123
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
/* Set the background color to black */
|
|
125
|
+
html,
|
|
126
|
+
body {
|
|
127
|
+
background-color: #000;
|
|
128
|
+
color: #fff; /* Set the default text color to white for better contrast */
|
|
129
|
+
}
|
|
130
|
+
</style>`;
|
|
130
131
|
let default_head = html `
|
|
131
132
|
<title>mini-next</title>
|
|
132
133
|
${commonHead} ${cssReset}
|
package/mininext/html.ts
CHANGED
|
@@ -145,30 +145,31 @@ function JsonTemplateProcessor(danger: boolean = false) {
|
|
|
145
145
|
}
|
|
146
146
|
export const json = JsonTemplateProcessor();
|
|
147
147
|
export const dangerjson = JsonTemplateProcessor(true);
|
|
148
|
-
export const commonHead =
|
|
149
|
-
|
|
148
|
+
export const commonHead = html` <meta
|
|
149
|
+
name="viewport"
|
|
150
|
+
content="width=device-width, initial-scale=1.0"
|
|
151
|
+
/>
|
|
150
152
|
<script>
|
|
151
153
|
/* prevent form resubmission */
|
|
152
154
|
if (window.history.replaceState) {
|
|
153
155
|
window.history.replaceState(null, null, window.location.href);
|
|
154
156
|
}
|
|
155
157
|
</script>`;
|
|
156
|
-
export const cssReset =
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
158
|
+
export const cssReset = html` <style>
|
|
159
|
+
/* CSS Reset */
|
|
160
|
+
* {
|
|
161
|
+
margin: 0;
|
|
162
|
+
padding: 0;
|
|
163
|
+
box-sizing: border-box;
|
|
164
|
+
}
|
|
164
165
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
166
|
+
/* Set the background color to black */
|
|
167
|
+
html,
|
|
168
|
+
body {
|
|
169
|
+
background-color: #000;
|
|
170
|
+
color: #fff; /* Set the default text color to white for better contrast */
|
|
171
|
+
}
|
|
172
|
+
</style>`;
|
|
172
173
|
let default_head = html`
|
|
173
174
|
<title>mini-next</title>
|
|
174
175
|
${commonHead} ${cssReset}
|