All files / src/components/ui/splash/credits style.ts

0% Statements 0/15
0% Branches 0/4
0% Functions 0/3
0% Lines 0/15

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153                                                                                                                                                                                                                                                                                                                 
import styled, { css, keyframes } from "styled-components";
import { StyledButton } from "ui/buttons/style";
 
const fadeIn = keyframes`
  from {
    opacity: 0;
  }
 
  to {
    opacity: 1;
  }
`;
 
const scrollAnim = keyframes`
  from {
    transform: translateY(0px);
  }
 
  to {
    transform: translateY(-200%);
  }
`;
 
export const StyledCredits = styled.div`
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  animation: ${fadeIn} 1s linear;
  animation-fill-mode: forwards;
  -webkit-app-region: drag;
  background: red;
`;
 
export const StyledCreditsTitle = styled.div`
  display: block;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  text-decoration: none;
  margin-bottom: 80px;
`;
 
export const StyledCreditsSubHeading = styled.div`
  display: block;
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  margin-top: 80px;
  margin-bottom: 60px;
`;
 
interface StyledCreditsPersonProps {
  $gold?: boolean;
}
 
const goldPersonAnimation = keyframes`
    0%   {background-position: 0px 0px}
    40%  {background-position: 0px 0px}
    60%  {background-position: 200px 0px}
    100% {background-position: 200px 0px}
  `;
 
export const StyledCreditsPerson = styled.div<StyledCreditsPersonProps>`
  display: block;
  color: #fff;
  font-size: 20px;
  text-decoration: none;
  margin-bottom: 30px;
 
  ${(props) =>
    props.onClick
      ? css`
          > span:hover {
            color: #ffff00;
            cursor: pointer;
          }
        `
      : ""}
 
  ${(props) =>
    props.$gold
      ? css`
          font-weight: bold;
          background: linear-gradient(
            to right,
            #ffc107 0px,
            #fff 2px,
            #fff 6px,
            #ffeb3b 8px,
            #ffd08b 200px
          );
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
          filter: drop-shadow(0px 1px 1px #333);
          animation: ${goldPersonAnimation} 2s linear infinite;
        `
      : ""}
`;
 
interface StyledCreditsContentProps {
  $duration: number;
}
 
export const StyledCreditsContent = styled.div<StyledCreditsContentProps>`
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  animation: ${scrollAnim} ${(props) => props.$duration}s linear infinite;
 
  &:has(${StyledCreditsPerson} > span:hover) {
    animation-play-state: paused;
  }
`;
 
export const StyledCreditsCloseButton = styled.div`
  position: absolute;
  top: 10px;
  right: 10px;
 
  & > * {
    height: 100%;
  }
 
  ${StyledButton} {
    padding: 0 5px;
    margin: 0;
  }
 
  ${StyledButton} svg {
    fill: #fff;
    width: 16px;
    max-width: none;
  }
`;
 
export const StyledCreditsGrid = styled.div`
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
 
  & > * {
    width: 30%;
  }
`;