Skip to content

Commit 97f1bd7

Browse files
authored
Merge pull request #38 from edman/main
Update the app for unframed
2 parents 18251c1 + bb9fff3 commit 97f1bd7

6 files changed

Lines changed: 18 additions & 14 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A demo showing off [Isolated Web Apps](https://github.com/WICG/isolated-web-apps
66

77
- [Direct Sockets](https://github.com/WICG/direct-sockets)
88
- [Controlled Frame](https://github.com/WICG/controlled-frame)
9-
- [Borderless display mode](https://github.com/WICG/manifest-incubations/blob/gh-pages/borderless-explainer.md)
9+
- [Unframed display mode](https://github.com/WICG/manifest-incubations/blob/gh-pages/unframed-explainer.md)
1010
- [Multiscreen capture with auto-permission](https://github.com/screen-share/capture-all-screens)
1111

1212
### Unrestricted [Protocol Handlers](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/protocol_handlers) & [Launch Handler](https://developer.mozilla.org/en-US/docs/Web/API/Launch_Handler_API)

public/.well-known/manifest.webmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
],
1515
"start_url": "/",
1616
"display": "standalone",
17-
"display_override": ["borderless"],
17+
"display_override": ["unframed"],
1818
"scope": "/",
1919
"isolated_storage": true,
2020
"permissions_policy": {

src/components/nav.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
limitations under the License.
1515
-->
1616

17-
<!-- Load the borderless button -->
18-
<load src="src/components/borderless.html" />
17+
<!-- Load the unframed button -->
18+
<load src="src/components/unframed.html" />
1919

2020
<header class="container--header">
2121
<div class="nav">
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
document.getElementById('borderless').addEventListener('click', async (e) => {
17+
document.getElementById('unframed').addEventListener('click', async (e) => {
1818
e.preventDefault();
1919
const screenDetails = await window.getScreenDetails();
2020
console.log(screenDetails);
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,25 @@
1414
limitations under the License.
1515
-->
1616

17-
<script type="module" src="/src/components/scripts/borderless.ts"></script>
17+
<script type="module" src="/src/components/scripts/unframed.ts"></script>
1818

1919
<div id="border">
2020
<p>This is a custom top border! Drag me!</p>
2121
</div>
2222

23-
<button id="borderless">
23+
<button id="unframed">
2424
<svg
2525
xmlns="http://www.w3.org/2000/svg"
2626
height="24"
2727
viewBox="0 -960 960 960"
2828
width="24"
29-
aria-label="Go Borderless!"
29+
aria-hidden="true"
3030
>
3131
<path
3232
d="M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"
3333
/>
3434
</svg>
35+
<span>Go unframed</span>
3536
</button>
3637

3738
<style>
@@ -63,26 +64,29 @@
6364
}
6465
}
6566

66-
#borderless {
67+
#unframed {
6768
display: flex;
6869
justify-content: center;
6970
align-items: center;
70-
padding: 0.5rem;
71-
border-radius: 50%;
71+
gap: 0.5rem;
72+
padding: 0.5rem 1rem;
73+
border-radius: 2rem;
7274
border: 0;
7375
position: absolute;
7476
right: 1rem;
7577
bottom: 1rem;
7678
background-color: #ea4335;
7779
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
80+
color: white;
81+
font-weight: bold;
7882

7983
svg {
8084
fill: white;
8185
}
8286
}
8387

84-
@media (display-mode: borderless) {
85-
#borderless {
88+
@media (display-mode: unframed) {
89+
#unframed {
8690
display: none;
8791
}
8892

src/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ body {
3434
padding-inline: 1rem;
3535
min-height: calc(100vh - 1rem);
3636

37-
@media (display-mode: borderless) {
37+
@media (display-mode: unframed) {
3838
margin-top: 2rem;
3939
min-height: calc(100vh - 3rem);
4040
}

0 commit comments

Comments
 (0)