Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc734221

Browse files
committed
Fill the right half with the shell when the editor doesn't show
1 parent03a3b19 commitc734221

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

‎backend/main/chapters/c01_the_shell.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
classIntroducingTheShell(Page):
66
classfirst_expression(VerbatimStep):
77
"""
8-
At thebottomright of the screen is the *shell*. This is a place for running small bits of Python code. Just type in some code, press enter, and it'll run! Try it now:
8+
On the right is the *shell*. This is a place for running small bits of Python code. Just type in some code, press enter, and it'll run! Try it now:
99
1010
1. Click anywhere on the shell (the black area).
1111
2. Type `__program__`

‎frontend/src/App.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class AppComponent extends React.Component {
214214

215215
</div>
216216
<divclassName="editor-and-terminal">
217-
<divclassName={"editor "+(showEditor ?"" :"invisible")}>
217+
{showEditor&&<divclassName="editor">
218218
<AceEditor
219219
mode="python"
220220
theme="monokai"
@@ -236,8 +236,8 @@ class AppComponent extends React.Component {
236236
}}
237237
readOnly={cantUseEditor}
238238
/>
239-
</div>
240-
<divclassName="terminal">
239+
</div>}
240+
<divclassName="terminal"style={{height:showEditor ?"49%" :"100%"}}>
241241
<Terminal
242242
onCommand={(cmd)=>this.runCode({code:cmd,source:"shell"})}
243243
ref={terminalRef}

‎frontend/src/css/main.scss‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
width:100%;
3232
position:absolute;
3333
bottom:0;
34-
top:51%;
35-
34+
3635
>div[name=react-console-emulator] {
3736
height:100%;
3837
min-height:unset!important;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp