Skip to content

Commit

Permalink
Merge pull request #110 from GTZ-STUDIO/develop
Browse files Browse the repository at this point in the history
Update dependency downloads in AzureDeployBackend.yml
  • Loading branch information
Verzaccii committed Mar 27, 2024
2 parents d6dc67a + a529242 commit b378f05
Show file tree
Hide file tree
Showing 13 changed files with 117 additions and 95 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/AzureDeployBackend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
run: |
cd lvlgg_backend
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install -r requirements.txt
python -m pip install django-cors-headers
python -m pip install djangorestframework
- name: Collect static files
run: |
Expand Down
2 changes: 1 addition & 1 deletion lvlgg_backend/Dockerfile.backend
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ WORKDIR /LvlUp.gg/lvlgg_backend

# Copy requirements file and install dependencies
COPY requirements.txt .
RUN /bin/sh -c pip install --no-cache-dir -r requirements.txt
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install djangorestframework
RUN pip install django-cors-headers

Expand Down
2 changes: 1 addition & 1 deletion lvlgg_backend/blog/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def test_getReccomended(self):
self.assertIn('blogs', data)
# Get the list of blogs from the response
blogs = data['blogs']
self.assertEqual( len(blogs), 2)
self.assertEqual( len(blogs), 5)

class reccomended_no_user(TestCase):

Expand Down
11 changes: 10 additions & 1 deletion lvlgg_backend/blog/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def get(self, request):

#Reccomended Blogs
queryset = Blog.objects.none() #Get an empty query set
size = 10
size = 5

if request.user.is_authenticated:
client = request.user
Expand All @@ -207,10 +207,19 @@ def get(self, request):
recommended_blogs_list = list( (recommended_blogs.order_by('-date_posted')[:remaining]).values('id', 'title', 'game') )
friend_blogs_list = list(Blog.objects.filter(author__in=friend_pks).order_by('-date_posted').values('id', 'title', 'game'))
queryset = friend_blogs_list + recommended_blogs_list
remaining = size - len(queryset)

else:
queryset = friend_blogs.order_by('-date_posted')[:10]
queryset = list(queryset.values('id', 'title', 'game'))
remaining = 0

if ( remaining > 0):
extraqueryset = Blog.objects.all()
extraqueryset = extraqueryset.order_by('-likes')[:remaining]
extraqueryset = list(extraqueryset.values('id', 'title', 'game'))
queryset = queryset + extraqueryset


return JsonResponse({'blogs': queryset}, status=200)

Expand Down
Binary file modified lvlgg_backend/requirements.txt
Binary file not shown.
70 changes: 33 additions & 37 deletions lvlgg_frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@
margin-top: 50px;
margin-right: 100px;
font-size: 14px;
background-color: #054453;
background-color: transparent;
box-shadow: 0 6px 20px rgb(95, 238, 243);
-webkit-filter: drop-shadow(0 6px 10px rgba(56, 125, 255, 0.017));
filter: drop-shadow(0 6px 10px rgba(56, 125, 255, 0.017));
color: #fff;
border: none;
border-radius: 5px;
Expand All @@ -106,14 +109,15 @@
left: 70px;
font-family: OCR A Std, monospace;
color: #fff;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
text-shadow: 2px 2px 4px rgba(107, 227, 243, 0.5);
}

.guide-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
max-width: 1200px;
width: 70%;
align-items: flex-start;
list-style: none;
padding: 0;
Expand All @@ -124,33 +128,30 @@
}

.guide-title {
padding: 10px 68px;
background-color: #073652;
padding: 10px 70px;
background-color: transparent;
color: #fff;
border-radius: 3px;
font-family: OCR A Std, monospace;
font-size: 12px;
font-size: 11px;
transition: background-color 0.3s;
}

.guide-title:hover {
background-color: #0056b3;
}

.guide-item {
width: 200px;
height: 250px;
position: relative;
width: 10vw;
height: 21vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
margin-right: 20px;
margin-bottom: 20px;
margin-bottom: 10px;
cursor: pointer;
border-radius: 5px;
overflow: hidden;
position: relative;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add box shadow */
box-shadow: 0 6px 20px rgb(95, 238, 243);
-webkit-filter: drop-shadow(0 6px 10px rgba(56, 125, 255, 0.017));
filter: drop-shadow(0 6px 10px rgba(56, 125, 255, 0.017));
transition: transform 0.3s;
}

Expand Down Expand Up @@ -552,46 +553,41 @@

/* social.css */
.social {
position: relative;
width: 100vw;
height: 98vh;
background-color: #020913;
display: flex;
flex-direction: column;
align-items: center;
background-size: cover;
background-color: #020913;
height: 98vh;
width: 100%;
}

