Skip to content

Commit

Permalink
minor adjustment overall
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmzdev committed Sep 17, 2024
1 parent 0a6d394 commit 165c06c
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 12 deletions.
19 changes: 14 additions & 5 deletions lib/components/app_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@ import 'package:jaspr/jaspr.dart';
@client
class AppButton extends StatelessComponent {
final String label;
final void Function() onPressed;
final String href;

final Unit? width;
final Unit? height;

const AppButton({
super.key,
required this.label,
required this.onPressed,
required this.href,
this.width,
this.height,
});

@override
Iterable<Component> build(BuildContext context) sync* {
yield button(
yield a(
classes: 'app-button',
target: Target.blank,
styles: Styles.box(width: width, height: height),
onClick: onPressed,
href: href,
[
span(classes: 'label', [text(label)])
],
Expand All @@ -33,14 +34,22 @@ class AppButton extends StatelessComponent {
static final List<StyleRule> styles = [
css('.app-button')
.box(
width: 130.px,
width: 100.px,
padding: EdgeInsets.all(10.px),
radius: BorderRadius.circular(6.px),
border: Border.all(BorderSide(
color: themePrimaryColor,
width: 1.px,
)),
)
.flexbox(
direction: FlexDirection.row,
alignItems: AlignItems.center,
justifyContent: JustifyContent.center,
)
.text(
decoration: TextDecoration.none,
)
.background(
color: Colors.transparent,
),
Expand Down
3 changes: 2 additions & 1 deletion lib/components/nav_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ class NavBar extends StatelessComponent {
),
AppButton(
label: 'RESUME',
onPressed: () {},
href:
"https://drive.google.com/drive/u/0/folders/1E6NxJlmnW2lTYTszcbODdpXiPFYe_kBM",
),
]),
]);
Expand Down
6 changes: 4 additions & 2 deletions lib/components/service_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ServiceCard extends StatelessComponent {
height: 200.px,
width: 250.px,
radius: BorderRadius.circular(12.px),
margin: EdgeInsets.only(top: 15.px),
margin: EdgeInsets.only(top: 25.px, left: 15.px, right: 15.px),
)
.background(
color: themeDarkGreyColor,
Expand All @@ -43,7 +43,9 @@ class ServiceCard extends StatelessComponent {
.text(
fontSize: 14.px,
)
.box(margin: EdgeInsets.only(top: 10.px)),
.box(
margin: EdgeInsets.only(top: 10.px),
),
css('.service-card:hover').box(
shadow: BoxShadow(
color: themePrimaryColor,
Expand Down
2 changes: 1 addition & 1 deletion lib/jaspr_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ final defaultJasprOptions = JasprOptions(
);

Map<String, dynamic> _prefix0AppButton(prefix0.AppButton c) =>
{'label': c.label, 'onPressed': c.onPressed, 'width': c.width, 'height': c.height};
{'label': c.label, 'href': c.href, 'width': c.width, 'height': c.height};
Map<String, dynamic> _prefix1ContactCard(prefix1.ContactCard c) =>
{'icon': c.icon, 'title': c.title, 'description': c.description, 'action': c.action};
Map<String, dynamic> _prefix4ProjectCard(prefix4.ProjectCard c) =>
Expand Down
3 changes: 2 additions & 1 deletion lib/sections/about_me.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ class AboutMeSection extends StatelessComponent {
div(classes: 'work-row', [
AppButton(
label: 'RESUME',
onPressed: () {},
href:
"https://drive.google.com/drive/u/0/folders/1E6NxJlmnW2lTYTszcbODdpXiPFYe_kBM",
),
div(classes: 'divider', styles: Styles.box(width: 80.px), []),
for (final work in works)
Expand Down
2 changes: 1 addition & 1 deletion lib/sections/projects.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ProjectsSections extends StatelessComponent {
div(styles: Styles.box(height: 45.px), []),
AppButton(
label: 'See more',
onPressed: () {},
href: 'https://github.com/mhmzdev',
),
]);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/sections/services.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ServicesSection extends StatelessComponent {
.flexbox(
direction: FlexDirection.row,
alignItems: AlignItems.center,
justifyContent: JustifyContent.spaceEvenly,
justifyContent: JustifyContent.center,
wrap: FlexWrap.wrap,
)
.box(
Expand Down

0 comments on commit 165c06c

Please sign in to comment.