1 | body {
|
---|
2 | font-family: Arial, sans-serif;
|
---|
3 | }
|
---|
4 |
|
---|
5 | .add-news, .add-coupons {
|
---|
6 | position: absolute;
|
---|
7 | top: 30px;
|
---|
8 | right: 70px;
|
---|
9 | width: 50px;
|
---|
10 | height: 50px;
|
---|
11 | background-color: #4CAF50;
|
---|
12 | color: white;
|
---|
13 | display: flex;
|
---|
14 | align-items: center;
|
---|
15 | justify-content: center;
|
---|
16 | border-radius: 50%;
|
---|
17 | font-size: 24px;
|
---|
18 | cursor: pointer;
|
---|
19 | }
|
---|
20 |
|
---|
21 | #news-list, #coupons-list {
|
---|
22 | display: flex;
|
---|
23 | flex-direction: row;
|
---|
24 | flex-wrap: wrap;
|
---|
25 | justify-content: flex-start;
|
---|
26 | margin: 0 20px;
|
---|
27 | }
|
---|
28 | .news-item{
|
---|
29 | display: flex; /* Aligns image and text in a row */
|
---|
30 | flex-direction: column; /* Change to 'row' for horizontal layout */
|
---|
31 | width: 260px;
|
---|
32 | align-items: center;
|
---|
33 | justify-content: center;
|
---|
34 | margin: 0 15px 10px 0;
|
---|
35 | padding: 20px;
|
---|
36 | border: 1px solid #ddd; /* Optional: Adds a border */
|
---|
37 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
---|
38 | }
|
---|
39 | img{
|
---|
40 | width: 100%; /* Make image responsive */
|
---|
41 | max-width: 400px; /* Set a maximum width for the image */
|
---|
42 | height: auto; /* Maintain aspect ratio */
|
---|
43 | border-radius: 10px; /* Optional: Adds rounded corners */
|
---|
44 | margin-bottom: 15px;
|
---|
45 | }
|
---|
46 | p{
|
---|
47 | font-size: 1.2rem;
|
---|
48 | line-height: 1.5;
|
---|
49 | text-align: center; /* Center the text */
|
---|
50 | color: #333;
|
---|
51 | margin: 0;
|
---|
52 | }
|
---|
53 | @media (max-width: 768px) {
|
---|
54 | .news-item {
|
---|
55 | flex-direction: column; /* Stack elements on smaller screens */
|
---|
56 | }
|
---|
57 | }
|
---|
58 |
|
---|
59 | .form-container, #coupons-form{
|
---|
60 | position: fixed;
|
---|
61 | top: 0;
|
---|
62 | left: 0;
|
---|
63 | width: 100%;
|
---|
64 | height: 100%;
|
---|
65 | background: rgba(0, 0, 0, 0.5);
|
---|
66 | display: flex;
|
---|
67 | align-items: center;
|
---|
68 | justify-content: center;
|
---|
69 | }
|
---|
70 |
|
---|
71 | #form {
|
---|
72 | background: white;
|
---|
73 | padding: 20px;
|
---|
74 | border-radius: 5px;
|
---|
75 | width: 500px;
|
---|
76 | height: 400px;
|
---|
77 | }
|
---|
78 | #title-part, #image-part, #code-part{
|
---|
79 | width:100%;
|
---|
80 | height:60px;
|
---|
81 | display: flex;
|
---|
82 | align-items: center;
|
---|
83 | }
|
---|
84 | input{
|
---|
85 | width:100%;
|
---|
86 |
|
---|
87 | }
|
---|
88 | textarea{
|
---|
89 | width: 100%;
|
---|
90 | height: 180px;
|
---|
91 | display: flex;
|
---|
92 | }
|
---|
93 | label{
|
---|
94 | padding-right: 10px;
|
---|
95 | }
|
---|
96 | #text-part, #description-part{
|
---|
97 | padding: 20px 0;
|
---|
98 | }
|
---|
99 |
|
---|
100 | /* Style for the upload button */
|
---|
101 | #open-popup {
|
---|
102 | padding: 10px 20px;
|
---|
103 | background-color: #007bff;
|
---|
104 | color: white;
|
---|
105 | border: none;
|
---|
106 | border-radius: 5px;
|
---|
107 | cursor: pointer;
|
---|
108 | font-size: 16px;
|
---|
109 | }
|
---|
110 |
|
---|
111 | #image-popup {
|
---|
112 | width: 400px; /* Set a width for the modal */
|
---|
113 | background-color: white;
|
---|
114 | border-radius: 8px;
|
---|
115 | padding: 20px;
|
---|
116 | box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
|
---|
117 | z-index: 1000;
|
---|
118 | }
|
---|
119 |
|
---|
120 | #image-popup h3 {
|
---|
121 | margin-top: 0;
|
---|
122 | margin-bottom: 15px;
|
---|
123 | font-size: 20px;
|
---|
124 | color: #333;
|
---|
125 | text-align: center;
|
---|
126 | }
|
---|
127 |
|
---|
128 | /* Image preview area */
|
---|
129 | #image-preview {
|
---|
130 | margin-top: 10px;
|
---|
131 | text-align: center;
|
---|
132 | padding: 10px;
|
---|
133 | }
|
---|
134 |
|
---|
135 | /* Style for buttons inside the popup */
|
---|
136 | #image-popup button {
|
---|
137 | padding: 8px 15px;
|
---|
138 | margin-right: 10px;
|
---|
139 | margin-top: 10px;
|
---|
140 | background-color: #28a745;
|
---|
141 | color: white;
|
---|
142 | border: none;
|
---|
143 | border-radius: 5px;
|
---|
144 | cursor: pointer;
|
---|
145 | }
|
---|
146 |
|
---|
147 |
|
---|
148 | #edit-button, #save-button {
|
---|
149 | background-color: #17a2b8; /* Blueish color */
|
---|
150 | }
|
---|
151 |
|
---|
152 |
|
---|
153 | /* Overlay */
|
---|
154 | #overlay {
|
---|
155 | background: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
---|
156 | z-index: 999; /* Ensure it is behind the modal but above everything else */
|
---|
157 | }
|
---|
158 |
|
---|
159 | /* Button hover effects */
|
---|
160 | #image-popup button:hover, #open-popup:hover {
|
---|
161 | opacity: 0.9;
|
---|
162 | }
|
---|
163 |
|
---|
164 |
|
---|
165 |
|
---|
166 | /* Cancel button */
|
---|
167 | #cancel-button {
|
---|
168 | background-color: #dc3545; /* Red color */
|
---|
169 | }
|
---|
170 |
|
---|
171 |
|
---|