Skip to content

Commit

Permalink
Add Beta banner
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter York committed Nov 26, 2024
1 parent 8000bea commit 5c1bec9
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 32 deletions.
13 changes: 0 additions & 13 deletions src/lib/common/Alpha.svelte

This file was deleted.

11 changes: 11 additions & 0 deletions src/lib/common/Beta.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="govuk-phase-banner">
<p class="govuk-phase-banner__content" style="margin-bottom: 0px">
<strong class="govuk-tag govuk-phase-banner__content__tag">Beta</strong>
<span class="govuk-phase-banner__text">
This is a new tool. Contact <a href="mailto:[email protected]">
the team
</a>
with any feedback or bug reports.
</span>
</p>
</div>
2 changes: 1 addition & 1 deletion src/lib/common/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fixBoundaries, type AuthorityBoundaries } from "boundaries";
import authoritiesUrl from "../../../assets/authorities.geojson?url";

export { default as Alpha } from "./Alpha.svelte";
export { default as Beta } from "./Beta.svelte";
export { default as BaselayerSwitcher } from "./BaselayerSwitcher.svelte";
export { default as ColorLegend } from "./ColorLegend.svelte";
export { default as ExternalLink } from "./ExternalLink.svelte";
Expand Down
5 changes: 2 additions & 3 deletions src/pages/AccessibilityStatement.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import "../style/main.css";
// @ts-expect-error no declarations
import { initAll } from "govuk-frontend";
import { AlphaBanner } from "govuk-svelte";
import { Header } from "lib/common";
import { Beta, Header } from "lib/common";
import { onMount } from "svelte";
onMount(async () => {
Expand All @@ -14,7 +13,7 @@

<div class="govuk-width-container govuk-prose">
<Header />
<AlphaBanner />
<Beta />

<h1 style="margin-top: 30px">
Plan Your Active Travel Schemes Accessibility Statement
Expand Down
4 changes: 2 additions & 2 deletions src/pages/BrowseSchemes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Geocoder,
Layout,
LoggedIn,
Alpha,
Beta,
MapLibreMap,
ZoomOutMap,
Header,
Expand Down Expand Up @@ -43,7 +43,7 @@
<div slot="sidebar" class="govuk-prose">
<Header />

<Alpha />
<Beta />
<div style="border-bottom: 1px solid #b1b4b6">
<LoggedIn />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/ChooseArea.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import {
getAuthoritiesGeoJson,
LoggedIn,
Alpha,
Beta,
MapLibreMap,
Popup,
describeAuthority,
Expand Down Expand Up @@ -89,7 +89,7 @@
<Header />

<div class="left">
<Alpha />
<Beta />
<div style="border-bottom: 1px solid #b1b4b6">
<LoggedIn />
</div>
Expand Down
5 changes: 2 additions & 3 deletions src/pages/CleanLocalStorage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
SecondaryButton,
ButtonGroup,
WarningButton,
AlphaBanner,
} from "govuk-svelte";
import {
downloadGeneratedFile,
measureLocalStorageSizes,
} from "lib/common/files";
import { Header } from "lib/common";
import { Beta, Header } from "lib/common";
import { onMount } from "svelte";
let items: [string, number][] = [];
Expand Down Expand Up @@ -54,7 +53,7 @@

<div class="govuk-width-container govuk-prose">
<Header />
<AlphaBanner />
<Beta />

<h1 style="margin-top: 30px">Manage local storage</h1>

Expand Down
6 changes: 3 additions & 3 deletions src/pages/LandingPage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import "../style/main.css";
// @ts-expect-error no declarations
import { initAll } from "govuk-frontend";
import { AlphaBanner, DefaultButton } from "govuk-svelte";
import { DefaultButton } from "govuk-svelte";
import About from "lib/common/About.svelte";
import PrivacyStatement from "lib/common/PrivacyStatement.svelte";
import { SecondaryButton } from "govuk-svelte";
import { Header } from "lib/common";
import { Beta, Header } from "lib/common";
import { onMount } from "svelte";
let showAbout = false;
Expand All @@ -28,7 +28,7 @@

<div class="govuk-width-container govuk-prose">
<Header />
<AlphaBanner />
<Beta />

<h1 style="margin-top: 30px">Welcome to Plan Your Active Travel Schemes!</h1>
<SecondaryButton on:click={() => (showAbout = true)}>
Expand Down
5 changes: 2 additions & 3 deletions src/pages/ManageFiles.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
FileInput,
WarningButton,
SecondaryButton,
AlphaBanner,
ErrorMessage,
} from "govuk-svelte";
import {
Expand All @@ -20,7 +19,7 @@
setLocalStorage,
serializeSchemes,
} from "lib/common/files";
import { Header, describeAuthority, getAuthoritiesGeoJson } from "lib/common";
import { Beta, Header, describeAuthority, getAuthoritiesGeoJson } from "lib/common";
import { cfg } from "lib/sketch/config";
import { emptySchemes } from "scheme-sketcher-lib/draw/stores";
import { onMount } from "svelte";
Expand Down Expand Up @@ -116,7 +115,7 @@

<div class="govuk-width-container govuk-prose">
<Header />
<AlphaBanner />
<Beta />

<h1 style="margin-top: 30px">Manage my sketches</h1>

Expand Down
4 changes: 2 additions & 2 deletions src/pages/SketchSchemes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Geocoder,
getAuthoritiesGeoJson,
LoggedIn,
Alpha,
Beta,
MapLibreMap,
Header,
} from "lib/common";
Expand Down Expand Up @@ -84,7 +84,7 @@
<Header />

{#if $mode.mode == "list" || $mode.mode == "split-route" || $mode.mode == "set-image" || $mode.mode == "streetview"}
<Alpha />
<Beta />
<div style="border-bottom: 1px solid #b1b4b6">
<LoggedIn />
</div>
Expand Down

0 comments on commit 5c1bec9

Please sign in to comment.