Skip to content

Commit 81379be

Browse files
calderbuildclaude
andcommitted
Complete comprehensive UI/UX optimization and dark mode enhancement
Major improvements include: - Fix dark mode toggle functionality by adding dark-mode.js to footer loading sequence - Enhance toggle button positioning and visibility with improved animations - Implement CSS custom properties for seamless dynamic theming - Dramatically improve text readability across all components - Add enhanced text shadows and background overlays for better contrast over images - Redesign home page profile section with proper styling and contrast - Optimize post preview cards with modern card-based design - Enhance sidebar styling with better backgrounds and typography - Fix background image handling with smart gradient overlays - Ensure WCAG AA compliant color contrasts throughout - Add smooth transitions and micro-animations for professional UX - Maintain backward compatibility while modernizing the theme system 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5143870 commit 81379be

File tree

9 files changed

+668
-100
lines changed

9 files changed

+668
-100
lines changed

_includes/footer.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
window.addEventListener('load', function() {
3636
loadScript('{{ "/js/bootstrap.min.js" | prepend: site.baseurl }}');
3737
loadScript('{{ "/js/jason-blog.min.js" | prepend: site.baseurl }}');
38+
loadScript('{{ "/js/dark-mode.js" | prepend: site.baseurl }}');
3839
loadScript('{{ "/js/simple-jason-search.min.js" | prepend: site.baseurl }}', function() {
3940
// Initialize SimpleJasonSearch after script loads
4041
initSimpleJasonSearch();

_includes/intro-header.html

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
position: absolute;
1919
background: rgba(0,0,0, {{ page.header-mask }});
2020
}
21+
{% else %}
22+
/* Default enhanced overlay for better text readability */
23+
header.intro-header .header-mask{
24+
width: 100%;
25+
height: 100%;
26+
position: absolute;
27+
background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.6) 100%);
28+
backdrop-filter: blur(1px);
29+
}
2130
{% endif %}
2231
</style>
2332
{% endif %}
@@ -45,22 +54,22 @@
4554
</a>
4655
{% endfor %}
4756
</div>
48-
<h1 class="animate-fade-in-up">{{ page.title }}</h1>
57+
<h1 class="animate-fade-in-up enhanced-text-shadow">{{ page.title }}</h1>
4958
{% comment %} always create a h2 for keeping the margin {% endcomment %}
5059
{% if page.subtitle %}
51-
<h2 class="subheading animate-fade-in-up delay-1">{{ page.subtitle }}</h2>
60+
<h2 class="subheading animate-fade-in-up delay-1 enhanced-text-shadow">{{ page.subtitle }}</h2>
5261
{% endif %}
5362
<div class="post-meta animate-fade-in-up delay-2">
54-
<span class="author">
63+
<span class="author enhanced-text-shadow">
5564
<i class="fa fa-user"></i>
5665
{% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %}
5766
</span>
58-
<span class="date">
67+
<span class="date enhanced-text-shadow">
5968
<i class="fa fa-calendar"></i>
6069
{{ page.date | date: "%B %-d, %Y" }}
6170
</span>
6271
{% if page.reading_time %}
63-
<span class="reading-time">
72+
<span class="reading-time enhanced-text-shadow">
6473
<i class="fa fa-clock-o"></i>
6574
{{ page.reading_time }} min read
6675
</span>
@@ -119,17 +128,17 @@ <h2 class="subheading">{{ page.subtitle }}</h2>
119128

120129
{% if include.type == 'page' %}
121130
<header class="intro-header" style="background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')">
122-
<div class="header-mask"></div>
131+
<div class="header-mask enhanced-header-mask"></div>
123132
<div class="container">
124133
<div class="row">
125134
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
126135
{% if include.short %}
127136
<div class="site-heading" id="tag-heading">
128137
{% else %}
129-
<div class="site-heading">
138+
<div class="site-heading enhanced-contrast">
130139
{% endif %}
131-
<h1>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1>
132-
<span class="subheading">{{ page.description }}</span>
140+
<h1 class="enhanced-text-shadow">{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1>
141+
<span class="subheading enhanced-text-shadow">{{ page.description }}</span>
133142
</div>
134143
</div>
135144
</div>

_includes/short-about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h5><a href="{{'/about/' | prepend: site.baseurl }}">ABOUT ME</a></h5>
66
<img src="{{site.sidebar-avatar}}" alt="Jason's Avatar - AI技术研发者头像" />
77
{% endif %}
88
{% if site.sidebar-about-description %}
9-
<p>{{site.sidebar-about-description}}</p>
9+
<p class="profile-description">{{site.sidebar-about-description}}</p>
1010
{% endif %}
1111
<!-- SNS Link -->
1212
{% include sns-links.html %}

0 commit comments

Comments
 (0)