Socialify

Folder ..

Viewing Footer.tsx
182 lines (164 loc) • 4.6 KB

  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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
import styled from 'styled-components';
import { FaReddit, FaDiscord, FaTwitter, FaGithub } from 'react-icons/fa';
import { Link } from 'react-router-dom';
import { year } from '../../hooks/useTIme';

const PageWrapper = styled.div`
  margin-top: 2rem;
  @media (max-width: 1000px) {
    padding: 0 0.5rem;
  }
`;

const FooterBaseContainer = styled.footer<{ $isSub: boolean }>`
  color: var(--global-text);
  padding: ${({ $isSub }) => ($isSub ? '0' : '0.5rem 0')};
  display: flex;
  justify-content: space-between;
  border-top: ${({ $isSub }) => ($isSub ? '0.125rem solid' : 'none')}
    var(--global-secondary-bg);
  flex-direction: column;

  @media (max-width: 1000px) {
    padding: ${({ $isSub }) => ($isSub ? '0 0 1rem 0' : '0.5rem 0')};
  }

  @media (min-width: 601px) {
    flex-direction: row;
  }

  @media (max-width: 600px) {
    padding: ${({ $isSub }) => ($isSub ? '0' : '0.5rem 0')};
  }
`;

const StyledLinkList = styled.div`
  display: flex;
  flex-direction: column;
  margin: 0.5rem 0;
  margin-top: auto;
`;

const FooterLink = styled(Link)`
  align-items: center;
  padding: 0.5rem 0;
  color: grey;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.1s ease-in-out;
  bottom: 0;
  align-self: auto;

  @media (min-width: 601px) {
    align-self: end;
  }

  &:hover,
  &:active,
  &:focus {
    color: var(--global-button-text);
  }
`;

const SocialIconsWrapper = styled.div`
  padding-top: 1rem;
  display: flex;
  gap: 1rem;
`;

const FooterLogoImage = styled.img`
  content: var(--logo-transparent);
  max-width: 4rem;
  height: 4.375rem;
`;

const Text = styled.div<{ $isSub: boolean }>`
  color: grey;
  font-size: ${({ $isSub }) => ($isSub ? '0.75rem' : '0.65rem')};
  margin: ${({ $isSub }) => ($isSub ? '1rem 0 0 0' : '1rem 0')};
  max-width: 25rem;

  strong {
    color: var(--global-text);
  }
`;

const ShareButton = styled.a`
  display: inline-block;
  color: grey;
  transition: 0.2s ease-in-out;

  svg {
    font-size: 1.2rem;
  }

  &:hover,
  &:active,
  &:focus {
    transform: scale(1.15);
    color: var(--global-button-text);
    text-decoration: underline;
  }

  @media (max-width: 600px) {
    margin-bottom: 1rem;
  }
`;

export function Footer() {
  return (
    <PageWrapper>
      <footer>
        {/* <FooterBaseContainer aria-label='Main Footer' $isSub={false}>
          <Text as='p' $isSub={false}>
            <FooterLogoImage alt='Footer Logo' /> <br />
            This website does not retain any files on its server. Rather, it
            solely provides links to media content hosted by third-party
            services.
          </Text>
          <StyledLinkList aria-label='Footer Links'>
            <FooterLink to='/about' title='About Us'>
              About
            </FooterLink>
            <FooterLink
              to='https://www.miruro.com'
              target='_blank'
              title='Domains'
            >
              Domains
            </FooterLink>
            <FooterLink to='/pptos' title='Privacy Policy and Terms of Service'>
              Privacy & ToS
            </FooterLink>
          </StyledLinkList>
        </FooterBaseContainer> */}
        <FooterBaseContainer aria-label='Sub Footer' $isSub={true}>
          <Text as='p' $isSub={true}>
            &copy; {year}{' '}
            <a
              href='https://miruro.rize.moe'
              rel='noopener noreferrer'
              style={{ color: 'grey' }}
            >
              miruro
            </a>{' '}
            | Instance brought to you by <strong>rize.moe</strong>
          </Text>
          <nav aria-label='Social Links'>
            {/* <SocialIconsWrapper>
              {[
                {
                  href: 'https://www.reddit.com/r/miruro',
                  Icon: FaReddit,
                  label: 'Reddit',
                },
                {
                  href: 'https://discord.gg/dubRrtfpFn',
                  Icon: FaDiscord,
                  label: 'Discord',
                },
                {
                  href: 'https://twitter.com/miruro_official',
                  Icon: FaTwitter,
                  label: 'Twitter',
                },
              ].map(({ href, Icon, label }) => (
                <ShareButton
                  key={href}
                  href={href}
                  target='_blank'
                  rel='noopener noreferrer'
                  aria-label={`Miruro on ${label}`}
                >
                  <Icon aria-hidden='true' />
                </ShareButton>
              ))}
            </SocialIconsWrapper> */}
          </nav>
        </FooterBaseContainer>
      </footer>
    </PageWrapper>
  );
}