Skip to content

Commit

Permalink
feat:暗黑主题
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhiFengJia authored and jiazhifeng committed Dec 10, 2021
1 parent e417766 commit 98d3354
Show file tree
Hide file tree
Showing 2 changed files with 167 additions and 40 deletions.
48 changes: 8 additions & 40 deletions remote-web/src/main/resources/static/WebIDE.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,47 +32,15 @@
integrity="sha512-GAled7oA9WlRkBaUQlUEgxm37hf43V2KEMaEiWlvBO/ueP2BLvBLKN5tIJu4VZOTwo6Z4XvrojYngoN9dJw2ug=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<style>
a {
color: rgb(205,205,205);
}
a:hover {
color: rgb(61,64,67);
}
.nav-pills .show>.nav-link {
color: #fff;
background-color: rgb(61,64,67);
}
.nav-link, .nav-tabs .nav-link.active {
color: #495057;
background-color: rgb(61,64,67);
border-color: #dee2e6 #dee2e6 #fff;
}
.nav .nav-tabs .card-header-tabs{
background-color: rgb(32,33,36);
}
.form-control[readonly] {
color: rgb(205,205,205);
background-color: #0a0a0a;
}
.jstree-default .jstree-wholerow-clicked {
background: rgb(13,41,42);
}
.dropdown-menu {
background-color: rgb(32,33,36);
}
dropdown-item {
color: rgb(205,205,205);
}
</style>
<link rel="stylesheet" href="/css/darkly.css" />

<title>Web IDE</title>
</head>

<body class="container-fluid" style="background-color: rgb(32,33,36);">
<body class="container-fluid">
<div class="row">
<div class="col">
<ul class="nav nav-pills">
<ul class="nav nav-pills" style="border: 1px solid #000000;">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button"
aria-expanded="false">File</a>
Expand Down Expand Up @@ -125,7 +93,7 @@
</li>
</ul>
</div>
<div class="card-body overflow-auto" style="padding-right:0px;padding-left:0px;padding:0px;height: 600px;background-color: rgb(61,64,67);color: rgb(205,205,205);">
<div class="card-body overflow-auto">
<div id="jstree"></div>
</div>
</div>
Expand Down Expand Up @@ -159,7 +127,7 @@
</div>
</div>
</div>
<div class="row border">
<div class="row">
<div class="col" style="padding-right:0px;padding-left:0px;">
<nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
Expand All @@ -169,10 +137,10 @@
aria-controls="nav-terminal" aria-selected="false">Terminal</a>
</div>
</nav>
<div class="tab-content" id="nav-tabContent" style="height: 200px;">
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="nav-console" role="tabpanel"
aria-labelledby="nav-console-tab">
<textarea id="console" class="form-control" style="height: 200px;" placeholder="控制台"
<textarea id="console" class="form-control" placeholder="控制台"
readonly></textarea>
</div>
<div class="tab-pane fade" id="nav-terminal" role="tabpanel" aria-labelledby="nav-terminal-tab">
Expand Down Expand Up @@ -244,7 +212,7 @@ <h5 class="modal-title" id="aboutModalLabel">项目简介</h5>
lineNumbers: true,
matchBrackets: true,
indentUnit: 4,
indentWithTabs: true,ambiance,blackboard
indentWithTabs: true,
});
editor.setSize('auto', '600');
editor.setOption("theme", 'darcula');
Expand Down
159 changes: 159 additions & 0 deletions remote-web/src/main/resources/static/css/darkly.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
.card {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: rgb(32,33,36);
background-clip: border-box;
border: 0px;
border-radius: 0.25rem;
}
.card-header {
padding: 0rem;
}
.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
color: rgb(205,205,205);
background-color: rgb(61,64,67);
border-color: rgb(205,205,205);
}
.nav-tabs .nav-link {
margin-bottom: 0px;
border: 0px;
}
.nav-tabs {
border-bottom: 0px;
}
body {
margin: 0;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: rgb(205,205,205);
text-align: left;
background-color: rgb(32,33,36);
}
.form-control {
display: block;
width: 100%;
height: calc(1.5em + 0.75rem + 2px);
padding: 0.375rem 0.75rem;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
background-clip: padding-box;
border: 1px solid #2b2b2b;
border-radius: 0.25rem;
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.form-control:disabled, .form-control[readonly] {
background-color: #2b2b2b;
color: rgb(205,205,205);
opacity: 1;
height: 13.4rem;
}
a {
color: rgb(205,205,205);
text-decoration: none;
background-color: transparent;
}
a:hover {
color: #ffffff;
text-decoration: underline;
}
.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
color: rgb(205,205,205);
background-color: rgb(61,64,67);
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 10rem;
padding: 0.5rem 0;
margin: 0.125rem 0 0;
font-size: 1rem;
color: rgb(205,205,205);
text-align: left;
list-style: none;
background-color: rgb(32,33,36);
background-clip: padding-box;
border: 1px solid rgba(0,0,0,.15);
border-radius: 0.25rem;
}
.dropdown-item:focus, .dropdown-item:hover {
color: #ffffff;
text-decoration: none;
background-color: #beebff;
}
.dropdown-item {
display: block;
width: 100%;
padding: 0.25rem 1.5rem;
clear: both;
font-weight: 400;
color: rgb(205,205,205);
text-align: inherit;
white-space: nowrap;
background-color: transparent;
border: 0;
}
.card-body.overflow-auto {
padding-right:0px;
padding-left:0px;
padding:0px;
height: 600px;
background-color: rgb(61,64,67);
color: rgb(205,205,205);
}
.col{
position: relative;
width: 100%;
padding-right: 0px;
padding-left: 0px;
}
.card-header-tabs {
margin-right: 0rem;
margin-bottom: 0rem;
margin-left: 0rem;
border-bottom: 0rem;
}
.modal-content {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
width: 100%;
pointer-events: auto;
background-color: rgb(61,64,67);
color: rgb(205,205,205);
background-clip: padding-box;
border: 1px solid rgba(0,0,0,.2);
border-radius: 0.3rem;
outline: 0;
}
.close {
float: right;
font-size: 1.5rem;
font-weight: 700;
line-height: 1;
color: #fff;
text-shadow: 0 1px 0 #fff;
opacity: .5;
}

.jstree-default .jstree-wholerow-clicked {
background: #beebff;
background: -webkit-linear-gradient(top, #beebff 0, #a8e4ff 100%);
background: linear-gradient(to bottom,rgb(0,0,0) 0, rgb(0,0,0) 100%);
}
.jstree-default .jstree-wholerow-hovered {
background: rgb(32,33,36);
}

0 comments on commit 98d3354

Please sign in to comment.