Skip to content

Commit

Permalink
Improve home page for mobile screens
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro-FA committed Nov 6, 2024
1 parent ac9e4b1 commit fbfba84
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions lib/pages/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ class _Greeting extends StatelessWidget {
Widget build(BuildContext context) {
final textTheme = Theme.of(context).textTheme;
final colorScheme = Theme.of(context).colorScheme;
final isCompact = WindowClass.of(context) == WindowClass.compact;
final nameStyle =
isCompact ? textTheme.displayMedium : textTheme.displayLarge;
final markdownTheme = MarkdownTheme.of(context);

return Padding(
padding: const EdgeInsets.only(top: 50, bottom: 10),
Expand All @@ -93,22 +97,23 @@ class _Greeting extends StatelessWidget {
children: [
Text(
'Hello, I’m ',
style: textTheme.displayMedium,
style: isCompact ? textTheme.displaySmall : textTheme.displayMedium,
),
Text(
'Alejandro Fernández',
style: textTheme.displayLarge?.copyWith(
style: nameStyle?.copyWith(
fontWeight: FontWeight.bold,
color: colorScheme.primary,
),
),
const SizedBox(height: 20),
MarkdownContent(
file: aboutMe,
styleSheet: MarkdownTheme.of(context).copyWith(
p: textTheme.titleLarge?.copyWith(
fontFamily: textTheme.bodyLarge?.fontFamily,
height: 1.5,
styleSheet: markdownTheme.copyWith(
p: markdownTheme.p?.copyWith(
fontSize: isCompact
? textTheme.titleMedium?.fontSize
: textTheme.titleLarge?.fontSize,
),
),
),
Expand Down

0 comments on commit fbfba84

Please sign in to comment.