From dadaeae1809363f2078fd1aeab9afb7859c28759 Mon Sep 17 00:00:00 2001 From: Guillaume Bort Date: Tue, 17 Sep 2013 18:43:11 +0200 Subject: [PATCH] JQuery starter kit --- README.md | 22 +++++ css/main.css | 3 + detail.html | 88 ++++++++++++++++---- index.html | 134 ++++++++++++++++++++++++------- notfound.html | 22 +++++ scripts/api.js | 16 ++-- scripts/main.js | 44 ---------- scripts/prismic-configuration.js | 10 +++ scripts/prismic-helpers.js | 116 ++++++++++++++++++++++++++ search.html | 92 +++++++++++++++++++++ server.sh | 1 + signin.html | 45 +++++++++++ signout.html | 28 +++++++ vendor/jquery-1.9.0.min.js | 4 - vendor/jquery-2.0.3.min.js | 6 ++ 15 files changed, 531 insertions(+), 100 deletions(-) create mode 100644 css/main.css create mode 100644 notfound.html delete mode 100644 scripts/main.js create mode 100644 scripts/prismic-configuration.js create mode 100644 scripts/prismic-helpers.js create mode 100644 search.html create mode 100755 server.sh create mode 100644 signin.html create mode 100644 signout.html delete mode 100644 vendor/jquery-1.9.0.min.js create mode 100644 vendor/jquery-2.0.3.min.js diff --git a/README.md b/README.md index e69de29..a262ddc 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,22 @@ +# Starter project for client side JavaScript using JQuery + +This is a pure client side application that will connect to any [prismic.io](https://prismic.io) repository. It uses the prismic.io JavaScript developement kit, and provide a few helpers to integrate with JQuery and a templating engine. + +> This project embed a very simple Micro templating engine (http://ejohn.org/blog/javascript-micro-templating/), but you can easily switch it by any other JavaScript templating engine you want. + +It uses the browser `sessionStorage` to store the access token when you interactively login to preview the future of your repository. Meaning that to preview another release than **Master**, a modern browser supporting HTML5 is required. + +## How to start? + +Edit the `script/prismic-configuration.js` file to make the application point to the correct repository: + +``` +var Configuration = { + + // -- API endpoint + apiEndpoint: 'https://lesbonneschoses.prismic.io/api' + +} +``` + +Open the `index.html` in your browser. Alternatively you can also launch a local Web server using the `server.sh` script and open the home page at http://localhost:8000/. diff --git a/css/main.css b/css/main.css new file mode 100644 index 0000000..d0aa6c2 --- /dev/null +++ b/css/main.css @@ -0,0 +1,3 @@ +body.loading { + display: none; +} \ No newline at end of file diff --git a/detail.html b/detail.html index d64d8aa..b383264 100644 --- a/detail.html +++ b/detail.html @@ -3,31 +3,91 @@ JavaScript starter - + + + + - +
- - -

Your prismic.io project

-
+
- - -
- +
+
-
- -
Sign in to preview changes - +
+ + + + diff --git a/index.html b/index.html index f35b9d6..82b403c 100644 --- a/index.html +++ b/index.html @@ -3,54 +3,126 @@ JavaScript starter - + + - + + - +
- - -

Your prismic.io project

-
+
- -
- - + +

-

- No documents found - +

+

-