Permalink
Browse files

.htaccess for apache's pushState problems, better about section init

  • Loading branch information...
1 parent a56bfad commit 2363aaf5416fc792abb8eb32066a53d100cb21ca @blackant blackant committed Apr 19, 2012
View
@@ -0,0 +1,4 @@
+RewriteEngine on
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule ^(.*)$ /about/ [L]
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='about'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='community'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='documentation'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='documentation'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='documentation'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='documentation'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='documentation'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='documentation'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='downloads'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='downloads'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='downloads'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='downloads'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
View
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='home'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -162,8 +162,10 @@ var AboutContent = {
defaultSection: "branching-and-merging",
init: function() {
+ if ($('body#about').length === 0) return;
AboutContent.observeNav();
AboutContent.observePopState();
+ AboutContent.showSection(AboutContent.getSection());
},
observePopState: function() {
@@ -16,7 +16,7 @@
//]]>
</script>
</head>
- <body>
+ <body id='search'>
<div class='inner'>
<header>
<a href="/"><img src="/images/logo.png" /></a>
@@ -162,8 +162,10 @@ var AboutContent = {
defaultSection: "branching-and-merging",
init: function() {
+ if ($('body#about').length === 0) return;
AboutContent.observeNav();
AboutContent.observePopState();
+ AboutContent.showSection(AboutContent.getSection());
},
observePopState: function() {
View
@@ -12,7 +12,7 @@
:javascript
try{Typekit.load();}catch(e){}
- %body{:id => @page}
+ %body{:id => @section}
%div.inner
= partial 'shared/header'

0 comments on commit 2363aaf

Please sign in to comment.