Skip to content

Commit

Permalink
transitions added
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmzdev committed Sep 17, 2024
1 parent a1e6599 commit 2577bf4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
11 changes: 8 additions & 3 deletions lib/components/app_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ class AppButton extends StatelessComponent {
.background(
color: Colors.transparent,
),
css('.app-button:hover').background(
color: primaryColor,
),
css('.app-button:hover')
.background(
color: primaryColor,
)
.box(
transition: Transition('background-color', duration: 500),
cursor: Cursor.pointer,
),
css('.label').text(fontSize: 12.px),
];
}
12 changes: 8 additions & 4 deletions lib/components/nav_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class NavBar extends StatelessComponent {
],
),
a(
href: '#',
href: '#services',
classes: 'navbar-label',
[
text('SERVICES'),
Expand Down Expand Up @@ -83,9 +83,13 @@ class NavBar extends StatelessComponent {
justifyContent: JustifyContent.spaceBetween,
alignItems: AlignItems.center,
),
css('.navbar-label:hover').text(
color: primaryColor,
),
css('.navbar-label:hover')
.text(
color: primaryColor,
)
.box(
transition: Transition('color', duration: 500),
),
css('.labels').flexbox(
direction: FlexDirection.row,
justifyContent: JustifyContent.end,
Expand Down
1 change: 1 addition & 0 deletions lib/components/service_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class ServiceCard extends StatelessComponent {
blur: 8.px,
spread: 2.px,
),
transition: Transition('box-shadow', duration: 500),
),
];
}
10 changes: 7 additions & 3 deletions lib/sections/basic_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,13 @@ class BasicInfoSection extends StatelessComponent {
.box(
padding: EdgeInsets.only(right: 25.px),
),
css('.social-icon:hover').text(
color: primaryColor,
),
css('.social-icon:hover')
.text(
color: primaryColor,
)
.box(
transition: Transition('color', duration: 300),
),

/// MEDIA QUERY 1100px
css.media(MediaQuery.screen(maxWidth: 1100.px), [
Expand Down
2 changes: 1 addition & 1 deletion lib/sections/services.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ServicesSection extends StatelessComponent {
span(classes: 'subtitle', [
text("I may not be perfect but surely I'm of some use :)"),
]),
div(classes: 'section-body', [
div(classes: 'section-body', id: 'services', [
for (final service in services)
ServiceCard(
icon: service['icon'],
Expand Down

0 comments on commit 2577bf4

Please sign in to comment.