Skip to content

Commit

Permalink
chore: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
choyiny committed Oct 19, 2022
1 parent 2d41abb commit 6505c7a
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 11 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist/
.angular/
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ These options are well documented in the [Cloudflare Docs](https://developers.cl
- `resolved(response: string)`. Occurs when the CAPTCHA resolution value changed.

### Example

For those who prefer examples over documentation, simply clone the repository and run

```bash
$ yarn install
$ ng build ngx-turnstile
$ ng serve ngx-turnstile-demo
```
```
32 changes: 25 additions & 7 deletions projects/ngx-turnstile-demo/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,41 @@
<h2 class="h3 mb-3 fw-normal">Turnstile &dash; Dummy Login Demo</h2>

<div class="form-floating">
<input type="text" id="user" class="form-control">
<input type="text" id="user" class="form-control" />
<label for="user">User name</label>
</div>
<div class="form-floating">
<input type="password" id="pass" class="form-control" autocomplete="off" readonly value="CorrectHorseBatteryStaple">
<input
type="password"
id="pass"
class="form-control"
autocomplete="off"
readonly
value="CorrectHorseBatteryStaple"
/>
<label for="pass">Password (dummy)</label>
</div>

<div class="checkbox mb-3">
<!-- The following line controls and configures the Turnstile widget. -->
<ngx-turnstile [siteKey]="siteKey" theme="light" (resolved)="onResolved($event)"></ngx-turnstile>
<ngx-turnstile
[siteKey]="siteKey"
theme="light"
(resolved)="onResolved($event)"
></ngx-turnstile>
<!-- end. -->
</div>
<button class="w-100 btn btn-lg btn-primary" type="submit">Sign in</button>
<p class="mt-5 mb-3 text-muted"><a href="https://github.com/cloudflare/turnstile-demo-workers"><i class="bi bi-github"></i> See code</a></p>
<p class="mt-5 mb-3 text-muted">Go to the <a href="/explicit">explicit render demo</a></p>
<button class="w-100 btn btn-lg btn-primary" type="submit">
Sign in
</button>
<p class="mt-5 mb-3 text-muted">
<a href="https://github.com/cloudflare/turnstile-demo-workers"
><i class="bi bi-github"></i> See code</a
>
</p>
<p class="mt-5 mb-3 text-muted">
Go to the <a href="/explicit">explicit render demo</a>
</p>
</form>
</main>

</div>
2 changes: 1 addition & 1 deletion projects/ngx-turnstile-demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.scss'],
})
export class AppComponent {
siteKey = "1x00000000000000000000AA";
siteKey = '1x00000000000000000000AA';

onResolved(response: string | null) {
console.log(response);
Expand Down
16 changes: 14 additions & 2 deletions projects/ngx-turnstile-demo/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,20 @@
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.1/css/bootstrap.min.css" integrity="sha512-siwe/oXMhSjGCwLn+scraPOWrJxHlUgMBMZXdPe2Tnk3I0x3ESCoLz7WZ5NTH6SZrywMY+PB1cjyqJ5jAluCOg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.9.1/font/bootstrap-icons.min.css" integrity="sha512-5PV92qsds/16vyYIJo3T/As4m2d8b6oWYfoqV+vtizRB6KhF1F9kYzWzQmsO6T3z3QG2Xdhrx7FQ+5R1LiQdUA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.1/css/bootstrap.min.css"
integrity="sha512-siwe/oXMhSjGCwLn+scraPOWrJxHlUgMBMZXdPe2Tnk3I0x3ESCoLz7WZ5NTH6SZrywMY+PB1cjyqJ5jAluCOg=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.9.1/font/bootstrap-icons.min.css"
integrity="sha512-5PV92qsds/16vyYIJo3T/As4m2d8b6oWYfoqV+vtizRB6KhF1F9kYzWzQmsO6T3z3QG2Xdhrx7FQ+5R1LiQdUA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
</head>
<body>
<app-root></app-root>
Expand Down

0 comments on commit 6505c7a

Please sign in to comment.