code refactoring

This commit is contained in:
sairaj mote 2022-09-23 02:54:04 +05:30
parent f5bfbb0494
commit c8c8356b1c
4 changed files with 816 additions and 615 deletions

View File

@ -31,7 +31,7 @@ body {
body[data-theme=dark] {
--accent-color: #6d83ff;
--secondary-color: #d60739;
--text-color: 220, 220, 220;
--text-color: 200, 200, 200;
--foreground-color: 27, 28, 29;
--background-color: 21, 22, 22;
--danger-color: rgb(255, 106, 106);
@ -45,7 +45,6 @@ body[data-theme=dark] ::-webkit-calendar-picker-indicator {
p,
strong {
font-size: 0.9rem;
max-width: 65ch;
line-height: 1.7;
color: rgba(var(--text-color), 0.9);
}
@ -459,6 +458,10 @@ ul {
height: 100%;
}
.padding-block-1 {
padding-block: 1rem;
}
.margin-right-0-3 {
margin-right: 0.3rem;
}
@ -670,12 +673,107 @@ ul {
cursor: pointer;
}
.page {
height: 100%;
}
.page__header {
display: flex;
justify-content: space-between;
margin-bottom: 1.5rem;
min-height: 8rem;
}
.page__header .grid {
margin-top: auto;
}
.page__header h1 {
margin-top: auto;
font-size: 2rem;
}
.page-layout {
display: grid;
gap: 1.5rem 0;
grid-template-columns: 1.5rem minmax(0, 1fr) 1.5rem;
align-content: flex-start;
}
.page-layout > * {
grid-column: 2/3;
}
#secondary_pages {
display: flex;
flex-direction: column;
width: 100%;
}
#secondary_pages header {
padding: 1.5rem;
}
#secondary_pages .inner-page {
width: 100%;
height: 100%;
}
.inner-page {
gap: 1rem;
display: grid;
position: relative;
padding: 1rem;
grid-template-columns: minmax(0, 1fr);
height: 100%;
background-color: rgba(var(--foreground-color), 0.5);
}
#sign_in,
#sign_up {
justify-items: center;
align-content: center;
}
#sign_in section,
#sign_up section {
margin-top: -8rem;
width: min(24rem, 100%);
}
#sign_in sm-form,
#sign_up sm-form {
margin: 2rem 0;
}
#sign_up .h2 {
margin-bottom: 0.5rem;
}
#sign_up .card {
margin: 1.5rem 0;
}
#sign_up h5 {
color: rgba(var(--text-color), 0.8);
}
#flo_id_warning {
padding-bottom: 1.5rem;
border-bottom: thin solid rgba(var(--text-color), 0.3);
}
#flo_id_warning .icon {
height: 4rem;
width: 4rem;
padding: 1rem;
background-color: #ffc107;
border-radius: 3rem;
fill: rgba(0, 0, 0, 0.8);
margin-bottom: 1.5rem;
}
#main_page {
height: 100%;
grid-template-rows: auto 1fr auto;
grid-template-areas: "main-header" "sub-pages" "main-nav";
}
#sub_page_container {
grid-area: sub-pages;
height: 100%;
overflow-y: auto;
}
#main_header {
grid-area: main-header;
display: flex;
@ -729,22 +827,12 @@ ul {
margin-bottom: 0.3rem;
}
#sub_page_container {
grid-area: sub-pages;
height: 100%;
overflow-y: auto;
}
.container-card {
position: relative;
background: rgba(var(--foreground-color), 1);
border-radius: 0.5rem;
}
.medium-top-bottom-margin {
margin: 0.5rem 0;
}
#sign_in_page {
display: grid;
position: fixed;
@ -758,10 +846,6 @@ ul {
gap: 1rem;
}
#sign_in_form {
width: 22rem;
}
#application_card {
position: relative;
overflow: hidden;
@ -791,18 +875,15 @@ ul {
.task .task__branch_container {
padding-bottom: 2rem;
}
.task:last-of-type .left .line {
transform: scaleY(0);
}
.task .left {
display: flex;
position: relative;
justify-content: center;
padding-top: 0.5rem;
}
.task .left .circle {
display: inline-flex;
position: relative;
@ -814,7 +895,6 @@ ul {
border: solid 2px rgba(var(--text-color), 0.4);
z-index: 1;
}
.task .left .line {
position: absolute;
left: 50%;
@ -823,75 +903,43 @@ ul {
transform: translateX(-50%) scaleY(1);
background-color: rgba(var(--text-color), 0.4);
}
.task .right {
margin-left: 1rem;
display: flex;
flex-direction: column;
width: 100%;
}
.task .right .apply-cont {
width: 100%;
display: flex;
flex-direction: row;
}
.task .right .apply-cont h4 {
flex: 1;
}
.task h4 {
margin-top: 0.4rem;
margin-bottom: 1rem;
}
.task .assigned-interns .assigned-intern {
padding: 0.4rem;
}
.timeline-task__description,
.admin-reply__description {
white-space: pre-line;
max-width: 100%;
}
.task .assigned-interns .assigned-intern {
padding: 0.4rem;
}
.completed-task .left .circle {
.completed .left .circle {
border: solid 2px #00c853 !important;
background: #00c853 !important;
}
.completed-task .left .line {
.completed .left .line {
background-color: #00c853 !important;
}
.page {
gap: 1rem;
display: grid;
position: relative;
padding: 1rem;
-webkit-animation: fadein 0.3s;
animation: fadein 0.3s;
grid-template-columns: minmax(0, 1fr);
height: 100%;
}
@-webkit-keyframes fadein {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fadein {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.task-title {
font-weight: 500;
}
@ -1111,7 +1159,6 @@ ul {
}
.branch-button {
margin-bottom: 0.5rem;
display: flex;
padding: 0.5rem;
border-radius: 0.2rem;
@ -1138,30 +1185,19 @@ ul {
.task-list-item {
display: grid;
grid-template-columns: auto 1fr auto;
grid-template-areas: "status title options" "status interns interns" "status description description" "status . .";
align-content: flex-start;
padding: 1rem;
gap: 0.5rem;
border-radius: 0.5rem;
background: rgba(var(--foreground-color), 1);
}
.task-list-item sm-checkbox {
grid-area: status;
align-self: flex-start;
padding: 0.2rem 0.5rem 0.5rem 0;
}
.task-list-item h4 {
font-weight: 500;
margin: 0;
}
.task-list-item .task-title {
grid-area: title;
line-height: 1.6;
}
.task-list-item .assigned-interns {
grid-area: interns;
}
.task__branch_container:not(:empty) {
display: grid;
@ -1197,13 +1233,10 @@ ul {
}
.task-option {
grid-area: options;
transition: opacity 0.3s ease;
padding: 0.5rem;
}
.task-description {
grid-area: description;
margin: 0;
overflow-wrap: break-word;
word-wrap: break-word;
@ -1351,10 +1384,6 @@ ul {
padding: 1rem;
}
#explorer_branch_container {
margin-top: 1.5rem;
}
#watch_project_button {
margin-left: 1rem;
text-transform: capitalize;
@ -1368,11 +1397,21 @@ ul {
height: 100%;
}
#admin_views {
display: grid;
gap: 1rem;
height: 100%;
}
#admin_views > * {
grid-area: 1/1;
}
#project_editing_panel {
position: relative;
padding: 1rem 0;
padding: max(4vw, 1rem);
height: 100%;
overflow-y: auto;
padding-bottom: 3rem;
}
.fab {
@ -1452,7 +1491,6 @@ ul {
.init-update-replay {
color: var(--accent-color);
background-color: rgba(var(--text-color), 0.04);
margin-left: auto;
}
.send-update-button .icon,
.init-update-replay .icon {
@ -1613,16 +1651,7 @@ input[type=date]:focus {
}
#settings_page {
align-items: flex-start;
}
#username {
margin-top: 1.5rem;
margin-bottom: 0.5rem;
}
#logout {
margin-top: 1.5rem;
align-content: flex-start;
}
@media only screen and (max-width: 640px) {
@ -1630,9 +1659,6 @@ input[type=date]:focus {
.hide-page-on-mobile {
display: none;
}
#project_editing_panel {
padding: 1rem;
}
.list-container {
padding-bottom: 5rem;
}
@ -1710,16 +1736,11 @@ input[type=date]:focus {
}
#admin_page {
padding: 0;
gap: 1rem;
grid-template-columns: 18rem minmax(0, 1fr);
grid-template-rows: 1fr;
}
#admin_page__left {
background-color: rgba(var(--foreground-color), 1);
}
#project_editing_panel {
padding-right: 1rem;
}
#edit_data_fig {
width: 16rem;
justify-self: center;
@ -1822,14 +1843,4 @@ input[type=date]:focus {
.interact:hover {
background-color: rgba(var(--text-color), 0.06);
}
.task-option,
.apply-button {
opacity: 0;
transition: opacity 0.3s;
}
.task-list-item:hover .task-option,
.task-option:focus-within,
.task:hover .apply-button {
opacity: 1;
}
}

2
css/main.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -31,7 +31,7 @@ body {
body[data-theme="dark"] {
--accent-color: #6d83ff;
--secondary-color: #d60739;
--text-color: 220, 220, 220;
--text-color: 200, 200, 200;
--foreground-color: 27, 28, 29;
--background-color: 21, 22, 22;
--danger-color: rgb(255, 106, 106);
@ -45,7 +45,6 @@ body[data-theme="dark"] {
p,
strong {
font-size: 0.9rem;
max-width: 65ch;
line-height: 1.7;
color: rgba(var(--text-color), 0.9);
}
@ -458,6 +457,10 @@ ul {
height: 100%;
}
.padding-block-1 {
padding-block: 1rem;
}
.margin-right-0-3 {
margin-right: 0.3rem;
}
@ -668,12 +671,114 @@ ul {
padding: 0.5rem;
cursor: pointer;
}
.page {
height: 100%;
&__header {
display: flex;
justify-content: space-between;
margin-bottom: 1.5rem;
min-height: 8rem;
.grid {
margin-top: auto;
}
h1 {
margin-top: auto;
font-size: 2rem;
}
}
}
.page-layout {
display: grid;
gap: 1.5rem 0;
grid-template-columns: 1.5rem minmax(0, 1fr) 1.5rem;
align-content: flex-start;
& > * {
grid-column: 2/3;
}
}
#secondary_pages {
display: flex;
flex-direction: column;
width: 100%;
header {
padding: 1.5rem;
}
.inner-page {
width: 100%;
height: 100%;
}
}
.inner-page {
gap: 1rem;
display: grid;
position: relative;
padding: 1rem;
grid-template-columns: minmax(0, 1fr);
height: 100%;
background-color: rgba(var(--foreground-color), 0.5);
}
#sign_in,
#sign_up {
justify-items: center;
align-content: center;
section {
margin-top: -8rem;
width: min(24rem, 100%);
}
sm-form {
margin: 2rem 0;
}
}
#sign_up {
.h2 {
margin-bottom: 0.5rem;
}
.card {
margin: 1.5rem 0;
}
h5 {
color: rgba(var(--text-color), 0.8);
}
}
#flo_id_warning {
padding-bottom: 1.5rem;
border-bottom: thin solid rgba(var(--text-color), 0.3);
.icon {
height: 4rem;
width: 4rem;
padding: 1rem;
background-color: #ffc107;
border-radius: 3rem;
fill: rgba(0, 0, 0, 0.8);
margin-bottom: 1.5rem;
}
}
#main_page {
height: 100%;
grid-template-rows: auto 1fr auto;
grid-template-areas: "main-header" "sub-pages" "main-nav";
}
#sub_page_container {
grid-area: sub-pages;
height: 100%;
overflow-y: auto;
}
#main_header {
grid-area: main-header;
@ -734,22 +839,12 @@ ul {
}
}
#sub_page_container {
grid-area: sub-pages;
height: 100%;
overflow-y: auto;
}
.container-card {
position: relative;
background: rgba(var(--foreground-color), 1);
border-radius: 0.5rem;
}
.medium-top-bottom-margin {
margin: 0.5rem 0;
}
#sign_in_page {
display: grid;
position: fixed;
@ -763,10 +858,6 @@ ul {
gap: 1rem;
}
#sign_in_form {
width: 22rem;
}
#application_card {
position: relative;
overflow: hidden;
@ -801,101 +892,74 @@ ul {
.task__branch_container {
padding-bottom: 2rem;
}
}
&:last-of-type .left .line {
transform: scaleY(0);
}
.task:last-of-type .left .line {
transform: scaleY(0);
}
.left {
display: flex;
position: relative;
justify-content: center;
padding-top: 0.5rem;
.circle {
display: inline-flex;
position: relative;
align-self: flex-start;
height: 1rem;
width: 1rem;
border-radius: 50%;
background: rgba(var(--foreground-color), 1);
border: solid 2px rgba(var(--text-color), 0.4);
z-index: 1;
}
.line {
position: absolute;
left: 50%;
height: 100%;
width: 2px;
transform: translateX(-50%) scaleY(1);
background-color: rgba(var(--text-color), 0.4);
}
}
.right {
margin-left: 1rem;
display: flex;
flex-direction: column;
width: 100%;
.apply-cont {
width: 100%;
display: flex;
flex-direction: row;
h4 {
flex: 1;
}
}
}
.task .left {
display: flex;
position: relative;
justify-content: center;
padding-top: 0.5rem;
}
h4 {
margin-top: 0.4rem;
margin-bottom: 1rem;
}
.task .left .circle {
display: inline-flex;
position: relative;
align-self: flex-start;
height: 1rem;
width: 1rem;
border-radius: 50%;
background: rgba(var(--foreground-color), 1);
border: solid 2px rgba(var(--text-color), 0.4);
z-index: 1;
.assigned-interns .assigned-intern {
padding: 0.4rem;
}
}
.task .left .line {
position: absolute;
left: 50%;
height: 100%;
width: 2px;
transform: translateX(-50%) scaleY(1);
background-color: rgba(var(--text-color), 0.4);
}
.task .right {
margin-left: 1rem;
display: flex;
flex-direction: column;
width: 100%;
}
.task .right .apply-cont {
width: 100%;
display: flex;
flex-direction: row;
}
.task .right .apply-cont h4 {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
}
.task h4 {
margin-top: 0.4rem;
margin-bottom: 1rem;
}
.timeline-task__description,
.admin-reply__description {
white-space: pre-line;
max-width: 100%;
}
.task .assigned-interns .assigned-intern {
padding: 0.4rem;
}
.completed-task .left .circle {
.completed .left .circle {
border: solid 2px #00c853 !important;
background: #00c853 !important;
}
.completed-task .left .line {
.completed .left .line {
background-color: #00c853 !important;
}
.page {
gap: 1rem;
display: grid;
position: relative;
padding: 1rem;
animation: fadein 0.3s;
grid-template-columns: minmax(0, 1fr);
height: 100%;
}
@keyframes fadein {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.task-title {
font-weight: 500;
}
@ -1109,7 +1173,6 @@ ul {
}
.branch-button {
margin-bottom: 0.5rem;
display: flex;
padding: 0.5rem;
border-radius: 0.2rem;
@ -1133,34 +1196,18 @@ ul {
}
.task-list-item {
display: grid;
grid-template-columns: auto 1fr auto;
grid-template-areas:
"status title options"
"status interns interns"
"status description description"
"status . .";
align-content: flex-start;
padding: 1rem;
gap: 0.5rem;
border-radius: 0.5rem;
background: rgba(var(--foreground-color), 1);
sm-checkbox {
grid-area: status;
align-self: flex-start;
padding: 0.2rem 0.5rem 0.5rem 0;
}
h4 {
font-weight: 500;
margin: 0;
}
.task-title {
grid-area: title;
line-height: 1.6;
}
.assigned-interns {
grid-area: interns;
}
}
.task__branch_container {
&:not(:empty) {
@ -1200,13 +1247,10 @@ ul {
}
.task-option {
grid-area: options;
transition: opacity 0.3s ease;
padding: 0.5rem;
}
.task-description {
grid-area: description;
margin: 0;
overflow-wrap: break-word;
word-wrap: break-word;
@ -1347,9 +1391,6 @@ ul {
align-content: flex-start;
padding: 1rem;
}
#explorer_branch_container {
margin-top: 1.5rem;
}
#watch_project_button {
margin-left: 1rem;
text-transform: capitalize;
@ -1362,12 +1403,20 @@ ul {
padding: 0;
height: 100%;
}
#admin_views {
display: grid;
gap: 1rem;
height: 100%;
& > * {
grid-area: 1/1;
}
}
#project_editing_panel {
position: relative;
padding: 1rem 0;
padding: max(4vw, 1rem);
height: 100%;
overflow-y: auto;
padding-bottom: 3rem;
}
.fab {
position: absolute;
@ -1444,7 +1493,6 @@ ul {
.init-update-replay {
color: var(--accent-color);
background-color: rgba(var(--text-color), 0.04);
margin-left: auto;
.icon {
fill: var(--accent-color);
}
@ -1601,23 +1649,13 @@ input[type="date"] {
}
}
#settings_page {
align-items: flex-start;
}
#username {
margin-top: 1.5rem;
margin-bottom: 0.5rem;
}
#logout {
margin-top: 1.5rem;
align-content: flex-start;
}
@media only screen and (max-width: 640px) {
.hide-on-mobile,
.hide-page-on-mobile {
display: none;
}
#project_editing_panel {
padding: 1rem;
}
.list-container {
padding-bottom: 5rem;
}
@ -1711,16 +1749,11 @@ input[type="date"] {
#admin_page {
padding: 0;
gap: 1rem;
grid-template-columns: 18rem minmax(0, 1fr);
grid-template-rows: 1fr;
}
#admin_page__left {
background-color: rgba(var(--foreground-color), 1);
}
#project_editing_panel {
padding-right: 1rem;
}
#edit_data_fig {
width: 16rem;
@ -1836,19 +1869,4 @@ input[type="date"] {
.interact:hover {
background-color: rgba(var(--text-color), 0.06);
}
.task-option,
.apply-button {
opacity: 0;
transition: opacity 0.3s;
}
.task-list-item:hover .task-option,
.task-option:focus-within,
.task:hover .apply-button {
opacity: 1;
}
}
@media (any-hover: none) {
}

File diff suppressed because one or more lines are too long