From 71c8155599ea59cb4acb888843fadfa43c21e2c5 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sun, 15 Feb 2015 13:13:13 +0100 Subject: Fix contact flash when loading a page --- Pages/contact.html | 3 ++ index.html | 98 +++++++++++++++++++++++++----------------------------- script.js | 10 +++--- style.css | 4 +-- 4 files changed, 56 insertions(+), 59 deletions(-) create mode 100644 Pages/contact.html diff --git a/Pages/contact.html b/Pages/contact.html new file mode 100644 index 0000000..ab7fb04 --- /dev/null +++ b/Pages/contact.html @@ -0,0 +1,3 @@ +
+ Contact : Auriane Besnard +
diff --git a/index.html b/index.html index 7831b95..8f55e49 100644 --- a/index.html +++ b/index.html @@ -12,60 +12,54 @@ -
- -
- Maquillage -
- - - -
- +
+ Maquillage
-
Contact : Auriane Besnard
+ + +
diff --git a/script.js b/script.js index 07feacd..e662ebb 100644 --- a/script.js +++ b/script.js @@ -23,10 +23,12 @@ }; function router() { - var url = location.hash.slice(2) || 'presentation'; - fetchFile('Pages/' + url + '.html', function(htmlData) { - var viewElement = document.getElementById('content'); - viewElement.innerHTML = htmlData; + var url = location.hash.slice(1) || 'presentation'; + var contentElement = document.getElementById('content'); + fetchFile('Pages' + url + '.html', function(contentData) { + fetchFile('Pages/contact.html', function(contactData) { + contentElement.innerHTML = contentData + contactData; + }); }); } diff --git a/style.css b/style.css index a1489cb..d09d767 100644 --- a/style.css +++ b/style.css @@ -1,9 +1,6 @@ body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; background-color: #FBDEE3; -} - -.headerMenuContent { width: 800px; margin: auto; } @@ -67,6 +64,7 @@ a:hover { .contact { background-color: #EEEEEE; + border-radius: 5px; padding: 30px; text-align: center; color: #555555; -- cgit v1.2.3