Brand.jsx 980 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import React from "react";
  2. import { Link } from "react-router-dom";
  3. import styled from "styled-components";
  4. const StyledBrand = styled.div`
  5. position: relative;
  6. display: inline-block;
  7. flex: 1;
  8. & h1 {
  9. font-weight: 700;
  10. font-size: 24px;
  11. & a {
  12. color: var(--font-color);
  13. padding: 0;
  14. display: inline;
  15. }
  16. }
  17. & span {
  18. color: var(--font-color);
  19. position: absolute;
  20. top: 5px;
  21. left: 175px;
  22. text-transform: uppercase;
  23. font-weight: 300;
  24. font-size: 1.5rem;
  25. }
  26. & .short {
  27. display: none;
  28. }
  29. @media screen and (max-width: 1024px) {
  30. & span {
  31. display: none;
  32. }
  33. & h1 {
  34. display: none;
  35. }
  36. & .short {
  37. display: block;
  38. }
  39. }
  40. @media screen and (max-width: 640px) {
  41. }
  42. `;
  43. const Brand = () => (
  44. <StyledBrand>
  45. <h1>
  46. <Link to="/">Air Board Game</Link>
  47. </h1>
  48. <h1 className="short">
  49. <Link to="/">ABG</Link>
  50. </h1>
  51. </StyledBrand>
  52. );
  53. export default Brand;