Skip to content

Commit 077779c

Browse files
thomhurstclaude
andauthored
TUnit Documentation Site Styling (#2852)
* Redesign docs homepage with modern dark theme and improved contrast - Implement sleek dark theme with purple/indigo gradient accents - Add animated code grid background and glassmorphism effects - Create hero section with live code example and test output visualization - Improve text contrast throughout for better readability - Update navbar to match dark theme aesthetic - Replace unsubstantiated performance claims with factual features - Add Quick Start section with 3-step guide - Enhance syntax highlighting with bright, high-contrast colors - Fix CSS Module selectors to properly target Prism tokens - Modernize feature cards with code examples - Add responsive design for mobile devices 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix text contrast in Quick Start and feature code blocks - Apply consistent bright syntax highlighting to Quick Start section - Fix feature card code blocks with proper token colors - Add global CodeBlock component styling for consistency - Ensure all code text uses bright white (#f8fafc) as base color - Match syntax colors across all code blocks on the page 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Use CodeBlock component for feature card code examples - Replace plain pre/code elements with CodeBlock component - Enable proper C# syntax highlighting in feature cards - Update CSS to style CodeBlock containers consistently - Format code examples with proper line breaks using template literals - Ensure consistent dark theme and colors across all code blocks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Style documentation pages to match dark theme - Apply dark gradient background to sidebar (#1a1f3a to #0f172a) - Update sidebar menu colors with purple accent for active items - Style breadcrumbs with gradient text for active item - Enhance heading hierarchy with proper contrast - Update table of contents with purple accent colors - Style pagination cards with gradient backgrounds and hover effects - Apply purple-tinted borders throughout - Update code blocks and inline code styling - Style blockquotes with gradient background - Apply consistent table styling with purple accents - Ensure all text has proper contrast for readability 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Reduce gaps between homepage sections - Reduce padding between sections from 5rem to 3rem - Decrease section header margins from 3rem to 2rem - Adjust responsive padding for mobile views (2rem) - Create more compact and cohesive layout - Maintain visual hierarchy while improving flow 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Move badge to float right of TUnit title - Create titleRow flex container to align title and badge horizontally - Position 'Modern .NET Testing' badge to the right of TUnit title - Remove vertical spacing caused by badge above title - Add responsive behavior for mobile (stacks vertically) - Improve visual hierarchy and reduce vertical space usage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Minimize padding above TUnit title - Reduce hero section padding to 2rem (32px) - Change alignment to flex-start to position content higher - Remove excessive whitespace at top of hero section - Create tighter, more compact hero layout 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix title spacing and animation continuity - Apply gradient and animation to parent container for seamless effect - Adjust spacing between TU and NIT with 0.05em margin - Keep both parts uppercase for consistency - Remove individual animations from child spans - Ensure animation flows continuously across entire title - Maintain proper letter spacing like original single element 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Simplify favicon to just the T letter - Remove square background for cleaner look - Keep gradient T letter with glow effect - Make T slightly wider (392px top bar, 120px stem) - Increase glow for better visibility - Add rounded corners (12px radius) for smoother appearance - Create minimalist design that works on any background 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix mobile responsive layout issues on documentation site - Fixed hero section content overflow and cutoff on mobile devices - Improved Quick Start section mobile layout with proper container structure - Added custom containers (quickStartContainer, whyContainer) for better control - Fixed step cards to stack properly in column layout on mobile - Adjusted padding, margins, and font sizes for mobile viewports - Prevented horizontal scrolling with proper overflow handling - Ensured code blocks and buttons display correctly without cutoff - Added box-sizing: border-box globally to prevent layout issues - Improved mobile breakpoints at 996px and 640px 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix feature card text cutoff and improve spacing - Replaced Bootstrap grid with CSS Grid for better control and spacing - Added 2rem gap between feature cards (responsive adjustments for mobile) - Fixed text overflow issues with proper word-wrapping and breaking - Added minmax(0, 1fr) grid template to prevent overflow - Set min-width: 0 on columns to allow proper shrinking - Added box-sizing: border-box throughout for consistent sizing - Added horizontal padding to features section - Improved responsive layout for tablet and mobile viewports 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Address PR review feedback for accessibility and code quality Based on PR #2852 review comments: Accessibility improvements: - Added focus-visible states for all interactive elements - Implemented prefers-reduced-motion support for animations - Added ARIA labels and semantic HTML attributes - Improved keyboard navigation support Code quality improvements: - Extracted colors to CSS custom properties for consistency - Created design system variables for reusable values - Reduced hardcoded color values throughout stylesheets - Improved CSS organization and maintainability Performance: - Disabled animations for users who prefer reduced motion - Optimized transitions to respect user preferences 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix dependency lock file management - Keep yarn.lock in source control for consistent dependency versions - Remove yarn.lock from .gitignore (only package-lock.json should be ignored) - Regenerate yarn.lock using yarn install - Remove conflicting package-lock.json from docs directory This ensures all developers and CI/CD get the same dependency versions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent b3debcc commit 077779c

File tree

11 files changed

+3468
-2612
lines changed

11 files changed

+3468
-2612
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ FakesAssemblies/
284284
# Node.js Tools for Visual Studio
285285
.ntvs_analysis.dat
286286
node_modules/
287+
package-lock.json
287288

288289
# Visual Studio 6 build log
289290
*.plg

docs/docusaurus.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type * as Preset from '@docusaurus/preset-classic';
55
const config: Config = {
66
title: 'TUnit',
77
tagline: 'Welcome to TUnit Testing',
8-
favicon: 'img/favicon.ico',
8+
favicon: 'img/tunit-favicon.svg',
99

1010
// Set the production url of your site here
1111
url: 'https://tunit.dev',
@@ -67,7 +67,7 @@ const config: Config = {
6767
title: 'TUnit',
6868
logo: {
6969
alt: 'TUnit Logo',
70-
src: 'img/lab.svg',
70+
src: 'img/tunit-favicon.svg',
7171
},
7272
items: [
7373
{

docs/src/components/HomepageFeatures/index.tsx

Lines changed: 55 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,84 @@
11
import clsx from 'clsx';
22
import Heading from '@theme/Heading';
3+
import CodeBlock from '@theme/CodeBlock';
34
import styles from './styles.module.css';
45

56
type FeatureItem = {
67
title: string;
7-
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
8+
icon: string;
89
description: JSX.Element;
10+
codeExample?: string;
911
};
1012

1113
const FeatureList: FeatureItem[] = [
1214
{
13-
title: 'Flexible',
14-
Svg: require('@site/static/img/flexible.svg').default,
15+
title: 'Flexible Test Design',
16+
icon: '🔧',
1517
description: (
1618
<>
17-
TUnit was designed for flexibility. With various ways to write, inject data into, and control tests.
19+
Multiple ways to write, inject data, and control tests. Support for data-driven testing, matrix tests, and custom data sources.
1820
</>
1921
),
22+
codeExample: `[Test]
23+
[Arguments(1, 2, 3)]
24+
[Arguments(4, 5, 9)]
25+
public void TestAdd(int a, int b, int expected)
26+
{
27+
Assert.That(a + b).IsEqualTo(expected);
28+
}`
2029
},
2130
{
22-
title: 'Easy',
23-
Svg: require('@site/static/img/easy.svg').default,
31+
title: 'Intuitive Syntax',
32+
icon: '✨',
2433
description: (
2534
<>
26-
TUnit uses an attribute-based syntax that is easy to read and write. Simply create methods and add attributes to them to control how your test suite works.
35+
Clean attribute-based syntax that's easy to read and write. Fluent assertions make tests expressive and self-documenting.
2736
</>
2837
),
38+
codeExample: `[Test]
39+
public async Task TestAsync()
40+
{
41+
var result = await GetDataAsync();
42+
await Assert.That(result)
43+
.IsNotNull()
44+
.And.HasCount(5);
45+
}`
2946
},
3047
{
31-
title: 'Fast & Source Generated',
32-
Svg: require('@site/static/img/fast.svg').default,
48+
title: 'Performance Optimized',
49+
icon: '⚡',
3350
description: (
3451
<>
35-
TUnit generates source code for your tests, enabling you to create your test applications using Native AOT or as Single File applications. Combined with being built on top of the new Microsoft Testing Platform, this makes it fast and efficient.
52+
Source generated tests with Native AOT support. Built on Microsoft Testing Platform to reduce overhead and improve efficiency.
3653
</>
3754
),
55+
codeExample: `// AOT Compatible
56+
[Test]
57+
public void PerformantTest()
58+
{
59+
// Source generated
60+
// No reflection overhead
61+
Assert.That(true).IsTrue();
62+
}`
3863
},
3964
];
4065

41-
function Feature({title, Svg, description}: FeatureItem) {
66+
function Feature({title, icon, description, codeExample}: FeatureItem) {
4267
return (
43-
<div className={clsx('col col--4')}>
44-
<div className="text--center">
45-
<Svg className={styles.featureSvg} role="img" />
46-
</div>
47-
<div className="text--center padding-horiz--md">
48-
<Heading as="h3">{title}</Heading>
49-
<p>{description}</p>
68+
<div className={styles.featureColumn}>
69+
<div className={styles.featureBox}>
70+
<div className={styles.featureHeader}>
71+
<span className={styles.featureIcon}>{icon}</span>
72+
<Heading as="h3" className={styles.featureTitle}>{title}</Heading>
73+
</div>
74+
<p className={styles.featureDescription}>{description}</p>
75+
{codeExample && (
76+
<div className={styles.featureCode}>
77+
<CodeBlock language="csharp">
78+
{codeExample}
79+
</CodeBlock>
80+
</div>
81+
)}
5082
</div>
5183
</div>
5284
);
@@ -56,7 +88,11 @@ export default function HomepageFeatures(): JSX.Element {
5688
return (
5789
<section className={styles.features}>
5890
<div className="container">
59-
<div className="row">
91+
<div className={styles.featuresHeader}>
92+
<h2 className={styles.featuresTitle}>Core Features</h2>
93+
<p className={styles.featuresSubtitle}>Everything you need for modern test development</p>
94+
</div>
95+
<div className={styles.featureRow}>
6096
{FeatureList.map((props, idx) => (
6197
<Feature key={idx} {...props} />
6298
))}

0 commit comments

Comments
 (0)