diff --git a/src/components/base/auto-px-style.ts b/src/components/base/auto-px-style.ts
index f2c833e..5ea6b69 100644
--- a/src/components/base/auto-px-style.ts
+++ b/src/components/base/auto-px-style.ts
@@ -79,7 +79,9 @@ export const autoPxStyle: CSSResult = css`
--auto-124px: calc(124px / var(--hostDevicePixelRatio));
--auto-128px: calc(128px / var(--hostDevicePixelRatio));
--auto-129px: calc(129px / var(--hostDevicePixelRatio));
+ --auto-130px: calc(130px / var(--hostDevicePixelRatio));
--auto-140px: calc(140px / var(--hostDevicePixelRatio));
+ --auto-150px: calc(150px / var(--hostDevicePixelRatio));
--auto-152px: calc(152px / var(--hostDevicePixelRatio));
--auto-160px: calc(160px / var(--hostDevicePixelRatio));
--auto-164px: calc(164px / var(--hostDevicePixelRatio));
@@ -111,6 +113,7 @@ export const autoPxStyle: CSSResult = css`
--auto-368px: calc(368px / var(--hostDevicePixelRatio));
--auto-370px: calc(370px / var(--hostDevicePixelRatio));
--auto-374px: calc(374px / var(--hostDevicePixelRatio));
+ --auto-381px: calc(381px / var(--hostDevicePixelRatio));
--auto-382px: calc(382px / var(--hostDevicePixelRatio));
--auto-388px: calc(388px / var(--hostDevicePixelRatio));
--auto-396px: calc(396px / var(--hostDevicePixelRatio));
diff --git a/src/components/clock-widget/clock-widget.ts b/src/components/clock-widget/clock-widget.ts
index c199367..58a4cc4 100644
--- a/src/components/clock-widget/clock-widget.ts
+++ b/src/components/clock-widget/clock-widget.ts
@@ -3,6 +3,7 @@ import {customElement, property} from 'lit/decorators.js'
import clockStyles from './clock-widget-style.js'
import './date/date.js'
import './time/time.js'
+import '../clock/clock.js'
@customElement('clock-widget')
export class ClockContainer extends LitElement {
@property({type: String}) name = 'clock-widget'
@@ -18,16 +19,38 @@ export class ClockContainer extends LitElement {
}
render() {
- return html`
-
-
- `
+ if (this.type == 'vertical') {
+ return html`
+
+
+ `
+ } else if (this.type == 'clock') {
+ return html`
+
+
+
+
+ `
+ } else {
+ return html`
+
+
+ `
+ }
}
}
diff --git a/src/components/clock-widget/time/time-style.ts b/src/components/clock-widget/time/time-style.ts
index b62c322..a45d9f6 100644
--- a/src/components/clock-widget/time/time-style.ts
+++ b/src/components/clock-widget/time/time-style.ts
@@ -13,16 +13,20 @@ export default css`
font-size: var(--auto-128px);
line-height: var(--auto-128px);
}
+ #vertical {
+ display: flex;
+ }
#clock-minute,
#clock-hour {
display: flex;
}
- #clock-hour div[type='platinic'] {
+ #clock-hour[type='platinic'] {
+ color: #ffffff;
opacity: 0.67;
padding-inline-end: var(--auto-10px);
}
- #clock-minute div[type='platinic'] {
+ #clock-minute[type='platinic'] {
padding-inline-start: var(--auto-10px);
/* 主题色/黄金渐变 */
background: linear-gradient(180deg, #ebc965 0%, #d9aa38 100%);
@@ -30,12 +34,58 @@ export default css`
background-clip: text;
}
- /* 默认 */
- #clock-line,
+ /* 传统的 */
+ #clock-line[type='convertional'],
.clock-time[type='convertional'] {
font-weight: 400;
font-size: var(--auto-116px);
line-height: var(--auto-116px);
color: #f0f0f0;
}
+ /* 分隔的 */
+ #clock-line[type='separate'] {
+ background: #ffffff;
+ opacity: 0.6;
+ width: var(--auto-2px);
+ height: var(--auto-90px);
+ margin: 0 var(--auto-24px);
+ position: relative;
+ top: var(--auto-50px);
+ }
+ .clock-time[type='separate'] {
+ font-weight: 400;
+ font-size: var(--auto-160px);
+ line-height: var(--auto-160px);
+ color: #f5f5f5;
+ }
+ /* 垂直的 */
+ #vertical[type='vertical'] {
+ display: flex;
+ flex-direction: column;
+ }
+ .clock-time[type='vertical'] {
+ font-weight: 600;
+ width: var(--auto-150px);
+ font-size: var(--auto-220px);
+ line-height: var(--auto-220px);
+ color: #f5f5f5;
+ }
+ #clock-minute[type='vertical'] {
+ position: relative;
+ bottom: var(--auto-70px);
+ /* 主题色/黄金渐变 */
+ background: linear-gradient(180deg, #ebc965 0%, #d9aa38 100%);
+ -webkit-text-fill-color: transparent;
+ background-clip: text;
+ }
+ #clock-hour[type='vertical'] {
+ background: linear-gradient(
+ 180deg,
+ rgba(255, 255, 255, 0.6) 50%,
+ rgba(255, 255, 255, 0.01) 100%
+ );
+ background-clip: text;
+ -webkit-text-fill-color: transparent;
+ }
+ /* TODO : 翻页的 --- flipping */
`
diff --git a/src/components/clock-widget/time/time.ts b/src/components/clock-widget/time/time.ts
index 898e78b..6071886 100644
--- a/src/components/clock-widget/time/time.ts
+++ b/src/components/clock-widget/time/time.ts
@@ -16,23 +16,29 @@ class LockScreenClockTimeContainer extends LitElement {
}
render() {
return html`
-
-
- ${this.hourFirst}
+
+
+
+ ${this.hourFirst}
+
+
+ ${this.hourSecond}
+
-
- ${this.hourSecond}
+
+ ${this.type == 'convertional' ? this.line : ''}
-
-
- ${this.type == 'convertional' ? this.line : ''}
-
-
-
- ${this.minuteFirst}
-
-
- ${this.minuteSecond}
+
+
+ ${this.minuteFirst}
+
+
+ ${this.minuteSecond}
+
`
diff --git a/src/test/panels/locked/locked.ts b/src/test/panels/locked/locked.ts
index f1dda32..5f2baf9 100644
--- a/src/test/panels/locked/locked.ts
+++ b/src/test/panels/locked/locked.ts
@@ -1,96 +1,202 @@
import {html, LitElement, css} from 'lit'
import {customElement, property} from 'lit/decorators.js'
import '../icon/icon'
+import '/home/duanzhijiang/WORKING_DIRECTORY/gaia/star-web-components/src/components/clock-widget/date/date.js'
+import '/home/duanzhijiang/WORKING_DIRECTORY/gaia/star-web-components/src/components/clock-widget/time/time.js'
+import '/home/duanzhijiang/WORKING_DIRECTORY/gaia/star-web-components/src/components/clock-widget/clock-widget.js'
+import '/home/duanzhijiang/WORKING_DIRECTORY/gaia/star-web-components/src/components/clock/clock'
@customElement('panel-locked')
export class PanelLocked extends LitElement {
@property({type: Number}) second = 30
+ @property({type: String}) type = 'platinic'
+ @property({type: String}) hourFirst = '1'
+ @property({type: String}) hourSecond = '2'
+ @property({type: String}) minuteFirst = '3'
+ @property({type: String}) minuteSecond = '4'
+ @property({type: String}) date = '7月21日 周四 上午'
+ // static styles = css`
+ // .screen {
+ // position: absolute;
+ // height: 100%;
+ // width: 100%;
+ // background-color: rgb(183, 211, 227);
+ // }
+ // .lock {
+ // box-sizing: border-box;
+ // left: 50%;
+ // transform: translate(-50%);
+ // }
+
+ // .lockup {
+ // position: absolute;
+ // width: 27px;
+ // height: 24px;
+ // top: 405px;
+ // border: 5px solid #6f7a89;
+ // border-radius: 50% 50% 0 0;
+ // }
+ // .lockdown {
+ // position: absolute;
+ // width: 39px;
+ // height: 25px;
+ // top: 424px;
+ // background: #6f7a89;
+ // border-radius: 3px 3px 6px 6px;
+ // }
+ // .cylinder-up {
+ // position: relative;
+ // top: 7.5px;
+ // width: 6px;
+ // height: 6px;
+ // background: #d9d9d9;
+ // border-radius: 50%;
+ // }
+ // .cylinder-down {
+ // position: relative;
+ // top: 6.5px;
+ // width: 2px;
+ // height: 4.5px;
+ // background: #d9d9d9;
+ // border-radius: 0 0 1px 1px;
+ // }
+ // .text {
+ // position: absolute;
+ // width: 135px;
+ // height: 45px;
+ // left: calc(50% - 135px / 2);
+ // top: calc(50% - 45px / 2 + 11.75px);
+ // font-family: 'OPPOSans';
+ // font-style: normal;
+ // font-weight: 400;
+ // font-size: 45px;
+ // line-height: 45px;
+ // text-align: center;
+ // color: #4d4d4d;
+ // }
+ // .try-again {
+ // position: absolute;
+ // width: 125.5px;
+ // height: 26.5px;
+ // left: calc(50% - 125.5px / 2 + 1px);
+ // top: calc(50% - 26.5px / 2 + 67.5px);
+ // font-family: 'OPPOSans';
+ // font-style: normal;
+ // font-weight: 400;
+ // font-size: 20px;
+ // line-height: 26.5px;
+ // color: #292929;
+ // }
+ // `
static styles = css`
+ :host {
+ margin: 0;
+ padding: 0;
+ }
.screen {
- position: absolute;
- height: 100%;
width: 100%;
- background-color: rgb(183, 211, 227);
+ height: 200px;
+ background-color: pink;
+ border-radius: 10px;
}
- .lock {
- box-sizing: border-box;
- left: 50%;
- transform: translate(-50%);
+ .clockType {
+ height: var(--auto-606px);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
}
-
- .lockup {
- position: absolute;
- width: 27px;
- height: 24px;
- top: 405px;
- border: 5px solid #6f7a89;
- border-radius: 50% 50% 0 0;
- }
- .lockdown {
- position: absolute;
- width: 39px;
- height: 25px;
- top: 424px;
- background: #6f7a89;
- border-radius: 3px 3px 6px 6px;
- }
- .cylinder-up {
- position: relative;
- top: 7.5px;
- width: 6px;
- height: 6px;
- background: #d9d9d9;
- border-radius: 50%;
- }
- .cylinder-down {
- position: relative;
- top: 6.5px;
- width: 2px;
- height: 4.5px;
- background: #d9d9d9;
- border-radius: 0 0 1px 1px;
- }
- .text {
- position: absolute;
- width: 135px;
- height: 45px;
- left: calc(50% - 135px / 2);
- top: calc(50% - 45px / 2 + 11.75px);
- font-family: 'OPPOSans';
- font-style: normal;
- font-weight: 400;
- font-size: 45px;
- line-height: 45px;
+ .textTop {
+ width: 100%;
+ height: 50px;
text-align: center;
- color: #4d4d4d;
+ line-height: 50px;
+ font-size: 26px;
+ font-weight: 600;
+ background-color: skyblue;
+ border-radius: 10px;
}
- .try-again {
- position: absolute;
- width: 125.5px;
- height: 26.5px;
- left: calc(50% - 125.5px / 2 + 1px);
- top: calc(50% - 26.5px / 2 + 67.5px);
- font-family: 'OPPOSans';
- font-style: normal;
- font-weight: 400;
- font-size: 20px;
- line-height: 26.5px;
- color: #292929;
+ clock-time {
+ display: flex;
+ justify-content: center;
}
+ /* TODO : flipping */
`
render() {
return html`
-
-
-
-
+
+
+
TODO : 翻页的 --- flipping
+
-
已锁定
-
请${this.second}秒后再试
+
+
+
+
+
+
+
传统的 --- convertional
+
+
+
+
+
+
+
+
`
}