├── .prettierignore ├── .gitignore ├── images ├── large.png └── vscode.png ├── .github └── workflows │ └── jekyll-docker.yml ├── LICENSE ├── README.md ├── css └── styles.css ├── index.html └── js └── scripts.js /.prettierignore: -------------------------------------------------------------------------------- 1 | *.html -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode -------------------------------------------------------------------------------- /images/large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BobsProgrammingAcademy/responsive-sales-dashboard/HEAD/images/large.png -------------------------------------------------------------------------------- /images/vscode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BobsProgrammingAcademy/responsive-sales-dashboard/HEAD/images/vscode.png -------------------------------------------------------------------------------- /.github/workflows/jekyll-docker.yml: -------------------------------------------------------------------------------- 1 | name: Jekyll site CI 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | pull_request: 8 | branches: [master] 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - name: Checkout source Git branch 17 | uses: actions/checkout@v4 18 | 19 | - name: Build the site in the jekyll/builder container 20 | run: | 21 | docker run \ 22 | -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \ 23 | jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future" 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Bob's Programming Academy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Responsive Sales Dashboard 2 | 3 | This is a responsive sales dashboard built using **HTML 5**, **CSS 3**, and **JavaScript**. Charts were built using **ApexCharts 3**. 4 | 5 |  6 | 7 | ## Table of Contents 8 | 9 | - [Prerequisites](#prerequisites) 10 | - [Running the application](#run-the-application) 11 | - [Copyright and License](#copyright-and-license) 12 | 13 | ## Prerequisites 14 | 15 | Install the following prerequisites: 16 | 17 | - [Visual Studio Code](https://code.visualstudio.com/download) with the **Live Server** extension. 18 | 19 | [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) allows us to launch a local development server that enables a live reload of our project. 20 | 21 | ## Run the application 22 | 23 | To run the application, start the **Live Server** by clicking **Go Live** in the bottom right corner of the status bar in Visual Studio Code. This action will load the website in your default web browser. 24 | 25 |  26 | 27 | ## View the application 28 | 29 | Once the **Live Server** is up and running, go to http://127.0.0.1:5500/index.html to view the application. 30 | 31 | ## Copyright and License 32 | 33 | Copyright © 2022 Bob's Programming Academy. Code released under the MIT license. 34 | -------------------------------------------------------------------------------- /css/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | background-color: #1d2634; 5 | color: #9e9ea4; 6 | font-family: 'Montserrat', sans-serif; 7 | } 8 | 9 | .material-icons-outlined { 10 | vertical-align: middle; 11 | line-height: 1px; 12 | font-size: 35px; 13 | } 14 | 15 | .grid-container { 16 | display: grid; 17 | grid-template-columns: 260px 1fr 1fr 1fr; 18 | grid-template-rows: 0.2fr 3fr; 19 | grid-template-areas: 20 | 'sidebar header header header' 21 | 'sidebar main main main'; 22 | height: 100vh; 23 | } 24 | 25 | /* ---------- HEADER ---------- */ 26 | .header { 27 | grid-area: header; 28 | height: 70px; 29 | display: flex; 30 | align-items: center; 31 | justify-content: space-between; 32 | padding: 0 30px 0 30px; 33 | box-shadow: 0 6px 7px -3px rgba(0, 0, 0, 0.35); 34 | } 35 | 36 | .menu-icon { 37 | display: none; 38 | } 39 | 40 | /* ---------- SIDEBAR ---------- */ 41 | 42 | #sidebar { 43 | grid-area: sidebar; 44 | height: 100%; 45 | background-color: #263043; 46 | overflow-y: auto; 47 | transition: all 0.5s; 48 | -webkit-transition: all 0.5s; 49 | } 50 | 51 | .sidebar-title { 52 | display: flex; 53 | justify-content: space-between; 54 | align-items: center; 55 | padding: 30px 30px 30px 30px; 56 | margin-bottom: 30px; 57 | } 58 | 59 | .sidebar-title > span { 60 | display: none; 61 | } 62 | 63 | .sidebar-brand { 64 | margin-top: 15px; 65 | font-size: 20px; 66 | font-weight: 700; 67 | } 68 | 69 | .sidebar-list { 70 | padding: 0; 71 | margin-top: 15px; 72 | list-style-type: none; 73 | } 74 | 75 | .sidebar-list-item { 76 | padding: 20px 20px 20px 20px; 77 | font-size: 18px; 78 | } 79 | 80 | .sidebar-list-item:hover { 81 | background-color: rgba(255, 255, 255, 0.2); 82 | cursor: pointer; 83 | } 84 | 85 | .sidebar-list-item > a { 86 | text-decoration: none; 87 | color: #9e9ea4; 88 | } 89 | 90 | .sidebar-responsive { 91 | display: inline !important; 92 | position: absolute; 93 | /* 94 | the z-index of the ApexCharts is 11 95 | we want the z-index of the sidebar higher so that 96 | the charts are not showing over the sidebar 97 | on small screens 98 | */ 99 | z-index: 12 !important; 100 | } 101 | 102 | /* ---------- MAIN ---------- */ 103 | 104 | .main-container { 105 | grid-area: main; 106 | overflow-y: auto; 107 | padding: 20px 20px; 108 | color: rgba(255, 255, 255, 0.95); 109 | } 110 | 111 | .main-title { 112 | display: flex; 113 | justify-content: space-between; 114 | } 115 | 116 | .main-cards { 117 | display: grid; 118 | grid-template-columns: 1fr 1fr 1fr 1fr; 119 | gap: 20px; 120 | margin: 20px 0; 121 | } 122 | 123 | .card { 124 | display: flex; 125 | flex-direction: column; 126 | justify-content: space-around; 127 | padding: 25px; 128 | border-radius: 5px; 129 | } 130 | 131 | .card:first-child { 132 | background-color: #2962ff; 133 | } 134 | 135 | .card:nth-child(2) { 136 | background-color: #ff6d00; 137 | } 138 | 139 | .card:nth-child(3) { 140 | background-color: #2e7d32; 141 | } 142 | 143 | .card:nth-child(4) { 144 | background-color: #d50000; 145 | } 146 | 147 | .card-inner { 148 | display: flex; 149 | align-items: center; 150 | justify-content: space-between; 151 | } 152 | 153 | .card-inner > .material-icons-outlined { 154 | font-size: 45px; 155 | } 156 | 157 | .charts { 158 | display: grid; 159 | grid-template-columns: 1fr 1fr; 160 | gap: 20px; 161 | margin-top: 60px; 162 | } 163 | 164 | .charts-card { 165 | background-color: #263043; 166 | margin-bottom: 20px; 167 | padding: 25px; 168 | box-sizing: border-box; 169 | -webkit-column-break-inside: avoid; 170 | border-radius: 5px; 171 | box-shadow: 0 6px 7px -4px rgba(0, 0, 0, 0.2); 172 | } 173 | 174 | .chart-title { 175 | display: flex; 176 | align-items: center; 177 | justify-content: center; 178 | } 179 | 180 | /* ---------- MEDIA QUERIES ---------- */ 181 | 182 | /* Medium <= 992px */ 183 | 184 | @media screen and (max-width: 992px) { 185 | .grid-container { 186 | grid-template-columns: 1fr; 187 | grid-template-rows: 0.2fr 3fr; 188 | grid-template-areas: 189 | 'header' 190 | 'main'; 191 | } 192 | 193 | #sidebar { 194 | display: none; 195 | } 196 | 197 | .menu-icon { 198 | display: inline; 199 | } 200 | 201 | .sidebar-title > span { 202 | display: inline; 203 | } 204 | } 205 | 206 | /* Small <= 768px */ 207 | 208 | @media screen and (max-width: 768px) { 209 | .main-cards { 210 | grid-template-columns: 1fr; 211 | gap: 10px; 212 | margin-bottom: 0; 213 | } 214 | 215 | .charts { 216 | grid-template-columns: 1fr; 217 | margin-top: 30px; 218 | } 219 | } 220 | 221 | /* Extra Small <= 576px */ 222 | 223 | @media screen and (max-width: 576px) { 224 | .hedaer-left { 225 | display: none; 226 | } 227 | } 228 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |