Skip to content

Commit

Permalink
JIRA-154 #test
Browse files Browse the repository at this point in the history
  • Loading branch information
seongho9 committed Nov 23, 2023
1 parent c80b404 commit 9e1eeb7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/CodeInputComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useContext, useEffect, useRef, useState } from 'react';
import { useEffect, useRef, useState } from 'react';
import hljs from 'highlight.js';
import 'highlight.js/styles/atom-one-dark.css';
import { StateContext } from '../StateContext';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/ConsolePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export default function ConsolePage() {
))}
{isConclusion ? <IntroComponent intro={conclusion} /> : null}
</SubTasksDiv>
{!isConclusion ? <CodeActionComponent codes={execCode}/> : null}
{isConclusion ? <CodeActionComponent codes={execCode}/> : null}
<TaskInputComponents
inputText={inputText}
setText={setInputText}
Expand Down
25 changes: 23 additions & 2 deletions frontend/src/styles/CodIenputComponent.styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styled from 'styled-components';
import styled, { keyframes } from 'styled-components';

export const CodeEditor = styled.div`
width: 78vw;
Expand All @@ -11,15 +11,23 @@ export const CodeEditor = styled.div`
padding-top: 1.5vh;
padding-left: 2vw;
`;
export const blinkCursor = keyframes`
0% { opacity: 0; };
50% { opacity: 1; };
100% { opacity: 0; };
`
export const CodeInput = styled.textarea`
position: absolute;
font-size: 1.05rem;
font-size: 1rem;
margin-top: 0vh;
margin-right: 0vw;
margin-bottom: 2.7%;
margin-left: 0vw;
padding: 0;
padding-top: 0vh;
padding-left: 4vw;
width: 100%;
min-height: 80vh;
max-height: auto;
Expand All @@ -31,10 +39,21 @@ export const CodeInput = styled.textarea`
border: none;
resize: none;
overflow: hidden;
transform: scaleX(1.1);
&:focus {
outline: none;
caret-color: black;
animation: ${blinkCursor} 1s step-end infinite;
}
&::selection {
background: #b3d4fs;
}
&.no-blick{
animation: none;
}
`;

export const Present = styled.pre`
background-color: #fff;
width: 76vw;
Expand All @@ -46,6 +65,7 @@ export const Present = styled.pre`
margin: 0;
padding: 0;
padding-bottom: 2vh;
font-family: monospace;
border: none;
border-radius: 20px;
Expand All @@ -56,4 +76,5 @@ export const Present = styled.pre`
color: #000000;
z-index: 0;
`;
7 changes: 7 additions & 0 deletions frontend/src/styles/TaskInputComponent.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,10 @@ export const ActionButtons = styled.button`
margin-left: 0%;
margin-right: 1%;
`;

export const Cursor = styled.div`
display: inline-block;
width: 0.1wv;
background-color: black;
margin-left: -1rem;
`

0 comments on commit 9e1eeb7

Please sign in to comment.