From 03be90e4eec84446692a98cf63f81099e370a58e Mon Sep 17 00:00:00 2001 From: Kieran Boyle Date: Thu, 1 Apr 2021 13:23:09 -0700 Subject: [PATCH 1/2] add github ribbon to docs page --- docs/index.html | 5 +++-- docs/public/global.css | 7 +++++++ docs/src/App.svelte | 25 +++++++++++++++---------- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/docs/index.html b/docs/index.html index 8091db4..2b893e0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -13,17 +13,18 @@ - + - + + Fork me on GitHub diff --git a/docs/public/global.css b/docs/public/global.css index 12c30e1..611c111 100644 --- a/docs/public/global.css +++ b/docs/public/global.css @@ -72,3 +72,10 @@ button:not(:disabled):active { button:focus { border-color: #666; } + +.github-ribbon { + position: fixed; + right: 0; + top: 0; + z-index: 100; +} diff --git a/docs/src/App.svelte b/docs/src/App.svelte index b23046e..d8de405 100644 --- a/docs/src/App.svelte +++ b/docs/src/App.svelte @@ -2,13 +2,12 @@ import ContainerExample from './ContainerExample.svelte'; let enableObstructionDetection = false; + let status = 'Hidden'; const handleClick = () => (enableObstructionDetection = !enableObstructionDetection); - - + $: status = enableObstructionDetection ? 'Visible' : 'Hidden'; + {#if enableObstructionDetection}
@@ -16,7 +15,10 @@
-

Open dev console to see debug output.

+ +

Hint: Open dev console to see debug output.

@@ -123,7 +125,6 @@ border-radius: 4px; display: inline-block; color: #111; - display: inline-block; padding: 8px 16px; } @@ -140,10 +141,14 @@ } #obstructions { - padding: 8px 16px; - position: fixed; - right: 4px; - top: 4px; + background: #eee; + border: 0; + margin-right: 8px; + } + + #obstructions.on { + background-color: #4a90e2; + color: #fff; } #overlay { From 2ec72125349d48d12e79a92e5da593b6f2f65b14 Mon Sep 17 00:00:00 2001 From: Kieran Boyle Date: Thu, 1 Apr 2021 14:29:39 -0700 Subject: [PATCH 2/2] update integration tests --- docs/src/App.svelte | 199 ++++++++++++++----------- tests/integration/obstructions.spec.js | 2 +- tests/integration/rules.spec.js | 2 +- 3 files changed, 112 insertions(+), 91 deletions(-) diff --git a/docs/src/App.svelte b/docs/src/App.svelte index d8de405..92edce9 100644 --- a/docs/src/App.svelte +++ b/docs/src/App.svelte @@ -13,113 +13,134 @@
{/if} -
-
+
+

Hint: Open dev console to see debug output.

-
-
-
-
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Hello World! + +
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- +
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Hello World! - +
+
+
+ +
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+