ソースを参照

Fix unread count in menu not triggering click

By moving unread count into anchor.

Previously, clicking the unread count would not cause the anchor to be
invoked. This was confusing. This change includes the unread count span
in the anchor.
Pascal Widdershoven 8 年 前
コミット
44decae557
4 ファイル変更14 行追加12 行削除
  1. 7 6
      template/common.go
  2. 5 4
      template/html/common/layout.html
  3. 1 1
      ui/static/css.go
  4. 1 1
      ui/static/css/common.css

+ 7 - 6
template/common.go

@@ -1,5 +1,5 @@
 // Code generated by go generate; DO NOT EDIT.
-// 2018-05-20 15:22:33.793709932 -0700 PDT m=+0.025180445
+// 2018-05-21 12:40:10.613112 +0200 CEST m=+0.010961753
 
 package template
 
@@ -115,10 +115,11 @@ var templateCommonMap = map[string]string{
             </div>
             <ul>
                 <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g u" }}">
-                    <a href="{{ route "unread" }}" data-page="unread">{{ t "Unread" }}</a>
-                    {{ if gt .countUnread 0 }}
-                        <span class="unread-counter-wrapper">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
-                    {{ end }}
+                    <a href="{{ route "unread" }}" data-page="unread">{{ t "Unread" }}
+                      {{ if gt .countUnread 0 }}
+                          <span class="unread-counter-wrapper">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
+                      {{ end }}
+                    </a>
                 </li>
                 <li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g b" }}">
                     <a href="{{ route "starred" }}" data-page="starred">{{ t "Starred" }}</a>
@@ -223,6 +224,6 @@ var templateCommonMap = map[string]string{
 var templateCommonMapChecksums = map[string]string{
 	"entry_pagination": "f1465fa70f585ae8043b200ec9de5bf437ffbb0c19fb7aefc015c3555614ee27",
 	"item_meta":        "6cff8ae243f19dac936e523867d2975f70aa749b2a461ae63f6ebbca94cf7419",
-	"layout":           "c7565e2cf904612e236bc1d7167c6c124ffe5d27348608eb5c2336606f266896",
+	"layout":           "2226ad243581d200b3d9499787a5ba38d6b2fff38d2ce86a40eb395a6efc17de",
 	"pagination":       "6ff462c2b2a53bc5448b651da017f40a39f1d4f16cef4b2f09784f0797286924",
 }

+ 5 - 4
template/html/common/layout.html

@@ -40,10 +40,11 @@
             </div>
             <ul>
                 <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g u" }}">
-                    <a href="{{ route "unread" }}" data-page="unread">{{ t "Unread" }}</a>
-                    {{ if gt .countUnread 0 }}
-                        <span class="unread-counter-wrapper">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
-                    {{ end }}
+                    <a href="{{ route "unread" }}" data-page="unread">{{ t "Unread" }}
+                      {{ if gt .countUnread 0 }}
+                          <span class="unread-counter-wrapper">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
+                      {{ end }}
+                    </a>
                 </li>
                 <li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g b" }}">
                     <a href="{{ route "starred" }}" data-page="starred">{{ t "Starred" }}</a>

ファイルの差分が大きいため隠しています
+ 1 - 1
ui/static/css.go


+ 1 - 1
ui/static/css/common.css

@@ -409,7 +409,7 @@ a.button {
 
 /* Counter */
 .unread-counter-wrapper {
-    font-size: 0.8em;
+    font-size: 0.9em;
     font-weight: 300;
     color: #666;
 }

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません