ds-one 0.1.11-alpha.1 → 0.1.11-alpha.11
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/DS1/0-face/2025-04-23-device.ts +135 -1
- package/DS1/1-root/fonts/GT-America-Compressed-Regular.woff2 +0 -0
- package/DS1/1-root/one.css +16 -2
- package/DS1/2-core/{text-v1.ts → ds-text.ts} +4 -4
- package/DS1/2-core/home-v1.ts +2 -2
- package/DS1/3-unit/doublenav-v1.ts +2 -2
- package/DS1/3-unit/singlenav-v1.ts +1 -1
- package/DS1/4-page/ds-grid.ts +74 -9
- package/DS1/4-page/ds-layout.ts +1 -20
- package/DS1/index.ts +7 -1
- package/DS1/utils/cdn-loader.ts +5 -0
- package/DS1/utils/keys.json +41 -1
- package/README.md +5 -5
- package/dist/0-face/2025-04-23-device.d.ts +24 -0
- package/dist/0-face/2025-04-23-device.d.ts.map +1 -1
- package/dist/0-face/2025-04-23-device.js +94 -1
- package/dist/2-core/ds-text.d.ts +48 -0
- package/dist/2-core/ds-text.d.ts.map +1 -0
- package/dist/2-core/ds-text.js +83 -0
- package/dist/2-core/home-v1.js +2 -2
- package/dist/3-unit/doublenav-v1.js +2 -2
- package/dist/3-unit/singlenav-v1.js +1 -1
- package/dist/4-page/ds-grid.d.ts +7 -0
- package/dist/4-page/ds-grid.d.ts.map +1 -1
- package/dist/4-page/ds-grid.js +69 -9
- package/dist/4-page/ds-layout.d.ts.map +1 -1
- package/dist/4-page/ds-layout.js +1 -20
- package/dist/ds-one.bundle.js +190 -39
- package/dist/ds-one.bundle.js.map +3 -3
- package/dist/ds-one.bundle.min.js +68 -67
- package/dist/ds-one.bundle.min.js.map +4 -4
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/utils/cdn-loader.d.ts.map +1 -1
- package/dist/utils/cdn-loader.js +5 -0
- package/dist/utils/keys.json +41 -1
- package/package.json +1 -1
|
@@ -1,3 +1,96 @@
|
|
|
1
1
|
// 2025-04-23-device.ts
|
|
2
2
|
// Device detection and context utilities
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Comprehensive mobile device detection
|
|
5
|
+
* Combines user agent detection, touch capability, and viewport size
|
|
6
|
+
*/
|
|
7
|
+
export function detectMobileDevice() {
|
|
8
|
+
if (typeof navigator === "undefined" || typeof window === "undefined") {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
const nav = navigator;
|
|
12
|
+
const win = window;
|
|
13
|
+
const ua = (nav && (nav.userAgent || nav.vendor)) || (win && win.opera) || "";
|
|
14
|
+
// User agent based detection
|
|
15
|
+
const uaMatchesMobile = /Mobile|Android|iP(ad|hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)|Windows Phone|Phone|Tablet/i.test(ua);
|
|
16
|
+
// Touch capability detection
|
|
17
|
+
const touchPoints = (nav && nav.maxTouchPoints) || 0;
|
|
18
|
+
const isTouchCapable = touchPoints > 1;
|
|
19
|
+
// Viewport detection
|
|
20
|
+
const narrowViewport = win
|
|
21
|
+
? Math.min(win.innerWidth || 0, win.innerHeight || 0) <= 820
|
|
22
|
+
: false;
|
|
23
|
+
return uaMatchesMobile || (isTouchCapable && narrowViewport);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get detailed device information
|
|
27
|
+
*/
|
|
28
|
+
export function getDeviceInfo() {
|
|
29
|
+
const isMobile = detectMobileDevice();
|
|
30
|
+
const nav = navigator;
|
|
31
|
+
const win = window;
|
|
32
|
+
const touchPoints = (nav && nav.maxTouchPoints) || 0;
|
|
33
|
+
const isTouchCapable = touchPoints > 1;
|
|
34
|
+
const screenWidth = win?.innerWidth || 0;
|
|
35
|
+
const screenHeight = win?.innerHeight || 0;
|
|
36
|
+
const isTablet = isMobile && Math.min(screenWidth, screenHeight) >= 600;
|
|
37
|
+
return {
|
|
38
|
+
isMobile,
|
|
39
|
+
isTablet,
|
|
40
|
+
isDesktop: !isMobile,
|
|
41
|
+
isTouchCapable,
|
|
42
|
+
deviceType: isMobile ? (isTablet ? "tablet" : "mobile") : "desktop",
|
|
43
|
+
userAgent: (nav && (nav.userAgent || nav.vendor)) || "",
|
|
44
|
+
screenWidth,
|
|
45
|
+
screenHeight,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Initialize device detection and log to console
|
|
50
|
+
*/
|
|
51
|
+
export function initDeviceDetection() {
|
|
52
|
+
const deviceInfo = getDeviceInfo();
|
|
53
|
+
// Calculate and set scaling factor for mobile
|
|
54
|
+
if (deviceInfo.isMobile && typeof document !== "undefined") {
|
|
55
|
+
// Design width: 280px (14 columns × 20px)
|
|
56
|
+
const designWidth = 280;
|
|
57
|
+
const actualWidth = deviceInfo.screenWidth;
|
|
58
|
+
const scalingFactor = actualWidth / designWidth;
|
|
59
|
+
// Set CSS custom property for scaling
|
|
60
|
+
document.documentElement.style.setProperty("--scaling-factor-mobile", scalingFactor.toFixed(3));
|
|
61
|
+
console.log(`[DS one] Mobile device detected - ${deviceInfo.deviceType} (${deviceInfo.screenWidth}x${deviceInfo.screenHeight}), scaling factor: ${scalingFactor.toFixed(2)}`);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
// Desktop - no scaling
|
|
65
|
+
if (typeof document !== "undefined") {
|
|
66
|
+
document.documentElement.style.setProperty("--scaling-factor-mobile", "1");
|
|
67
|
+
}
|
|
68
|
+
console.log(`[DS one] Desktop device detected (${deviceInfo.screenWidth}x${deviceInfo.screenHeight})`);
|
|
69
|
+
}
|
|
70
|
+
// Log additional details in development mode
|
|
71
|
+
if (typeof window !== "undefined" && window.DS_ONE_DEBUG) {
|
|
72
|
+
console.log("[DS one] Device Info:", {
|
|
73
|
+
type: deviceInfo.deviceType,
|
|
74
|
+
isMobile: deviceInfo.isMobile,
|
|
75
|
+
isTablet: deviceInfo.isTablet,
|
|
76
|
+
isDesktop: deviceInfo.isDesktop,
|
|
77
|
+
isTouchCapable: deviceInfo.isTouchCapable,
|
|
78
|
+
viewport: `${deviceInfo.screenWidth}x${deviceInfo.screenHeight}`,
|
|
79
|
+
userAgent: deviceInfo.userAgent,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return deviceInfo;
|
|
83
|
+
}
|
|
84
|
+
// Auto-initialize when module loads
|
|
85
|
+
if (typeof window !== "undefined") {
|
|
86
|
+
// Wait for DOM to be ready
|
|
87
|
+
if (document.readyState === "loading") {
|
|
88
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
89
|
+
initDeviceDetection();
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
// DOM is already ready
|
|
94
|
+
initDeviceDetection();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* A component for displaying text from translations
|
|
4
|
+
*
|
|
5
|
+
* @element ds-text
|
|
6
|
+
* @prop {string} key - The translation key to use
|
|
7
|
+
* @prop {string} defaultValue - Default value if translation is not found
|
|
8
|
+
* @prop {string} fallback - Optional fallback text if translation is not found (deprecated, use defaultValue)
|
|
9
|
+
*/
|
|
10
|
+
export declare class Text extends LitElement {
|
|
11
|
+
static get properties(): {
|
|
12
|
+
key: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
reflect: boolean;
|
|
15
|
+
};
|
|
16
|
+
defaultValue: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
reflect: boolean;
|
|
19
|
+
attribute: string;
|
|
20
|
+
};
|
|
21
|
+
fallback: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
reflect: boolean;
|
|
24
|
+
};
|
|
25
|
+
_text: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
state: boolean;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
key: string;
|
|
31
|
+
defaultValue: string;
|
|
32
|
+
fallback: string;
|
|
33
|
+
_text: string;
|
|
34
|
+
private boundHandlers;
|
|
35
|
+
constructor();
|
|
36
|
+
static styles: import("lit").CSSResult;
|
|
37
|
+
connectedCallback(): void;
|
|
38
|
+
disconnectedCallback(): void;
|
|
39
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
40
|
+
_loadText(): void;
|
|
41
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
42
|
+
}
|
|
43
|
+
declare global {
|
|
44
|
+
interface HTMLElementTagNameMap {
|
|
45
|
+
"ds-text": Text;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=ds-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-text.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;;GAOG;AACH,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,KAAK,UAAU;;;;;;;;;;;;;;;;;;MAOpB;IAEO,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,aAAa,CAAqC;;IAkB1D,MAAM,CAAC,MAAM,0BAQX;IAEF,iBAAiB;IAoBjB,oBAAoB;IAYpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAQ/C,SAAS;IAgBT,MAAM;CAGP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { LitElement, html, css } from "lit";
|
|
2
|
+
import { getText } from "../utils/language";
|
|
3
|
+
/**
|
|
4
|
+
* A component for displaying text from translations
|
|
5
|
+
*
|
|
6
|
+
* @element ds-text
|
|
7
|
+
* @prop {string} key - The translation key to use
|
|
8
|
+
* @prop {string} defaultValue - Default value if translation is not found
|
|
9
|
+
* @prop {string} fallback - Optional fallback text if translation is not found (deprecated, use defaultValue)
|
|
10
|
+
*/
|
|
11
|
+
export class Text extends LitElement {
|
|
12
|
+
static get properties() {
|
|
13
|
+
return {
|
|
14
|
+
key: { type: String, reflect: true },
|
|
15
|
+
defaultValue: { type: String, reflect: true, attribute: "default-value" },
|
|
16
|
+
fallback: { type: String, reflect: true }, // Kept for backward compatibility
|
|
17
|
+
_text: { type: String, state: true },
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
this.key = "";
|
|
23
|
+
this.defaultValue = "";
|
|
24
|
+
this.fallback = "";
|
|
25
|
+
this._text = "";
|
|
26
|
+
// Create bound event handlers for proper cleanup
|
|
27
|
+
this.boundHandlers = {
|
|
28
|
+
languageChanged: (() => {
|
|
29
|
+
console.log("Language changed event received in ds-text");
|
|
30
|
+
this._loadText();
|
|
31
|
+
}),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
connectedCallback() {
|
|
35
|
+
super.connectedCallback();
|
|
36
|
+
this._loadText();
|
|
37
|
+
// Listen for language changes
|
|
38
|
+
window.addEventListener("language-changed", this.boundHandlers.languageChanged);
|
|
39
|
+
// Also listen for translations loaded event
|
|
40
|
+
window.addEventListener("translations-loaded", this.boundHandlers.languageChanged);
|
|
41
|
+
// Listen for language changes via events instead of signals
|
|
42
|
+
// The currentLanguage signal changes will trigger the language-changed event
|
|
43
|
+
}
|
|
44
|
+
disconnectedCallback() {
|
|
45
|
+
super.disconnectedCallback();
|
|
46
|
+
window.removeEventListener("language-changed", this.boundHandlers.languageChanged);
|
|
47
|
+
window.removeEventListener("translations-loaded", this.boundHandlers.languageChanged);
|
|
48
|
+
}
|
|
49
|
+
updated(changedProperties) {
|
|
50
|
+
super.updated(changedProperties);
|
|
51
|
+
if (changedProperties.has("key") || changedProperties.has("defaultValue")) {
|
|
52
|
+
this._loadText();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
_loadText() {
|
|
56
|
+
if (!this.key) {
|
|
57
|
+
this._text = this.defaultValue || this.fallback || "";
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
const text = getText(this.key);
|
|
62
|
+
this._text = text || this.defaultValue || this.fallback || this.key;
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
console.error("Error loading text for key:", this.key, error);
|
|
66
|
+
this._text = this.defaultValue || this.fallback || this.key;
|
|
67
|
+
}
|
|
68
|
+
this.requestUpdate();
|
|
69
|
+
}
|
|
70
|
+
render() {
|
|
71
|
+
return html `<span>${this._text || this.defaultValue || this.key}</span>`;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
Text.styles = css `
|
|
75
|
+
:host {
|
|
76
|
+
display: inline;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.loading {
|
|
80
|
+
opacity: 0.6;
|
|
81
|
+
}
|
|
82
|
+
`;
|
|
83
|
+
customElements.define("ds-text", Text);
|
package/dist/2-core/home-v1.js
CHANGED
|
@@ -63,7 +63,7 @@ export class Home extends LitElement {
|
|
|
63
63
|
@click="${this._navigateHome}"
|
|
64
64
|
@keydown="${this._onKeyDown}"
|
|
65
65
|
>
|
|
66
|
-
<text
|
|
66
|
+
<ds-text key="home"></ds-text>
|
|
67
67
|
</div>
|
|
68
68
|
`;
|
|
69
69
|
}
|
|
@@ -107,7 +107,7 @@ Home.styles = css `
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
/* Inner text spacing without affecting the 80px outer width */
|
|
110
|
-
.home > text
|
|
110
|
+
.home > ds-text {
|
|
111
111
|
padding: 0 calc(var(--1) * 0.15 * var(--scaling-factor));
|
|
112
112
|
box-sizing: border-box;
|
|
113
113
|
height: 100%;
|
|
@@ -33,14 +33,14 @@ export class DoubleNav extends LitElement {
|
|
|
33
33
|
? html `
|
|
34
34
|
<a href="${this.previous}" class="nav-previous">
|
|
35
35
|
<icon-v1 type="left"></icon-v1>
|
|
36
|
-
<text
|
|
36
|
+
<ds-text>${this.previousText || "Previous"}</ds-text>
|
|
37
37
|
</a>
|
|
38
38
|
`
|
|
39
39
|
: html `<div></div>`}
|
|
40
40
|
${this.next
|
|
41
41
|
? html `
|
|
42
42
|
<a href="${this.next}" class="nav-next">
|
|
43
|
-
<text
|
|
43
|
+
<ds-text>${this.nextText || "Next"}</ds-text>
|
|
44
44
|
<icon-v1 type="right"></icon-v1>
|
|
45
45
|
</a>
|
|
46
46
|
`
|
|
@@ -22,7 +22,7 @@ export class SingleNav extends LitElement {
|
|
|
22
22
|
const href = this.to || navConfig.href;
|
|
23
23
|
return html `
|
|
24
24
|
<a href="${href}">
|
|
25
|
-
<text
|
|
25
|
+
<ds-text key="${navConfig.key}"></ds-text>
|
|
26
26
|
<icon-v1 type="right"></icon-v1>
|
|
27
27
|
</a>
|
|
28
28
|
`;
|
package/dist/4-page/ds-grid.d.ts
CHANGED
|
@@ -10,9 +10,16 @@ export declare class Grid extends LitElement {
|
|
|
10
10
|
align: {
|
|
11
11
|
type: StringConstructor;
|
|
12
12
|
};
|
|
13
|
+
_isMobile: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
state: boolean;
|
|
16
|
+
};
|
|
13
17
|
};
|
|
14
18
|
align?: string;
|
|
19
|
+
_isMobile: boolean;
|
|
20
|
+
connectedCallback(): void;
|
|
15
21
|
static styles: import("lit").CSSResult;
|
|
22
|
+
updated(): void;
|
|
16
23
|
render(): import("lit-html").TemplateResult<1>;
|
|
17
24
|
}
|
|
18
25
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-grid.d.ts","sourceRoot":"","sources":["../../DS1/4-page/ds-grid.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"ds-grid.d.ts","sourceRoot":"","sources":["../../DS1/4-page/ds-grid.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,UAAU,GAAG,IAAI,CAAC;KAC5D;IACD,IAAI,cAAc,EAAE,qBAAqB,CAAC;CAC3C;AAED,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,CAAC,UAAU;;;;;;;;MAGf;IAEF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAS;IAE3B,iBAAiB;IAiCjB,MAAM,CAAC,MAAM,0BAyDX;IAEF,OAAO;IASP,MAAM;CAGP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
|
package/dist/4-page/ds-grid.js
CHANGED
|
@@ -1,30 +1,70 @@
|
|
|
1
1
|
// ds-grid.ts
|
|
2
2
|
// Simple grid layout component
|
|
3
3
|
import { LitElement, html, css } from "lit";
|
|
4
|
+
import { detectMobileDevice } from "../0-face/2025-04-23-device";
|
|
4
5
|
export class Grid extends LitElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this._isMobile = false;
|
|
9
|
+
}
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
super.connectedCallback();
|
|
12
|
+
this._isMobile = detectMobileDevice();
|
|
13
|
+
console.log(`[ds-grid] Mobile device: ${this._isMobile}`);
|
|
14
|
+
// Apply mobile class immediately
|
|
15
|
+
if (this._isMobile) {
|
|
16
|
+
this.classList.add("mobile");
|
|
17
|
+
console.log(`[ds-grid] Mobile class added`);
|
|
18
|
+
}
|
|
19
|
+
// Calculate mobile grid dimensions to fit screen
|
|
20
|
+
if (this._isMobile && typeof window !== "undefined") {
|
|
21
|
+
const screenWidth = window.innerWidth;
|
|
22
|
+
const columns = 14;
|
|
23
|
+
const gap = 0.5;
|
|
24
|
+
// Calculate column size accounting for gaps between columns
|
|
25
|
+
// Total width = (columns * columnSize) + ((columns - 1) * gap)
|
|
26
|
+
// Therefore: columnSize = (screenWidth - ((columns - 1) * gap)) / columns
|
|
27
|
+
const totalGapWidth = (columns - 1) * gap;
|
|
28
|
+
const columnSize = (screenWidth - totalGapWidth) / columns;
|
|
29
|
+
console.log(`[ds-grid] Mobile grid: ${columns} columns × ${columnSize.toFixed(2)}px + ${totalGapWidth}px gaps = ${screenWidth}px`);
|
|
30
|
+
// Set custom property for this grid instance
|
|
31
|
+
this.style.setProperty("--mobile-column-size", `${columnSize}px`);
|
|
32
|
+
this.style.setProperty("--mobile-gap", `${gap}px`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
updated() {
|
|
36
|
+
// Apply mobile class if detected as mobile device
|
|
37
|
+
if (this._isMobile) {
|
|
38
|
+
this.classList.add("mobile");
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this.classList.remove("mobile");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
5
44
|
render() {
|
|
6
45
|
return html ``;
|
|
7
46
|
}
|
|
8
47
|
}
|
|
9
48
|
Grid.properties = {
|
|
10
49
|
align: { type: String },
|
|
50
|
+
_isMobile: { type: Boolean, state: true },
|
|
11
51
|
};
|
|
12
52
|
Grid.styles = css `
|
|
13
53
|
:host {
|
|
14
54
|
margin-top: 0.5px !important;
|
|
15
55
|
margin-left: 0.5px !important;
|
|
16
56
|
display: grid;
|
|
17
|
-
width:
|
|
57
|
+
width: 1440px;
|
|
18
58
|
height: 100%;
|
|
19
59
|
grid-template-columns: repeat(auto-fill, 19px);
|
|
20
60
|
grid-template-rows: repeat(auto-fill, 19px);
|
|
21
61
|
gap: 1px;
|
|
22
|
-
row-rule: 1px solid
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
light-dark(
|
|
26
|
-
|
|
27
|
-
position:
|
|
62
|
+
row-rule: 1px solid light-dark(rgb(147, 147, 147), rgb(147, 147, 147));
|
|
63
|
+
column-rule: 1px solid light-dark(rgb(147, 147, 147), rgb(147, 147, 147));
|
|
64
|
+
outline:
|
|
65
|
+
1px solid light-dark(rgb(147, 147, 147)),
|
|
66
|
+
rgb(147, 147, 147);
|
|
67
|
+
position: fixed;
|
|
28
68
|
top: 0;
|
|
29
69
|
left: 50%;
|
|
30
70
|
transform: translateX(-50%);
|
|
@@ -32,6 +72,25 @@ Grid.styles = css `
|
|
|
32
72
|
z-index: 300;
|
|
33
73
|
}
|
|
34
74
|
|
|
75
|
+
/* DO NOT CHANGE THIS GRID CODE FOR MOBILE. ITS PERFECT FOR MOBILE. */
|
|
76
|
+
:host(.mobile) {
|
|
77
|
+
outline: calc(2px * var(--scaling-factor)) solid rgba(251, 255, 0, 0.9);
|
|
78
|
+
width: calc(100% - calc(1px * var(--scaling-factor)));
|
|
79
|
+
max-width: 100vw;
|
|
80
|
+
margin-left: 0 !important;
|
|
81
|
+
margin-top: 0 !important;
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
position: fixed;
|
|
84
|
+
top: calc(0.5px * var(--scaling-factor));
|
|
85
|
+
left: 50%;
|
|
86
|
+
transform: translateX(-50%);
|
|
87
|
+
pointer-events: none;
|
|
88
|
+
z-index: 300;
|
|
89
|
+
gap: calc(1px * var(--scaling-factor));
|
|
90
|
+
grid-template-columns: repeat(14, calc(19px * var(--scaling-factor)));
|
|
91
|
+
grid-template-rows: repeat(auto-fill, calc(19px * var(--scaling-factor)));
|
|
92
|
+
}
|
|
93
|
+
|
|
35
94
|
:host([align="left"]) {
|
|
36
95
|
left: 0;
|
|
37
96
|
transform: none;
|
|
@@ -43,8 +102,9 @@ Grid.styles = css `
|
|
|
43
102
|
}
|
|
44
103
|
|
|
45
104
|
:host([align="right"]) {
|
|
46
|
-
left:
|
|
47
|
-
|
|
105
|
+
left: auto;
|
|
106
|
+
right: 0;
|
|
107
|
+
transform: none;
|
|
48
108
|
}
|
|
49
109
|
`;
|
|
50
110
|
customElements.define("ds-grid", Grid);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-layout.d.ts","sourceRoot":"","sources":["../../DS1/4-page/ds-layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,UAAU,GAAG,IAAI,CAAC;KAC5D;IACD,IAAI,cAAc,EAAE,qBAAqB,CAAC;CAC3C;AAED,qBAAa,MAAO,SAAQ,UAAU;IACpC,MAAM,CAAC,UAAU;;;;;;;;;;MAIf;IAEF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ds-layout.d.ts","sourceRoot":"","sources":["../../DS1/4-page/ds-layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,UAAU,GAAG,IAAI,CAAC;KAC5D;IACD,IAAI,cAAc,EAAE,qBAAqB,CAAC;CAC3C;AAED,qBAAa,MAAO,SAAQ,UAAU;IACpC,MAAM,CAAC,UAAU;;;;;;;;;;MAIf;IAEF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,MAAM,CAAC,MAAM,0BAgJX;IAEF,MAAM;CA6BP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,MAAM,CAAC;KACrB;CACF"}
|
package/dist/4-page/ds-layout.js
CHANGED
|
@@ -54,7 +54,7 @@ Layout.styles = css `
|
|
|
54
54
|
". footer ."
|
|
55
55
|
". . .";
|
|
56
56
|
min-height: 600px;
|
|
57
|
-
background-color: rgba(
|
|
57
|
+
background-color: rgba(165, 165, 165, 0.03);
|
|
58
58
|
position: relative;
|
|
59
59
|
width: 100%;
|
|
60
60
|
max-width: 640px;
|
|
@@ -90,10 +90,6 @@ Layout.styles = css `
|
|
|
90
90
|
justify-self: end;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
:host([mode="debug"]) {
|
|
94
|
-
background-color: rgba(200, 114, 114, 0.1);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
93
|
.debug-overlay {
|
|
98
94
|
position: absolute;
|
|
99
95
|
margin-left: -1px;
|
|
@@ -142,7 +138,6 @@ Layout.styles = css `
|
|
|
142
138
|
font-size: 10px;
|
|
143
139
|
font-weight: var(--type-weight-default);
|
|
144
140
|
font-family: var(--typeface);
|
|
145
|
-
background-color: var(--slate);
|
|
146
141
|
color: var(--black);
|
|
147
142
|
border: 1px solid red;
|
|
148
143
|
opacity: 1;
|
|
@@ -150,53 +145,39 @@ Layout.styles = css `
|
|
|
150
145
|
|
|
151
146
|
.debug-square {
|
|
152
147
|
grid-area: square;
|
|
153
|
-
background-color: rgba(255, 0, 0, 0.2);
|
|
154
148
|
}
|
|
155
149
|
|
|
156
150
|
.debug-title {
|
|
157
151
|
grid-area: title;
|
|
158
|
-
background-color: rgba(0, 255, 0, 0.2);
|
|
159
152
|
}
|
|
160
153
|
|
|
161
154
|
.debug-header {
|
|
162
155
|
grid-area: header;
|
|
163
|
-
background-color: rgba(0, 0, 255, 0.2);
|
|
164
156
|
border-color: #0000ff;
|
|
165
157
|
}
|
|
166
158
|
|
|
167
159
|
.debug-projects {
|
|
168
160
|
grid-area: projects;
|
|
169
|
-
background-color: rgba(255, 255, 0, 0.2);
|
|
170
161
|
border-color: #ffff00;
|
|
171
162
|
}
|
|
172
163
|
|
|
173
164
|
.debug-bio {
|
|
174
165
|
grid-area: bio;
|
|
175
|
-
background-color: rgba(255, 0, 255, 0.2);
|
|
176
166
|
border-color: #ff00ff;
|
|
177
167
|
}
|
|
178
168
|
|
|
179
169
|
.debug-nav {
|
|
180
170
|
grid-area: nav;
|
|
181
|
-
background-color: rgba(0, 255, 255, 0.2);
|
|
182
171
|
border-color: #00ffff;
|
|
183
172
|
}
|
|
184
173
|
|
|
185
174
|
.debug-footer {
|
|
186
175
|
grid-area: footer;
|
|
187
|
-
background-color: rgba(255, 165, 0, 0.2);
|
|
188
176
|
border-color: #ffa500;
|
|
189
177
|
}
|
|
190
178
|
|
|
191
|
-
.debug-header {
|
|
192
|
-
grid-area: header;
|
|
193
|
-
background-color: rgba(0, 0, 255, 0.2);
|
|
194
|
-
border-color: #0000ff;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
179
|
.debug-content {
|
|
198
180
|
grid-area: content;
|
|
199
|
-
background-color: rgba(21, 169, 21, 0.57);
|
|
200
181
|
border-color: rgba(71, 231, 71, 0.63);
|
|
201
182
|
}
|
|
202
183
|
`;
|