-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from cse110-sp24-group31/add-project-view
Add project view
- Loading branch information
Showing
5 changed files
with
344 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
/* COLOR THEMES */ | ||
:root { | ||
--background-color: #ffdaca; | ||
--content-color: #588b8b; | ||
--accomp-color: #FFA343; | ||
--bar-color: #c8553d; | ||
--card-color: #ffffffeb; | ||
--cal-color: #65c9c9be; | ||
} | ||
|
||
|
||
/* ENTIRE PAGE SELECTORS */ | ||
body, html { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
height: 100%; | ||
font-family: Arial, sans-serif; /* temporary */ | ||
background-color: var(--background-color); | ||
min-height: 500px; | ||
} | ||
|
||
|
||
|
||
/* NAV AND BOTTOM TAB SELECTORS */ | ||
.main-nav, .bottom-tab { | ||
background-color: var(--bar-color); | ||
padding: 20px 0; | ||
width: 100%; | ||
} | ||
|
||
|
||
/* MAIN SECTION SELECTORS */ | ||
.card { | ||
cursor: pointer; | ||
display: flex; | ||
height: 300px; | ||
width: 200px; | ||
border-radius: 8px; | ||
background-color: var(--card-color); | ||
transition: box-shadow 0.3s; | ||
} | ||
|
||
.card:hover { | ||
box-shadow: 0 5px 15px rgba(0,0,0,0.3); | ||
} | ||
|
||
.main { | ||
display: flex; | ||
width: 100%; | ||
height: calc(100% - 80px); | ||
} | ||
|
||
.project-cards, .sidebar-sec { | ||
border-radius: 8px; /* Rounded corners */ | ||
} | ||
|
||
.project-cards { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: flex-start; | ||
align-items: flex-start; | ||
gap: 25px; | ||
padding: 30px; | ||
background-color: var(--content-color); | ||
flex-grow: 1; | ||
margin: 30px 15px 30px 30px; | ||
} | ||
|
||
.sidebar { | ||
width: 380px; /* Fixed width for the sidebar */ | ||
display: flex; | ||
height: calc(100% - 60px); | ||
flex-direction: column; | ||
margin: 30px 30px 30px 15px; | ||
} | ||
|
||
|
||
.calendar { | ||
margin-bottom: 15px; | ||
background-color: var(--cal-color); /* Light grey for visibility */ | ||
height: 283px; | ||
flex-direction: column; | ||
} | ||
|
||
.cal-header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 10px; | ||
} | ||
|
||
.monthYear { | ||
text-align: center; | ||
font-weight: 600; | ||
width: 150px; | ||
} | ||
|
||
.cal-header button { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
border: none; | ||
border-radius: 50%; | ||
background: #fff; | ||
cursor: pointer; | ||
width: 30px; | ||
height: 30px; | ||
box-shadow: 0 0 4px rgba(0,0,0,0.2); | ||
} | ||
|
||
.days { | ||
display: grid; | ||
grid-template-columns: repeat(7,1fr); | ||
} | ||
|
||
|
||
.day { | ||
text-align: center; | ||
padding: 5px; | ||
font-weight: 600; | ||
} | ||
|
||
.dates { | ||
display: grid; | ||
grid-template-columns: repeat(7, 1fr); | ||
gap: 1px; | ||
} | ||
|
||
.date { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
text-align: center; | ||
padding: 4px; | ||
margin: auto; | ||
cursor: pointer; | ||
font-weight: 400; | ||
border-radius: 50%; | ||
width: 30px; | ||
height: 30px; | ||
transition: 0.2s; | ||
} | ||
|
||
.date:hover, .date:active { | ||
background: #ff5869; | ||
color: #fff; | ||
} | ||
|
||
.date.inactive { | ||
color: #d2d2d2; | ||
} | ||
|
||
.date.inactive:hover { | ||
color: #fff; | ||
} | ||
|
||
.accomplishments { | ||
background-color: var(--accomp-color); /* Slightly different grey for distinction */ | ||
margin-top: 15px; | ||
flex-grow: 1; | ||
} | ||
|
||
|
||
/* MEDIA QUERY FOR MOBILE DEVICES */ | ||
@media (max-width: 837px) { | ||
.main { | ||
flex-direction: column; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.modal { | ||
display: none; | ||
position: fixed; | ||
z-index: 2; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
overflow: auto; | ||
background-color: rgba(0,0,0,0.4);; /* Black with opacity for blur effect */ | ||
backdrop-filter: blur(8px); | ||
} | ||
|
||
.modal-content { | ||
background-color: #fff; /* White background */ | ||
margin: 10% auto; /* 10% from the top and centered horizontally */ | ||
padding: 20px; | ||
border: 1px solid #888; | ||
width: 50%; /* Smaller width to keep it well-sized */ | ||
border-radius: 10px; /* Rounded edges */ | ||
box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Soft shadow for 3D effect */ | ||
position: relative; /* Needed for absolute positioning of close button */ | ||
height: 65%; | ||
} | ||
|
||
.close { | ||
color: #aaa; | ||
position: absolute; | ||
right: 10px; | ||
top: 5px; | ||
font-size: 24px; | ||
font-weight: bold; | ||
cursor: pointer; | ||
} | ||
|
||
.close:hover, | ||
.close:focus { | ||
color: black; | ||
text-decoration: none; | ||
} | ||
|
||
/* Ensure the modal content is scrollable if the content exceeds the viewport */ | ||
.modal-content { | ||
overflow: auto; | ||
max-height: 80%; /* Limit the height to ensure it stays within the viewport */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
const monthYearElement = document.getElementById('monthYear'); | ||
const datesElement = document.getElementById('dates'); | ||
const prevBttn = document.getElementById('cal-prev'); | ||
const nextBttn = document.getElementById('cal-next'); | ||
|
||
let currentDate = new Date(); | ||
|
||
const updateCalendar = () => { | ||
const currentYear = currentDate.getFullYear(); | ||
const currentMonth = currentDate.getMonth(); | ||
|
||
const firstDay = new Date(currentYear, currentMonth, 0); | ||
const lastDay = new Date(currentYear, currentMonth + 1, 0); | ||
const totalDays = lastDay.getDate(); | ||
const firstDayIndex = firstDay.getDay(); | ||
const lastDayIndex = lastDay.getDay(); | ||
|
||
const monthYearString = currentDate.toLocaleString('default', {month: 'long', year: 'numeric'}); | ||
monthYearElement.textContent = monthYearString; | ||
|
||
let datesHTML = ''; | ||
|
||
for (let i = firstDayIndex; i > 0; i--) { | ||
const prevDate = new Date(currentYear, currentMonth, 0 - i + 1); | ||
datesHTML += `<div class="date inactive">${prevDate.getDate()}</div>`; | ||
} | ||
|
||
for (let i = 1; i <= totalDays; i++) { | ||
const date = new Date(currentYear, currentMonth, i); | ||
const activeClass = date.toDateString() === new Date(). | ||
toDateString() ? 'active' : ''; | ||
datesHTML += `<div class="date ${activeClass}">${i}</div>`; | ||
} | ||
|
||
for (let i = 1; i <= 7 - lastDayIndex; i++) { | ||
const nextDate = new Date(currentYear, currentMonth + 1, i); | ||
datesHTML += `<div class="date inactive">${nextDate.getDate()}</div>`; | ||
} | ||
|
||
datesElement.innerHTML = datesHTML; | ||
} | ||
prevBttn.addEventListener('click', () => { | ||
currentDate.setMonth(currentDate.getMonth() - 1); | ||
updateCalendar(); | ||
}) | ||
|
||
nextBttn.addEventListener('click', () => { | ||
currentDate.setMonth(currentDate.getMonth() + 1); | ||
updateCalendar(); | ||
}) | ||
|
||
updateCalendar(); |
Oops, something went wrong.