HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //opt/alt/alt-nodejs12/root/usr/lib/node_modules/npm/docs/src/components/home/Terminal.js
import React from 'react'
import styled, {keyframes} from 'styled-components'
import {Flex, Box, Button as RebassButton} from 'rebass'
import closeX from '../../images/x.svg'
import {LinkButton} from '../Button'
import bracket from '../../images/bracket.svg'

const TerminalBody = styled(Flex)`
  background-color: ${(props) => props.theme.colors.purpleBlack};
  border: 2px solid ${(props) => props.theme.colors.purpleBlack};
  color: ${(props) => props.theme.colors.white};
  flex-direction: column;
  max-width: 620px;
  width: 100%;
  height: 100%;
  box-shadow: 0px 0px 17px 1px #dc3bc180;
  border-radius: 2px;
  top: ${(props) => props.top};
  left: ${(props) => props.left};  
  right: 0;
  position: absolute;
`

const Top = styled(Flex)`
  background-color: ${(props) => props.theme.colors.white};
  height: 18px;
`

const SiteName = styled(Flex)`
  font-size: 45px;
  font-family: 'Inconsolata', sans-serif;
  font-weight: 700;
  letter-spacing: 5px;
  text-shadow: 3px 2px 4px #abf1e04d;

  @media screen and (min-width: ${(props) => props.theme.breakpoints.TABLET}) {
    font-size: 70px;
  }
`

const Bottom = styled(Flex)`
  flex-direction: column;
  padding: 30px;

  @media screen and (min-width: ${(props) => props.theme.breakpoints.TABLET}) {
    font-size: 70px;
    padding: 30px 50px;

  }
`

const blink = keyframes`
  0% {
    opacity: 0;
  }
  50% {
    opacity 1;
  }
  100% {
    opacity: 0;
  }
`

const Cursor = styled.span`
  color: ${(props) => props.theme.colors.red};
  text-shadow: none;
  opacity: 1;
  animation: ${blink};
  animation-duration: 3s;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
`

const Bracket = styled.span`
  background: center / contain no-repeat url(${bracket});
  width: 25px;
  margin-right: 5px;
  margin-top: 10px;
`

const Text = styled.span`
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.4;

  @media screen and (min-width: ${(props) => props.theme.breakpoints.TABLET}) {
    font-size: 18px;
  }
`

const ModalButton = styled(RebassButton)`
  cursor: pointer;
  background: center no-repeat  url(${closeX});
  width: 14px;
  height: 14px;
`

const Terminal = ({onClose, top, left}) => {
  return (
    <TerminalBody m={'auto'} top={top} left={left}>
      <Top alignItems='center'>
        <ModalButton onClick={onClose} ml={1} p={1} />
      </Top>
      <Bottom>
        <SiteName py={3}><Bracket />npm cli <Cursor>_</Cursor></SiteName>
        <Text>
          The intelligent package manager for the Node Javascript Platform. Install stuff and get coding!
        </Text>
        <Box mx={'auto'} my={4}>
          <LinkButton to='/cli-commands/npm'>
            read docs
          </LinkButton>
        </Box>
      </Bottom>
    </TerminalBody>
  )
}

export default Terminal