diff --git a/03_source/mobile/src/pages/DemoProfileExample/components/Figure.module.scss b/03_source/mobile/src/pages/DemoProfileExample/components/Figure.module.scss new file mode 100644 index 0000000..48ef851 --- /dev/null +++ b/03_source/mobile/src/pages/DemoProfileExample/components/Figure.module.scss @@ -0,0 +1,26 @@ +.figure { + padding: 1rem; +} + +.figure h6 { + font-size: 1.5rem; + font-weight: 200; +} + +.figure p { + color: rgb(255, 255, 255); + font-size: 0.9rem; + font-weight: 200; +} + +.figure:nth-child(1) { + background-color: rgb(157, 163, 141); +} + +.figure:nth-child(2) { + background-color: rgb(150, 155, 138); +} + +.figure:nth-child(3) { + background-color: rgb(135, 143, 120); +} diff --git a/03_source/mobile/src/pages/DemoProfileExample/components/Figure.tsx b/03_source/mobile/src/pages/DemoProfileExample/components/Figure.tsx new file mode 100644 index 0000000..57c6f2b --- /dev/null +++ b/03_source/mobile/src/pages/DemoProfileExample/components/Figure.tsx @@ -0,0 +1,9 @@ +import { IonCol } from '@ionic/react'; +import styles from './Figure.module.scss'; + +export const Figure = (props): React.JSX.Element => ( + +
{props.count}
+

{props.title}

+
+); diff --git a/03_source/mobile/src/pages/DemoProfileExample/components/Post.module.scss b/03_source/mobile/src/pages/DemoProfileExample/components/Post.module.scss new file mode 100644 index 0000000..3b81ae7 --- /dev/null +++ b/03_source/mobile/src/pages/DemoProfileExample/components/Post.module.scss @@ -0,0 +1,55 @@ +.post { + border-bottom: 1px solid rgb(219, 219, 219); + padding-top: 1rem; + padding-bottom: 0.2rem; + + p { + font-size: 0.9rem; + padding: 0 !important; + margin: 0 !important; + } + + .postText { + color: rgb(107, 112, 97); + } +} + +.postAvatar { + height: 3.5rem; + width: 3.5rem; + margin-right: 1rem; + border: 3px solid rgba(218, 223, 208, 1); +} + +.postInfo { + display: flex; + flex-direction: row; + justify-content: space-between; + padding-right: 1rem; + color: rgb(190, 190, 190); +} + +.postReactions { + display: flex; + justify-content: space-between; + padding-right: 1rem; + margin-top: 0.5rem; + color: rgb(107, 112, 97); + + .postReaction { + display: flex; + align-items: center; + justify-content: space-between; + font-size: 0.9rem; + + ion-icon { + margin-right: 0.5rem; + } + + p { + padding: 0; + margin: 0; + font-size: 0.8rem; + } + } +} diff --git a/03_source/mobile/src/pages/DemoProfileExample/components/Post.tsx b/03_source/mobile/src/pages/DemoProfileExample/components/Post.tsx new file mode 100644 index 0000000..406e1dd --- /dev/null +++ b/03_source/mobile/src/pages/DemoProfileExample/components/Post.tsx @@ -0,0 +1,35 @@ +import { IonAvatar, IonIcon, IonItem, IonLabel } from '@ionic/react'; +import { chatbubbleOutline, heart, heartOutline, shareSocialOutline } from 'ionicons/icons'; +import styles from './Post.module.scss'; + +export const Post = (props): React.JSX.Element => ( +
+ + + + + +
+

{props.post.date}

+

@93alan

+
+

{props.post.text}

+ +
+
+ +

{props.post.comments}

+
+
+ +

{props.post.likes}

+
+ +
+ +
+
+
+
+
+); diff --git a/03_source/mobile/src/pages/DemoProfileExample/index.tsx b/03_source/mobile/src/pages/DemoProfileExample/index.tsx index 83b92dd..392e5a6 100644 --- a/03_source/mobile/src/pages/DemoProfileExample/index.tsx +++ b/03_source/mobile/src/pages/DemoProfileExample/index.tsx @@ -1,28 +1,25 @@ -import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react'; +import { IonRouterOutlet, IonTabs } from '@ionic/react'; -import { cloudOutline, searchOutline } from 'ionicons/icons'; import { Route, Redirect } from 'react-router'; -import Tab1 from './AppPages/Tab1'; -import Tab2 from './AppPages/Tab2'; +// import Tab1 from './AppPages/Tab1'; +// import Tab2 from './AppPages/Tab2'; import './style.scss'; +import Home from './pages/Home'; -function DemoProfileExample() { +function DemoProfileExample(): React.JSX.Element { return ( - + - - - - - + + - + - {/* */} + {/* @@ -33,6 +30,7 @@ function DemoProfileExample() { Search + */} ); } diff --git a/03_source/mobile/src/pages/DemoProfileExample/pages/Home.module.scss b/03_source/mobile/src/pages/DemoProfileExample/pages/Home.module.scss new file mode 100644 index 0000000..5db20c8 --- /dev/null +++ b/03_source/mobile/src/pages/DemoProfileExample/pages/Home.module.scss @@ -0,0 +1,90 @@ +$main-color: rgb(143, 149, 130); + +.page { + ion-toolbar { + --background: rgb(143, 149, 130) !important; + --color: white; + --border-style: none; + margin: 0 !important; + } +} + +.top { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + align-content: center; + background-color: rgb(143, 149, 130); + color: white; + padding-bottom: 1rem; +} + +.figures { + text-align: center; + background-color: rgb(143, 149, 130); + color: white; + + p, + h6 { + padding: 0; + margin: 0; + } +} + +.profileHeader { + ion-card-subtitle, + ion-card-title { + --color: white; + } + + ion-card-title { + font-size: 1.3rem; + } + + ion-card-subtitle { + --color: rgb(202, 211, 189); + } +} + +.avatar { + width: 7rem; + height: 7rem; + border: 5px solid rgba(218, 223, 208, 0.4); +} + +.avatarUpload { + display: flex; + flex-direction: row; + justify-content: center; + + background-color: rgb(255, 255, 255); + border: 3px solid rgba(218, 223, 208, 0.4); + color: rgb(80, 80, 80); + position: absolute; + padding: 0.3rem; + font-size: 1.1rem; + border-radius: 500px; + margin-top: -2.2rem; + margin-left: 5rem; +} + +.postActions { + display: flex; + flex-direction: row; + align-content: center; + align-items: center; + justify-content: space-between; + padding: 0.2rem; + padding-left: 1.3rem; + padding-right: 1.3rem; + color: rgb(149, 149, 149); + font-size: 0.9rem; + border-bottom: 1px solid rgba(218, 223, 208, 1); + + background-color: rgba(218, 223, 208, 0.4); + + ion-icon { + font-size: 1.2rem; + } +} diff --git a/03_source/mobile/src/pages/DemoProfileExample/pages/Home.tsx b/03_source/mobile/src/pages/DemoProfileExample/pages/Home.tsx new file mode 100644 index 0000000..d565f0a --- /dev/null +++ b/03_source/mobile/src/pages/DemoProfileExample/pages/Home.tsx @@ -0,0 +1,130 @@ +import { + IonAvatar, + IonButton, + IonButtons, + IonCardSubtitle, + IonCardTitle, + IonCol, + IonContent, + IonGrid, + IonHeader, + IonIcon, + IonList, + IonPage, + IonRow, + IonToolbar, + useIonRouter, +} from '@ionic/react'; +import styles from './Home.module.scss'; +import { + arrowBackOutline, + cameraOutline, + chevronBackOutline, + filterOutline, + menuOutline, +} from 'ionicons/icons'; +import { Figure } from '../components/Figure'; +import { Post } from '../components/Post'; + +const Home = (): React.JSX.Element => { + const posts = [ + { + date: 'Mar 30', + text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', + comments: 13, + likes: 49, + liked: true, + }, + { + date: 'Mar 28', + text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', + comments: 1, + likes: 9, + }, + { + date: 'Mar 25', + text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', + comments: 119, + likes: 483, + }, + { + date: 'Mar 23', + text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', + comments: 27, + likes: 78, + }, + ]; + + const router = useIonRouter(); + function handleBackClick() { + router.goBack(); + } + + return ( + + + + + handleBackClick()}> + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + Alan Montgomery + Mobile Team Lead + + +
+ + + +
+
+
+ + + + + + +
+

Posts by @93alan

+ +
+
+
+ + + {posts.map((post, index) => { + return ; + })} + +
+ + + ); +}; + +export default Home; diff --git a/03_source/mobile/src/pages/DemoProfileExample/theme/variables.scss b/03_source/mobile/src/pages/DemoProfileExample/theme/variables.scss new file mode 100644 index 0000000..1a2dbc3 --- /dev/null +++ b/03_source/mobile/src/pages/DemoProfileExample/theme/variables.scss @@ -0,0 +1,79 @@ +.demo-profile-example { + /* Ionic Variables and Theming. For more info, please see: +http://ionicframework.com/docs/theming/ */ + + /** Ionic CSS Variables **/ + :root { + /** primary **/ + --ion-color-primary: #3880ff; + --ion-color-primary-rgb: 56, 128, 255; + --ion-color-primary-contrast: #ffffff; + --ion-color-primary-contrast-rgb: 255, 255, 255; + --ion-color-primary-shade: #3171e0; + --ion-color-primary-tint: #4c8dff; + + /** secondary **/ + --ion-color-secondary: #3dc2ff; + --ion-color-secondary-rgb: 61, 194, 255; + --ion-color-secondary-contrast: #ffffff; + --ion-color-secondary-contrast-rgb: 255, 255, 255; + --ion-color-secondary-shade: #36abe0; + --ion-color-secondary-tint: #50c8ff; + + /** tertiary **/ + --ion-color-tertiary: #5260ff; + --ion-color-tertiary-rgb: 82, 96, 255; + --ion-color-tertiary-contrast: #ffffff; + --ion-color-tertiary-contrast-rgb: 255, 255, 255; + --ion-color-tertiary-shade: #4854e0; + --ion-color-tertiary-tint: #6370ff; + + /** success **/ + --ion-color-success: #2dd36f; + --ion-color-success-rgb: 45, 211, 111; + --ion-color-success-contrast: #ffffff; + --ion-color-success-contrast-rgb: 255, 255, 255; + --ion-color-success-shade: #28ba62; + --ion-color-success-tint: #42d77d; + + /** warning **/ + --ion-color-warning: #ffc409; + --ion-color-warning-rgb: 255, 196, 9; + --ion-color-warning-contrast: #000000; + --ion-color-warning-contrast-rgb: 0, 0, 0; + --ion-color-warning-shade: #e0ac08; + --ion-color-warning-tint: #ffca22; + + /** danger **/ + --ion-color-danger: #eb445a; + --ion-color-danger-rgb: 235, 68, 90; + --ion-color-danger-contrast: #ffffff; + --ion-color-danger-contrast-rgb: 255, 255, 255; + --ion-color-danger-shade: #cf3c4f; + --ion-color-danger-tint: #ed576b; + + /** dark **/ + --ion-color-dark: #222428; + --ion-color-dark-rgb: 34, 36, 40; + --ion-color-dark-contrast: #ffffff; + --ion-color-dark-contrast-rgb: 255, 255, 255; + --ion-color-dark-shade: #1e2023; + --ion-color-dark-tint: #383a3e; + + /** medium **/ + --ion-color-medium: #92949c; + --ion-color-medium-rgb: 146, 148, 156; + --ion-color-medium-contrast: #ffffff; + --ion-color-medium-contrast-rgb: 255, 255, 255; + --ion-color-medium-shade: #808289; + --ion-color-medium-tint: #9d9fa6; + + /** light **/ + --ion-color-light: #f4f5f8; + --ion-color-light-rgb: 244, 245, 248; + --ion-color-light-contrast: #000000; + --ion-color-light-contrast-rgb: 0, 0, 0; + --ion-color-light-shade: #d7d8da; + --ion-color-light-tint: #f5f6f9; + } +}