Prechádzať zdrojové kódy

refactor: link page summary block rather than text

Enables the visitor to easily click anywhere on the summary (even between lines) rather than having to click exactly on the text.

Close #1751
George Cushen 5 rokov pred
rodič
commit
4efb4d3ab0

+ 1 - 2
assets/scss/academic/_card.scss

@@ -26,8 +26,7 @@
 }
 
 /* In page listings, display the linked summaries as normal text except for the hover cursor. */
-.media.stream-item .article-style a,
-.card-simple .article-style a {
+a.summary-link {
   color: unset;
   text-decoration: none;
 }

+ 4 - 4
layouts/partials/li_card.html

@@ -54,11 +54,11 @@
   </h3>
 
   {{ with $summary }}
-  <div class="article-style">
-    <a href="{{ $item.RelPermalink }}">
+  <a href="{{ $item.RelPermalink }}" class="summary-link">
+    <div class="article-style">
       <p>{{.}}</p>
-    </a>
-  </div>
+    </div>
+  </a>
   {{ end }}
 
   {{ if $show_buttons }}

+ 3 - 3
layouts/partials/li_compact.html

@@ -38,11 +38,11 @@
     </h3>
 
     {{ with $summary }}
+    <a href="{{ $item.RelPermalink }}" class="summary-link">
       <div class="article-style">
-        <a href="{{ $item.RelPermalink }}">
-          {{ . }}
-        </a>
+        {{.}}
       </div>
+    </a>
     {{ end }}
 
     <div class="stream-meta article-metadata">