Browse Source

Add header directly to files that need it.
Remove header partial from shared.

Lee Morgan 5 năm trước cách đây
mục cha
commit
a265ba05b4

+ 14 - 6
views/informationPages/help.ejs

@@ -10,7 +10,20 @@
         <link href="https://fonts.googleapis.com/css?family=Saira&display=swap" rel="stylesheet">
     </head>
     <body>
-        <% include ../shared/header %>
+        <div class="header">
+            <a class="headerStart" href="/" >
+                <img src="/shared/images/logo.png" alt="Subline">
+                <div class='headerLogo'>THE SUBLINE</div>
+            </a>
+        
+            <div class="headerEnd">
+                <a id="helpLink" class="headerHide" href="/help">HELP</a>
+        
+                <a id="privacyPolicyLink" class="headerHide" href="/privacy">PRIVACY POLICY</a>
+        
+                <a id="termsLink" class="headerHide" href="/terms">TERMS AND CONDITIONS</a>        
+            </div>
+        </div>
 
         <div class="helpMenu">
             <ul>
@@ -209,10 +222,5 @@
 
             <a href="mailto:lee@thesubline.com">lee@thesubline.com</a>
         </div>
-
-        <script>
-            document.getElementById("privacyPolicyLink").classList.remove("headerHide");
-            document.getElementById("termsLink").classList.remove("headerHide");
-        </script>
     </body>
 </html>

+ 14 - 6
views/informationPages/privacyPolicy.ejs

@@ -10,7 +10,20 @@
         <link href="https://fonts.googleapis.com/css?family=Saira&display=swap" rel="stylesheet">
     </head>
     <body>
-        <% include ../shared/header %>
+        <div class="header">
+            <a class="headerStart" href="/" >
+                <img src="/shared/images/logo.png" alt="Subline">
+                <div class='headerLogo'>THE SUBLINE</div>
+            </a>
+        
+            <div class="headerEnd">
+                <a id="helpLink" class="headerHide" href="/help">HELP</a>
+        
+                <a id="privacyPolicyLink" class="headerHide" href="/privacy">PRIVACY POLICY</a>
+        
+                <a id="termsLink" class="headerHide" href="/terms">TERMS AND CONDITIONS</a>        
+            </div>
+        </div>
 
         <div class="content">
             <h1>The Subline, LLC Privacy Policy</h1>
@@ -199,10 +212,5 @@
         
             <p class="contactInfo last">www.thesubline.com</p>
         </div>
-
-        <script>
-            document.getElementById("termsLink").classList.remove("headerHide");
-            document.getElementById("helpLink").classList.remove("headerHide");
-        </script>
     </body>
 </html>

+ 14 - 6
views/informationPages/terms.ejs

@@ -10,7 +10,20 @@
         <link href="https://fonts.googleapis.com/css?family=Saira&display=swap" rel="stylesheet">
     </head>
     <body>
-        <% include ../shared/header %>
+        <div class="header">
+            <a class="headerStart" href="/" >
+                <img src="/shared/images/logo.png" alt="Subline">
+                <div class='headerLogo'>THE SUBLINE</div>
+            </a>
+        
+            <div class="headerEnd">
+                <a id="helpLink" class="headerHide" href="/help">HELP</a>
+        
+                <a id="privacyPolicyLink" class="headerHide" href="/privacy">PRIVACY POLICY</a>
+        
+                <a id="termsLink" class="headerHide" href="/terms">TERMS AND CONDITIONS</a>        
+            </div>
+        </div>
 
         <div class="content">
             <h1>The Subline, Terms and Conditions</h1>
@@ -293,10 +306,5 @@
 
             <p>16.3 All credit card transactions are processed using secure encryption are handled via Third Party Payment Providers.</p>
         </div>
-
-        <script>
-            document.getElementById("helpLink").classList.remove("headerHide");
-            document.getElementById("privacyPolicyLink").classList.remove("headerHide");
-        </script>
     </body>
 </html>

+ 14 - 7
views/passwordResetPages/email.ejs

@@ -10,7 +10,20 @@
         <link href="https://fonts.googleapis.com/css?family=Saira&display=swap" rel="stylesheet"> 
     </head>
     <body>
-        <% include ../shared/header %>
+        <div class="header">
+            <a class="headerStart" href="/" >
+                <img src="/shared/images/logo.png" alt="Subline">
+                <div class='headerLogo'>THE SUBLINE</div>
+            </a>
+        
+            <div class="headerEnd">
+                <a id="helpLink" class="headerHide" href="/help">HELP</a>
+        
+                <a id="privacyPolicyLink" class="headerHide" href="/privacy">PRIVACY POLICY</a>
+        
+                <a id="termsLink" class="headerHide" href="/terms">TERMS AND CONDITIONS</a>        
+            </div>
+        </div>
 
         <h1 class="title">Enter your email to reset your password</h1>
 
@@ -21,11 +34,5 @@
         </form>
 
         <p class="text">An email will be sent to you shortly with instructions on reseting your password.  If you don't recieve an email within one minute, then try again.</p>
-
-        <script>
-            document.getElementById("helpLink").style.display = "block";
-            document.getElementById("privacyPolicyLink").style.display = "block";
-            document.getElementById("termsLink").style.display = "block";
-        </script>
     </body>
 </html>

+ 0 - 18
views/shared/header.ejs

@@ -1,18 +0,0 @@
-<div class="header">
-    <a class="headerStart" href="/" >
-        <img src="/shared/images/logo.png" alt="Subline">
-        <div class='headerLogo'>THE SUBLINE</div>
-    </a>
-
-    <div class="headerEnd">
-        <a id="helpLink" class="headerHide" href="/help">HELP</a>
-
-        <a id="privacyPolicyLink" class="headerHide" href="/privacy">PRIVACY POLICY</a>
-
-        <a id="termsLink" class="headerHide" href="/terms">TERMS AND CONDITIONS</a>
-
-        <button id="logInButton" class="button headerHide" onclick="loginObj.display()">LOG IN</button>
-
-        <button id="joinButton" class="button headerHide" onclick="registerObj.display()">JOIN</button>
-    </div>
-</div>

+ 15 - 7
views/verifyPage/verify.ejs

@@ -10,7 +10,20 @@
         <link rel="stylesheet" href="/verifyPage/verify.css">
     </head>
     <body>
-        <% include ../shared/header %>
+        <div class="header">
+            <a class="headerStart" href="/" >
+                <img src="/shared/images/logo.png" alt="Subline">
+                <div class='headerLogo'>THE SUBLINE</div>
+            </a>
+        
+            <div class="headerEnd">
+                <a id="helpLink" class="headerHide" href="/help">HELP</a>
+        
+                <a id="privacyPolicyLink" class="headerHide" href="/privacy">PRIVACY POLICY</a>
+        
+                <a id="termsLink" class="headerHide" href="/terms">TERMS AND CONDITIONS</a>        
+            </div>
+        </div>
 
         <% if(banner !== undefined){ %>
             <% include ./banner.ejs %>
@@ -28,12 +41,7 @@
             <input class="button" type="submit" value="SUBMIT">
         </form>
     </body>
-
-    <script>
-        document.getElementById("helpLink").style.display = "block";
-        document.getElementById("privacyPolicyLink").style.display = "block";
-        document.getElementById("termsLink").style.display = "block";
-    </script>
+    
     <script>
         setTimeout(()=>{
             let banner = document.getElementById("banner");