浏览代码

feat: migrate to latest web best practices

Improve accessibility, informed by Google Lighthouse insights.

Part 3
George Cushen 4 年之前
父节点
当前提交
7b3aff07a7

+ 3 - 0
wowchemy/assets/scss/wowchemy/_search.scss

@@ -165,6 +165,9 @@
 .sidebar-search-text {
   flex-grow: 1;
   text-align: left;
+  // Multilingual safe option to prevent long placeholders overflowing search box.
+  overflow: hidden;
+  font-size: .8rem;
 }
 
 .sidebar-search-shortcut {

+ 5 - 1
wowchemy/assets/scss/wowchemy/_widgets.scss

@@ -143,7 +143,11 @@
 .section-heading p {
   font-weight: 400;
   font-size: 1.1rem;
-  color: #b2b2b2;
+  color: rgba(0,0,0,0.54);  // Accessible contrast, matching footer text color.
+}
+
+.dark .section-heading p {
+  color: rgb(158, 158, 158);
 }
 
 /*************************************************

+ 2 - 2
wowchemy/layouts/partials/portfolio_li_showcase.html

@@ -31,11 +31,11 @@
 <div class="col-lg-12 project-item isotope-item {{ $js_tag_classes | safeHTMLAttr }}">
   <div class="row align-items-center">
     <div class="col-12 col-md-6">
-      <h3 class="article-title mb-0 mt-0">
+      <div class="section-subheading article-title mb-0 mt-0">
         {{- if $do_link}}<a href="{{ $link }}" {{ $target | safeHTMLAttr }}>{{end -}}
         {{ $item.Title | markdownify | emojify }}
         {{- if $do_link}}</a>{{end -}}
-      </h3>
+      </div>
 
       {{ with $summary }}
       <div class="article-style">