Guest User

Untitled

a guest
Jan 21st, 2021
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import { Splide, SplideSlide } from '@splidejs/react-splide';
  3. import '@splidejs/splide/dist/css/themes/splide-default.min.css';
  4. import { Link } from 'gatsby';
  5.  
  6. const NavbarMobile = ({ className }) => {
  7.   if (typeof window === "undefined") {
  8.     return <p>Server Render</p>
  9.   }
  10.  
  11.   return (
  12.     <Splide
  13.       className={`w-full h-full flex justify-center items-center ${className}`}
  14.       options={{
  15.         type: 'loop',
  16.         direction: 'ttb',
  17.         width: '100%',
  18.         heightRatio: 1.33,
  19.         focus: 'center',
  20.         autoWidth: true,
  21.         autoHeight: true,
  22.         perMove: 1,
  23.         gap: '0.2rem',
  24.         arrows: false,
  25.         pagination: false,
  26.       }}
  27.     >
  28.       <SplideSlide className="text-center w-full">
  29.         <Link to="/canvas-and-paper"
  30.               className={`text-center text-2xl sm:text-3xl uppercase transition-all`}>
  31.               Canvas & Paper</Link>
  32.       </SplideSlide>
  33.       <SplideSlide className="text-center w-full">
  34.         <Link to="/digital"
  35.               className={`text-2xl sm:text-3xl uppercase transition-all`}>
  36.               Digital</Link>
  37.       </SplideSlide>
  38.       <SplideSlide className="text-center w-full">
  39.         <Link to="/analog"
  40.               className={`text-2xl sm:text-3xl uppercase transition-all`}>
  41.               Analog</Link>
  42.       </SplideSlide>
  43.       <SplideSlide className="text-center w-full">
  44.         <Link to="/fashion"
  45.               className={`text-2xl sm:text-3xl uppercase transition-all`}>
  46.               Fashion</Link>
  47.       </SplideSlide>
  48.       <SplideSlide className="text-center w-full">
  49.         <Link to="/moving-image"
  50.               className={`text-2xl sm:text-3xl uppercase transition-all`}>
  51.               Moving Image</Link>
  52.       </SplideSlide>
  53.       <SplideSlide className="text-center w-full">
  54.         <Link to="/sounds"
  55.               className={`text-2xl sm:text-3xl uppercase transition-all`}>
  56.               Sounds</Link>
  57.       </SplideSlide>
  58.       <SplideSlide className="text-center w-full">
  59.         <Link to="/sculpture"
  60.               className={`text-2xl sm:text-3xl uppercase transition-all`}>
  61.               Sculpture</Link>
  62.       </SplideSlide>
  63.       <SplideSlide className="text-center w-full">
  64.         <Link to="/about"
  65.               className={`text-2xl sm:text-3xl uppercase transition-all`}>
  66.               About</Link>
  67.       </SplideSlide>
  68.     </Splide>
  69.   )
  70. }
  71.  
  72. export default NavbarMobile
Advertisement
Add Comment
Please, Sign In to add comment