hexo-blog-encrypt 4.0.0 → 4.0.1

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.
@@ -17,7 +17,7 @@
17
17
  <span class="hbe hbe-input-label-content hbe-input-label-content-blink" data-content="{{hbeMessage}}">{{hbeMessage}}</span>
18
18
  </label>
19
19
  </div>
20
- <button class="hbe hbe-button" type="submit">{{hbeButtonText}}</button>
20
+ <button class="hbe hbe-button{{hbeButtonClass}}" type="submit">{{hbeButtonText}}</button>
21
21
  <div class="hbe hbe-error" role="alert" aria-live="polite"></div>
22
22
  </form>
23
23
  </div>
@@ -17,7 +17,7 @@
17
17
  <span class="hbe hbe-input-label-content hbe-input-label-content-default">{{hbeMessage}}</span>
18
18
  </label>
19
19
  </div>
20
- <button class="hbe hbe-button" type="submit">{{hbeButtonText}}</button>
20
+ <button class="hbe hbe-button{{hbeButtonClass}}" type="submit">{{hbeButtonText}}</button>
21
21
  <div class="hbe hbe-error" role="alert" aria-live="polite"></div>
22
22
  </form>
23
23
  </div>
package/lib/hbe.flip.html CHANGED
@@ -17,7 +17,7 @@
17
17
  <span class="hbe hbe-input-label-content hbe-input-label-content-flip" data-content="{{hbeMessage}}">{{hbeMessage}}</span>
18
18
  </label>
19
19
  </div>
20
- <button class="hbe hbe-button" type="submit">{{hbeButtonText}}</button>
20
+ <button class="hbe hbe-button{{hbeButtonClass}}" type="submit">{{hbeButtonText}}</button>
21
21
  <div class="hbe hbe-error" role="alert" aria-live="polite"></div>
22
22
  </form>
23
23
  </div>
@@ -17,7 +17,7 @@
17
17
  <span class="hbe hbe-input-label-content hbe-input-label-content-shrink">{{hbeMessage}}</span>
18
18
  </label>
19
19
  </div>
20
- <button class="hbe hbe-button" type="submit">{{hbeButtonText}}</button>
20
+ <button class="hbe hbe-button{{hbeButtonClass}}" type="submit">{{hbeButtonText}}</button>
21
21
  <div class="hbe hbe-error" role="alert" aria-live="polite"></div>
22
22
  </form>
23
23
  </div>
package/lib/hbe.style.css CHANGED
@@ -762,25 +762,39 @@
762
762
  * ============================================================ */
763
763
 
764
764
  .hbe-form {
765
- margin: 0;
766
- padding: 0;
767
- display: contents;
765
+ margin: 0;
766
+ padding: 0;
767
+ width: 100%;
768
+ display: flex;
769
+ flex-direction: column;
770
+ align-items: center;
768
771
  }
769
772
 
770
773
  .hbe-button {
771
- display: inline-block;
772
- margin: 0.5em 1em;
773
- padding: 0.7em 1.6em;
774
- font-size: 1rem;
775
- font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
776
- font-weight: 600;
777
- color: #fff;
778
- background: #2a7ae2;
779
- border: none;
780
- border-radius: 4px;
781
- cursor: pointer;
782
- -webkit-appearance: none;
783
- transition: background 0.15s ease, box-shadow 0.15s ease;
774
+ display: block;
775
+ margin: 0 auto 1em;
776
+ padding: 0.7em 1.6em;
777
+ width: auto;
778
+ max-width: 100%;
779
+ min-width: 8em;
780
+ height: auto;
781
+ line-height: 1.2;
782
+ font-size: 1rem;
783
+ font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
784
+ font-weight: 600;
785
+ color: #fff;
786
+ text-align: center;
787
+ text-indent: 0;
788
+ text-shadow: none;
789
+ white-space: normal;
790
+ overflow-wrap: anywhere;
791
+ background: #2a7ae2;
792
+ border: none;
793
+ border-radius: 4px;
794
+ box-shadow: none;
795
+ cursor: pointer;
796
+ -webkit-appearance: none;
797
+ transition: background 0.15s ease, box-shadow 0.15s ease;
784
798
  }
785
799
 
786
800
  .hbe-button:hover,
@@ -809,6 +823,15 @@ border-radius: 50%;
809
823
  animation: hbe-spin 0.7s linear infinite;
810
824
  }
811
825
 
826
+ .hbe-button::after {
827
+ content: none;
828
+ display: none;
829
+ }
830
+
831
+ .hbe-button-hidden {
832
+ display: none;
833
+ }
834
+
812
835
  @keyframes hbe-spin {
813
836
  to { transform: rotate(360deg); }
814
837
  }
