Skip to content

Commit 249304d

Browse files
authored
rename button for mobile and reformat (#34)
1 parent dd93498 commit 249304d

File tree

1 file changed

+52
-50
lines changed

1 file changed

+52
-50
lines changed

src/archive-now.ts

Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -355,15 +355,15 @@ class ArchiveNow extends LitElement {
355355
? "shadow shadow-earth-800/10 ring-1 ring-earth-300/50"
356356
: "shadow-lg shadow-cyan-800/10 ring-2 ring-cyan-300/50"} overflow-hidden rounded-lg bg-white transition-all [grid-area:archive]"
357357
>
358-
${!this.isEmpty ?
359-
!this.isFinished
360-
? html` <archive-web-page
361-
proxyPrefix="https://archive-now.webrecorder.workers.dev/proxy/"
362-
sandbox="true"
363-
coll=${this.collId}
364-
deepLink="true"
365-
></archive-web-page>`
366-
: html` <replay-web-page coll=${this.collId}></replay-web-page>`
358+
${!this.isEmpty
359+
? !this.isFinished
360+
? html` <archive-web-page
361+
proxyPrefix="https://archive-now.webrecorder.workers.dev/proxy/"
362+
sandbox="true"
363+
coll=${this.collId}
364+
deepLink="true"
365+
></archive-web-page>`
366+
: html` <replay-web-page coll=${this.collId}></replay-web-page>`
367367
: html``}
368368
</div>
369369
<div
@@ -375,22 +375,23 @@ class ArchiveNow extends LitElement {
375375
? "translate-x-0"
376376
: "lg:-translate-x-4"} inline-flex h-8 items-center gap-1.5 rounded-full text-brand-green transition-transform"
377377
>
378-
${!this.isEmpty ?
379-
this.isFinished
380-
? html`
381-
🎉
382-
<span class="text-sm"> Archiving finished! </span>
383-
`
384-
: html`
385-
<sl-icon
386-
name="arrow-left-circle"
387-
class="hidden text-lg lg:block"
388-
></sl-icon>
389-
<span class="text-sm">
390-
Click <strong class="font-semibold">Finish</strong> to
391-
finalize your archive
392-
</span>
393-
` : ``}
378+
${!this.isEmpty
379+
? this.isFinished
380+
? html`
381+
🎉
382+
<span class="text-sm"> Archiving finished! </span>
383+
`
384+
: html`
385+
<sl-icon
386+
name="arrow-left-circle"
387+
class="hidden text-lg lg:block"
388+
></sl-icon>
389+
<span class="text-sm">
390+
Click <strong class="font-semibold">Finish</strong> to
391+
finalize your archive
392+
</span>
393+
`
394+
: ``}
394395
</div>
395396
</div>
396397
<!-- FOR LINKY
@@ -501,11 +502,7 @@ class ArchiveNow extends LitElement {
501502
${card(
502503
btrixLockupSrc,
503504
"Browsertrix",
504-
html`
505-
<p>
506-
Automated browser-based crawling at scale.
507-
</p>
508-
`,
505+
html` <p>Automated browser-based crawling at scale.</p> `,
509506
{
510507
href: "https://webrecorder.net/browsertrix/",
511508
text: "Learn More",
@@ -515,7 +512,9 @@ class ArchiveNow extends LitElement {
515512
${card(
516513
awpLockupSrc,
517514
"ArchiveWeb.page",
518-
html` <p>Archive while you browse with our free Chrome extension.</p> `,
515+
html`
516+
<p>Archive while you browse with our free Chrome extension.</p>
517+
`,
519518
{
520519
href: "https://chromewebstore.google.com/detail/webrecorder-archivewebpag/fpeoodllldobpkbkabpblcfaogecpndd",
521520
text: "Install Extension",
@@ -693,25 +692,28 @@ class ArchiveNow extends LitElement {
693692
}}
694693
>
695694
<div class="flex flex-col">
696-
<div class="flex items-end gap-3 px-3 pb-3">
697-
<sl-input
698-
name="url"
699-
class="flex-1"
700-
label="Enter a URL"
701-
placeholder=${DEFAULT_URL.replace(/\/$/, "")}
702-
type="text"
703-
autocomplete="url"
704-
inputmode="url"
705-
spellcheck="false"
706-
required
707-
></sl-input>
708-
<sl-button type="submit" variant="primary"
709-
>Start Archiving</sl-button
710-
>
711-
</div>
712-
${!this.isEmpty ? html`
713-
<div class="px-3 pb-2 text-sm">Note: Your previous archive will be cleared out. Be sure to download it if you want to keep it!</div>
714-
` : ``}
695+
<div class="flex items-end gap-3 px-3 pb-3">
696+
<sl-input
697+
name="url"
698+
class="flex-1"
699+
label="Enter a URL"
700+
placeholder=${DEFAULT_URL.replace(/\/$/, "")}
701+
type="text"
702+
autocomplete="url"
703+
inputmode="url"
704+
spellcheck="false"
705+
required
706+
></sl-input>
707+
<sl-button type="submit" variant="primary">Go</sl-button>
708+
</div>
709+
${!this.isEmpty
710+
? html`
711+
<div class="px-3 pb-2 text-sm">
712+
Note: Your previous archive will be cleared out. Be sure to
713+
download it if you want to keep it!
714+
</div>
715+
`
716+
: ``}
715717
</div>
716718
</form>
717719
</sl-dialog>

0 commit comments

Comments
 (0)