.social .form-container {
width: 300px;
margin-top: 10vh;
.form-container {
margin-top: 20vh;
}

.social form {
display: flex;
flex-direction: column;
align-items: center;
font-family: OCR A Std, monospace;
}

.social input[type='text'],
.social button {
margin-top: 11vh;
padding: 5px 10px;
width: 100%;
box-sizing: border-box;
.social input[type='text'] {
padding: 10px;
width: 300px;
border: 1px solid #ccc;
}

.social button {
margin-top: 0px;
padding: 8px 16px;
background-color: #021125d3;
color: white;
.social button[type='submit'] {
padding: 10px 20px;
background-color: #0e94e2; /* dark blue */
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
}

.social button:hover {
background-color: #353535;
.social button[type='submit']:hover {
background-color: #041d1f; /* bright turquoise */
}


Expand Down
17 changes: 13 additions & 4 deletions lvlgg_frontend/src/Components/Cards.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
flex-flow: column;
align-items: center;
max-width: 1320px;
width: 70%;
width: 60%;
margin: 0 auto;
}

.cards__container h1 {
.cards h2 {
position: relative;
font-size: 13px;
margin-right: 60vw;
font-size: 14px;
margin-left: 23.5vw;
color: white;
font-family: OCR A Std, monospace;
z-index: 1000;
Expand All @@ -26,6 +26,15 @@
margin: 60px 0 45px;
}

.cards__wrapper h1 {
position: relative;
font-size: 14px;
margin-left: 1vw;
color: white;
font-family: OCR A Std, monospace;
z-index: 1000;
}

.cards__items {
margin-bottom: 24px;
}
Expand Down
3 changes: 2 additions & 1 deletion lvlgg_frontend/src/Components/Cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ function Cards() {
return (
<div className='cards'>
<div className='cards__container'>
<h1>View Games</h1>
<div className='cards__wrapper'>
<h1>View Games</h1>
<ul className='cards__items'>
<CardItem
src='images/eldenRing.png'
Expand Down Expand Up @@ -37,6 +37,7 @@ function Cards() {
</ul>
</div>
</div>
<h2>Recommended Games</h2>
</div>
);
}
Expand Down
69 changes: 37 additions & 32 deletions lvlgg_frontend/src/Components/FriendsList.css
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
.friends-list {
position: relative;
background-color: #021125d3;
align-items: center;
margin-top: 20px;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
margin-top: 3vh;
width: 16%;
}

.friends-list h2 {
color: white;
border: 1px solid #ccc;
border-radius: 5px;
background-color: #020913; /* dark blue */
box-shadow: 0 6px 20px rgb(4, 224, 231);
-webkit-filter: drop-shadow(0 6px 20px rgba(56, 125, 255, 0.017));
filter: drop-shadow(0 6px 20px rgba(56, 125, 255, 0.017));
color: #fff;
width: 400px;
font-family: OCR A Std, monospace;
text-align: center;
}

.friends-list h2 {
margin-bottom: 10px;
}

.friends-list input[type='text'] {
padding: 5px;
margin-bottom: 10px;
}

.friends-list input {
margin-bottom: 300px;
padding: 8px;
box-sizing: border-box;
width: 30%;
height: 5%;
width: 100%;
border: 1px solid #ccc;
border-radius: 5px;
}

.friend-item {
background-color: #fff;
text-align: center;
padding: 10px;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

ul {
list-style-type: none;
padding: 0;
margin: 0;
}

.friend-item {
padding: 5px 10px;
border-bottom: 1px solid #ccc;
}

.friend-item:last-child {
border-bottom: none;
}

.friend-item:hover {
cursor: pointer;
}

.friend-item:hover {
background-color: #f0f0f0;
}
}
17 changes: 9 additions & 8 deletions lvlgg_frontend/src/Components/Navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,20 @@

.profile-icon {
position: relative;
width: 30px; /* Adjust size as needed */
height: 30px; /* Adjust size as needed */
border-radius: 90%; /* To make it round */
width: 30px;
height: 30px;
border-radius: 90%;
}

.profile-icon img {
width: 100%;
height: 100%;
object-fit: cover; /* Maintain aspect ratio and fill container */
object-fit: cover;
}

.profile-icon:hover {
border: 2px solid #06ebcc; /* Add a border around the profile icon */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Add a shadow effect */
border: 2px solid #06ebcc;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.dropdown {
Expand All @@ -108,6 +108,7 @@
top: 100%;
right: -40px;
background-color: #020913;
border-radius: 3px;
min-width: 160px;
z-index: 50;
}
Expand All @@ -120,7 +121,7 @@
border: none;
outline: none;
cursor: pointer;
color: #02f2ff;
color: #ffffff;
}

.dropdown-content button:hover {
Expand All @@ -131,7 +132,7 @@
position: relative;
top: 2px;
right: -150px;
color: #17faef;
color: #ffffff;
font-size: 16px;
font-weight: bold;
}
Expand Down
2 changes: 1 addition & 1 deletion lvlgg_frontend/src/Components/Pages/Social.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function Social() {
<form onSubmit={handleFormSubmit}>
<input
type='text'
placeholder='Enter username'
placeholder='Search for a user to follow'
value={username}
onChange={handleInputChange}
/>
Expand Down
2 changes: 1 addition & 1 deletion lvlgg_frontend/src/Components/RecommendedGuides.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const RecommendedGuides = () => {
}, []);

return (
<div style={{position: 'relative', marginLeft: '20vw'} }>
<div style={{position: 'relative', marginLeft: '23.5vw'} }>
<h1 style={{ fontSize: '14px', position: 'absolute', top: '0', left: '0', }}>Recommended Guides</h1>
<ul className='guide-list'>
{recommendedGuides.slice(0, 5).map((blog) => (
Expand Down
Loading

0 comments on commit b378f05

Please sign in to comment.