Skip to content

Commit

Permalink
Merge pull request #22 from landog893/rlgaddy-webpages
Browse files Browse the repository at this point in the history
Rlgaddy webpages
  • Loading branch information
smarota17 authored Dec 1, 2022
2 parents 5f022e6 + ebece2e commit 3e8751b
Show file tree
Hide file tree
Showing 18 changed files with 650 additions and 60 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__/
5 changes: 5 additions & 0 deletions src/.streamlit/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[theme]
primaryColor="#C00000"
backgroundColor="#FFFFFF"
secondaryBackgroundColor="#F0F2F6"
textColor="#31333F"
17 changes: 17 additions & 0 deletions src/PATHS.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
NAVBAR_PATHS = {
'HOME':'home',
'WISHLIST': 'wishlist',
'FRIENDLIST': 'friendlist'
}

FOOTER_PATHS = {
# 'GitHub Repository':'https://github.com/landog893/Gifter-2',
'Code of Conduct': 'https://github.com/landog893/Gifter-2/blob/main/CODE_OF_CONDUCT.md',
'MIT License': 'https://github.com/landog893/Gifter-2/blob/main/LICENSE',
"Made with Streamlit": 'https://streamlit.io/'
}

SETTINGS = {
'PROFILE':'profile',
'LOGOUT':'logout'
}
Binary file added src/__pycache__/PATHS.cpython-39.pyc
Binary file not shown.
Binary file modified src/__pycache__/account.cpython-39.pyc
Binary file not shown.
Binary file modified src/__pycache__/account_info.cpython-39.pyc
Binary file not shown.
Binary file modified src/__pycache__/item.cpython-39.pyc
Binary file not shown.
Binary file modified src/__pycache__/item_manager.cpython-39.pyc
Binary file not shown.
Binary file added src/__pycache__/utils.cpython-39.pyc
Binary file not shown.
27 changes: 27 additions & 0 deletions src/account_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,33 @@ def get_friendlist(self, ID):
result_dict = result.values
return result_dict[0][6]

def find_id(self, ID) :
query = """Select "Name","Surname","Birthday","UserName","Password","Interests","WishList","FriendList"
From "Account" WHERE "ID" = %s;"""
conn = None
user_info = None
try:
# initializing connection
params = config()
print('Connecting to the PostgreSQL database...')
conn = psycopg2.connect(**params)
cur = conn.cursor()
# execute a statement
cur.execute(query, (ID,))
user_info = cur.fetchall()
cur.close()
conn.commit()
cur.close()

except (Exception, psycopg2.DatabaseError) as error:
print(error)
finally:
if conn is not None:
conn.close()
print('Database connection closed.')

return user_info[0].ID if user_info else 0


class Friends(AccountInfo):
def __init__(self):
Expand Down
Binary file added src/assets/images/gift-flat.ico
Binary file not shown.
Binary file added src/assets/images/gift-flat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/github-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
289 changes: 289 additions & 0 deletions src/assets/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,289 @@
.navbar{
font-family: 'Trebuchet MS', sans-serif;
position: fixed;
width: 100%;
background: #C00000;
z-index: 99999999999999999999;
left: 0rem;
top: 0rem;
height: 55px;
padding-left: 4rem;
}


.navitem{
float: left;
display: block;
color: #f2f2f2 !important;
text-align: center;
padding: 17px 20px;
text-decoration: none !important;
border-bottom: 2px solid transparent;
font-size: 14px;
font-family: 'Trebuchet MS', sans-serif;
}

.navitem:hover{
background-color: rgba(221, 221, 221, 0.233);
height: 55px !important;

}


.settings{
height:1rem;
}

.version-span{
color: white;
position: absolute;
right: 1rem;
bottom: 1.75rem;
opacity: 0.5;
z-index: 9999;
border: 2px solid #333;
border-radius: 25px;
padding-right: 0.5rem;
padding-left: 0.5rem;
background: #333;
}

.dropbtn {
background-color: transparent;
color: white;
padding: 10px;
font-size: 16px;
height: 55px;
opacity: 0.5;
filter: invert(1);
cursor: pointer;
transition: 0.3s;
display: inline-block;
margin: 0;
}

