Update styling and add styling for new mode

This commit is contained in:
2021-09-12 20:27:15 +01:00
parent 42cfa1d619
commit a72b42d705
7 changed files with 183 additions and 114 deletions

View File

@@ -7,6 +7,7 @@ import Footer from "./Footer";
import "./css/GroupPage.css"; import "./css/GroupPage.css";
import "./css/ConfirmationDialog.css"; import "./css/ConfirmationDialog.css";
import "./css/OptionsListOverlay.css";
import Loader from "./puff-loader.svg" import Loader from "./puff-loader.svg"
@@ -530,7 +531,7 @@ export default withRouter(class GroupPage extends Component {
this.state.editingUser && this.state.editingUser &&
<> <>
<div className="overlay" onClick={this.hideEditUserRole}></div> <div className="overlay" onClick={this.hideEditUserRole}></div>
<div className="overlay-content group-page-overlay-content"> <div className="overlay-content options-list-overlay-content">
{ {
["Owner", "Contributor", "Member", "Remove"].map((role) => ["Owner", "Contributor", "Member", "Remove"].map((role) =>
<h3 <h3

View File

@@ -192,14 +192,16 @@ export default class History extends Component {
<div> <div>
{ {
this.state.progressHistoryIncomplete.length > 0 && this.state.progressHistoryIncomplete.length > 0 &&
<div className="progress-history-container"> <>
<h2>Incomplete</h2> <h2>Incomplete</h2>
<div className="progress-history-container progress-history-container--incomplete">
<div> <div>
<h3>Set</h3> <h3>Set</h3>
<h3>Progress</h3> <h3>Progress</h3>
<h3>Mark</h3> <h3>Mark</h3>
<h3>Grade</h3> <h3>Grade</h3>
<h3>Mode</h3> <h3>Mode</h3>
<span></span>
</div> </div>
{ {
this.state.progressHistoryIncomplete.map((progressItem) => this.state.progressHistoryIncomplete.map((progressItem) =>
@@ -236,14 +238,15 @@ export default class History extends Component {
) )
} }
</div> </div>
</>
} }
{ {
this.state.progressHistoryComplete.length > 0 && this.state.progressHistoryComplete.length > 0 &&
<div className="progress-history-container"> <>
<h2>Completed</h2> <h2>Completed</h2>
<div className="progress-history-container progress-history-container--complete">
<div> <div>
<h3>Set</h3> <h3>Set</h3>
<h3>Progress</h3>
<h3>Mark</h3> <h3>Mark</h3>
<h3>Grade</h3> <h3>Grade</h3>
<h3>Mode</h3> <h3>Mode</h3>
@@ -260,7 +263,6 @@ export default class History extends Component {
<SwapHorizRoundedIcon /> <SwapHorizRoundedIcon />
} }
</Link> </Link>
<p>{progressItem.percentageProgress}%</p>
<p>{progressItem.correct}/{progressItem.progress}</p> <p>{progressItem.correct}/{progressItem.progress}</p>
<p>{progressItem.grade}%</p> <p>{progressItem.grade}%</p>
<p> <p>
@@ -276,6 +278,7 @@ export default class History extends Component {
) )
} }
</div> </div>
</>
} }
</div> </div>
: :

View File

@@ -168,7 +168,7 @@ button:focus-visible, a:focus-visible {
outline: 1px solid var(--text-color-tinted); outline: 1px solid var(--text-color-tinted);
} }
input[type=text] { input {
border-top: none; border-top: none;
border-right: none; border-right: none;
border-left: none; border-left: none;
@@ -179,10 +179,20 @@ input[type=text] {
min-width: 100px; min-width: 100px;
} }
input[type=text]:focus { input:focus {
outline: none; outline: none;
} }
input[type="number"] {
-webkit-appearance: textfield;
-moz-appearance: textfield;
appearance: textfield;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
}
.page-header { .page-header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@@ -256,6 +266,10 @@ label, p, input[type=text], main > span, main div > span {
margin-bottom: 8px; margin-bottom: 8px;
} }
label .MuiIconButton-label > input {
z-index: -1;
}
.stat-row { .stat-row {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@@ -342,8 +356,8 @@ label, p, input[type=text], main > span, main div > span {
.progress-history-container > div > * { .progress-history-container > div > * {
display: table-cell; display: table-cell;
word-wrap: break-word; word-wrap: break-word;
padding-top: 2px; padding-top: 6px;
padding-bottom: 2px; padding-bottom: 6px;
text-decoration: none; text-decoration: none;
color: inherit; color: inherit;
border-left: 8px solid transparent; border-left: 8px solid transparent;
@@ -357,13 +371,27 @@ label, p, input[type=text], main > span, main div > span {
text-align: left; text-align: left;
} }
.progress-history-container > div:first-child > * {
padding-top: 0;
}
.progress-history-container > div > *:first-child > svg {
vertical-align: top;
margin-left: 4px;
}
.progress-history-container .button.button--no-background { .progress-history-container .button.button--no-background {
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.title-icon {
color: var(--text-color-tinted);
margin-left: 12px;
}
@media screen and (max-width: 420px) { @media screen and (max-width: 420px) {
.progress-history-container > div > *:nth-child(2), .progress-history-container > div > *:nth-last-child(3) { .progress-history-container > div > *:nth-child(2), .progress-history-container--complete > div > *:nth-last-child(3), .progress-history-container--incomplete > div > *:nth-last-child(4) {
display: none; display: none;
} }
} }

View File

@@ -52,29 +52,3 @@
.group-set-link--enabled > svg { .group-set-link--enabled > svg {
margin-left: 8px; margin-left: 8px;
} }
.group-page-overlay-content {
width: fit-content;
height: fit-content;
padding: 0;
}
.group-page-overlay-content > * {
border-bottom: 1px solid var(--overlay-color);
cursor: pointer;
margin: 0;
}
.group-page-overlay-content > *:not(:last-child) {
padding: 30px 48px;
}
.group-page-overlay-content > *:last-child {
border: none;
padding: 18px 48px;
}
.no-groups-message-list {
padding: 0 18px;
margin: 4px 0;
}

View File

@@ -0,0 +1,20 @@
.options-list-overlay-content {
width: fit-content;
height: fit-content;
padding: 0;
}
.options-list-overlay-content > * {
border-bottom: 1px solid var(--overlay-color);
cursor: pointer;
margin: 0;
}
.options-list-overlay-content > *:not(:last-child) {
padding: 30px 48px;
}
.options-list-overlay-content > *:last-child {
border: none;
padding: 18px 48px;
}

View File

@@ -1,8 +1,3 @@
.set-cloud-icon {
color: var(--text-color-tinted);
margin-left: 12px;
}
.vocab-list { .vocab-list {
display: table; display: table;
table-layout: fixed; table-layout: fixed;
@@ -50,6 +45,11 @@
row-gap: 8px; row-gap: 8px;
} }
.no-groups-message-list {
padding: 0 18px;
margin: 4px 0;
}
@media screen and (max-width: 860px) { @media screen and (max-width: 860px) {
.set-page-group-overlay-content { .set-page-group-overlay-content {
width: 75%; width: 75%;

43
src/css/SliderOverlay.css Normal file
View File

@@ -0,0 +1,43 @@
.slider-overlay-content {
width: 80%;
max-width: 700px;
height: 40%;
max-height: 500px;
align-items: center;
}
.slider-overlay-content label {
margin: 16px 0 0 0;
}
.slider-overlay-content .continue-button {
margin: 24px 0 0 0;
}
.slider-overlay-content > .slider-container {
width: 100%;
display: flex;
flex-direction: row;
column-gap: 12px;
justify-content: center;
align-items: center;
}
.slider-overlay-content > .slider-container input {
min-width: 0;
min-width: 26px;
width: 26px;
}
@media screen and (max-width: 500px) {
.slider-overlay-content {
width: 75%;
}
}
@media screen and (max-height: 700px) {
.slider-overlay-content {
height: 60%;
}
}