aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-02-15 13:13:13 +0100
committerJoris Guyonvarch2015-02-15 13:13:13 +0100
commit71c8155599ea59cb4acb888843fadfa43c21e2c5 (patch)
treed838d71eb1d711e77e2e5e8874e15472bf1a35b4
parent65bc73c3ad675dec2f4c630532fe94f7f7a70ac4 (diff)
Fix contact flash when loading a page
-rw-r--r--Pages/contact.html3
-rw-r--r--index.html98
-rw-r--r--script.js10
-rw-r--r--style.css4
4 files changed, 56 insertions, 59 deletions
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 @@
+<div class="contact">
+ Contact : Auriane Besnard
+</div>
diff --git a/index.html b/index.html
index 7831b95..8f55e49 100644
--- a/index.html
+++ b/index.html
@@ -12,60 +12,54 @@
<body>
- <div class="headerMenuContent">
-
- <div class="header">
- Maquillage
- </div>
-
- <ul class="menu">
- <li>
- <a href="#/teint">Teint</a>
- <ul class="hidden">
- <li><a href="#/teint/ceci">Ceci</a></li>
- <li><a href="#/teint/cela">Cela</a></li>
- </ul>
- </li>
- <li>
- <a href="#">Yeux</a>
- <ul class="hidden">
- <li><a href="#">A</a></li>
- <li><a href="#">B</a></li>
- <li><a href="#">C</a></li>
- <li><a href="#">D</a></li>
- </ul>
- </li>
- <li>
- <a href="#">Lèvres</a>
- <ul class="hidden">
- <li><a href="#">A</a></li>
- <li><a href="#">B</a></li>
- </ul>
- </li>
- <li>
- <a href="#">Accessoires</a>
- <ul class="hidden">
- <li><a href="#">A</a></li>
- </ul>
- </li>
- <li>
- <a href="#">Démaquillant</a>
- <ul class="hidden">
- <li><a href="#">A</a></li>
- <li><a href="#">B</a></li>
- <li><a href="#">C</a></li>
- </ul>
- </li>
- <li>
- <a href="#">Promos</a>
- </li>
- </ul>
-
- <div id="content"></div>
-
+ <div class="header">
+ Maquillage
</div>
- <div class="contact">Contact : Auriane Besnard</div>
+ <ul class="menu">
+ <li>
+ <a href="#/teint">Teint</a>
+ <ul class="hidden">
+ <li><a href="#/teint/ceci">Ceci</a></li>
+ <li><a href="#/teint/cela">Cela</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="#">Yeux</a>
+ <ul class="hidden">
+ <li><a href="#">A</a></li>
+ <li><a href="#">B</a></li>
+ <li><a href="#">C</a></li>
+ <li><a href="#">D</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="#">Lèvres</a>
+ <ul class="hidden">
+ <li><a href="#">A</a></li>
+ <li><a href="#">B</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="#">Accessoires</a>
+ <ul class="hidden">
+ <li><a href="#">A</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="#">Démaquillant</a>
+ <ul class="hidden">
+ <li><a href="#">A</a></li>
+ <li><a href="#">B</a></li>
+ <li><a href="#">C</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="#">Promos</a>
+ </li>
+ </ul>
+
+ <div id="content"></div>
</body>
</html>
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;