Updated buttons
This commit is contained in:
parent
3e89d1f4b6
commit
d5c5f2838f
68
.cursorrules
Normal file
68
.cursorrules
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
"version": 1,
|
||||
"rules": [
|
||||
{
|
||||
"name": "Server Code",
|
||||
"pattern": "server.js",
|
||||
"description": "Main Express.js server file containing API endpoints and server configuration"
|
||||
},
|
||||
{
|
||||
"name": "Frontend Views",
|
||||
"pattern": "views/*.html",
|
||||
"description": "HTML templates for the application views"
|
||||
},
|
||||
{
|
||||
"name": "Static Assets",
|
||||
"pattern": "public/**/*",
|
||||
"description": "Static assets including JavaScript, CSS, and images"
|
||||
},
|
||||
{
|
||||
"name": "Client-side JavaScript",
|
||||
"pattern": "public/*.js",
|
||||
"description": "Client-side JavaScript files for frontend functionality"
|
||||
},
|
||||
{
|
||||
"name": "Database",
|
||||
"pattern": "db/**/*",
|
||||
"description": "SQLite database files and related resources"
|
||||
},
|
||||
{
|
||||
"name": "Node Modules",
|
||||
"pattern": "node_modules/**/*",
|
||||
"description": "Third-party dependencies",
|
||||
"ignore": true
|
||||
},
|
||||
{
|
||||
"name": "Package Configuration",
|
||||
"pattern": "package*.json",
|
||||
"description": "NPM package configuration files"
|
||||
},
|
||||
{
|
||||
"name": "Git Files",
|
||||
"pattern": ".git/**/*",
|
||||
"description": "Git repository files",
|
||||
"ignore": true
|
||||
},
|
||||
{
|
||||
"name": "System Files",
|
||||
"pattern": "**/.DS_Store",
|
||||
"description": "macOS system files",
|
||||
"ignore": true
|
||||
}
|
||||
],
|
||||
"fileAssociations": {
|
||||
".js": "javascript",
|
||||
".html": "html",
|
||||
".css": "css",
|
||||
".json": "json",
|
||||
".md": "markdown"
|
||||
},
|
||||
"search": {
|
||||
"excludePatterns": [
|
||||
"node_modules/**/*",
|
||||
".git/**/*",
|
||||
"**/.DS_Store",
|
||||
"db/*.db"
|
||||
]
|
||||
}
|
||||
}
|
BIN
db/freesched.db
BIN
db/freesched.db
Binary file not shown.
@ -1434,7 +1434,35 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
selectedAdminDate = null; // Clear selected date
|
||||
selectedDateDisplay.textContent = '';
|
||||
timeSlots.innerHTML = ''; // Clear time slots
|
||||
|
||||
// Re-render the calendar
|
||||
await renderAdminCalendar(currentAdminMonth, currentAdminYear);
|
||||
|
||||
// If a date was previously selected in the calendar, update the time slots UI
|
||||
const selectedDateElement = document.querySelector('#adminCalendarDates .date-item.selected');
|
||||
if (selectedDateElement) {
|
||||
const day = parseInt(selectedDateElement.textContent);
|
||||
selectedAdminDate = new Date(currentAdminYear, currentAdminMonth, day);
|
||||
await updateTimeSlots(selectedAdminDate);
|
||||
} else {
|
||||
// If no date was selected, select today's date if it's in the current month
|
||||
const today = new Date();
|
||||
if (today.getMonth() === currentAdminMonth && today.getFullYear() === currentAdminYear) {
|
||||
selectedAdminDate = today;
|
||||
await updateTimeSlots(today);
|
||||
|
||||
// Find and highlight today in the calendar
|
||||
const dateItems = document.querySelectorAll('#adminCalendarDates .date-item');
|
||||
const todayDay = today.getDate();
|
||||
const todayElement = Array.from(dateItems).find(item => {
|
||||
return item.textContent && parseInt(item.textContent) === todayDay;
|
||||
});
|
||||
|
||||
if (todayElement) {
|
||||
todayElement.classList.add('selected');
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error deleting availability:', error);
|
||||
alert('Failed to delete availability. Please try again.');
|
||||
|
@ -63,7 +63,6 @@
|
||||
width: 70%;
|
||||
padding: 20px;
|
||||
position: relative;
|
||||
min-height: 600px; /* Ensure minimum height for the content area */
|
||||
}
|
||||
|
||||
.calendar-header h1 {
|
||||
@ -156,9 +155,9 @@
|
||||
|
||||
.time-slots .text-muted {
|
||||
color: #6c757d; /* Muted text color, matching Calendly */
|
||||
font-size: 1rem; /* Slightly larger font, e.g., 20px instead of 16px */
|
||||
font-size: rem; /* Slightly larger font, e.g., 20px instead of 16px */
|
||||
font-weight: bold; /* Bold text */
|
||||
padding: 1rem 0;
|
||||
padding: 2.2rem 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@ -171,34 +170,91 @@
|
||||
.timezone {
|
||||
font-size: 0.875rem;
|
||||
color: #666;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#timezone {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.powered-by {
|
||||
font-size: 0.75rem;
|
||||
color: #666;
|
||||
text-align: right;
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
opacity: 0.8;
|
||||
transition: opacity 0.3s ease;
|
||||
z-index: 1;
|
||||
z-index: 10;
|
||||
background-color: transparent;
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
margin-left: auto; /* Push to the right */
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.powered-by.text-end {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.powered-by a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.powered-by a.github-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
background-color: #e9e9e9;
|
||||
color: #333;
|
||||
padding: 8px 12px;
|
||||
border-radius: 20px;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.octocat-icon {
|
||||
margin-right: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.octocat-icon svg {
|
||||
fill: #333;
|
||||
}
|
||||
|
||||
.powered-by:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Admin-specific powered-by styling */
|
||||
.admin-powered-by {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* Index-specific powered-by styling */
|
||||
.index-powered-by {
|
||||
text-align: right;
|
||||
margin-top: 0;
|
||||
margin-left: auto;
|
||||
display: inline-flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Add clearance for elements with flex classes */
|
||||
.d-flex.flex-column.gap-2.mt-3 {
|
||||
margin-bottom: 50px; /* Increased margin to ensure these elements don't overlap with the powered-by button */
|
||||
}
|
||||
|
||||
/* Admin-specific styles */
|
||||
#admin .calendar {
|
||||
margin-bottom: 20px;
|
||||
@ -247,6 +303,22 @@
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.admin-powered-by {
|
||||
position: relative;
|
||||
bottom: auto;
|
||||
right: auto;
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.index-powered-by {
|
||||
position: relative;
|
||||
text-align: right;
|
||||
margin-left: auto;
|
||||
display: inline-flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
/* Sidebar buttons styling */
|
||||
@ -301,4 +373,8 @@
|
||||
background-color: #0099cc;
|
||||
border-color: #0099cc;
|
||||
box-shadow: 0 0 15px rgba(0, 191, 255, 0.7); /* Enhanced glow on hover */
|
||||
}
|
||||
|
||||
.time-slots {
|
||||
margin-bottom: 50px; /* Increased margin to ensure time slots don't overlap with the powered-by button */
|
||||
}
|
@ -22,10 +22,10 @@
|
||||
<p class="text-muted fs-6">30 min</p>
|
||||
|
||||
<div class="d-grid gap-3 w-100 mt-4">
|
||||
<button class="btn btn-success btn-lg rounded-pill fw-medium px-3 py-2" id="createUid" style="height: 50px; font-size: 1rem;">Create</button>
|
||||
<button class="btn btn-warning btn-lg rounded-pill fw-medium px-3 py-2" id="flushDatabase" disabled style="height: 50px; font-size: 1rem;">Clear</button>
|
||||
<button class="btn btn-danger btn-lg rounded-pill fw-medium px-3 py-2" id="deleteUid" disabled style="height: 50px; font-size: 1rem;">Delete</button>
|
||||
<button class="btn btn-info btn-lg rounded-pill fw-medium px-3 py-2" id="devToolsBtn" style="height: 50px; font-size: 1rem;">Dev Tools</button>
|
||||
<button class="btn btn-success btn-lg rounded-pill fw-medium px-3 py-2" id="createUid" style="height: 50px; font-size: 1rem;"><i class="bi bi-plus-circle me-2"></i>Create</button>
|
||||
<button class="btn btn-warning btn-lg rounded-pill fw-medium px-3 py-2" id="flushDatabase" disabled style="height: 50px; font-size: 1rem;"><i class="bi bi-eraser me-2"></i>Clear</button>
|
||||
<button class="btn btn-danger btn-lg rounded-pill fw-medium px-3 py-2" id="deleteUid" disabled style="height: 50px; font-size: 1rem;"><i class="bi bi-x-circle me-2"></i>Delete</button>
|
||||
<button class="btn btn-info btn-lg rounded-pill fw-medium px-3 py-2" id="devToolsBtn" style="height: 50px; font-size: 1rem;"><i class="bi bi-gear me-2"></i>Dev Tools</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -79,8 +79,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="powered-by">
|
||||
<a href="https://github.com/moeny/freesched" target="_blank" class="text-decoration-none text-muted">Powered by FreeSched</a>
|
||||
<div class="powered-by admin-powered-by">
|
||||
<a href="https://github.com/moeny/freesched" target="_blank" class="text-decoration-none text-muted github-link">
|
||||
<svg class="octocat-icon" height="16" viewBox="0 0 16 16" width="16" aria-hidden="true">
|
||||
<path fill="currentColor" d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>
|
||||
</svg>
|
||||
Powered by FreeSched
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -53,9 +53,16 @@
|
||||
<div id="timeSlots" class="time-slots mb-4">
|
||||
<!-- Time slots will be dynamically populated by JavaScript -->
|
||||
</div>
|
||||
<p id="timezone" class="text-muted fs-6 mb-3">Eastern Time - US & Canada (<span id="currentTime"></span>)</p>
|
||||
<div class="powered-by text-muted fs-7 text-end">
|
||||
<a href="https://github.com/moeny/freesched" target="_blank" class="text-decoration-none text-muted">Powered by FreeSched</a>
|
||||
<div id="timezone" class="text-muted fs-6 mb-3 d-flex justify-content-between align-items-center">
|
||||
<span>Eastern Time - US & Canada (<span id="currentTime"></span>)</span>
|
||||
<span class="powered-by text-muted fs-7 text-end index-powered-by">
|
||||
<a href="https://github.com/moeny/freesched" target="_blank" class="text-decoration-none text-muted github-link">
|
||||
<svg class="octocat-icon" height="16" viewBox="0 0 16 16" width="16" aria-hidden="true">
|
||||
<path fill="currentColor" d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>
|
||||
</svg>
|
||||
Powered by FreeSched
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user