index.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. <h1>Your Next Training</h1>
  23. <Training {...data.trainings[data.trainings.length - 1]} />
  24. </section>
  25. <style jsx>
  26. {`
  27. #nextTraining {
  28. background-image: url('media/man_working_out.jpg');
  29. background-size: auto 400px;
  30. background-repeat: no-repeat;
  31. display: grid;
  32. grid-template-rows: 48px 1fr;
  33. }
  34. #nextTraining > h1 {
  35. background: rgba(32, 35, 40, 0.8);
  36. padding: 5px 20px;
  37. color: ${theme.colors.offWhite};
  38. }
  39. `}
  40. </style>
  41. </>
  42. )
  43. export default Home