diff --git a/demos/vanilla-browser/.gitignore b/demos/vanilla-browser/.gitignore deleted file mode 100644 index 1bf4259af7..0000000000 --- a/demos/vanilla-browser/.gitignore +++ /dev/null @@ -1 +0,0 @@ -config.js diff --git a/demos/vanilla-browser/README.md b/demos/vanilla-browser/README.md index 9bc5299ee7..0d3fb598dc 100644 --- a/demos/vanilla-browser/README.md +++ b/demos/vanilla-browser/README.md @@ -1,9 +1,12 @@ -# Running this demo +# ArcGIS Rest JS / Vanilla JS Demo -1. Make sure you run `npm run bootstrap` in the root folder to setup the dependencies -2. Register a new app on https://developers.arcgis.com -3. Add a redirect URL of `http://localhost:8080/post-sign-in.html` to your app. -4. Copy the `config.js.template` file, rename it to `config.js` -5. Copy your apps client id into your new `config.js` file. -6. `npm start` -7. Visit http://localhost:8080 and click "Sign In" to start the OAuth 2.0 process. +This demo uses Vanilla JS to implement OAuth2 using +the `arcgis-rest-js` libraries. + +## Running this demo +1. Like all the other demo apps, run `npm run bootstrap` in the root directory. +1. Register an app at [https://developers.arcgis.com](https://developers.arcgis.com). +1. Add a redirect URL of `http://localhost:8080` to your new app. +1. Copy the `Client ID` of your new app. +1. Run `npm start` to spin up the development server. +1. Visit [http://localhost:8080](http://localhost:8080) and paste the copied `Client ID`. diff --git a/demos/vanilla-browser/authenticate.html b/demos/vanilla-browser/authenticate.html new file mode 100644 index 0000000000..823b02e16d --- /dev/null +++ b/demos/vanilla-browser/authenticate.html @@ -0,0 +1,28 @@ + + + + + ArcGIS Rest JS Vanilla JS + + + + + + + + + diff --git a/demos/vanilla-browser/config.js.template b/demos/vanilla-browser/config.js.template deleted file mode 100644 index 130c3d82f6..0000000000 --- a/demos/vanilla-browser/config.js.template +++ /dev/null @@ -1 +0,0 @@ -var ClientId = "CLIENT_ID"; diff --git a/demos/vanilla-browser/index.html b/demos/vanilla-browser/index.html index 57dc4378c4..f4ce5b9b10 100644 --- a/demos/vanilla-browser/index.html +++ b/demos/vanilla-browser/index.html @@ -1,33 +1,171 @@ - - - - - - -Sign In - - - - - - - + + + + ArcGIS Rest JS Vanilla JS + + + + +
+
+
+ +
+
+
+
+
+
+ + + +
+

+ You can generate your own client id by creating an application on the + + ArcGIS for Developers + + site. Be sure to add + + + + as a redirect uri for your application. +

+
+
+
+
+ + +
+
+ +
+
+
+
+

+ +

+
+
+
+
+ + + + + diff --git a/demos/vanilla-browser/logo.svg b/demos/vanilla-browser/logo.svg new file mode 100644 index 0000000000..9650ca78ef --- /dev/null +++ b/demos/vanilla-browser/logo.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/demos/vanilla-browser/post-sign-in.html b/demos/vanilla-browser/post-sign-in.html deleted file mode 100644 index 2d47cbf05b..0000000000 --- a/demos/vanilla-browser/post-sign-in.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - diff --git a/demos/vanilla-browser/style.css b/demos/vanilla-browser/style.css new file mode 100644 index 0000000000..84a19ae086 --- /dev/null +++ b/demos/vanilla-browser/style.css @@ -0,0 +1,36 @@ +html, body { + width: 100%; + height: 100%; +} + +.row { + margin-bottom: 25px; +} + +.jumbotron { + padding-top: 0px; + padding-bottom: 0px; +} + +#logo-container { + display: flex; + justify-content: center; + align-content: center; +} +#logo { + width: 125px; + height: 125px; + padding: 12.5px; +} + +.info-panel{ + padding: 15px; +} + +.loading-table { + width: 100%; + height: 150px; + display: flex; + align-content: center; + justify-content: center; +}