forked from b00tc4mp/isdi-parttime-202403
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
componetize create post form, and others; add more features to view c…
…ompo; add feedback panel to form with feedback b00tc4mp#136
- Loading branch information
1 parent
779b19a
commit 501d0df
Showing
116 changed files
with
10,884 additions
and
57 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 |
---|---|---|
@@ -1 +1 @@ | ||
[{"author":"pepitogrillo","title":"blah","image":"https://m.media-amazon.com/images/I/41xsPjrM-pL._AC_UF350,350_QL50_.jpg","description":"blah blah","id":"5879244716997389-1716667549269","date":"2024-05-25T20:05:49.269Z"},{"id":"5424401351689265-1716995937318","author":"WendyD","title":"asfaF","image":"https://media.giphy.com/media/xTiTntKyFNFbCNuqkw/giphy.gif?cid=790b76117ksklq64slgwdawn5cmtm14enobheew3nkecwdq1&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"ASAFA","date":"2024-05-29T15:18:57.318Z"},{"author":"peterpan","title":"hello world","image":"https://miro.medium.com/v2/resize:fit:1024/1*OohqW5DGh9CQS4hLY5FXzA.png","description":"console.log(\"hello world\")","date":"2024-05-30T13:46:33.345Z","id":"2575794271140359-1717076793345"},{"author":"peterpan","title":"blah","image":"https://upload.wikimedia.org/wikipedia/commons/1/1d/Blah_Blah_Blah.jpg","description":"blah blah","date":"2024-05-30T14:07:06.222Z","id":"03238060139373644-1717078026222"},{"author":"peterpan","title":"i love js","image":"https://images-na.ssl-images-amazon.com/images/I/61VmREcLaFL._SLDPMOBCAROUSELAUTOCROP288221_MCnd_AC_SR462,693_.jpg","description":"t-shirt","date":"2024-05-30T15:07:38.101Z","id":"7052022051791447-1717081658101"},{"author":"ManoloC","title":"i love debugging","image":"https://ih1.redbubble.net/image.5079675350.2246/gptr,1400x,front,black-c,188,133,1000,1000-bg,f8f8f8.jpg","description":"otra tshirt","date":"2024-05-30T15:12:22.193Z","id":"3242603140750757-1717081942193"},{"author":"peterpan","title":"I hate onions","image":"https://res.cloudinary.com/teepublic/image/private/s--jk8hOZj1--/t_Resized%20Artwork/c_crop,x_10,y_10/c_fit,h_563/c_crop,g_north_west,h_626,w_470,x_-40,y_-15/g_north_west,u_upload:v1462829018:production:blanks:ekerz3afkzxin2pgqj8h,x_-435,y_-340/b_rgb:eeeeee/c_limit,f_auto,h_630,q_auto:good:420,w_630/v1704062586/production/designs/55814456_0.jpg","description":"camiseta","date":"2024-05-30T15:19:04.125Z","id":"4007381802005925-1717082344121"},{"author":"pepitogrillo","title":"this is me","image":"https://pastaypizzagrossi.com/wp-content/uploads/2015/11/pepito.png","description":"PepitoG","date":"2024-06-03T15:37:09.141Z","id":"7816694399029667-1717429029143"},{"author":"PabloP","title":"yo","image":"https://imgs.search.brave.com/shWZquMWkPDaIeX0KktOS6CA0nC8DjMZ7f8UNHr3FIc/rs:fit:500:0:0/g:ce/aHR0cHM6Ly9oaXBz/LmhlYXJzdGFwcHMu/Y29tL2htZy1wcm9k/L2ltYWdlcy9hdXRv/cnJldHRhcm8tMTkw/Ny0xNjU3ODA0Mzg5/LmpwZWc_Y3JvcD0x/eHc6MXhoO2NlbnRl/cix0b3AmcmVzaXpl/PTk4MDoq","description":"my portrait","date":"2024-06-03T16:49:06.088Z","id":"6226364135019973-1717433346091"},{"author":"peterpan","title":"NBA","image":"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExOHJla2VldzRxODB3M25lZmw4eHo4aXBnb2dnOGZkNjR0aHAxZGw2MCZlcD12MV9naWZzX3RyZW5kaW5nJmN0PWc/q45TMknC4xNUCfZt6H/giphy.gif","description":"PlayOffs","date":"2024-06-05T14:54:30.056Z","id":"8142909801569895-1717599270057"},{"author":"WendyD","title":"dancing","image":"https://media.giphy.com/media/iibH5ymW6LFvSIVyUc/giphy.gif?cid=790b76118rekeew4q80w3nefl8xz8ipgogg8fd64thp1dl60&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"girl dancing","date":"2024-06-05T16:59:52.426Z","id":"9678571314947659-1717606792429"},{"author":"peterpan","title":"thursday","image":"https://media.giphy.com/media/H3NC55FLtoF3RXM3eL/giphy.gif?cid=790b7611yhopdjk154taitnd087agc4kk9f1mv61gmkvlv4l&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"hege","date":"2024-06-13T17:37:30.738Z","id":"15869690379310386-1718300250740"},{"author":"peterpan","title":"foto","image":"https://media.giphy.com/media/4Jxa0QgHF2HSw/giphy.gif?cid=790b7611uw89e4dpo4svai7q6sulh4u7yeaudqipse0i8d2o&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"look","date":"2024-06-17T08:35:29.759Z","id":"9106929267928583-1718613329760"},{"author":"peterpan","title":"carrey","image":"https://media.giphy.com/media/dRvEZLV0ORAmHT1L5u/giphy.gif?cid=790b7611uw89e4dpo4svai7q6sulh4u7yeaudqipse0i8d2o&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"jim","date":"2024-06-17T09:06:47.560Z","id":"35807982447313225-1718615207560"},{"author":"peterpan","title":"corazon","image":"https://media.giphy.com/media/R6gvnAxj2ISzJdbA63/giphy.gif?cid=790b7611uw89e4dpo4svai7q6sulh4u7yeaudqipse0i8d2o&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"heart","date":"2024-06-17T09:21:21.170Z","id":"3338800772065065-1718616081171"},{"author":"peterpan","title":"sdgdDG","image":"https://media.giphy.com/media/iGqP4DYXe4zVJbCY5N/giphy.gif?cid=82a1493bljazeirf80bswzzbztripbnc5hfph6gll89r3spz&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"xbxbB","date":"2024-06-17T11:27:38.535Z","id":"9130813019067745-1718623658536"},{"author":"peterpan","title":"dfhdfhz","image":"https://media.giphy.com/media/UuB5lh1bL1Dl6svihe/giphy.gif?cid=82a1493bljazeirf80bswzzbztripbnc5hfph6gll89r3spz&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"hugs","date":"2024-06-17T11:31:15.209Z","id":"27637147804292184-1718623875210"},{"author":"peterpan","title":"vaqueroooo","image":"https://media.giphy.com/media/SAUOBJogCbegrukfwR/giphy.gif?cid=82a1493b1bk1hxb7r6ubjt02jfxyvwxpt4sqx0x3j3h0zc03&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"yayyyy!","date":"2024-06-17T11:49:05.188Z","id":"381087757154702-1718624945188"}] | ||
[{"author":"pepitogrillo","title":"blah","image":"https://m.media-amazon.com/images/I/41xsPjrM-pL._AC_UF350,350_QL50_.jpg","description":"blah blah","id":"5879244716997389-1716667549269","date":"2024-05-25T20:05:49.269Z"},{"id":"5424401351689265-1716995937318","author":"WendyD","title":"asfaF","image":"https://media.giphy.com/media/xTiTntKyFNFbCNuqkw/giphy.gif?cid=790b76117ksklq64slgwdawn5cmtm14enobheew3nkecwdq1&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"ASAFA","date":"2024-05-29T15:18:57.318Z"},{"author":"peterpan","title":"hello world","image":"https://miro.medium.com/v2/resize:fit:1024/1*OohqW5DGh9CQS4hLY5FXzA.png","description":"console.log(\"hello world\")","date":"2024-05-30T13:46:33.345Z","id":"2575794271140359-1717076793345"},{"author":"peterpan","title":"blah","image":"https://upload.wikimedia.org/wikipedia/commons/1/1d/Blah_Blah_Blah.jpg","description":"blah blah","date":"2024-05-30T14:07:06.222Z","id":"03238060139373644-1717078026222"},{"author":"peterpan","title":"i love js","image":"https://images-na.ssl-images-amazon.com/images/I/61VmREcLaFL._SLDPMOBCAROUSELAUTOCROP288221_MCnd_AC_SR462,693_.jpg","description":"t-shirt","date":"2024-05-30T15:07:38.101Z","id":"7052022051791447-1717081658101"},{"author":"ManoloC","title":"i love debugging","image":"https://ih1.redbubble.net/image.5079675350.2246/gptr,1400x,front,black-c,188,133,1000,1000-bg,f8f8f8.jpg","description":"otra tshirt","date":"2024-05-30T15:12:22.193Z","id":"3242603140750757-1717081942193"},{"author":"peterpan","title":"I hate onions","image":"https://res.cloudinary.com/teepublic/image/private/s--jk8hOZj1--/t_Resized%20Artwork/c_crop,x_10,y_10/c_fit,h_563/c_crop,g_north_west,h_626,w_470,x_-40,y_-15/g_north_west,u_upload:v1462829018:production:blanks:ekerz3afkzxin2pgqj8h,x_-435,y_-340/b_rgb:eeeeee/c_limit,f_auto,h_630,q_auto:good:420,w_630/v1704062586/production/designs/55814456_0.jpg","description":"camiseta","date":"2024-05-30T15:19:04.125Z","id":"4007381802005925-1717082344121"},{"author":"pepitogrillo","title":"this is me","image":"https://pastaypizzagrossi.com/wp-content/uploads/2015/11/pepito.png","description":"PepitoG","date":"2024-06-03T15:37:09.141Z","id":"7816694399029667-1717429029143"},{"author":"PabloP","title":"yo","image":"https://imgs.search.brave.com/shWZquMWkPDaIeX0KktOS6CA0nC8DjMZ7f8UNHr3FIc/rs:fit:500:0:0/g:ce/aHR0cHM6Ly9oaXBz/LmhlYXJzdGFwcHMu/Y29tL2htZy1wcm9k/L2ltYWdlcy9hdXRv/cnJldHRhcm8tMTkw/Ny0xNjU3ODA0Mzg5/LmpwZWc_Y3JvcD0x/eHc6MXhoO2NlbnRl/cix0b3AmcmVzaXpl/PTk4MDoq","description":"my portrait","date":"2024-06-03T16:49:06.088Z","id":"6226364135019973-1717433346091"},{"author":"peterpan","title":"NBA","image":"https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExOHJla2VldzRxODB3M25lZmw4eHo4aXBnb2dnOGZkNjR0aHAxZGw2MCZlcD12MV9naWZzX3RyZW5kaW5nJmN0PWc/q45TMknC4xNUCfZt6H/giphy.gif","description":"PlayOffs","date":"2024-06-05T14:54:30.056Z","id":"8142909801569895-1717599270057"},{"author":"WendyD","title":"dancing","image":"https://media.giphy.com/media/iibH5ymW6LFvSIVyUc/giphy.gif?cid=790b76118rekeew4q80w3nefl8xz8ipgogg8fd64thp1dl60&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"girl dancing","date":"2024-06-05T16:59:52.426Z","id":"9678571314947659-1717606792429"},{"author":"peterpan","title":"thursday","image":"https://media.giphy.com/media/H3NC55FLtoF3RXM3eL/giphy.gif?cid=790b7611yhopdjk154taitnd087agc4kk9f1mv61gmkvlv4l&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"hege","date":"2024-06-13T17:37:30.738Z","id":"15869690379310386-1718300250740"},{"author":"peterpan","title":"foto","image":"https://media.giphy.com/media/4Jxa0QgHF2HSw/giphy.gif?cid=790b7611uw89e4dpo4svai7q6sulh4u7yeaudqipse0i8d2o&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"look","date":"2024-06-17T08:35:29.759Z","id":"9106929267928583-1718613329760"},{"author":"peterpan","title":"carrey","image":"https://media.giphy.com/media/dRvEZLV0ORAmHT1L5u/giphy.gif?cid=790b7611uw89e4dpo4svai7q6sulh4u7yeaudqipse0i8d2o&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"jim","date":"2024-06-17T09:06:47.560Z","id":"35807982447313225-1718615207560"},{"author":"peterpan","title":"dfhdfhz","image":"https://media.giphy.com/media/UuB5lh1bL1Dl6svihe/giphy.gif?cid=82a1493bljazeirf80bswzzbztripbnc5hfph6gll89r3spz&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"hugs","date":"2024-06-17T11:31:15.209Z","id":"27637147804292184-1718623875210"},{"author":"peterpan","title":"vaqueroooo","image":"https://media.giphy.com/media/SAUOBJogCbegrukfwR/giphy.gif?cid=82a1493b1bk1hxb7r6ubjt02jfxyvwxpt4sqx0x3j3h0zc03&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"yayyyy!","date":"2024-06-17T11:49:05.188Z","id":"381087757154702-1718624945188"},{"author":"ManoloC","title":"ghjkgh","image":"https://media.giphy.com/media/n1rwdMK9xlxxNNMyQo/giphy.gif?cid=790b7611uw89e4dpo4svai7q6sulh4u7yeaudqipse0i8d2o&ep=v1_gifs_trending&rid=giphy.gif&ct=g","description":"dfhdzfh","date":"2024-06-18T14:08:39.919Z","id":"9633525110445467-1718719719920"}] |
3 changes: 3 additions & 0 deletions
3
staff/eduardo-sanchez/socialcode/app/src/components/core/Text.css
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,3 @@ | ||
.Text { | ||
color: tomato; | ||
} |
7 changes: 7 additions & 0 deletions
7
staff/eduardo-sanchez/socialcode/app/src/components/core/Text.jsx
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,7 @@ | ||
import './Text.css' | ||
|
||
function Text({ children }) { | ||
return <p className="Text">{children}</p> | ||
} | ||
|
||
export default Text |
3 changes: 3 additions & 0 deletions
3
staff/eduardo-sanchez/socialcode/app/src/components/core/Time.css
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,3 @@ | ||
.Time { | ||
color: dodgerblue; | ||
} |
11 changes: 11 additions & 0 deletions
11
staff/eduardo-sanchez/socialcode/app/src/components/core/Time.jsx
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,11 @@ | ||
import './Time.css' | ||
|
||
function Time({ children: time }) { | ||
const formattedTime = new Date(time).toLocaleString() | ||
|
||
return <time className="Time">{formattedTime}</time> | ||
|
||
{ /*return <time>{formattedTime}</time>*/ } | ||
} | ||
|
||
export default Time |
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
padding: 1rem; | ||
} | ||
|
||
.FormWithFeedback .Feedback { | ||
.FormWithFeedback .Feedback.error { | ||
color: tomato; | ||
} | ||
|
||
|
8 changes: 6 additions & 2 deletions
8
staff/eduardo-sanchez/socialcode/app/src/components/library/FormWithFeedback.jsx
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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import Form from '../core/Form' | ||
import Text from '../core/Text' | ||
|
||
import './FormWithFeedback.css' | ||
|
||
function FormWithFeedback({ onSubmit, children }) { | ||
return <Form className="FormWithFeedback" onSubmit={onSubmit}>{children}</Form> | ||
function FormWithFeedback({ onSubmit, children, message, level = 'error' }) { | ||
return <Form className="FormWithFeedback" onSubmit={onSubmit}> | ||
{children} | ||
{message && <Text className={`Feedback ${level}`}>{message}</Text>} | ||
</Form> | ||
} | ||
|
||
export default FormWithFeedback |
11 changes: 11 additions & 0 deletions
11
staff/eduardo-sanchez/socialcode/app/src/components/library/View.css
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 |
---|---|---|
@@ -1,5 +1,16 @@ | ||
.View { | ||
display: flex; | ||
} | ||
|
||
.View--column { | ||
flex-direction: column; | ||
} | ||
|
||
.View--row { | ||
flex-direction: row; | ||
gap: 1rem; | ||
} | ||
|
||
.View--center { | ||
align-items: center; | ||
} |
7 changes: 4 additions & 3 deletions
7
staff/eduardo-sanchez/socialcode/app/src/components/library/View.jsx
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import './View.css' | ||
|
||
function View({ tag: Tag = 'div', className, children }) { | ||
return <Tag className={`View ${className ? className : ''}`}>{children}</Tag> | ||
function View({ tag: Tag = 'div', className, children, direction = 'column', align = 'center' }) { | ||
|
||
return <Tag className={`View ${className ? className : ''} ${direction === 'column' ? 'View--column' : 'View--row'} ${align === 'center' ? 'View--center' : ''}`}>{children}</Tag> | ||
} | ||
|
||
export default View | ||
export default View |
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
8 changes: 8 additions & 0 deletions
8
staff/eduardo-sanchez/socialcode/app/src/views/components/CreatePostForm.css
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,8 @@ | ||
.CreatePostForm { | ||
position: fixed; | ||
bottom: 3rem; | ||
width: 100%; | ||
left: 0; | ||
box-sizing: border-box; | ||
background-color: var(--second-color); | ||
} |
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
Oops, something went wrong.