index.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import Training from '../components/training'
  2. import data from '../initial-data.js'
  3. import theme from '../styles/theme'
  4. console.log(data)
  5. const Home = () => (
  6. <>
  7. <section>
  8. <h1>Stay in Shape with u-fit</h1>
  9. <p>u-fit is a high intensity interval training offered by u-blox.</p>
  10. <aside>
  11. <div id='trainingTime'>
  12. <span className='caption'>When</span>
  13. <span className='data'>Tuesdays, 11:45-12:30</span>
  14. </div>
  15. <div id='trainingEquipment'>
  16. <span className='caption'>Equipment</span>
  17. <span className='data'>Towel, water, optional: yoga mat</span>
  18. </div>
  19. </aside>
  20. </section>
  21. <section id='nextTraining'>
  22. <Training {
  23. ... {
  24. ...data.trainings[data.trainings.length - 1],
  25. title: `Your Next Training: ${data.trainings[data.trainings.length - 1].title}`,
  26. }
  27. } />
  28. </section>
  29. <style jsx>
  30. {`
  31. #nextTraining {
  32. background-image: url('media/man_working_out.jpg');
  33. background-size: auto 400px;
  34. background-repeat: no-repeat;
  35. display: grid;
  36. grid-template-rows: 48px 1fr;
  37. }
  38. #nextTraining > h1 {
  39. background: rgba(32, 35, 40, 0.8);
  40. padding: 5px 20px;
  41. color: ${theme.colors.offWhite};
  42. }
  43. `}
  44. </style>
  45. </>
  46. )
  47. export default Home