Find LayoutFind Theme With Material GuidanceComponents- Views
Tablet (width>=1024px && width <1366px) breakpointDesktop BreakpointGeneral Refinement- Finalize 👈
- Future Improvements
- Copyright & Trademark
-
take away hamburger menu -
make AppBar match the theme's color
Make it thinner.
-
Navigation UI in Footer. -
fix width; -
Change icons accordingly.* add an GitHub icon/link
Add a store for Footer.state.value, with a Redux store, in order to be able to set all components to act according to the current navigation icon selected, and for screen swipes also change the navigatino icons.
-
Understand classes in material ui. Why it was passed as props to Footer.js -
Handle actions>dispatch>reducer>scrolling to the right view-
Should I use mapDispatchToProps. I read that all data from store should be dispatched by actions (flux) -
Selected Footer tab should be determined by Redux's store -
- Clicking an BottomNavigationIcon scrolls to the top of the respective view
- Scrolling/Swiping to a view will change BottomNavigation selected tab correspondingly
- The Projects tab will be selected if window.screen doesn't exactly match the
window.screen
of the views of either theHero
orContact
components
- The Projects tab will be selected if window.screen doesn't exactly match the
-
click button -> changesselectValue
's redux state (viewSelect
action) -> goes to view (action that goes to the view onClick. So, add logic that moves to view into theviewSelect
action).TASK: create action/reducerGoing to a view by scrolling/swiping -> also changesselectValue
's redux state, which -> changesBottomNavigation
's value.Try this on desktop view, to see if App.onScroll works. using window.addEventListener('scroll') or setIntervall() makes slideshow and the whole app laggy.Usewindow.pageYOffset
(orwindow.scrollY
), for comparison.- M
aybe go to/contact
after checking if pageYOffset >= (method for whole app height
-window.screen.availHeight
) Selected button matches view. Default selected button isProjects
, if view nottop
orcontact
(or default istop
. If!top
&&!contact
, isproject
)TASK: create action/reducer
- M
-
-
Change unselected navigation icons color to white, matching those on the AppBar -
Pressing on the buttons should change viewReplace the contact icon for one that doesn't give the idea of multiple contacts.
Choose start view's "/" image
-
Only in this View, Switch Header and Footer component's background to '#00000090', else, back to '#2d5f72' -
Choose Typography for Logo, and if it is gonna be only text or if there's gonna be a image for my brand. -
Scroll down
call to action should be a little further down. -
Maybe add a redux storeDesktop | Mobile
, that, switches text betweenScroll | Swipe
Insted, solve it by using Hidden tags around spans for each wordscroll | swipe
.
-
Change hero image, because the first one was in russian, and displays the hardware's logo, which could bring problems.
Make structure projectSteps.js show each project dataThe way it is now, it won't show the projectIndex prop on SwipeableTextMobileStepper.jsmaybe I could import projectSteps.js to Portfolio.js and inject it as an argument into a function that calls.map()
through it to return an element with the data for each project in theprojectSteps
array
Choose which projects to displaytake screenshots of apps and replace images in the slideshowProject images forCat Clicker
mobile view who are too little to see it's details should be cut so details are more visible. Do the same thing for theMemory Game
victory mobile view.Anchor tags on each app on the list should send to the respective app, hosted at Heroku.
-
Draw Contact/Footer component. -
Ready textField UI, with name, email and message fields. -
Contact view should take 100% of view height -
Links for Linkedin and Twitter? If there is, write it's names, icons are optional here.
-
See if it can be done with a 3rd party package or service. -
Reset fields after send.The reset fields after send
generates and email with empty fields. Maybe setTimeout would be enough to fix it.
-
Methods:-
Method #1: Open OS Email Client, Filled By Form Input
<!DOCTYPE html> <html> <body> <h2>Send e-mail to mail@ricardobossan.com:</h2> <form action="mailto:mail@ricardobossan.com" method="post" enctype="text/plain"> Name:<br> <input type="text" name="name"><br> E-mail:<br> <input type="text" name="mail"><br> Comment:<br> <input type="text" name="comment" size="50"><br><br> <input type="submit" value="Send"> <input type="reset" value="Reset"> </form> </body> </html>
-
-
Method #2: Actions
Handling scroll events in React - @kempsterrrr
Navigate between component's views upon user input.
HashRouter not working as intended. It only uses a#
in the address bar. Edit: Managed to get it working with this tip, from Seth KrogerInstead, addid
s in the components, for navigation.Create<Link>
s on the Footer component, for navigating to the respective views
/* pq cada componente tem 100vh, e portfolio é o segundo componente. O primeiro não muda /*
/* Top */
window.scrollTo(0,0)
/* Portfolio */
window.scrollTo(0, (window.screen.availHeight) )
/* Contact */
window.scrollTo(0, (window.screen.availHeight*10) )
social should be closer to each other.Slideshows should wrap.
Decide design. Between:Using css breakpoints and material ui theme breakpointsCreating a redux store for switching between Desktop and Mobile (or also between tablet and phone) view, whenApp
ComponentonResize
is triggered, to displaying, hiding or modifying accordingly things that show on the screen.👉 Both approaches (CSS Breakpoints in material UI && redux state for phone, tablet and desktop, for eventual features)👈
Hide bottom navigationSwitch it's functionality to a 👉 left aside or top the center of the Top App Bar, without icons.
Scrolling to a view should call.focus()
on it, so it will beselected
.This can be achieved using React refssolved by removing the propertybutton
from Mui class ListItem
Hide componetFooter / NavigationBottom
.And replace it by mounting a left<aside>
, or material ui equivalent component.Use secondary, in themes, for styling selected tab in<aside>
Check tutorialUse this JSS in the class, and make it be the iten's style when the redux state matches that item (found in Mui docs for MenuItem):
'&:focus': {
backgroundColor: theme.palette.primary.main,
'& $primary, & $icon': {
color: theme.palette.common.white,
},
},
<aside>
should have the same functionality as the Footer
Do some styling to diferentiate the current view, so it won't be boring and so it is good looking.
Header mail icon goes to the right view, but doesn't change BottomNavigation selected tab, like it's not connected to Redux. On Redux DevTools, no action is dispatched, when clicked on the iconGot to either fix lack of connection between Header and Redux, or simply get rid of the mail icon.Had forgotten to destructure action in component.
-
Add events for checkingif the view is correct in either BottomNavigation or Aside.-
Programmatically Managing Focus: Starting focus doesn't allow keyboard events to be fired. Right now, i have to hit tab so the linkedin icon in the header will be focused. Only then keyboard events will fire, and the aside selected tab will follow accordingly.-
I think I'll solve this by using useRef,tabIndex
and.focus()
-
Solution: simply wrap an dom event listener ondocument.body
, wrapped around an useEffect() React method.-
In order to prevent memory leaks, I had to wrap the event handler inside another function, who would first call removeEventListener on this new function, who is now the event handler:Avoiding Memory Leaks
const handleKey = e => e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'PageUp' || e.key === 'PageDown' || e.key === 'Home' || e.key === 'End' ? handleScroll() : null; const handleKeyWrapper = e => { document.body.removeEventListener('keyup', handleKeyWrapper, false); handleKey(e); }; useEffect(() => { document.body.addEventListener('keyup', handleKeyWrapper); });
-
-
-
-
-
Git rid of desktop view horizontal scrollbar -
slideshow buttons shouldn't be encapsulated by anchor tags -
Build a production enviroment -
host portfolio's production enviroment. -
desktop: selected property on ListItem, if selected. -
Change hero image's text shadow to a barelly noticiable color. -
remove scrollbar
-
Issues:
-
Contact links to social network services are cut behind the footer at the bottom of the page, and can't be swiped to (research 1). -
Email form doesn't work on mobile.-
SOLVED:
- Material UI solution:
<Button>'s
href
property: https://material-ui.com/api/button/ - Confirmed by the common
<a>
tag approach: https://stackoverflow.com/questions/18870154/mailto-attribute-does-not-work-on-mobile#answer-18870188
- Material UI solution:
-
Method #0: https://www.sitepoint.com/sending-email-using-node-js/
-
Method #1: SMTPJS - https://smtpjs.com/
Security Whoa!, wait a minute. I don't want my SMTP credentials visible to the world! We've thought of that, so instead you can encrypt your SMTP credentials, and lock it to a single domain, and pass a secure token instead of the credentials instead, for example: Email.send({ SecureToken : "C973D7AD-F097-4B95-91F4-40ABC5567812", To : 'them@website.com', From : "you@isp.com", Subject : "This is the subject", Body : "And this is the body" }).then( message => alert(message) ); Note: By default, the SMTP connection is secure (STARTTLS) and over port 25. If you need to use an SMTP server that does not accepts secure connections, or in on a non-standard port, like 587, then use the button above "Encrypt your SMTP Credentials" to store advanced configuration. Need an SMTP server: If you don't have access to an SMTP server, you can create one by opening an account at Elastic Email.com, then pressing Settings > SMTP/API, and using the SMTP configuration shown.
Send an email using only JavaScript
in short:
- register for Mandrill to get an API key
- load jQuery
- use $.ajax to send an email Like this -
function sendMail() { $.ajax({ type: 'POST', url: 'https://mandrillapp.com/api/1.0/messages/send.json', data: { 'key': 'YOUR API KEY HERE', 'message': { 'from_email': 'YOUR@EMAIL.HERE', 'to': [ { 'email': 'RECIPIENT@EMAIL.HERE', 'name': 'RECIPIENT NAME (OPTIONAL)', 'type': 'to' } ], 'autotext': 'true', 'subject': 'YOUR SUBJECT HERE!', 'html': 'YOUR EMAIL CONTENT HERE! YOU CAN USE HTML!' } } }).done(function(response) { console.log(response); // if you're into that sorta thing }); } https://medium.com/design-startups/b53319616782
Note: Keep in mind that your API key is visible to anyone, so any malicious user may use your key to send out emails that can eat up your quota.
To overcome the above vulnerability, you can modify your own server to send the email after session based authentication.
node.js - https://www.npmjs.org/package/node-mandrill
var mandrill = require('node-mandrill')('');
function sendEmail ( _name, _email, _subject, _message) { mandrill('/messages/send', { message: { to: [{email: _email , name: _name}], from_email: 'noreply@yourdomain.com', subject: _subject, text: _message } }, function(error, response){ if (error) console.log( error ); else console.log(response); }); }
// define your own email api which points to your server.
app.post( '/api/sendemail/', function(req, res){
var _name = req.body.name; var _email = req.body.email; var _subject = req.body.subject; var _messsage = req.body.message; //implement your spam protection or checks. sendEmail ( _name, _email, _subject, _message );
}); and then use use $.ajax on client to call your email API.
shareedit edited Apr 20 '15 at 5:16 answered Dec 2 '14 at 7:46
rahulroy9202 2,07912439
-
-
-
-
Set this portfolio to my portfolio domain.
-
Clean commented out code.
-
Create a full sketch of
react-redux
(specifically) functionality
- Clicking on the mail icon on the header focuses on the name input in the form.
- Form validation for email TextField.
- Use Refs for DOM
- Use react hooks with redux, to have global state with functional components
- Type (light /dark theme) You can make the theme dark by setting type to dark. While it's only a single property value change, internally it modifies the value of the following keys:
palette.text
palette.divider
palette.background
palette.action
const theme = createMuiTheme({
palette: {
type: 'dark',
},
});
- If swipe is long, it may hit Top or Bottom view without activating the action for selecting the respective view in the BottomNavigation bar. May be solved by adding a check at
scrollY === 0
andscrolly >= window.scrollHeight - window.screen.availHeight -1
. Add a setTimeout for 1000ms, so it won't call too many times.