Skip to content

Commit c71b82e

Browse files
emma-sgikreymer
andauthored
Layout fixes (#31)
* remove unused method * adjust margins to accommodate scrolling entire height * remove border from tip about finish button etc * fix overflow/scroll issues on mobile * move restart button to top right * remove extra padding on help thingy * tweak mobile layout * final text tweaks --------- Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
1 parent 882944b commit c71b82e

File tree

2 files changed

+24
-39
lines changed

2 files changed

+24
-39
lines changed

src/archive-now.ts

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,15 @@ class ArchiveNow extends LitElement {
327327
<span class="text-sm">Back to Webrecorder.net</span>
328328
</a>
329329
</header>
330+
<div class="justify-self-end [grid-area:restart]">
331+
<button
332+
class="flex items-center gap-2 leading-none text-stone-400 transition-colors hover:text-stone-600"
333+
@click=${() => (this.showCreateDialog = true)}
334+
>
335+
<span class="text-sm">Start over</span>
336+
<sl-icon name="arrow-clockwise" class="text-lg"></sl-icon>
337+
</button>
338+
</div>
330339
<div
331340
class="${this.isFinished || this.showHint || this.showCreateDialog
332341
? "shadow shadow-earth-800/10 ring-1 ring-earth-300/50"
@@ -343,17 +352,17 @@ class ArchiveNow extends LitElement {
343352
: html` <replay-web-page coll=${this.collId}></replay-web-page>`}
344353
</div>
345354
<div
346-
class="mr-16 overflow-auto [grid-area:detail] lg:mr-0 lg:px-4 2xl:px-6"
355+
class="-mb-4 -mt-4 overflow-auto pb-4 pt-4 [grid-area:detail] lg:mr-0 lg:px-4 2xl:px-6"
347356
>
348357
<div class="mb-3 mt-3">
349358
<div
350359
class="${this.isFinished
351360
? "translate-x-0"
352-
: "lg:-translate-x-4"} inline-flex h-8 items-center gap-1.5 rounded-full border border-brand-green/30 px-2.5 text-brand-green transition-transform lg:pl-1.5"
361+
: "lg:-translate-x-4"} inline-flex h-8 items-center gap-1.5 rounded-full text-brand-green transition-transform"
353362
>
354363
${this.isFinished
355364
? html`
356-
<span class="pl-1.5">🎉</span>
365+
🎉
357366
<span class="text-sm"> Archiving finished! </span>
358367
`
359368
: html`
@@ -460,26 +469,25 @@ class ArchiveNow extends LitElement {
460469
</dl>
461470
462471
<hr class="my-3 rounded-md border-brand-green/30" />
463-
464-
<h3 class="mt-4 mb-4 text-sm font-semibold leading-none text-stone-700">Next Steps</h3>
472+
<h3 class="mt-4 mb-2 text-sm font-semibold leading-none text-stone-700">Next Steps</h3>
465473
<p class="mb-2 mt-1 text-sm">View your archive any time with
466474
<a
467475
class="font-medium text-cyan-500 transition-colors hover:text-cyan-400"
468476
href="http://replayweb.page"
469477
target="_blank"
470-
>ReplayWeb.page</a>.</p>
478+
>ReplayWeb.page</a>.
479+
</p>
471480
472481
<p class="mb-4 mt-1 text-sm">
473-
Ready to go beyond the demo? Find the Webrecorder tools that best fit your archiving needs.
482+
Ready to go beyond the demo? Check out these other Webrecorder tools:
474483
</p>
475484
476485
${card(
477486
btrixLockupSrc,
478487
"Browsertrix",
479488
html`
480489
<p>
481-
Automate archiving entire websites on schedule and share your
482-
archives with others.
490+
Fully automated archiving of entire websites on a set schedule.
483491
</p>
484492
`,
485493
{
@@ -491,25 +499,13 @@ class ArchiveNow extends LitElement {
491499
${card(
492500
awpLockupSrc,
493501
"ArchiveWeb.page",
494-
html` <p>Archive while you browse with our Chrome extension.</p> `,
502+
html` <p>Archive while you browse with our free Chrome extension.</p> `,
495503
{
496504
href: "https://chromewebstore.google.com/detail/webrecorder-archivewebpag/fpeoodllldobpkbkabpblcfaogecpndd",
497505
text: "Install Extension",
498506
},
499507
true,
500508
)}
501-
502-
<hr class="my-3 rounded-md border-brand-green/30" />
503-
504-
<div>
505-
<button
506-
class="flex items-center gap-2 leading-none text-stone-400 transition-colors hover:text-stone-600"
507-
@click=${() => (this.showCreateDialog = true)}
508-
>
509-
<sl-icon name="arrow-clockwise" class="text-lg"></sl-icon>
510-
<span class="text-sm">Create another archive</span>
511-
</button>
512-
</div>
513509
</div>
514510
`;
515511
}
@@ -730,17 +726,6 @@ class ArchiveNow extends LitElement {
730726
}
731727
}
732728

733-
private showBackdrop() {
734-
if (!this.hintBackdrop || this.hintBackdrop.style.display === "block")
735-
return;
736-
737-
this.hintBackdrop.style.display = "block";
738-
739-
window.requestAnimationFrame(() => {
740-
this.hintBackdrop!.style.opacity = "1";
741-
});
742-
}
743-
744729
private hideBackdrop() {
745730
if (!this.hintBackdrop || this.hintBackdrop.style.display === "none")
746731
return;

src/global.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@
5858
archive-now {
5959
@apply grid h-full gap-4;
6060
grid-template-areas:
61-
"header"
62-
"archive"
63-
"detail";
64-
grid-template-rows: min-content 1fr theme(size.48);
65-
grid-template-columns: 1fr;
61+
"header restart"
62+
"archive archive"
63+
"detail detail";
64+
grid-template-rows: min-content 1fr min-content theme(size.48);
65+
grid-template-columns: 1fr auto;
6666
}
6767

6868
@media screen(lg) {
6969
archive-now {
7070
grid-template-areas:
71-
"header header"
71+
"header restart"
7272
"archive detail";
7373
grid-template-rows: min-content 1fr;
7474
grid-template-columns: 1fr theme(size.80);

0 commit comments

Comments
 (0)