| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- /* WYSIWYG Editor Styles */
- .wysiwyg-container {
- position: relative;
- }
- .wysiwyg-editor {
- min-height: 400px;
- border: 1px solid #d1d5db;
- border-radius: 6px;
- background-color: white;
- }
- .wysiwyg-toolbar {
- border: 1px solid #d1d5db;
- border-bottom: none;
- border-radius: 6px 6px 0 0;
- background-color: #f9fafb;
- padding: 8px;
- display: flex;
- flex-wrap: wrap;
- gap: 4px;
- }
- .wysiwyg-btn {
- padding: 6px 10px;
- border: 1px solid #d1d5db;
- border-radius: 4px;
- background-color: white;
- cursor: pointer;
- font-size: 12px;
- transition: all 0.2s;
- }
- .wysiwyg-btn:hover {
- background-color: #f3f4f6;
- border-color: #9ca3af;
- }
- .wysiwyg-btn.active {
- background-color: #3b82f6;
- color: white;
- border-color: #3b82f6;
- }
- .wysiwyg-separator {
- width: 1px;
- height: 24px;
- background-color: #d1d5db;
- margin: 0 4px;
- }
- .wysiwyg-select {
- padding: 4px 8px;
- border: 1px solid #d1d5db;
- border-radius: 4px;
- background-color: white;
- font-size: 12px;
- }
- .wysiwyg-content {
- padding: 12px;
- min-height: 350px;
- font-family: inherit;
- font-size: 14px;
- line-height: 1.5;
- border: none;
- outline: none;
- resize: vertical;
- }
- .wysiwyg-content:focus {
- outline: 2px solid #3b82f6;
- outline-offset: -2px;
- }
- /* Form integration */
- .publication-form .form-group:has(.wysiwyg-container) {
- margin-bottom: 20px;
- }
- .wysiwyg-label {
- display: block;
- margin-bottom: 8px;
- font-weight: 600;
- color: #374151;
- }
- /* Character count */
- .wysiwyg-char-count {
- margin-top: 8px;
- font-size: 12px;
- color: #6b7280;
- text-align: right;
- }
- /* Image Gallery */
- .image-gallery {
- display: none;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: rgba(0, 0, 0, 0.8);
- z-index: 1000;
- overflow-y: auto;
- }
- .image-gallery.open {
- display: block;
- }
- .gallery-container {
- max-width: 1200px;
- margin: 50px auto;
- background: white;
- border-radius: 8px;
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
- }
- .gallery-header {
- padding: 20px;
- border-bottom: 1px solid #ddd;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .gallery-title {
- font-size: 18px;
- font-weight: bold;
- margin: 0;
- }
- .gallery-close {
- background: #dc3545;
- color: white;
- border: none;
- padding: 8px 16px;
- border-radius: 4px;
- cursor: pointer;
- font-size: 14px;
- }
- .gallery-close:hover {
- background: #c82333;
- }
- .gallery-content {
- padding: 20px;
- }
- .gallery-tabs {
- display: flex;
- margin-bottom: 20px;
- border-bottom: 1px solid #ddd;
- }
- .gallery-tab {
- padding: 10px 20px;
- background: none;
- border: none;
- border-bottom: 2px solid transparent;
- cursor: pointer;
- font-size: 14px;
- font-weight: 500;
- }
- .gallery-tab.active {
- border-bottom-color: #007bff;
- color: #007bff;
- }
- .gallery-tab:hover {
- color: #007bff;
- }
- .gallery-upload {
- display: none;
- padding: 20px;
- border: 2px dashed #ddd;
- border-radius: 4px;
- text-align: center;
- }
- .gallery-upload.active {
- display: block;
- }
- .upload-area {
- padding: 40px;
- border: 2px dashed #007bff;
- border-radius: 4px;
- background: #f8f9fa;
- cursor: pointer;
- transition: all 0.3s ease;
- }
- .upload-area:hover {
- background: #e3f2fd;
- border-color: #0056b3;
- }
- .upload-area.dragover {
- background: #e3f2fd;
- border-color: #0056b3;
- }
- .upload-icon {
- font-size: 48px;
- color: #007bff;
- margin-bottom: 10px;
- }
- .upload-text {
- font-size: 16px;
- color: #333;
- margin-bottom: 10px;
- }
- .upload-hint {
- font-size: 14px;
- color: #666;
- }
- .file-input {
- display: none;
- }
- .gallery-grid {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
- gap: 15px;
- max-height: 400px;
- overflow-y: auto;
- }
- .gallery-item {
- position: relative;
- border: 1px solid #ddd;
- border-radius: 4px;
- overflow: hidden;
- cursor: pointer;
- transition: all 0.3s ease;
- }
- .gallery-item:hover {
- border-color: #007bff;
- box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
- }
- .gallery-item.selected {
- border-color: #007bff;
- box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5);
- }
- .gallery-image {
- width: 100%;
- height: 120px;
- object-fit: cover;
- display: block;
- }
- .gallery-info {
- padding: 8px;
- font-size: 12px;
- color: #666;
- background: #f8f9fa;
- }
- .gallery-name {
- font-weight: 500;
- color: #333;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .gallery-size {
- color: #666;
- }
- .gallery-actions {
- padding: 15px;
- border-top: 1px solid #ddd;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .gallery-insert {
- background: #007bff;
- color: white;
- border: none;
- padding: 10px 20px;
- border-radius: 4px;
- cursor: pointer;
- font-size: 14px;
- }
- .gallery-insert:hover:not(:disabled) {
- background: #0056b3;
- }
- .gallery-insert:disabled {
- background: #6c757d;
- cursor: not-allowed;
- }
- .gallery-upload-btn {
- background: #28a745;
- color: white;
- border: none;
- padding: 10px 20px;
- border-radius: 4px;
- cursor: pointer;
- font-size: 14px;
- }
- .gallery-upload-btn:hover {
- background: #218838;
- }
- .upload-progress {
- margin-top: 15px;
- display: none;
- }
- .upload-progress.active {
- display: block;
- }
- .progress-bar {
- width: 100%;
- height: 8px;
- background: #e9ecef;
- border-radius: 4px;
- overflow: hidden;
- }
- .progress-fill {
- height: 100%;
- background: #007bff;
- width: 0%;
- transition: width 0.3s ease;
- }
- .upload-status {
- margin-top: 10px;
- font-size: 14px;
- color: #666;
- }
- .upload-status.success {
- color: #28a745;
- }
- .upload-status.error {
- color: #dc3545;
- }
- /* Responsive Design */
- @media (max-width: 768px) {
- .gallery-container {
- margin: 20px;
- max-width: none;
- }
-
- .gallery-grid {
- grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
- gap: 10px;
- }
-
- .gallery-image {
- height: 80px;
- }
-
- .gallery-header {
- flex-direction: column;
- gap: 10px;
- text-align: center;
- }
-
- .gallery-actions {
- flex-direction: column;
- gap: 10px;
- }
-
- .gallery-insert,
- .gallery-upload-btn {
- width: 100%;
- }
- }
- @media (max-width: 768px) {
- .wysiwyg-toolbar {
- padding: 6px;
- gap: 2px;
- }
-
- .wysiwyg-btn {
- padding: 4px 6px;
- font-size: 11px;
- }
-
- .wysiwyg-content {
- padding: 8px;
- min-height: 300px;
- }
- }
|