@flun/html-template 4.4.3 → 5.0.0

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.
@@ -27,6 +27,7 @@
27
27
  .card {
28
28
  background: var(--container-bg);
29
29
  border-radius: 12px;
30
+ border: 1px solid #2e3135;
30
31
  box-shadow: 0 20px 40px var(--content-shadow);
31
32
  width: 100%;
32
33
  max-width: 400px;
@@ -130,8 +131,8 @@
130
131
  text-decoration: underline;
131
132
  }
132
133
 
133
- .hidden {
134
- display: none;
134
+ [hidden] {
135
+ display: none !important;
135
136
  }
136
137
 
137
138
  /* ==================== 移动端样式适配 (≤640px) ==================== */
@@ -28,6 +28,7 @@
28
28
  .card {
29
29
  background: var(--container-bg);
30
30
  border-radius: 12px;
31
+ border: 1px solid #2e3135;
31
32
  box-shadow: 0 20px 40px var(--content-shadow);
32
33
  width: 80%;
33
34
  min-width: 400px;
@@ -131,8 +132,8 @@
131
132
  text-decoration: underline;
132
133
  }
133
134
 
134
- .hidden {
135
- display: none;
135
+ [hidden] {
136
+ display: none !important;
136
137
  }
137
138
 
138
139
  /* ==================== 移动端样式适配 (≤640px) ==================== */
@@ -155,7 +156,6 @@
155
156
 
156
157
  .form-group input {
157
158
  font-size: 16px;
158
- /* 防止iOS缩放 */
159
159
  padding: 12px 14px;
160
160
  }
161
161
 
@@ -197,7 +197,7 @@
197
197
  autocomplete="new-password">
198
198
  </div>
199
199
  <div class="form-group" id="confirmPasswordGroup">
200
- <input type="password" id="confirmPassword" placeholder="确认新密码" maxlength="72"
200
+ <input type="password" id="confirmPassword" placeholder="再次输入新密码" maxlength="72"
201
201
  autocomplete="new-password">
202
202
  </div>
203
203
  <button type="button" class="btn" id="resetBtn">重置密码</button>
@@ -26,6 +26,7 @@
26
26
  .card {
27
27
  background: var(--container-bg);
28
28
  border-radius: 12px;
29
+ border: 1px solid #2e3135;
29
30
  box-shadow: 0 20px 40px var(--content-shadow);
30
31
  width: 80%;
31
32
  min-width: 400px;
@@ -101,8 +102,8 @@
101
102
  text-decoration: underline;
102
103
  }
103
104
 
104
- .hidden {
105
- display: none;
105
+ [hidden] {
106
+ display: none !important;
106
107
  }
107
108
 
108
109
  /* ==================== 移动端样式适配 (≤640px) ==================== */
@@ -164,8 +165,8 @@
164
165
  <body>
165
166
  <div class="card">
166
167
  <h2 id="pageTitle">邮箱验证</h2>
167
- <div id="message" class="message">正在验证,请稍候...</div>
168
- <div id="action" style="display:none;"></div>
168
+ <div id="message" class="message">正在验证,请稍候...</div>
169
+ <div id="action" hidden></div>
169
170
  </div>
170
171
 
171
172
  <!-- 公共逻辑 -->
@@ -186,7 +187,7 @@
186
187
  },
187
188
  handleError = msg => {
188
189
  messageDiv.className = 'error', messageDiv.textContent = msg;
189
- actionDiv.innerHTML = `<div class="link">${getFallbackLink()}</div>`, actionDiv.style.display = 'block';
190
+ actionDiv.innerHTML = `<div class="link">${getFallbackLink()}</div>`, actionDiv.hidden = false;
190
191
  };
191
192
 
192
193
  if (!token) return handleError('无效的验证链接');
@@ -197,7 +198,7 @@
197
198
  const response = await fetch(`${apiEndpoint}?token=${encodeURIComponent(token)}`), data = await response.json();
198
199
 
199
200
  if (response.ok) {
200
- title.classList.add('hidden'), actionDiv.style.display = 'none';
201
+ title.classList.add('hidden'), actionDiv.hidden = true;
201
202
  messageDiv.className = 'success big-success', messageDiv.textContent = data.message;
202
203
 
203
204
  let seconds = 3;