diff --git a/app/assets/stylesheets/_variables.scss b/app/assets/stylesheets/abstracts/_variables.scss similarity index 100% rename from app/assets/stylesheets/_variables.scss rename to app/assets/stylesheets/abstracts/_variables.scss diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index c4acf7a..a53a323 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,24 +1,25 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's - * vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - */ +@import "bootstrap"; - @import "bootstrap"; - @import "variables"; - @import "home"; - @import "header"; - @import "pagination"; - @import "buttons"; - @import "form"; - @import "progress_bar"; +// Abstracts +@import "abstracts/variables"; + +// Base +@import "base/base"; +@import "base/typography"; + +// Components +@import "components/alerts"; +@import "components/buttons"; +@import "components/card"; +@import "components/form"; +@import "components/pagination"; +@import "components/progress_bar"; +@import "components/stats"; + +// Layout +@import "layout/header"; +@import "layout/footer"; + +// Pages +@import "pages/home"; +@import "pages/login"; diff --git a/app/assets/stylesheets/base/_base.scss b/app/assets/stylesheets/base/_base.scss new file mode 100644 index 0000000..73d049f --- /dev/null +++ b/app/assets/stylesheets/base/_base.scss @@ -0,0 +1,75 @@ +html, body { + height: 100%; + margin: 0; + color: $text; + font-family: Roboto, sans-serif; + font-size: $font-size; +} + +body { + background-color: $bg; + display: flex; + flex-direction: row; + + @media (max-width: $breakpoint-lg) { + flex-direction: column; + } +} + +main { + flex: 1; + display: flex; + flex-direction: column; + flex-grow: 1; + + @media (max-width: $breakpoint-lg) { + flex-direction: column; + } +} + +h1, h2, h3 { + color: $text-bold; +} + +h1 { + font-size: 2rem; +} + +h2 { + font-size: 1.5rem; +} + +// To support having the sidebar and no proper header +.not-header { + width: calc(100% - 400px); + margin-left: 400px; + display: flex; + flex-direction: column; + min-height: 100vh; + + @media (max-width: $breakpoint-lg) { + width: 100%; + margin: 0; + } +} + +.not-header-login { + width: 100%; + display: flex; + flex-direction: column; + min-height: 100vh; +} + +.main-content { + display: flex; + flex-direction: column; + flex-grow: 1; + padding: 1rem; + width: 100%; + max-width: $max-page-width; + margin: 0 auto; + + @media (max-width: $breakpoint-md) { + padding: 0.5rem; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/base/_typography.scss b/app/assets/stylesheets/base/_typography.scss new file mode 100644 index 0000000..2404787 --- /dev/null +++ b/app/assets/stylesheets/base/_typography.scss @@ -0,0 +1,24 @@ +.font-secondary { + color: $font-secondary-color; + font-size: 0.8em; +} + +.text-brand-light { + color: $brand-light +} + +.unstyle-link { + text-decoration: none; + + &:hover { + text-decoration: underline; + } +} + +.icon { + display: inline-block; + background: none; + border: none; + color: $font-color; + padding: 0; +} \ No newline at end of file diff --git a/app/assets/stylesheets/components/_alerts.scss b/app/assets/stylesheets/components/_alerts.scss new file mode 100644 index 0000000..0b00041 --- /dev/null +++ b/app/assets/stylesheets/components/_alerts.scss @@ -0,0 +1,22 @@ +.alert-bar { + width: 100%; + padding: 0.5rem; + text-align: center; + margin: 0; +} + +.ab-notice { + background-color: $success; +} + +.ab-danger { + background-color: $danger; +} + +.ab-warning { + background-color: $warning; +} + +.text-danger { + color: $danger; +} \ No newline at end of file diff --git a/app/assets/stylesheets/buttons.scss b/app/assets/stylesheets/components/_buttons.scss similarity index 74% rename from app/assets/stylesheets/buttons.scss rename to app/assets/stylesheets/components/_buttons.scss index 578d382..791e130 100644 --- a/app/assets/stylesheets/buttons.scss +++ b/app/assets/stylesheets/components/_buttons.scss @@ -1,20 +1,18 @@ -@import "variables"; - .link-button { - color: $font-color; - text-decoration: none; - background-color: $highlight-color; - padding: 2px 10px; - border-radius: 5px; - border: none; + color: $font-color; + text-decoration: none; + background-color: $highlight-color; + padding: 2px 10px; + border-radius: 5px; + border: none; - &:hover { - box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); - } + &:hover { + box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); + } } .icon-button { - background: none; + background: none !important; border: none; color: $font-color; cursor: pointer; @@ -23,7 +21,7 @@ a { color: inherit; text-decoration: none; - background: none; + background: none !important; padding: 0; border-radius: 0; } diff --git a/app/assets/stylesheets/components/_card.scss b/app/assets/stylesheets/components/_card.scss new file mode 100644 index 0000000..8bcbe15 --- /dev/null +++ b/app/assets/stylesheets/components/_card.scss @@ -0,0 +1,33 @@ +.gt-card { + padding: $roundness; + border-radius: $roundness; + border: 1px solid $line-color; + margin: 0 0 0.5rem; + max-width: 100%; +} + +.card-heading { + color: $font-color; + display: flex; + align-items: center; + justify-content: space-between; + h1 { + margin: 0; + } + + h2 { + margin: 0; + } + + a { + color: $font-color; + text-decoration: none; + background-color: $highlight-color; + padding: 2px 10px; + border-radius: 5px; + } + + a:hover{ + box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/components/_form.scss b/app/assets/stylesheets/components/_form.scss new file mode 100644 index 0000000..892c24e --- /dev/null +++ b/app/assets/stylesheets/components/_form.scss @@ -0,0 +1,43 @@ +.form-heading { + display: flex; + align-items: center; + gap: 0.5rem; + + margin-bottom: 0.5rem; + + h1, h2, h3 { + margin: 0; + } +} + +.gt-form { + input, select { + height: 34px; + width: 100%; + padding: 0 0.5rem; + outline: none; + border-radius: 5px; + background-color: $line-color; + color: $font-color; + border: none; + margin-bottom: 4px; + } + + input[type="submit"] { + background-color: $highlight-color; + border: none; + padding: 2px 10px; + border-radius: 5px; + margin-top: 4px; + + &:hover{ + box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); + } + } +} + +.form-card-container { + width: 100%; + max-width: 600px; + margin: 0 auto; +} \ No newline at end of file diff --git a/app/assets/stylesheets/components/_pagination.scss b/app/assets/stylesheets/components/_pagination.scss new file mode 100644 index 0000000..a88ee17 --- /dev/null +++ b/app/assets/stylesheets/components/_pagination.scss @@ -0,0 +1,9 @@ +.pagination-box { + border: 1px solid $background-color; + border-radius: 5px; + text-align: center; + line-height: 30px; + width: 30px; + height: 30px; + margin: 0 5px; +} \ No newline at end of file diff --git a/app/assets/stylesheets/components/_progress_bar.scss b/app/assets/stylesheets/components/_progress_bar.scss new file mode 100644 index 0000000..3320111 --- /dev/null +++ b/app/assets/stylesheets/components/_progress_bar.scss @@ -0,0 +1,26 @@ +.progress-bar { + margin: 0; + padding: 0; + border-radius: 1px; + background-color: $line-color; + height: 3px; + + .progress { + padding: 0; + height: 100%; + width: 0; + background-color: $highlight-color; + transition: width 0.3s ease-in-out; + } +} + +// Awkward fix for padding issues in grids +.px-12px { + padding-left: 12px; + padding-right: 12px; +} + +.mx-12px { + margin-left: 12px; + margin-right: 12px; +} \ No newline at end of file diff --git a/app/assets/stylesheets/components/_stats.scss b/app/assets/stylesheets/components/_stats.scss new file mode 100644 index 0000000..b697e12 --- /dev/null +++ b/app/assets/stylesheets/components/_stats.scss @@ -0,0 +1,27 @@ +.stats-container { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + text-align: center; + margin-bottom: 0.5rem; + + .stat-header { + color: $text; + font-size: 1rem; + } + + .stat-content { + color: $brand-light; + font-size: 2rem; + text-decoration: none; + + a { + color: inherit; + text-decoration: inherit; + } + } + + + @media (max-width: $breakpoint-sm) { + grid-template-columns: 1fr; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/footer.scss b/app/assets/stylesheets/footer.scss deleted file mode 100644 index 4e34e96..0000000 --- a/app/assets/stylesheets/footer.scss +++ /dev/null @@ -1,21 +0,0 @@ -@import "variables"; - -footer { - background-color: $line-color; - padding: 10px; - display: flex; - gap: 1rem; - justify-content: center; - align-items: center; - - a { - margin: 0 0.5rem; - text-decoration: none; - color: inherit; - } - - @media (max-width: $breakpoint-lg) { - width: 100%; - margin: 0; - } -} \ No newline at end of file diff --git a/app/assets/stylesheets/form.scss b/app/assets/stylesheets/form.scss deleted file mode 100644 index fb42bf1..0000000 --- a/app/assets/stylesheets/form.scss +++ /dev/null @@ -1,45 +0,0 @@ -@import "variables"; - -.form-heading { - display: flex; - align-items: center; - gap: 0.5rem; - - margin-bottom: 0.5rem; - - h1, h2, h3 { - margin: 0; - } -} - -.gt-form { - input, select { - height: 34px; - width: 100%; - padding: 0 0.5rem; - outline: none; - border-radius: 5px; - background-color: $line-color; - color: $font-color; - border: none; - margin-bottom: 4px; - } - - input[type="submit"] { - background-color: $highlight-color; - border: none; - padding: 2px 10px; - border-radius: 5px; - margin-top: 4px; - - &:hover{ - box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); - } - } -} - -.form-card-container { - width: 100%; - max-width: 600px; - margin: 0 auto; -} \ No newline at end of file diff --git a/app/assets/stylesheets/header.scss b/app/assets/stylesheets/header.scss deleted file mode 100644 index b5cabd3..0000000 --- a/app/assets/stylesheets/header.scss +++ /dev/null @@ -1,56 +0,0 @@ -@import "variables"; - -header { - background-color: $bg-dark; - width: 400px; - border-right: 1px solid $bg-light; - flex-shrink: 0; - padding: 1rem; - height: 100vh; - overflow-y: auto; - position: fixed; - top: 0; - flex-shrink: 0; - - .side-heading { - .title { - font-size: 2.5rem; - line-height: 2.5rem; - } - - .account { - margin-bottom: 0.5rem; - } - - border-bottom: 1px solid $bg-light; - } - - .side-content { - margin-top: 0.5rem; - @media (max-width: $breakpoint-lg) { - display: none; - } - } - - a { - color: $font-color; - text-decoration: none; - } - - .due-date { - color: $font-secondary-color; - font-style: italic; - } - - @media (max-width: $breakpoint-lg) { - width: 100%; - max-width: 100%; - border-right: none; - position: relative; - height: fit-content; - } - - @media (max-width: $breakpoint-md) { - padding: 0.5rem; - } -} \ No newline at end of file diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss deleted file mode 100644 index 0d0b556..0000000 --- a/app/assets/stylesheets/home.scss +++ /dev/null @@ -1,415 +0,0 @@ -@import "variables"; - -html, body { - height: 100%; - margin: 0; - color: $font-color; - font-family: Roboto, sans-serif; - font-size: $font-size; -} - -body { - background-color: $background-color; - display: flex; - flex-direction: row; - - @media (max-width: $breakpoint-lg) { - flex-direction: column; - } -} - -main { - flex: 1; - display: flex; - flex-direction: column; - flex-grow: 1; - - @media (max-width: $breakpoint-lg) { - flex-direction: column; - } -} - -.not-header { - width: calc(100% - 400px); - margin-left: 400px; - display: flex; - flex-direction: column; - min-height: 100vh; - - @media (max-width: $breakpoint-lg) { - width: 100%; - margin: 0; - } -} - -.not-header-login { - width: 100%; - display: flex; - flex-direction: column; - min-height: 100vh; -} - -h1, h2, h3 { - color: $text-bold; -} - -h1 { - font-size: 2rem; -} - -h2 { - font-size: 1.5rem; -} - -.main-content { - display: flex; - flex-direction: column; - flex-grow: 1; - padding: 1rem; - width: 100%; - max-width: $max-page-width; - margin: 0 auto; - - @media (max-width: $breakpoint-md) { - padding: 0.5rem; - } -} - -.module-list { - width: 100%; - a { - color: $font-color; - text-decoration: none; - } - - .card-heading { - margin-bottom: 0; - } - - .name-row { - margin-top: 0.5rem; - display: flex; - } - - .mod-code { - flex: 0 0 100px; - } - - .mod-name { - flex: 1; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - .module-selected { - color: $text-muted; - } -} - -.gt-card { - padding: $roundness; - border-radius: $roundness; - //background-color: $line-color; - border: 1px solid $line-color; - margin: 0 0 0.5rem; - max-width: 100%; - //box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.2); -} - -.chart-container { - display: flex; - flex: 1 1; - width: 100%; - min-height: 300px; - min-width: 0; - max-width: 100%; - box-sizing: border-box; - - canvas { - position: absolute; - } -} - -.quicklog { /*Can probably switch to gt-form once polished (TODO)*/ - //width: 400px; - margin-top: 0; - - input { - width: 100%; - height: 30px; - outline: none; - border-radius: 5px; - background-color: $line-color; - color: $font-color; - border: none; - } - - .split-row { - display: flex; - flex-direction: row; - justify-content: space-between; - gap: 0.5rem; - } - - #module_code, #minutes { - margin: 0; - padding: 0 0.5rem; - } - - input[type="submit"] { - margin-top: 0.5rem; - background-color: $highlight-color; - border: none; - width: 100% - } -} - -.exam-row { - border-top: 1px solid $background-color; - background-color: $background-color; -} - -.page-heading { - display: flex; - justify-content: space-between; - align-items: center; - border-bottom: 2px solid $line-color; - margin-bottom: 10px; - - .left-button, - .right-button { - flex: 1 1 0; - display: flex; - - } - - .right-button { - justify-content: flex-end; - } - - h1 { - flex: 1 1 auto; - margin: 0; - text-align: center; - } -} - -.section-heading { - border-bottom: 2px solid $line-color; - display: flex; - justify-content: space-between; - margin-bottom: 10px; - - h1 { - margin: 0; - } -} - -.card-heading { - color: $font-color; - display: flex; - align-items: center; - justify-content: space-between; - h1 { - margin: 0; - } - - h2 { - margin: 0; - } - - a { - color: $font-color; - text-decoration: none; - background-color: $highlight-color; - padding: 2px 10px; - border-radius: 5px; - } - - a:hover{ - box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); - } -} - -.gt-table { - width: 100%; - border-collapse: collapse; - margin: 10px 0; - - th, td { - padding: 10px; - text-align: left; - border-bottom: 1px solid $background-color; - } - - // tr:nth-child(even) { - // background-color: $line-color; - // } -} - -.th-content { - display: inline-flex; - gap: 0.5rem; -} - -.stat { - font-size: 40px; -} - -.unstyle-link { - text-decoration: none; - - &:hover { - text-decoration: underline; - } -} - -.font-secondary { - color: $font-secondary-color; - font-size: 0.8em; -} - -.login-container { - flex: 1; - display: flex; - justify-content: center; - align-items: center; -} - -.login { - width: fit-content; - .gt-card { - padding: 1rem; - } - - h1 { - margin-bottom: 1rem; - } - .omniauth { - width: 100%; - color: $font-color; - background: none; - border: 1px solid $line-color; - border-radius: $roundness; - font-size: 1.5rem; - margin: 10px auto; - i { - margin-right: 0.5rem; - } - } - - .field { - border-radius: $roundness; - margin-bottom: 10px; - } - - #user_remember_me { - width: 20px; - margin: 0; - } - - .checkbox-container { - display: flex; - align-items: center; - gap: 0.5rem; - } - - input[type="submit"] { - margin: 0.5rem 0 !important; - } -} - -.center { - text-align: center; - a { - display: inline-block; - } -} - -.divider { - display: flex; - align-items: center; - text-align: center; - color: $font-secondary-color; - font-size: 0.9rem; - margin: 0.5rem 0; - - &::before, - &::after { - content: ""; - flex: 1; - border-bottom: 1px solid $line-color; - } - - &::before { - margin-right: 10px; - } - - &::after { - margin-left: 10px; - } -} - -.alert-bar { - width: 100%; - padding: 0.5rem; - text-align: center; - margin: 0; -} - -.ab-notice { - background-color: $success; -} - -.ab-danger { - background-color: $danger; -} - -.ab-warning { - background-color: $warning; -} - -.text-danger { - color: $danger; -} - -.icon { - display: inline-block; - background: none; - border: none; - color: $font-color; - padding: 0; -} - -.text-brand-light { - color: $brand-light -} - -.stats-container { - display: grid; - grid-template-columns: 1fr 1fr 1fr; - text-align: center; - margin-bottom: 0.5rem; - - .stat-header { - color: $text; - font-size: 1rem; - } - - .stat-content { - color: $brand-light; - font-size: 2rem; - text-decoration: none; - - a { - color: inherit; - text-decoration: inherit; - } - } - - - @media (max-width: $breakpoint-sm) { - grid-template-columns: 1fr; - } -} \ No newline at end of file diff --git a/app/assets/stylesheets/layout/_footer.scss b/app/assets/stylesheets/layout/_footer.scss new file mode 100644 index 0000000..208da77 --- /dev/null +++ b/app/assets/stylesheets/layout/_footer.scss @@ -0,0 +1,19 @@ +footer { + background-color: $line-color; + padding: 10px; + display: flex; + gap: 1rem; + justify-content: center; + align-items: center; + + a { + margin: 0 0.5rem; + text-decoration: none; + color: inherit; + } + + @media (max-width: $breakpoint-lg) { + width: 100%; + margin: 0; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/layout/_header.scss b/app/assets/stylesheets/layout/_header.scss new file mode 100644 index 0000000..9a30b53 --- /dev/null +++ b/app/assets/stylesheets/layout/_header.scss @@ -0,0 +1,120 @@ +header { + background-color: $bg-dark; + width: 400px; + border-right: 1px solid $bg-light; + flex-shrink: 0; + padding: 1rem; + height: 100vh; + overflow-y: auto; + position: fixed; + top: 0; + flex-shrink: 0; + + .side-heading { + .title { + font-size: 2.5rem; + line-height: 2.5rem; + } + + .account { + margin-bottom: 0.5rem; + } + + border-bottom: 1px solid $bg-light; + } + + .side-content { + margin-top: 0.5rem; + @media (max-width: $breakpoint-lg) { + display: none; + } + } + + a { + color: $font-color; + text-decoration: none; + } + + .due-date { + color: $font-secondary-color; + font-style: italic; + } + + @media (max-width: $breakpoint-lg) { + width: 100%; + max-width: 100%; + border-right: none; + position: relative; + height: fit-content; + } + + @media (max-width: $breakpoint-md) { + padding: 0.5rem; + } +} + +.quicklog { /*Can probably switch to gt-form once polished (TODO)*/ + //width: 400px; + margin-top: 0; + + input { + width: 100%; + height: 30px; + outline: none; + border-radius: 5px; + background-color: $line-color; + color: $font-color; + border: none; + } + + .split-row { + display: flex; + flex-direction: row; + justify-content: space-between; + gap: 0.5rem; + } + + #module_code, #minutes { + margin: 0; + padding: 0 0.5rem; + } + + input[type="submit"] { + margin-top: 0.5rem; + background-color: $highlight-color; + border: none; + width: 100% + } +} + +.module-list { + width: 100%; + a { + color: $font-color; + text-decoration: none; + } + + .card-heading { + margin-bottom: 0; + } + + .module-selected { + color: $text-muted; + } +} + +.name-row { + margin-top: 0.5rem; + display: flex; + + .mod-code { + flex: 0 0 100px; + } + + .mod-name { + flex: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/pages/_home.scss b/app/assets/stylesheets/pages/_home.scss new file mode 100644 index 0000000..8ca6816 --- /dev/null +++ b/app/assets/stylesheets/pages/_home.scss @@ -0,0 +1,106 @@ +.page-heading { + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 2px solid $line-color; + margin-bottom: 10px; + + .left-button, + .right-button { + flex: 1 1 0; + display: flex; + + } + + .right-button { + justify-content: flex-end; + } + + h1 { + flex: 1 1 auto; + margin: 0; + text-align: center; + } +} + +.section-heading { + border-bottom: 2px solid $line-color; + display: flex; + justify-content: space-between; + margin-bottom: 10px; + + h1 { + margin: 0; + } +} + +.chart-container { + display: flex; + flex: 1 1; + width: 100%; + min-height: 300px; + min-width: 0; + max-width: 100%; + box-sizing: border-box; + + canvas { + position: absolute; + } +} + +.exam-row { + border-top: 1px solid $background-color; + background-color: $background-color; +} + +.gt-table { + width: 100%; + border-collapse: collapse; + margin: 10px 0; + + th, td { + padding: 10px; + text-align: left; + border-bottom: 1px solid $background-color; + } +} + +.th-content { + display: inline-flex; + gap: 0.5rem; +} + +.stat { + font-size: 40px; +} + +.center { + text-align: center; + a { + display: inline-block; + } +} + +.divider { + display: flex; + align-items: center; + text-align: center; + color: $font-secondary-color; + font-size: 0.9rem; + margin: 0.5rem 0; + + &::before, + &::after { + content: ""; + flex: 1; + border-bottom: 1px solid $line-color; + } + + &::before { + margin-right: 10px; + } + + &::after { + margin-left: 10px; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/pages/_login.scss b/app/assets/stylesheets/pages/_login.scss new file mode 100644 index 0000000..a370930 --- /dev/null +++ b/app/assets/stylesheets/pages/_login.scss @@ -0,0 +1,49 @@ +.login-container { + flex: 1; + display: flex; + justify-content: center; + align-items: center; +} + +.login { + width: fit-content; + .gt-card { + padding: 1rem; + } + + h1 { + margin-bottom: 1rem; + } + .omniauth { + width: 100%; + color: $font-color; + background: none; + border: 1px solid $line-color; + border-radius: $roundness; + font-size: 1.5rem; + margin: 10px auto; + i { + margin-right: 0.5rem; + } + } + + .field { + border-radius: $roundness; + margin-bottom: 10px; + } + + #user_remember_me { + width: 20px; + margin: 0; + } + + .checkbox-container { + display: flex; + align-items: center; + gap: 0.5rem; + } + + input[type="submit"] { + margin: 0.5rem 0 !important; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/pagination.scss b/app/assets/stylesheets/pagination.scss deleted file mode 100644 index 0443069..0000000 --- a/app/assets/stylesheets/pagination.scss +++ /dev/null @@ -1,11 +0,0 @@ -@import "variables"; - -.pagination-box { - border: 1px solid $background-color; - border-radius: 5px; - text-align: center; - line-height: 30px; - width: 30px; - height: 30px; - margin: 0 5px; -} \ No newline at end of file diff --git a/app/assets/stylesheets/progress_bar.scss b/app/assets/stylesheets/progress_bar.scss deleted file mode 100644 index fd41103..0000000 --- a/app/assets/stylesheets/progress_bar.scss +++ /dev/null @@ -1,27 +0,0 @@ -@import "variables"; - -.progress-bar { - margin: 0; - padding: 0; - border-radius: 1px; - background-color: $line-color; - height: 3px; - - .progress { - padding: 0; - height: 100%; - width: 0; - background-color: $highlight-color; - transition: width 0.3s ease-in-out; - } -} - -.px-12px { - padding-left: 12px; - padding-right: 12px; -} - -.mx-12px { - margin-left: 12px; - margin-right: 12px; -} \ No newline at end of file diff --git a/app/views/layouts/_sidebar.html.haml b/app/views/layouts/_sidebar.html.haml index 83521ca..39451e1 100644 --- a/app/views/layouts/_sidebar.html.haml +++ b/app/views/layouts/_sidebar.html.haml @@ -36,21 +36,16 @@ .progress-bar .progress{style: "width: #{m.completion_percentage(current_user)}%"} - .gt-card + .gt-card.upcoming-assessments %h2 Upcoming Assessments - if @next_exams - @next_exams.each do |exam| = link_to uni_module_exam_path(exam.uni_module, exam) do - .row - .col-12 - .row - .col.mod-code= exam.uni_module.code - .col.text-truncate= exam.name - .col-1.text-end.icon-button.pe-3 - %i.fa-solid.fa-arrow-right - .row - .col.due-date.font-secondary - Due: - = exam.due.strftime("%d %b %Y, %H:%M") + .name-row + .mod-code= exam.uni_module.code + .text-truncate= exam.name + .due-date.font-secondary + Due: + = exam.due.strftime("%d %b %Y, %H:%M") - else %span No upcoming assessments. \ No newline at end of file