aboutsummaryrefslogtreecommitdiff
path: root/mark-staging.patch
blob: 37b6af0e17e77800334801449f747deeaec64428 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
From d00ede2e9a33cf88b6a5d20358f127b1cf1d5863 Mon Sep 17 00:00:00 2001
From: Yuchen Pei <hi@ypei.me>
Date: Tue, 12 Oct 2021 09:08:38 +1100
Subject: [PATCH] Adding prominant notice that the site is staging.

And directing visitors to the official site.
---
 h-source/Application/Include/params.php       | 2 +-
 h-source/Application/Views/Desktop/header.php | 1 +
 h-source/Application/Views/Mobile/header.php  | 4 +++-
 h-source/config.xml                           | 9 +++++++++
 4 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/h-source/Application/Include/params.php b/h-source/Application/Include/params.php
index 5ab28df..29cdc6c 100644
--- a/h-source/Application/Include/params.php
+++ b/h-source/Application/Include/params.php
@@ -26,7 +26,7 @@ class Website
 	
 	static public $fromEmail = "noreply@h-node.org";
 	
-	static public $generalName = "h-node.org";
+	static public $generalName = "h-node.org STAGING";
 	
 	static public $projectName = "h-node";
 	
diff --git a/h-source/Application/Views/Desktop/header.php b/h-source/Application/Views/Desktop/header.php
index d153840..2a20ef6 100644
--- a/h-source/Application/Views/Desktop/header.php
+++ b/h-source/Application/Views/Desktop/header.php
@@ -105,6 +105,7 @@ $currPos = $querySanitized ? $this->controller."/".$this->action : 'home/index';
 <div id="external_header">
 	<div id="header">
 		<img style="float:left;" src="<?php echo $this->baseUrl;?>/Public/Img/title.png">
+        <span style="font-size: 400%;">STAGING</span>
 		<a href="http://www.fsf.org"><img style="float:right;" src="<?php echo $this->baseUrl;?>/Public/Img/fsf_logo.png"></a>
 	</div>
 </div>
diff --git a/h-source/Application/Views/Mobile/header.php b/h-source/Application/Views/Mobile/header.php
index 446f820..ac66d27 100644
--- a/h-source/Application/Views/Mobile/header.php
+++ b/h-source/Application/Views/Mobile/header.php
@@ -89,7 +89,9 @@ $currPos = $querySanitized ? $this->controller."/".$this->action : 'home/index';
 <div data-role="page" data-theme="d">
 	<div data-role="header">
 		<div class="ui-grid-a">
-			<div class="ui-block-a"><img style="padding-top:5px;" width="110px" src="<?php echo $this->baseUrl;?>/Public/Img/title.png"></div>
+			<div class="ui-block-a"><img style="padding-top:5px;" width="110px" src="<?php echo $this->baseUrl;?>/Public/Img/title.png">
+                   <span style="font-size: 300%; vertical-align:top;">STAGING</span>
+                   </div>
 			<div class="ui-block-b"><a href="http://www.fsf.org"><img style="padding-top:10px;" width="150px" src="<?php echo $this->baseUrl;?>/Public/Img/fsf_logo.png"></a></div>
 		</div><!-- /grid-a -->
 
diff --git a/h-source/config.xml b/h-source/config.xml
index 8f87304..159eef5 100644
--- a/h-source/config.xml
+++ b/h-source/config.xml
@@ -77,6 +77,15 @@
 	</top_menu>
 	<top_news>
 		<en>
+			<mod>
+				<type>raw</type>
+				<text><![CDATA[
+
+				<div style="padding:0.5em;background:#FFA07A;margin:0.5em;border-top:1px solid #FF4500;border-bottom:1px solid #FF4500;color:#DC143C;font-size:16px;">This is a staging instance of h-node.  For the official site please visit <a href="https://h-node.org">h-node.org</a>.
+				</div>
+
+				]]></text>
+			</mod>
 			<mod>
 				<type>raw</type>
 				<text><![CDATA[
-- 
2.33.0