@@ -20,7 +20,7 @@
20
20
  <path d="M1200,9c0,0-305.005,0-401.001,0C733,9,675.327,4.969,598,4.969C514.994,4.969,449.336,9,400.333,9C299.666,9,0,9,0,9v43c0,0,299.666,0,400.333,0c49.002,0,114.66,3.484,197.667,3.484c77.327,0,135-3.484,200.999-3.484C894.995,52,1200,52,1200,52V9z"></path>
21
21
  </svg>
22
22
  </div>
23
- <button class="hbe hbe-button" type="submit">{{hbeButtonText}}</button>
23
+ <button class="hbe hbe-button{{hbeButtonClass}}" type="submit">{{hbeButtonText}}</button>
24
24
  <div class="hbe hbe-error" role="alert" aria-live="polite"></div>
25
25
  </form>
26
26
  </div>
package/lib/hbe.up.html CHANGED
@@ -17,7 +17,7 @@
17
17
  <span class="hbe hbe-input-label-content hbe-input-label-content-up">{{hbeMessage}}</span>
18
18
  </label>
19
19
  </div>
20
- <button class="hbe hbe-button" type="submit">{{hbeButtonText}}</button>
20
+ <button class="hbe hbe-button{{hbeButtonClass}}" type="submit">{{hbeButtonText}}</button>
21
21
  <div class="hbe hbe-error" role="alert" aria-live="polite"></div>
22
22
  </form>
23
23
  </div>
package/lib/hbe.wave.html CHANGED
@@ -20,7 +20,7 @@
20
20
  <path d="M0,56.5c0,0,298.666,0,399.333,0C448.336,56.5,513.994,46,597,46c77.327,0,135,10.5,200.999,10.5c95.996,0,402.001,0,402.001,0"></path>
21
21
  </svg>
22
22
  </div>
23
- <button class="hbe hbe-button" type="submit">{{hbeButtonText}}</button>
23
+ <button class="hbe hbe-button{{hbeButtonClass}}" type="submit">{{hbeButtonText}}</button>
24
24
  <div class="hbe hbe-error" role="alert" aria-live="polite"></div>
25
25
  </form>
26
26
  </div>
package/lib/hbe.xray.html CHANGED
@@ -21,7 +21,7 @@
21
21
  <path d="M0,2.5c0,0,298.666,0,399.333,0C448.336,2.5,513.994,13,597,13c77.327,0,135-10.5,200.999-10.5c95.996,0,402.001,0,402.001,0"></path>
22
22
  </svg>
23
23
  </div>
24
- <button class="hbe hbe-button" type="submit">{{hbeButtonText}}</button>
24
+ <button class="hbe hbe-button{{hbeButtonClass}}" type="submit">{{hbeButtonText}}</button>
25
25
  <div class="hbe hbe-error" role="alert" aria-live="polite"></div>
26
26
  </form>
27
27
  </div>
package/package.json CHANGED
@@ -41,7 +41,7 @@
41
41
  "test:docs": "node --test tests/docs.test.js",
42
42
  "lint": "eslint --ext .js ./"
43
43
  },
44
- "version": "4.0.0",
44
+ "version": "4.0.1",
45
45
  "engines": {
46
46
  "node": ">=18"
47
47
  },
@@ -152,7 +152,8 @@ function register(hexo) {
152
152
  message: cfg.message,
153
153
  wpm: cfg.wrong_pass_message,
154
154
  whm: cfg.wrong_hash_message,
155
- buttonText: buttonShow ? buttonText : '',
155
+ buttonClass: buttonShow ? '' : ' hbe-button-hidden',
156
+ buttonText,
156
157
  kdfIterations: cfg.kdf.iterations,
157
158
  autoSave: !!cfg.autoSave,
158
159
  });
@@ -38,6 +38,7 @@ const PLACEHOLDERS = [
38
38
  { token: '{{hbeKdfIterations}}', field: 'kdfIterations', mode: 'attr' },
39
39
  { token: '{{hbeAutoSave}}', field: 'autoSave', mode: 'attr' },
40
40
  { token: '{{hbeMessage}}', field: 'message', mode: 'text' },
41
+ { token: '{{hbeButtonClass}}', field: 'buttonClass', mode: 'attr' },
41
42
  { token: '{{hbeButtonText}}', field: 'buttonText', mode: 'text' },
42
43
  { token: '{{hbeSalt}}', field: 'salt', mode: 'hex' },
43
44
  { token: '{{hbeNonce}}', field: 'nonce', mode: 'hex' },