.dropbtn:hover, .dropbtn:focus, .dropdown:hover .dropbtn {
opacity:1;
}

.dropdown {
position: fixed;
display: block;
right: 0rem;
top: 0rem;
padding-left: 0.7rem;
user-select: none;
padding-right: 10px;
}

.dropdown-content {
visibility: hidden;
position: fixed;
border-radius: 9px;
background-color: #C00000;
min-width: 160px;
overflow: auto;
right:0.3rem;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}

.dropdown-content a {
color: white;
padding: 12px 16px;
text-decoration: none;
display: block;
}

.dropdown:hover{
background-color: rgba(221, 221, 221, 0.233);
background: rgba(221, 221, 221, 0.233);
}

.dropdown a:hover {background-color: rgba(221, 221, 221, 0.233);}

iframe{
height: 0rem;
}

.stTabs {
display: none;
}

.navName {
display: inline-block;
color: #f2f2f2 !important;
text-align: center;
text-decoration: none !important;
border-bottom: 2px solid transparent;
font-size: 14px;
font-family: 'Trebuchet MS', sans-serif;
position: static;
right: 4rem;
margin: 0;

}

.hide {
display: none !important;
}

.footer{
font-family: 'Trebuchet MS', sans-serif;
position: relative;
width: 100%;
background: #ededed;
z-index: 99999999999999999999;
left: 0rem;
bottom: 0rem;
height: 70px;
/* padding-left: 4rem; */

}

.footerlist {
position: absolute;
width: 100%;
text-align: center;
background-color: #ededed;
}

.footeritem{
/* float: left; */
/* display: block; */
display: inline-block;
color: #000 !important;
text-align: center;
margin: 17px 20px;
text-decoration: none !important;
border-bottom: 2px solid transparent;
font-size: 14px;
font-family: 'Trebuchet MS', sans-serif;
filter: invert(.2);
}

.footeritem:hover{
filter: invert(.4);
}

footer:last-child {
display: none;
}

.gitHub {
display: inline-block;
width: 30px;
margin-top: -4px;
filter: invert(.2);

}

.block-container {
padding-top: 0 !important;
padding-bottom: 0 !important;
}

[data-testid="stHeader"] {
display: none;
}

[data-testid="stVerticalBlock"] > :nth-child(7) iframe {
height: unset;
}

blockquote {
color: rgb(49, 51, 63);
font-family: "Source Sans Pro", sans-serif;
font-weight: bold;
font-size: 1.5rem;
margin: 0;
border: none;
}

blockquote footer {
display: block !important;
text-align: right;
margin-top: 1rem;
}

blockquote footer:before {
content: "-";
}

.buttonDiv {
margin: 20px 0;
}

.block-container > div > [data-testid="stVerticalBlock"] {
display: block;
}

.block-container {
margin-top: 55px;
}

.show {
display: block !important;
background: pink !important;
}

button[kind="primary"], button[kind="formSubmit"]{
background-color: #C00000;
color: white;
}

button[kind="primary"]:hover, button[kind="formSubmit"]:hover{
background-color: #c00000a3;
color: white;
}

button[kind="primary"]:active, button[kind="formSubmit"]:active {
background-color: #c00000a3;
color: white;
}

.horizontalDiv {
width: unset !important;
display: inline-block;
}

.initial h2 {
text-align: center;
margin-bottom: 50px;
font-size: 3rem;
}

.initial .buttonDiv {
text-align: center;
}

.createaccount [data-testid="stVerticalBlock"] {
display: block;
}

.createaccount [data-testid="stVerticalBlock"] > div {
margin: 10px 0;
}

.createaccount [data-testid="stVerticalBlock"] > .horizontalDiv:last-child {
float: right;
margin-right: 10px;
}

.account .stMarkdown [data-testid="stMarkdownContainer"] > p {
margin-bottom: 3rem;
font-size: 20px;
margin-top: 1rem;
}

.wishlist [data-testid="stVerticalBlock"] {
display: block;
}

.wishlist .horizontalDiv {
margin-right: 25px;
}

.friendlist .horizontalDiv {
margin-right: 25px;
}
Loading

0 comments on commit 3e8751b

Please sign in to comment.