Skip to content

Commit 13276b6

Browse files
committed
add_gradient_panel
1 parent 3958d35 commit 13276b6

22 files changed

+124
-76
lines changed

services/app/apps/codebattle/assets/css/external.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ $dark-red: #b00020;
3939
background-color: #0C0F1E !important;
4040
}
4141

42+
.cb-bg-dark {
43+
background-color: #0C0F1E !important;
44+
background: linear-gradient(135deg, #242424 0%, #151515 100%);
45+
}
46+
4247
// Example custom classes for your text
4348
.battle-title {
4449
color: $warning; // or #fffb47 if you want a brighter yellow

services/app/apps/codebattle/assets/css/grades.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
display: flex;
109109
flex-direction: column;
110110
align-items: center;
111+
margin-left: -10px;
111112
}
112113

113114
.rank-caption {

services/app/apps/codebattle/assets/css/style.scss

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ $cb-border-color: #4c4c5a;
3535
// $cb-border-color: rgba(255, 255, 255, 0.15);
3636

3737
$cb-bg-panel: #2a2a35;
38+
$cb-bg-panel-background: linear-gradient(135deg, #2a2a35 0%, #171720 100%);
3839
// $cb-bg-panel: #291c1c;
3940
// $cb-bg-panel: #1c2129;
4041

@@ -185,7 +186,11 @@ input[type="range"] {
185186
}
186187

187188
.dark-bg {
188-
background: $dark;
189+
background-color: $dark;
190+
}
191+
192+
.cb-bg-dark {
193+
background-color: #1a1a1a;
189194
}
190195

191196
.bg-winner {
@@ -331,7 +336,7 @@ a {
331336
}
332337

333338
.cb-heatmap-background {
334-
background-color: $cb-bg-panel;
339+
background: $cb-bg-panel-background;
335340
}
336341

337342
.react-calendar-heatmap {
@@ -419,9 +424,8 @@ a {
419424
}
420425

421426
.cb-user-dark-offline {
422-
border: 0.2rem solid transparent;
423427
border-color: var(--gray);
424-
border-radius: $cb-border-radius;
428+
border-radius: 50%;
425429
}
426430

427431
.cb-timer-progress {
@@ -1115,7 +1119,14 @@ a:hover {
11151119
}
11161120

11171121
.dropdown-item.cb-dropdown-item {
1118-
&:hover {
1122+
color: white;
1123+
1124+
&:disabled,
1125+
&.disabled {
1126+
color: $text-muted;
1127+
}
1128+
1129+
&:hover:not(:disabled):not(.disabled) {
11191130
background-color: $cb-bg-panel;
11201131
}
11211132
}
@@ -2049,9 +2060,19 @@ a:hover {
20492060
border-radius: 0.5rem;
20502061
}
20512062

2063+
2064+
20522065
.cb-bg-panel {
20532066
background-color: $cb-bg-panel;
20542067

2068+
&:not(.cb-toolbar):not(.cb-slider-timeline) {
2069+
background: $cb-bg-panel-background;
2070+
}
2071+
2072+
&.form-control {
2073+
background-color: $cb-bg-highlight-panel;
2074+
}
2075+
20552076
&.form-control:hover,
20562077
&.form-control:focus {
20572078
background-color: $cb-bg-panel;
@@ -2438,7 +2459,7 @@ a.cb-text:hover {
24382459
}
24392460

24402461
.card.cb-card {
2441-
background-color: $cb-bg-panel;
2462+
background-color: transparent;
24422463
border-color: $cb-border-color;
24432464

24442465
& .card-header {

services/app/apps/codebattle/assets/js/widgets/components/InvitesContainer.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ function InvitesContainer() {
103103
>
104104
{({ ref, ...triggerHandler }) => (
105105
<Button
106-
variant="dark"
107106
{...triggerHandler}
108-
className="attachment mx-2"
107+
className="bg-transparent border-0 attachment mx-2"
109108
>
110109
<img
111110
ref={ref}

services/app/apps/codebattle/assets/js/widgets/components/TournamentPreviewPanel.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const TournamentPreviewPanel = ({
1313
end,
1414
}) => (
1515
<div className={className}>
16-
<div className="d-flex flex-column cb-bg-panel cb-rounded p-3">
16+
<div className="d-flex flex-column border cb-border-color cb-rounded p-3">
1717
<span>{`Start Date: ${dayjs(start).format('MMMM DD, YYYY')}`}</span>
1818
<span>{`Time: ${dayjs(start).format('hh:mm A')} - ${dayjs(end).format('hh:mm A')}`}</span>
1919
{tournament.grade !== grades.open

services/app/apps/codebattle/assets/js/widgets/components/TournamentTimer.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ const TournamentTimer = ({ date = new Date(), label, children }) => {
3030
}
3131

3232
return (
33-
<>
33+
<span className="d-inline-flex">
3434
{label}
3535
{' '}
36-
<span className="text-monospace">{dayjs.duration(duration).format('HH:mm:ss')}</span>
37-
</>
36+
<span className="text-monospace text-warning ml-2">{dayjs.duration(duration).format('HH:mm:ss')}</span>
37+
</span>
3838
);
3939
};
4040

services/app/apps/codebattle/assets/js/widgets/components/UserLabel.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function UserLabel({ user }) {
1515
);
1616
const onlineIndicatorClassName = cn('mr-1', {
1717
'cb-user-online': isOnline,
18-
'cb-user-offline': !isOnline,
18+
'cb-user-dark-offline': !isOnline,
1919
});
2020

2121
return (

services/app/apps/codebattle/assets/js/widgets/pages/game/ChatWidget.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ function ChatWidget() {
8181

8282
return (
8383
<ChatContextMenu menuId={menuId} inputRef={inputRef} request={menuRequest}>
84-
<div className="d-flex flex-wrap flex-sm-nowrap cb-bg-panel shadow-sm h-100 cb-rounded">
84+
<div className="d-flex cb-bg-panel shadow-sm h-100 cb-rounded">
8585
<div
8686
className={cn(
87-
'd-none d-lg-flex d-md-flex d-sm-flex flex-column flex-grow-1 position-relative p-0 h-100 mh-100 rounded-left',
87+
'd-flex flex-column flex-grow-1 position-relative p-0 h-100 mh-100 rounded-left',
8888
'cb-game-chat-container cb-messages-container cb-text',
8989
)}
9090
>

services/app/apps/codebattle/assets/js/widgets/pages/game/EditorToolbar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const EditorToolbar = ({
4848
<>
4949
<div
5050
ref={toolbarRef}
51-
className="cb-bg-panel cb-border-color rounded-top"
51+
className="cb-bg-panel cb-toolbar cb-border-color rounded-top"
5252
data-player-type={type}
5353
>
5454
<div className={toolbarClassNames} role="toolbar">

services/app/apps/codebattle/assets/js/widgets/pages/lobby/ActiveGames.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const ActiveGames = ({
6969

7070
return (
7171
<>
72-
<div className="d-none d-md-block table-responsive rounded-bottom cb-bg-panel cb-rounded">
72+
<div className="d-none d-md-block table-responsive rounded-bottom cb-rounded">
7373
<table className="table table-striped mb-0">
7474
<thead className="text-center text-white">
7575
<tr>

0 commit comments

Comments
 (0)