-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Installable PWA w/ simple server management plugin (#3380)
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
- Loading branch information
Showing
15 changed files
with
1,890 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 5 additions & 11 deletions
16
resources/index.html.ejs → examples/graphiql-webpack/index.html.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1, shrink-to-fit=no" | ||
/> | ||
<meta name="theme-color" content="#ffffff" /> | ||
|
||
<link rel="manifest" href="manifest.json" /> | ||
<link rel="icon" href="logo.svg" /> | ||
<title>GraphiQL Webpack Example!</title> | ||
</head> | ||
|
||
<body> | ||
<style> | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
min-height: 100vh; | ||
} | ||
#root { | ||
height: 100vh; | ||
} | ||
</style> | ||
<div id="root"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export const STARTING_URL = | ||
'https://swapi-graphql.netlify.app/.netlify/functions/index'; | ||
|
||
export const LAST_URL_KEY = 'lastURL'; | ||
|
||
export const PREV_URLS_KEY = 'previousURLs'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
min-height: 100vh; | ||
background-color: hsl(var(--color-base)); | ||
} | ||
#root { | ||
height: 100vh; | ||
} | ||
|
||
.plugin-title { | ||
font-size: var(--font-size-h2); | ||
font-weight: var(--font-weight-medium); | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding-bottom: 1rem; | ||
} | ||
|
||
.select-server--button { | ||
background-color: hsl(var(--color-primary)); | ||
border: 0 none; | ||
display: block; | ||
width: 100%; | ||
color: hsl(var(--color-base)); | ||
padding: 0.5rem; | ||
font-size: 1rem; | ||
margin-bottom: 1rem; | ||
} | ||
|
||
.select-server--button.disabled { | ||
background-color: hsl(var(--color-base)); | ||
color: hsl(var(--color-primary)); | ||
} | ||
|
||
.select-server--schema-error { | ||
color: hsl(var(--color-error)); | ||
margin-top: 0.5rem; | ||
display: block; | ||
} | ||
|
||
.select-server--schema-error code { | ||
padding: 0.5rem; | ||
background-color: hsla(var(--color-base), var(--alpha-secondary)); | ||
} | ||
|
||
.select-server--schema-success { | ||
color: hsl(var(--color-success)); | ||
margin-top: 0.5rem; | ||
display: block; | ||
} | ||
|
||
.select-server--schema-loading { | ||
color: hsl(var(--color-warning)); | ||
margin-top: 0.5rem; | ||
display: block; | ||
} | ||
|
||
input.select-server--input { | ||
display: block; | ||
width: 100%; | ||
color: hsla(var(--color-neutral), var(--alpha-secondary)); | ||
padding: 0.5rem; | ||
background-color: hsla(var(--color-primary), var(--alpha-background-medium)); | ||
border: 0 none; | ||
font-size: 1.05rem; | ||
} | ||
|
||
.select-server--input-error { | ||
color: hsl(var(--color-error)); | ||
margin-top: 0.5rem; | ||
display: block; | ||
} | ||
|
||
li.select-server--previous-entry { | ||
display: flex; | ||
flex-direction: row; | ||
flex-grow: inherit; | ||
width: 100%; | ||
} | ||
|
||
li.select-server--previous-entry span { | ||
display: flex; | ||
cursor: pointer; | ||
padding: 0.5rem; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
flex-grow: 1; | ||
} | ||
|
||
li.select-server--previous-entry span:hover, | ||
li.select-server--previous-entry button:hover { | ||
background-color: hsl(var(--color-primary)); | ||
color: hsl(var(--color-base)); | ||
} | ||
|
||
li.select-server--previous-entry button { | ||
background-color: transparent; | ||
border: hsla(var(--color-neutral), 1); | ||
display: flex; | ||
color: hsla(var(--color-neutral), 1); | ||
font-size: 1rem; | ||
cursor: pinter; | ||
padding: 0.5rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.