- Implemented email settings configuration in the admin panel, allowing for SMTP settings and notification preferences. - Created a new template for email settings with fields for SMTP host, port, username, password, sender address, and recipients. - Added JavaScript functionality to handle loading, saving, and validating email settings. - Introduced email templates management, enabling the listing, editing, and saving of email templates. - Updated navigation to include links to email settings and templates. - Added tests for email settings and templates to ensure proper functionality and validation.
389 lines
6.2 KiB
CSS
389 lines
6.2 KiB
CSS
/* Navigation links */
|
|
nav a {
|
|
color: #007bff;
|
|
text-decoration: none;
|
|
margin-right: 20px;
|
|
}
|
|
nav a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.nav {
|
|
margin-bottom: 20px;
|
|
padding: 10px;
|
|
background-color: #f8f9fa;
|
|
border-radius: 5px;
|
|
text-align: center;
|
|
}
|
|
.nav a {
|
|
margin-right: 15px;
|
|
color: #007bff;
|
|
text-decoration: none;
|
|
}
|
|
.nav a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.nav a.active {
|
|
font-weight: 600;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* Pagination */
|
|
.pagination {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.pagination a,
|
|
.pagination span {
|
|
padding: 8px 12px;
|
|
text-decoration: none;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
color: #007bff;
|
|
}
|
|
|
|
.pagination a:hover {
|
|
background-color: #007bff;
|
|
color: white;
|
|
}
|
|
|
|
.pagination .current {
|
|
background-color: #007bff;
|
|
color: white;
|
|
}
|
|
|
|
/* Pagination */
|
|
.pagination button {
|
|
padding: 8px 12px;
|
|
border: 1px solid #ddd;
|
|
background-color: white;
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
}
|
|
.pagination button:hover {
|
|
background-color: #f8f9fa;
|
|
}
|
|
.pagination button:disabled {
|
|
background-color: #e9ecef;
|
|
cursor: not-allowed;
|
|
}
|
|
.pagination .current-page {
|
|
font-weight: bold;
|
|
color: #007bff;
|
|
}
|
|
|
|
/* Admin newsletter */
|
|
.filters {
|
|
margin-bottom: 20px;
|
|
padding: 15px;
|
|
background-color: #f8f9fa;
|
|
border-radius: 5px;
|
|
display: flex;
|
|
gap: 15px;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
.filters form {
|
|
display: flex;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
align-items: end;
|
|
}
|
|
.filters input,
|
|
.filters select {
|
|
padding: 8px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
min-width: 150px;
|
|
}
|
|
.filters button {
|
|
padding: 8px 16px;
|
|
background-color: #007bff;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
}
|
|
.filters button:hover {
|
|
background-color: #0056b3;
|
|
}
|
|
|
|
/* Subscribers table */
|
|
.subscribers-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-bottom: 20px;
|
|
}
|
|
.subscribers-table th,
|
|
.subscribers-table td {
|
|
padding: 12px;
|
|
text-align: left;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
.subscribers-table th {
|
|
background-color: #f8f9fa;
|
|
font-weight: bold;
|
|
}
|
|
.subscribers-table tr:hover {
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
.loading {
|
|
text-align: center;
|
|
padding: 20px;
|
|
color: #666;
|
|
}
|
|
|
|
.actions {
|
|
display: flex;
|
|
gap: 5px;
|
|
}
|
|
|
|
/* Newsletter creation form */
|
|
|
|
.form-section {
|
|
margin-bottom: 30px;
|
|
padding: 20px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 8px;
|
|
background-color: #f9f9f9;
|
|
}
|
|
.form-section h2 {
|
|
margin-top: 0;
|
|
color: #555;
|
|
border-bottom: 1px solid #ddd;
|
|
padding-bottom: 10px;
|
|
}
|
|
.form-group {
|
|
margin-bottom: 15px;
|
|
}
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 5px;
|
|
font-weight: bold;
|
|
color: #333;
|
|
}
|
|
.form-group input,
|
|
.form-group textarea,
|
|
.form-group select {
|
|
width: 100%;
|
|
padding: 10px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
box-sizing: border-box;
|
|
}
|
|
.input-error {
|
|
border-color: #dc3545;
|
|
}
|
|
.form-group textarea {
|
|
min-height: 200px;
|
|
resize: vertical;
|
|
}
|
|
.checkbox-inline {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-weight: normal;
|
|
}
|
|
.form-actions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
}
|
|
.form-row {
|
|
display: flex;
|
|
gap: 15px;
|
|
margin-bottom: 15px;
|
|
}
|
|
.form-row .form-group {
|
|
flex: 1;
|
|
margin-bottom: 0;
|
|
}
|
|
.newsletter-preview {
|
|
margin-top: 20px;
|
|
padding: 20px;
|
|
background-color: white;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
}
|
|
.newsletter-preview h3 {
|
|
margin-top: 0;
|
|
color: #555;
|
|
}
|
|
.newsletter-stats {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 15px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
|
|
/* Admin settings */
|
|
.setting strong {
|
|
display: inline-block;
|
|
width: 200px;
|
|
}
|
|
.iframe-code {
|
|
width: 100%;
|
|
height: 100px;
|
|
font-family: monospace;
|
|
padding: 10px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
/* Admin settings cards grid */
|
|
.settings-cards {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
margin: 8px 0 16px 0;
|
|
}
|
|
|
|
.settings-card {
|
|
background: #ffffff;
|
|
border: 1px solid #e6e6e6;
|
|
border-radius: 8px;
|
|
padding: 12px 14px;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
|
|
flex: 1 1 300px;
|
|
min-width: 220px;
|
|
}
|
|
|
|
.card-title {
|
|
margin: 0 0 8px 0;
|
|
font-size: 1.05rem;
|
|
}
|
|
|
|
.card-body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
/* Keep individual dynamic setting layout readable */
|
|
.setting {
|
|
font-size: 0.95rem;
|
|
color: #222;
|
|
}
|
|
|
|
@media (max-width: 720px) {
|
|
.settings-card {
|
|
flex: 1 1 100%;
|
|
}
|
|
}
|
|
|
|
/* Spinner styles used by embed pages */
|
|
#spinnerIcon {
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
@keyframes spin {
|
|
0% {
|
|
transform: rotate(0deg);
|
|
}
|
|
100% {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
#submitSpinner {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
/* Email templates layout */
|
|
.email-templates-container {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 20px;
|
|
}
|
|
|
|
.email-templates-list {
|
|
flex: 0 0 280px;
|
|
max-width: 320px;
|
|
background: #ffffff;
|
|
border: 1px solid #e6e6e6;
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.template-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
padding: 10px 12px;
|
|
border: 1px solid transparent;
|
|
border-radius: 6px;
|
|
background: #f8f9fa;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
transition: border-color 0.2s ease, background-color 0.2s ease;
|
|
}
|
|
|
|
.template-item:hover {
|
|
border-color: #007bff;
|
|
background: #eef5ff;
|
|
}
|
|
|
|
.template-item.active {
|
|
border-color: #007bff;
|
|
background: #e2ecff;
|
|
}
|
|
|
|
.template-name {
|
|
font-weight: 600;
|
|
margin-bottom: 4px;
|
|
color: #1a1a1a;
|
|
}
|
|
|
|
.template-description {
|
|
margin: 0 0 12px 0;
|
|
color: #555555;
|
|
font-size: 0.95rem;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.email-template-editor {
|
|
flex: 1 1 380px;
|
|
min-width: 300px;
|
|
background: #ffffff;
|
|
border: 1px solid #e6e6e6;
|
|
border-radius: 8px;
|
|
padding: 16px 18px;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.email-template-editor .form-group textarea {
|
|
min-height: 360px;
|
|
font-family: "Courier New", Courier, monospace;
|
|
}
|
|
|
|
.empty-state {
|
|
margin: 0;
|
|
color: #555555;
|
|
font-style: italic;
|
|
}
|
|
|
|
@media (max-width: 960px) {
|
|
.email-templates-container {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.email-templates-list {
|
|
flex: 1 1 auto;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.email-template-editor {
|
|
flex: 1 1 auto;
|
|
}
|
|
}
|