Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Home.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from dash import html,dcc
from dash.dependencies import Input, Output, State
import dash_bootstrap_components as dbc
import pprint
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
from app import server
from app import app

from dashboard.vizfuncs import table1to6st
from dashboard.utils.parseresponsejson import VILLAGE_NAMES,get_data, DATA

import streamlit as st
from PIL import Image

def display_page(pathname):
data = get_data(pathname)
DATA.update({pathname:data})
return table1to6st.layout
Binary file added assets/logo_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
175 changes: 175 additions & 0 deletions assets/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
@charset "UTF-8";
:root {
--bs-blue: #007bff;
--bs-indigo: #6610f2;
--bs-purple: #696cff;
--bs-pink: #e83e8c;
--bs-red: #ff3e1d;
--bs-orange: #fd7e14;
--bs-yellow: #ffab00;
--bs-green: #71dd37;
--bs-teal: #20c997;
--bs-cyan: #03c3ec;
--bs-white: #fff;
--bs-gray: rgba(67, 89, 113, 0.6);
--bs-gray-dark: rgba(67, 89, 113, 0.8);
--bs-gray-25: rgba(67, 89, 113, 0.025);
--bs-gray-50: rgba(67, 89, 113, 0.05);
--bs-primary: #696cff;
--bs-secondary: #8592a3;
--bs-success: #71dd37;
--bs-info: #03c3ec;
--bs-warning: #ffab00;
--bs-danger: #ff3e1d;
--bs-light: #fcfdfd;
--bs-dark: #233446;
--bs-gray: rgba(67, 89, 113, 0.1);
--bs-primary-rgb: 105, 108, 255;
--bs-secondary-rgb: 133, 146, 163;
--bs-success-rgb: 113, 221, 55;
--bs-info-rgb: 3, 195, 236;
--bs-warning-rgb: 255, 171, 0;
--bs-danger-rgb: 255, 62, 29;
--bs-light-rgb: 252, 253, 253;
--bs-dark-rgb: 35, 52, 70;
--bs-gray-rgb: 67, 89, 113;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 67, 89, 113;
--bs-body-color-rgb: 105, 122, 141;
--bs-body-bg-rgb: 245, 245, 249;
--bs-font-sans-serif: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
--bs-font-monospace: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-root-font-size: 16px;
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 0.9375rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.53;
--bs-body-color: #EC7063;
--bs-body-bg: #E5E8E8 ;
}

*,
*::before,
*::after {
box-sizing: border-box;
}

:root {
font-size: var(--bs-root-font-size);
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}

body {
margin: 0px;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(67, 89, 113, 0);
}

hr {
margin: 1rem 0;
color: #d9dee3;
background-color: currentColor;
border: 0;
opacity: 1;
}

hr:not([size]) {
height: 1px;
}

h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
margin-top: 0;
margin-bottom: 1rem;
font-weight: 500;
line-height: 1.1;
color: #566a7f;
}

h1, .h1 {
font-size: calc(1.3625rem + 1.35vw);
text-align: center;
}
@media (min-width: 1200px) {
h1, .h1 {
font-size: 2.375rem;
}
}

h2, .h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2, .h2 {
font-size: 2rem;
margin-left: 10px;
}
}

h3, .h3 {
font-size: calc(1.2875rem + 0.45vw);
}
@media (min-width: 1200px) {
h3, .h3 {
font-size: 1.625rem;
}
}

h4, .h4 {
font-size: calc(1.2625rem + 0.15vw);
}
@media (min-width: 1200px) {
h4, .h4 {
font-size: 1.375rem;
}
}

h5, .h5 {
font-size: 1.125rem;
}

h6, .h6 {
font-size: 0.9375rem;
}

p {
margin-top: 0;
margin-bottom: 1rem;
}
div.card {
margin-left: 10px;
margin-right: 10px;
position: relative;
display: flex;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #fff;
background-clip: border-box;
border: 0 solid #d9dee3;
border-radius: 10px !important;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
div.header{

position: relative;
display: flex;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #fff;
background-clip: border-box;
border: 0 solid #d9dee3;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
9 changes: 9 additions & 0 deletions assets/stylesheets.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
body {
font-size: 1.5em; /* currently ems cause chrome bug misinterpreting rems on body element */
line-height: 1.6;
font-weight: 400;
font-family: "Open Sans", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
background-color: rgb(33, 31, 31) !important;
color: rgb(17, 14, 8);
}

9 changes: 5 additions & 4 deletions dashboard/utils/signin.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import requests
# from dotenv import load_dotenv
# load_dotenv()
from dotenv import load_dotenv
load_dotenv()

BASE_URL = "https://ubaformapi-qyaec74aq-fastapis-build.vercel.app"
BASE_URL = "https://ubaformapi.vercel.app"


def get_access_token(data):

url = BASE_URL + '/login'
url = BASE_URL + '/auth/login'
headers = {
"accept": "application/json",
}
response = requests.post(url, params=data, headers=headers)

access_token = response.json()['access_token']
return access_token

Expand Down
Loading