Pārlūkot izejas kodu

Implemented Basic InfoBar

Yoginth 7 gadi atpakaļ
vecāks
revīzija
79760425cc

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
public/css/gitote.min.css


+ 0 - 9
public/less/_admin.less

@@ -109,15 +109,6 @@
 		margin: @5 3px;
 		font-size: 11px;
 	}
-	&.branch {
-		margin-left: -@5;
-	}
-	&.logo {
-		width: 13px !important;
-		margin-top: -1px !important;
-		margin-left: @5;
-		margin-right: 1px;
-	}
 	&.align {
 		margin-right: @5;
 	}

+ 28 - 0
public/less/_base.less

@@ -577,6 +577,34 @@ footer {
     margin-left: 8px !important;
 }
 
+
+.infobar {
+	color: @white;
+	
+	&.align {
+		margin-right: 18px;
+	}
+	&.heart {
+		font-size: 12px;
+    	margin-right: 5px;
+	}
+	&.expansion {
+		cursor: pointer;
+		letter-spacing: 0.2px;
+		user-select: none;
+	}
+	&.main {
+		background-color: #2f363c;
+		border-bottom: 1px solid #454e57;
+		height: 41px;
+	}
+	&.text {
+		padding: @5 0 !important;
+		color: #fff !important;
+		font-size: 13px !important;
+	}
+}
+
 @media only screen and (max-width: 991px) and (min-width: 768px) {
 	.ui.container {
 		width: 95%;

templates/misc/admin_bar.tmpl → templates/base/admin_bar.tmpl


+ 4 - 1
templates/base/head.tmpl

@@ -96,7 +96,10 @@
 		{{if not .PageIsSuspended}}
 			<div class="following bar light" style="{{if not .IsLogged}}padding-top:5px;padding-bottom:5px{{end}}">
 				{{if or .IsAdmin .IsStaff .IsIntern}}
-					{{template "misc/admin_bar" .}}
+					{{template "base/admin_bar" .}}
+				{{end}}
+				{{if or .IsBeta}}
+					{{template "base/info_bar" .}}
 				{{end}}
 				<div class="navbar container">
 					<div class="ui grid">

+ 42 - 0
templates/base/info_bar.tmpl

@@ -0,0 +1,42 @@
+<div class="navbar container infobar main">
+    <div class="ui grid">
+        <div class="column">
+            <div class="ui left floated header infobar text">
+                <span class="infobar align">
+                    <span class="infobar heart">❤</span>
+                    <span id="expansion" class="infobar expansion" onclick="document.getElementById('expansion').innerHTML = nextWord();">Get Into Text</span>
+                </span>
+            </div>
+            <div class="ui right floated header infobar text">
+                <a href="{{AppURL}}about">
+                    <span class="infobar align hide-mobile">About</span>
+                </a>
+                <a href="{{AppURL}}features">
+                    <span class="infobar align hide-mobile">Features</span>
+                </a>
+                <a href="https://help.gitote.in">
+                    <span class="infobar align hide-mobile">Docs</span>
+                </a>
+                <a href="{{AppURL}}contact">
+                    <span class="infobar">Support</span>
+                </a>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script>
+    var nextWord = (function() {
+      var wordArray = [
+        'Just in Time',
+        'Gitote is Tasty',
+        'Git it Best',
+        'Git It Test'
+      ];
+      var copy;
+      return function() {
+        if (!copy || !copy.length) copy = wordArray.slice();
+        return copy.splice(Math.random() * copy.length | 0, 1);
+      }
+    }());
+</script>