-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
242 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import 'package:devfolio/constants/theme.dart'; | ||
import 'package:jaspr/jaspr.dart'; | ||
|
||
@client | ||
class ProjectCard extends StatelessComponent { | ||
final String title; | ||
final String description; | ||
final String icon; | ||
final String banner; | ||
final String url; | ||
const ProjectCard({ | ||
super.key, | ||
required this.title, | ||
required this.description, | ||
required this.icon, | ||
required this.banner, | ||
required this.url, | ||
}); | ||
|
||
@override | ||
Iterable<Component> build(BuildContext context) sync* { | ||
yield a(href: url, target: Target.blank, classes: 'banner-card', [ | ||
div( | ||
classes: 'banner-image', | ||
styles: Styles.combine([ | ||
Styles.background( | ||
image: ImageStyle.url(banner), | ||
size: BackgroundSize.cover, | ||
), | ||
]), | ||
[]), | ||
img(src: icon, height: 40), | ||
span(classes: 'service-title', [ | ||
text(title), | ||
]), | ||
span(classes: 'service-description', [ | ||
text(description), | ||
]), | ||
]); | ||
} | ||
|
||
@css | ||
static final List<StyleRule> styles = [ | ||
css('.banner-card') | ||
.flexbox( | ||
direction: FlexDirection.column, | ||
alignItems: AlignItems.center, | ||
justifyContent: JustifyContent.center, | ||
) | ||
.box( | ||
height: 200.px, | ||
width: 350.px, | ||
radius: BorderRadius.circular(12.px), | ||
margin: EdgeInsets.only(top: 25.px, left: 15.px, right: 15.px), | ||
) | ||
.background( | ||
color: themeGray, | ||
) | ||
.text( | ||
decoration: TextDecoration.none, | ||
), | ||
css('.banner-card:hover').box( | ||
shadow: BoxShadow( | ||
color: primaryColor, | ||
offsetX: 0.px, | ||
offsetY: 0.px, | ||
blur: 8.px, | ||
spread: 2.px, | ||
), | ||
transition: Transition('box-shadow', duration: 500), | ||
cursor: Cursor.pointer, | ||
), | ||
css('.banner-image').box( | ||
height: 200.px, | ||
width: 350.px, | ||
), | ||
css('.service-description') | ||
.text( | ||
fontSize: 12.px, | ||
align: TextAlign.center, | ||
) | ||
.box( | ||
padding: EdgeInsets.symmetric(horizontal: 10.px), | ||
margin: EdgeInsets.only(top: 10.px), | ||
), | ||
css('.banner-image').box( | ||
opacity: 1.0, | ||
radius: BorderRadius.circular(12.px), | ||
position: Position.absolute(), | ||
), | ||
css('.banner-image:hover').box( | ||
opacity: 0, | ||
transition: Transition('opacity', duration: 500), | ||
), | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
import 'package:devfolio/components/app_button.dart'; | ||
import 'package:devfolio/components/project_card.dart'; | ||
import 'package:devfolio/utils/assets.dart'; | ||
import 'package:jaspr/jaspr.dart'; | ||
|
||
class ProjectsSections extends StatelessComponent { | ||
const ProjectsSections({super.key}); | ||
|
||
@override | ||
Iterable<Component> build(BuildContext context) sync* { | ||
final List<Map<String, dynamic>> projects = [ | ||
{ | ||
'banner': StaticAssets.snackbar, | ||
'icon': StaticAssets.flutter, | ||
'title': 'Awesome Snackbar', | ||
'description': | ||
"A very unique dart package to uplift the snackbar experience in flutter. Available at pub.dev now!", | ||
'link': 'https://pub.dev/packages/awesome_snackbar', | ||
}, | ||
{ | ||
'banner': StaticAssets.quranB, | ||
'icon': StaticAssets.quran, | ||
'title': 'Quran App', | ||
'description': | ||
"Application of Holy book of Muslims, Al-Qur'an. Developed using Flutter. Powered with live RestAPI given in README.md", | ||
'link': 'https://github.com/mhmzdev/the-holy-quran-app', | ||
}, | ||
{ | ||
'banner': StaticAssets.medkitB, | ||
'icon': StaticAssets.medkit, | ||
'title': 'MedKit', | ||
'description': | ||
"A Phramacy app developed using Flutter powered with Firebase as database with Doctor and Patient panels.", | ||
'link': "https://github.com/mhmzdev/MedKit-Pharmacy-App-Using-Flutter", | ||
}, | ||
{ | ||
'banner': StaticAssets.hereiamB, | ||
'icon': StaticAssets.hereiam, | ||
'title': 'Here I Am', | ||
'description': | ||
"Here I am is an Alert app that Sends alert SMS holding your location (Address and Google Maps) to your loved ones.", | ||
'link': "https://github.com/mhmzdev/Here-I-Am-Alert-App", | ||
}, | ||
{ | ||
'banner': StaticAssets.covidB, | ||
'icon': StaticAssets.covid, | ||
'title': 'Covid-19 Tracker', | ||
'description': | ||
"A live trakcer for COVID19 stats across the Globe and my Home country Pakistan. It uses APIs so the data is live.", | ||
'link': "https://github.com/mhmzdev/Covid19-Tracker-App", | ||
}, | ||
]; | ||
|
||
yield section(classes: 'projects-section', [ | ||
span(classes: 'title', [ | ||
text('Portfolio'), | ||
]), | ||
span(classes: 'subtitle', [ | ||
text("Here are few samples of my work :)"), | ||
]), | ||
div(classes: 'section-body-projects', id: 'projects', [ | ||
for (final project in projects) | ||
ProjectCard( | ||
banner: project['banner'], | ||
icon: project['icon'], | ||
title: project['title'], | ||
description: project['description'], | ||
url: project['link'], | ||
), | ||
]), | ||
div(styles: Styles.box(height: 45.px), []), | ||
AppButton( | ||
label: 'See more', | ||
onPressed: () {}, | ||
), | ||
]); | ||
} | ||
|
||
@css | ||
static final List<StyleRule> styles = [ | ||
css('.projects-section') | ||
.flexbox( | ||
direction: FlexDirection.column, | ||
alignItems: AlignItems.center, | ||
justifyContent: JustifyContent.start, | ||
) | ||
.box( | ||
padding: EdgeInsets.symmetric(vertical: 5.vh, horizontal: 10.vw), | ||
), | ||
css('.title').text( | ||
fontFamily: FontFamily('Montserrat'), | ||
fontWeight: FontWeight.w100, | ||
fontSize: 40.px, | ||
), | ||
css('.section-body-projects') | ||
.flexbox( | ||
direction: FlexDirection.row, | ||
alignItems: AlignItems.center, | ||
justifyContent: JustifyContent.center, | ||
wrap: FlexWrap.wrap, | ||
) | ||
.box( | ||
margin: EdgeInsets.only(top: 50.px), | ||
width: 100.percent, | ||
), | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters