Skip to content

Commit 78b4852

Browse files
committed
small fixes
1 parent 364afcd commit 78b4852

File tree

9 files changed

+42
-35
lines changed

9 files changed

+42
-35
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3099,6 +3099,13 @@ a.cb-text:hover {
30993099
border-color: $cb-border-color;
31003100
}
31013101

3102+
& .card-footer {
3103+
color: white;
3104+
font-family: 'Arial', sans-serif;
3105+
background-color: $cb-bg-highlight-panel;
3106+
border-color: $cb-border-color;
3107+
}
3108+
31023109
& .card-text {
31033110
color: white;
31043111
font-family: 'Arial', sans-serif;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const AnimationModal = NiceModal.create(() => {
6161
onHide={modal.hide}
6262
contentClassName="cb-bg-panel cb-text"
6363
>
64-
<Modal.Header closeButton>
64+
<Modal.Header className="cb-border-color" closeButton>
6565
<Modal.Title>{titleModal}</Modal.Title>
6666
</Modal.Header>
6767
<Modal.Body>
@@ -74,14 +74,14 @@ const AnimationModal = NiceModal.create(() => {
7474
/>
7575
</div>
7676
{tournamentId && (
77-
<div className="d-flex text-center justify-content-center">
77+
<div className="d-flex text-center text-white justify-content-center">
7878
<span className="py-2 h4">
7979
<TournamentInfoPanel />
8080
</span>
8181
</div>
8282
)}
8383
</Modal.Body>
84-
<Modal.Footer>
84+
<Modal.Footer className="cb-border-color">
8585
{/* {tournamentId && ( */}
8686
{/* <a */}
8787
{/* href={`/tournaments/${tournamentId}`} */}
@@ -90,7 +90,7 @@ const AnimationModal = NiceModal.create(() => {
9090
{/* Back to tournament */}
9191
{/* </a> */}
9292
{/* )} */}
93-
<Button onClick={modal.hide} className="btn btn-secondary cb-rounded">
93+
<Button onClick={modal.hide} className="btn btn-secondary cb-btn-secondary cb-rounded">
9494
{buttonText}
9595
</Button>
9696
</Modal.Footer>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const PremiumRestrictionModal = NiceModal.create(() => {
3939
onHide={modal.hide}
4040
contentClassName="cb-bg-panel cb-text"
4141
>
42-
<Modal.Header closeButton>
42+
<Modal.Header className="cb-border-color" closeButton>
4343
<Modal.Title>Restricted Content</Modal.Title>
4444
</Modal.Header>
4545
<Modal.Body>
@@ -61,7 +61,7 @@ const PremiumRestrictionModal = NiceModal.create(() => {
6161
<span className="mr-2">Want subscribe?</span>
6262
<div className="btn-group">
6363
{sended ? (
64-
<div className="btn btn-sm btn-secondary cb-rounded disabled">
64+
<div className="btn btn-sm btn-secondary cb-btn-secondary cb-rounded disabled">
6565
Sending...
6666
</div>
6767
) : (
@@ -70,7 +70,7 @@ const PremiumRestrictionModal = NiceModal.create(() => {
7070
type="button"
7171
data-premium-request="yes"
7272
data-user-id={currentUserId}
73-
className="btn btn-sm btn-secondary rounded-left"
73+
className="btn btn-sm btn-secondary cb-btn-secondary rounded-left"
7474
onClick={handleSendRequest}
7575
>
7676
<FontAwesomeIcon className="mr-2" icon="check" />
@@ -80,7 +80,7 @@ const PremiumRestrictionModal = NiceModal.create(() => {
8080
type="button"
8181
data-premium-request="no"
8282
data-user-id={currentUserId}
83-
className="btn btn-sm btn-secondary rounded-right"
83+
className="btn btn-sm btn-secondary cb-btn-secondary rounded-right"
8484
onClick={handleSendRequest}
8585
>
8686
<FontAwesomeIcon className="mr-2" icon="times" />
@@ -95,11 +95,11 @@ const PremiumRestrictionModal = NiceModal.create(() => {
9595
</div>
9696
</div>
9797
</Modal.Body>
98-
<Modal.Footer>
98+
<Modal.Footer className="cb-border-color">
9999
<div className="d-flex justify-content-end w-100">
100100
<Button
101101
onClick={modal.hide}
102-
className="btn btn-secondary text-white cb-rounded"
102+
className="btn btn-secondary cb-btn-secondary cb-rounded"
103103
>
104104
<FontAwesomeIcon icon="times" className="mr-2" />
105105
Close

services/app/apps/codebattle/assets/js/widgets/pages/registration/Registration.jsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ const getCsrfToken = () => document.querySelector("meta[name='csrf-token']").get
1515

1616
const isShowInvalidMessage = (formik, typeValue) => formik.submitCount !== 0 && !!formik.errors[typeValue];
1717

18-
const getInputClassName = isInvalid => cn('form-control', {
18+
const getInputClassName = isInvalid => cn('form-control custom-control cb-bg-panel cb-border-color text-white', {
1919
'is-invalid': isInvalid,
2020
});
2121

2222
const Container = ({ children }) => (
2323
<div className="container-fluid">
2424
<div className="row justify-content-center">
2525
<div className="col-lg-5 col-md-5 col-sm-5 px-md-4">
26-
<div className="card cb-card border-light shadow-sm">{children}</div>
26+
<div className="card cb-card border cb-border-color cb-rounded shadow-sm">{children}</div>
2727
</div>
2828
</div>
2929
</div>
3030
);
3131

32-
const Title = ({ text }) => <h3 className="text-center">{text}</h3>;
32+
const Title = ({ text }) => <h3 className="text-center text-white">{text}</h3>;
3333

3434
const Form = ({ onSubmit, id, children }) => (
3535
<form onSubmit={onSubmit} noValidate>
@@ -40,7 +40,7 @@ const Form = ({ onSubmit, id, children }) => (
4040
id={`${id}-submit`}
4141
value="Submit"
4242
aria-label="SubmitForm"
43-
className="btn btn-primary btn-block rounded-lg"
43+
className="btn btn-secondary cb-btn-secondary btn-block cb-rounded"
4444
data-disable-with="Submit"
4545
/>
4646
</form>
@@ -54,7 +54,7 @@ const Input = ({
5454

5555
return (
5656
<div className="form-group">
57-
<span className="text-primary">{title}</span>
57+
<span className="text-white">{title}</span>
5858
<input
5959
type={type}
6060
id={id}
@@ -77,8 +77,8 @@ const PasswordInput = ({ id, title, formik }) => {
7777
};
7878

7979
return (
80-
<div className="form-group ">
81-
<span className="text-primary">{title}</span>
80+
<div className="form-group">
81+
<span className="text-white">{title}</span>
8282
<div className="position-relative">
8383
<input
8484
type={showPassword ? 'text' : 'password'}
@@ -122,7 +122,7 @@ const SocialLinks = ({ isSignUp }) => (
122122
type="button"
123123
aria-label={isSignUp ? 'signUpWithGithub' : 'signInWithGithub'}
124124
href={getLinkWithNext('/auth/github')}
125-
className="btn w-100 px-2 btn-outline-dark rounded-lg"
125+
className="btn w-100 px-2 btn-outline-secondary cb-btn-outline-secondary cb-rounded"
126126
>
127127
{isSignUp
128128
? i18n.t('Sign up with Github')
@@ -134,7 +134,7 @@ const SocialLinks = ({ isSignUp }) => (
134134
type="button"
135135
aria-label={isSignUp ? 'signUpWithDiscord' : 'signInWithDiscord'}
136136
href={getLinkWithNext('/auth/discord')}
137-
className="btn w-100 px-2 btn-outline-dark rounded-lg"
137+
className="btn w-100 px-2 btn-outline-secondary cb-btn-outline-secondary cb-rounded"
138138
>
139139
{isSignUp
140140
? i18n.t('Sign up with Discord')
@@ -146,11 +146,11 @@ const SocialLinks = ({ isSignUp }) => (
146146

147147
const SignInInvitation = () => (
148148
<div className="small">
149-
<span className="text-muted">{i18n.t('If you have an account')}</span>
149+
<span className="cb-text">{i18n.t('If you have an account')}</span>
150150
<a
151151
href={getLinkWithNext('/session/new')}
152152
role="button"
153-
className="btn-link ml-3"
153+
className="btn-link text-white ml-3"
154154
>
155155
{i18n.t('Sign In')}
156156
</a>
@@ -159,11 +159,11 @@ const SignInInvitation = () => (
159159

160160
const SignUpInvitation = () => (
161161
<div className="small">
162-
<span className="text-muted">{i18n.t('Have not an account?')}</span>
162+
<span className="cb-text">{i18n.t('Have not an account?')}</span>
163163
<a
164164
href={getLinkWithNext('/users/new')}
165165
role="button"
166-
className="btn-link ml-3"
166+
className="btn-link text-primary ml-3"
167167
>
168168
{i18n.t('Sign Up')}
169169
</a>

services/app/apps/codebattle/assets/js/widgets/pages/tournament/DetailsModal.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ function DetailsModal({
5151
);
5252

5353
return (
54-
<Modal className="cb-bg-panel cb-text" show={modalShowing} onHide={handleCancel}>
55-
<Modal.Header closeButton>
54+
<Modal contentClassName="cb-bg-panel cb-text" show={modalShowing} onHide={handleCancel}>
55+
<Modal.Header className="cb-border-color" closeButton>
5656
<Modal.Title>Tournament details</Modal.Title>
5757
</Modal.Header>
5858
<Modal.Body>
59-
<pre className="bg-light rounded-lg p-3">{tournamentDetailsStr}</pre>
59+
<pre className="cb-bg-highlight-panel cb-rounded p-3 text-white">{tournamentDetailsStr}</pre>
6060
</Modal.Body>
61-
<Modal.Footer>
61+
<Modal.Footer className="cb-border-color">
6262
<Button
6363
onClick={handleCancel}
6464
className={closeBtnClassName}

services/app/apps/codebattle/assets/js/widgets/pages/tournament/MatchConfirmationModal.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ function MatchConfirmationModal({
145145
});
146146

147147
return (
148-
<Modal className="cb-bg-panel cb-text" show={modalShowing} onHide={handleCancel}>
149-
<Modal.Header closeButton>
148+
<Modal contentClassName="cb-bg-panel cb-text" show={modalShowing} onHide={handleCancel}>
149+
<Modal.Header className="cb-border-color" closeButton>
150150
<Modal.Title>{title}</Modal.Title>
151151
</Modal.Header>
152152
<Modal.Body>
@@ -172,7 +172,7 @@ function MatchConfirmationModal({
172172
</div>
173173
)}
174174
</Modal.Body>
175-
<Modal.Footer>
175+
<Modal.Footer className="cb-border-color">
176176
<div className="d-flex justify-content-between w-100">
177177
<Button
178178
onClick={handleCancel}

services/app/apps/codebattle/assets/js/widgets/pages/tournament/TournamentDescriptionModal.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ const TournamentDescriptionModal = NiceModal.create(({ description }) => {
2121
});
2222

2323
return (
24-
<Modal className="cb-bg-panel cb-text" centered show={modal.visible} onHide={modal.hide}>
25-
<Modal.Header closeButton>
24+
<Modal contentClassName="cb-bg-panel cb-text" centered show={modal.visible} onHide={modal.hide}>
25+
<Modal.Header className="cb-border-color" closeButton>
2626
<Modal.Title>{i18next.t('Tournament description')}</Modal.Title>
2727
</Modal.Header>
2828
<Modal.Body>
2929
{description}
3030
</Modal.Body>
31-
<Modal.Footer>
31+
<Modal.Footer className="cb-border-color">
3232
<div className="d-flex justify-content-end w-100">
3333
<Button
3434
onClick={modal.hide}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="container-lg bg-light" id="registration"></div>
1+
<div class="container-lg" id="registration"></div>
22
<script>
33
window.csrf_token = "<%= csrf_token() %>"
44
</script>

services/app/apps/codebattle/lib/codebattle_web/templates/task/new.html.heex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="w-100">
2-
<div class="bg-light" id="builder-widget-root"></div>
2+
<div id="builder-widget-root"></div>
33
<%= if Application.get_env(:codebattle, :html_debug_mode) do %>
44
<iframe class="xstate w-100 border-0"></iframe>
55
<% end %>

0 commit comments

Comments
 (0)