diff --git a/v0/css/base.css b/v0/css/base.css index 67887e0..5335b16 100644 --- a/v0/css/base.css +++ b/v0/css/base.css @@ -1,4 +1,5 @@ /* CSS properties that apply to all elements of a particular type */ + *, ::before, ::after { diff --git a/v0/css/components.css b/v0/css/components.css index a0167d8..6e65e43 100644 --- a/v0/css/components.css +++ b/v0/css/components.css @@ -1,274 +1,14 @@ -/* CSS for components on the website including the sidebar, navbar, and form elements */ - -/* Header Styles */ -header { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: var(--nav-height); - background: white; - z-index: var(--z-index-nav); - padding: 0 3em 0 calc(var(--sidebar-width) + 3em); - transition: 0.5s; -} - -nav { - display: flex; - justify-content: space-between; - align-items: center; - height: var(--nav-height); -} - -nav .controls { - display: flex; - align-items: center; - gap: 1rem; -} - -nav a { - text-decoration: none; -} - -nav .trigger { - display: flex; - align-items: center; - border: none; - outline: none; - background: none; - font-size: 1.25em; -} - -nav .sidebar-toggle { - font-size: 1.25em; - color: rgba(0, 0, 0, 0.5); - cursor: pointer; -} - -nav .sidebar-toggle:hover { - color: rgba(0, 0, 0, 0.75); -} - -/* Sidebar Styles */ -.sidebar { - position: fixed; - top: 0; - width: var(--sidebar-width); - height: 100vh; - background-color: var(--sidebar-bg-color); - z-index: 100; - overflow: scroll; - transition: 0.5s; - display: flex; - flex-direction: column; -} -.sidebar .main-content { - display: flex; - flex-direction: column; - height: calc(100% - 3px); - overflow: auto; -} - -.sidebar .header { - margin-bottom: 2.5rem; - height: var(--nav-height); - font-size: 1.25rem; - font-weight: bold; - color: rgba(0, 0, 0, 0.75); -} - -.sidebar .header .logo { - display: flex; - justify-content: center; - align-items: center; - font-family: "Press Start 2P", monospace; - font-size: 1em; - font-weight: bold; - color: rgba(0, 0, 0, 0.75); - white-space: nowrap; - transition: justify-content 0.5s ease; - width: 100%; - gap: 10px; -} - -.logo-img { - width: var(--sidebar-icon-width); - height: auto; -} - -.sidebar.sidebar--collapsed .header .logo { - justify-content: flex-start; -} - -.sidebar .accordion { - width: 100%; - display: flex; - align-items: center; - border: none; - outline: none; - background: none; - color: rgba(0, 0, 0, 0.75); - cursor: pointer; - font-size: 1.25rem; - font-weight: bold; - margin-bottom: 0.5em; - padding: 0; - white-space: nowrap; -} - -.sidebar .accordion:hover { - background-color: #dddddd; -} - -.sidebar .accordion-content { - padding: 0 20px; - max-height: 0; - overflow: hidden; - gap: 0.5em; - transition: max-height 0.2s ease-in-out; -} - -.sidebar .accordion-content label { - font-size: 0.8rem; -} - -.sidebar .accordion-content select { - width: 100%; - height: 2em; -} -.sidebar .accordion-content input[type="range"] { - width: 100%; -} - -.sidebar .color { - display: flex; - justify-content: space-between; -} -.sidebar .accordion-option { - padding-bottom: 10px; -} - -.sidebar .accordion-option .output { - float: right; - font-size: 0.75rem; - font-family: monospace; - color: #963c10; -} - -.sidebar .icon { - width: var(--sidebar-icon-width); - height: var(--sidebar-icon-width); - display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; - font-size: 1.75rem; -} -.legend { - padding-top: 0.2em; -} - -#url-json-file { - width: 100%; - height: 2em; -} - -#url-markdown-file { - width: 100%; - height: 2em; -} - -.sidebar--collapsed { - width: var(--sidebar-icon-width); - overflow-x: hidden; -} - -.body-pad { - padding: 0 2.5em 0 calc(var(--sidebar-icon-width) + 2.5em) !important; -} - -.download-toggle { - width: 100%; - height: 1.5em; - position: relative; - background: white; - border: 1px solid rgba(0, 0, 0, 0.75); - border-radius: 25px; - cursor: pointer; - display: flex; - justify-content: center; - align-items: center; - box-sizing: border-box; - overflow: hidden; -} - -.download-toggle button { - text-align: center; - line-height: 50px; - color: black; - flex: 1; - margin: 0; - border: none; - background: white; - border-radius: 25px 0 0 25px; -} - -.download-toggle .upload-method { - color: white; - background: #007bff; -} - -.download-toggle button:last-child { - border-radius: 0 25px 25px 0; -} - -.github-link { - margin-top: auto; - width: 100%; - display: flex; - justify-content: center; - align-items: center; - padding: 1px; - box-sizing: border-box; - background-color: var(--sidebar-bg-color); -} - -.github-link .icon { - width: 30px; - height: 30px; -} - -.github-link a { - display: flex; - align-items: center; - text-decoration: none; - color: rgba(0, 0, 0, 0.75); -} - -.software-version { - width: 100%; - display: flex; - justify-content: center; - align-items: center; - padding: 1px; - box-sizing: border-box; - background-color: var(--sidebar-bg-color); -} - -.software-version span { - display: flex; - color: rgba(44, 44, 44, 0.75); - font-size: small; -} +/* CSS for components on the website including the loading spinner and alerts */ /* Alert Styles */ .alert { - padding: 15px; + padding: 10px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; position: relative; padding-right: 35px; + font-size: 14px; } .alert.error { @@ -307,7 +47,7 @@ nav .sidebar-toggle:hover { .alert-close { position: absolute; right: 10px; - top: 15px; + top: 10px; cursor: pointer; } diff --git a/v0/css/layout.css b/v0/css/layout.css index 389717e..7d8e49b 100644 --- a/v0/css/layout.css +++ b/v0/css/layout.css @@ -1,29 +1,52 @@ /* CSS for the application layout and resizing */ -.main { - margin-top: 3em; +.app-navbar { + position: fixed; + top: 0px; + left: 0; + z-index: var(--z-index-nav); + width: 100%; + pointer-events: none; +} + +.app-sidebar { + position: fixed; + top: 0; + width: var(--sidebar-width); + height: 100vh; + background-color: var(--sidebar-bg-color); + z-index: 100; + overflow: scroll; + display: flex; + flex-direction: column; +} + +.app-main { + display: flex; + flex-direction: column; + align-items: center; + margin-top: 10px; padding: 0 2.5em 0 calc(var(--sidebar-width) + 2.5em); - transition: 0.5s; + min-height: 100vh; } -.chart { - max-width: 1200px; - min-width: 300px; +.app-main.sidebar-collapsed { + padding: 0 4em 0 calc(var(--sidebar-icon-width) + 4em); } -.protein { - max-width: 1080px; - min-width: 300px; - min-height: 300px; - max-height: 600px; - border-radius: 10px; +.app-main .container { + max-width: calc(var(--layout-max-width) - var(--sidebar-width)); + min-width: var(--layout-min-width); + width: 100%; + box-sizing: border-box; + margin-left: auto; + margin-right: auto; +} + +.app-main.sidebar-collapsed .container { + max-width: calc(var(--layout-max-width) - var(--sidebar-icon-width)); } -@media (min-width: 1400px) { - .body-pad { - padding: 0 4em 0 calc(var(--sidebar-icon-width) + 4em) !important; - } - .main { - padding: 0 4em 0 calc(var(--sidebar-width) + 4em); - } +.protein { + border-radius: 10px; } diff --git a/v0/css/main.css b/v0/css/main.css index 90d5cce..bf74441 100644 --- a/v0/css/main.css +++ b/v0/css/main.css @@ -4,4 +4,6 @@ @import "./base.css"; @import "./layout.css"; @import "./components.css"; +@import "./navbar.css"; +@import "./sidebar.css"; @import "./visualization.css"; diff --git a/v0/css/navbar.css b/v0/css/navbar.css new file mode 100644 index 0000000..8afe4cd --- /dev/null +++ b/v0/css/navbar.css @@ -0,0 +1,122 @@ +/* CSS for the navigation bar component at the top of the application */ + +.app-navbar { + background-color: transparent; + position: relative; + height: var(--nav-height); + pointer-events: none; + white-space: nowrap; +} + +.app-navbar .wrapper { + padding: 0; +} + +.app-navbar .container { + display: flex; + justify-content: space-between; + margin: 0 auto; + max-width: calc(var(--layout-max-width) + var(--sidebar-width)); + min-width: calc(var(--layout-min-width) + var(--sidebar-width)); + height: var(--nav-height); + pointer-events: none; +} + +.app-navbar .container * { + pointer-events: auto; +} + +.app-navbar.sidebar-collapsed .container { + max-width: calc(var(--layout-max-width) + var(--sidebar-icon-width)); + min-width: calc(var(--layout-min-width) + var(--sidebar-icon-width)); +} + +.app-navbar .content { + display: flex; + align-items: center; + position: relative; + z-index: 1; + padding-right: 32px; + padding-left: calc(var(--sidebar-width) + 32px); + flex-grow: 1; + pointer-events: none; +} + +.app-navbar.sidebar-collapsed .content { + padding-left: calc(var(--sidebar-icon-width) + 32px); +} + +.app-navbar .content-body { + position: relative; + display: flex; + justify-content: flex-end; + align-items: center; + flex-grow: 1; + height: var(--nav-height); + background-color: var(--primary-bg-color); + pointer-events: auto; +} + +.app-navbar .menu { + display: flex; +} + +.app-navbar .menu-item { + display: flex; + align-items: center; + padding: 0 12px; + line-height: var(--nav-height); + font-size: 14px; + font-weight: 500; + color: var(--primary-txt-color); +} + +.app-navbar .menu-item:hover { + color: rgb(72, 72, 230); +} + +.app-navbar .sidebar-toggle { + margin-right: auto; + display: flex; + align-items: center; + justify-content: center; + padding: 0 20px; + border: none; + outline: none; + border-radius: 8px; + cursor: pointer; + background-color: rgb(226, 226, 226); + transition: background-color 0.2s ease-in-out; +} + +.app-navbar .sidebar-toggle:hover { + background-color: rgb(200, 200, 200); +} + +.app-navbar .sidebar-toggle i { + font-size: 20px; + color: var(--primary-txt-color); + margin-right: 8px; +} + +.app-navbar .sidebar-toggle span { + line-height: var(--nav-height); + font-size: 14px; + font-weight: 500; + color: var(--primary-txt-color); +} +.app-navbar .divider { + padding-left: var(--sidebar-width); + width: 100%; + height: 1px; +} + +.app-navbar.sidebar-collapsed .divider { + padding-left: var(--sidebar-icon-width); +} + +.app-navbar .divider-line { + background-color: #e2e2e3; + width: 100%; + height: 1px; +} diff --git a/v0/css/sidebar.css b/v0/css/sidebar.css new file mode 100644 index 0000000..df5b5fa --- /dev/null +++ b/v0/css/sidebar.css @@ -0,0 +1,200 @@ +/* CSS for the side bar component on the left side of the application */ + +.app-sidebar .main-content { + display: flex; + flex-direction: column; + height: calc(100% - 3px); + overflow: auto; +} + +.app-sidebar .menu-title { + margin-bottom: 2.5rem; + height: var(--nav-height); + font-size: 1.25rem; + font-weight: bold; + color: rgba(0, 0, 0, 0.75); +} + +.app-sidebar .menu-title .logo { + display: flex; + justify-content: center; + align-items: center; + font-family: "Press Start 2P", monospace; + font-size: 1em; + font-weight: bold; + color: rgba(0, 0, 0, 0.75); + white-space: nowrap; + width: 100%; + gap: 10px; +} + +.logo-img { + width: var(--sidebar-icon-width); + height: auto; +} + +.app-sidebar .accordion { + width: 100%; + display: flex; + align-items: center; + border: none; + outline: none; + background: none; + color: rgba(0, 0, 0, 0.75); + cursor: pointer; + font-size: 1.25rem; + font-weight: bold; + margin-bottom: 0.5em; + padding: 0; + white-space: nowrap; +} + +.app-sidebar .accordion:hover { + background-color: #dddddd; +} + +.app-sidebar .accordion-content { + padding: 0 20px; + max-height: 0; + overflow: hidden; + gap: 0.5em; +} + +.app-sidebar .accordion-content label { + font-size: 0.8rem; +} + +.app-sidebar .accordion-content select { + width: 100%; + height: 2em; +} +.app-sidebar .accordion-content input[type="range"] { + width: 100%; +} + +.app-sidebar .color { + display: flex; + justify-content: space-between; +} +.app-sidebar .accordion-option { + padding-bottom: 10px; +} + +.app-sidebar .accordion-option .output { + float: right; + font-size: 0.75rem; + font-family: monospace; + color: #963c10; +} + +.app-sidebar .icon { + width: var(--sidebar-icon-width); + height: var(--sidebar-icon-width); + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + font-size: 1.75rem; +} +.legend { + padding-top: 0.2em; +} + +#url-json-file { + width: 100%; + height: 2em; +} + +#url-markdown-file { + width: 100%; + height: 2em; +} + +.body-pad { + padding: 0 2.5em 0 calc(var(--sidebar-icon-width) + 2.5em) !important; +} + +.download-toggle { + width: 100%; + height: 1.5em; + position: relative; + background: white; + border: 1px solid rgba(0, 0, 0, 0.75); + border-radius: 25px; + cursor: pointer; + display: flex; + justify-content: center; + align-items: center; + box-sizing: border-box; + overflow: hidden; +} + +.download-toggle button { + text-align: center; + line-height: 50px; + color: black; + flex: 1; + margin: 0; + border: none; + background: white; + border-radius: 25px 0 0 25px; +} + +.download-toggle .upload-method { + color: white; + background: #007bff; +} + +.download-toggle button:last-child { + border-radius: 0 25px 25px 0; +} + +.github-link { + margin-top: auto; + width: 100%; + display: flex; + justify-content: center; + align-items: center; + padding: 1px; + box-sizing: border-box; + background-color: var(--sidebar-bg-color); +} + +.github-link .icon { + width: 30px; + height: 30px; +} + +.github-link a { + display: flex; + align-items: center; + text-decoration: none; + color: rgba(0, 0, 0, 0.75); +} + +.software-version { + width: 100%; + display: flex; + justify-content: center; + align-items: center; + padding: 1px; + box-sizing: border-box; + background-color: var(--sidebar-bg-color); +} + +.software-version span { + display: flex; + color: rgba(44, 44, 44, 0.75); + font-size: small; +} + +/* Collapse the Sidebar */ + +.app-sidebar.sidebar-collapsed { + width: var(--sidebar-icon-width); + overflow-x: hidden; +} + +.app-sidebar.sidebar-collapsed .menu-title .logo { + justify-content: flex-start; +} diff --git a/v0/css/variables.css b/v0/css/variables.css index b0c5526..d36c69e 100644 --- a/v0/css/variables.css +++ b/v0/css/variables.css @@ -19,6 +19,7 @@ /* Layout */ :root { --layout-max-width: 1440px; + --layout-min-width: 600px; } /* Navbar */ diff --git a/v0/css/visualization.css b/v0/css/visualization.css index 59e9623..5c3d130 100644 --- a/v0/css/visualization.css +++ b/v0/css/visualization.css @@ -1,4 +1,4 @@ -/* CSS for visualization components including the chart and protein */ +/* CSS for visualization components (i.e., tooltips, axes, ect..) */ /* Tooltip Styles */ .heatmap-tooltip, diff --git a/v0/index.html b/v0/index.html index 4970db4..bb5aaaf 100644 --- a/v0/index.html +++ b/v0/index.html @@ -1,6 +1,5 @@ -
@@ -17,7 +16,6 @@