Skip to content

Commit 12a4546

Browse files
author
Programming-Sai
committed
Done with the editor, preparing to start work on the draft and the published blogs page. both would make use of some custom tables.
1 parent 7fb7af7 commit 12a4546

File tree

17 files changed

+2762
-63
lines changed

17 files changed

+2762
-63
lines changed

package-lock.json

Lines changed: 1180 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,26 @@
1212
"@fortawesome/fontawesome-svg-core": "^6.6.0",
1313
"@fortawesome/free-solid-svg-icons": "^6.6.0",
1414
"@fortawesome/react-fontawesome": "^0.2.2",
15+
"@tiptap/extension-blockquote": "^2.9.1",
16+
"@tiptap/extension-document": "^2.9.1",
17+
"@tiptap/extension-image": "^2.9.1",
18+
"@tiptap/extension-link": "^2.9.1",
19+
"@tiptap/extension-paragraph": "^2.9.1",
20+
"@tiptap/extension-text": "^2.9.1",
21+
"@tiptap/extension-text-align": "^2.9.1",
22+
"@tiptap/extension-underline": "^2.9.1",
23+
"@tiptap/pm": "^2.9.1",
24+
"@tiptap/react": "^2.9.1",
25+
"@tiptap/starter-kit": "^2.9.1",
1526
"eslint": "8.48.0",
1627
"eslint-config-next": "13.4.19",
28+
"iframe-resizer": "^5.3.2",
29+
"lucide-react": "^0.453.0",
1730
"next": "^14.2.14",
1831
"react": "18.2.0",
1932
"react-dom": "18.2.0",
33+
"react-dropzone": "^14.2.10",
34+
"react-quill": "^2.0.0",
2035
"recharts": "^2.13.0"
2136
}
2237
}

src/app/admin/editor/editor.module.css

Lines changed: 220 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,237 @@
55
min-height: 100vh;
66
padding: 20px;
77
top: 100%;
8-
margin-bottom: 5%;
98
}
109

10+
.topContainer{
11+
display: flex;
12+
justify-content: space-between;
13+
align-items: center;
14+
gap: 2%;
15+
height: 350px;
16+
}
1117

12-
.buton {
13-
font-size: 2rem;
18+
.imgContainer, .titleContainer{
19+
flex: 1;
20+
position: relative;
21+
height: 100%;
22+
}
23+
24+
.imgContainer{
25+
width: 100%;
26+
position: relative;
27+
border: 2px solid var(--index-color);
28+
border-radius: 20px;
29+
overflow: hidden;
30+
display: grid;
31+
align-items: stretch;
32+
justify-content: stretch;
1433
cursor: pointer;
15-
transition: left 0.3s ease;
34+
35+
}
36+
37+
.titleContainer{
38+
width: 100%;
39+
height: 350px;
40+
}
41+
42+
.titleContainer textarea{
43+
all: unset;
44+
word-wrap: break-word;
45+
white-space: normal;
46+
padding: 10px;
47+
width: 95%;
48+
height: 100%;
49+
font-size: 3.5em;
50+
font-weight: bold;
1651
}
1752

18-
.container.active ~ .buton {
19-
left: 80px;
53+
54+
.blogContent{
55+
width: 100%;
56+
height: 100%;
2057
}
2158

22-
.top{
59+
60+
.close{
61+
position: absolute;
62+
top: 5px;
63+
left: 5px;
64+
padding: 20px;
65+
width: 50px;
66+
height: 50px;
67+
font-size: 2rem;
68+
background-color: rgba(255,0,0,0.5);
69+
z-index: 1000;
70+
display: none;
71+
place-content: center;
72+
border-radius: 100%;
73+
}
74+
75+
.imgContainer:hover .close{
76+
display: grid;
77+
}
78+
79+
.blogContent{
80+
color: var(--text-color);
81+
}
82+
83+
.content{
84+
margin-block: 5%;
85+
}
86+
87+
88+
89+
.topContent{
2390
display: flex;
2491
justify-content: space-between;
2592
align-items: center;
26-
width: 100%;
27-
margin-block: 2%;
93+
flex-direction: row-reverse;
94+
}
95+
.toggleThemeButton{
96+
background-color: var(--index-color);
97+
padding: 10px 20px;
98+
border-radius: 100px;
99+
font-weight: bold;
100+
text-transform: capitalize;
28101
}
29102

30-
.top h2{
103+
.keywordsContainer{
31104
width: 100%;
32-
text-align: center;
33-
}
105+
height: auto;
106+
margin-block: 5%;
107+
}
108+
109+
.keywordsContainer input{
110+
all: unset;
111+
padding: 20px 10px;
112+
width: 50%;
113+
background-color: var(--footer-bg-two);
114+
border-radius: 10px;
115+
}
116+
117+
.keywordsContainer input::placeholder{
118+
color: var(--text-color);
119+
font-style: italic;
120+
font-weight: lighter;
121+
}
122+
123+
124+
.buttons, .endButton, .firstIcon{
125+
display: flex;
126+
justify-content: space-between;
127+
align-items: center;
128+
gap: 10px;
129+
}
130+
131+
.buttons{
132+
margin-block: 10%;
133+
}
134+
135+
.endButton{
136+
border: 1px solid var(--index-color);
137+
padding: 10px 20px;
138+
border-radius: 100px;
139+
cursor: pointer;
140+
}
141+
142+
143+
.endButton:hover{
144+
transform: scale(1.1);
145+
}
146+
147+
.endButton:nth-child(1){
148+
background-color: var(--back-color);
149+
}
150+
151+
.endButton:nth-child(2){
152+
background-color: #228B22;
153+
}
154+
155+
.endButton:nth-child(3){
156+
background-color: #32CD32;
157+
}
158+
159+
.endButton:nth-child(4){
160+
background-color: #66CDAA;
161+
}
162+
163+
.indicator{
164+
position: fixed;
165+
bottom: 10%;
166+
left: 50%; /* Center horizontally */
167+
transform: translateX(-50%); /* Offset to center */
168+
width: 200px;
169+
height: 50px;
170+
display: flex;
171+
justify-content: center;
172+
align-items: center;
173+
border-radius: 100px;
174+
animation: blinker 1s infinite;
175+
}
176+
177+
178+
179+
180+
181+
182+
@keyframes blinker {
183+
0%{
184+
opacity: 0;
185+
background-color: rgba(0,255,0,0.9);
186+
}
187+
50%{
188+
opacity: 1;
189+
background-color: rgba(0,255,0,0.1);
190+
}
191+
100%{
192+
opacity: 0;
193+
background-color: rgba(0,255,0,0.5);
194+
}
195+
}
196+
197+
198+
@media screen and (max-width:1424px){
199+
.container{
200+
width: calc(100% - 80px);
201+
left: 80px;
202+
}
203+
}
204+
205+
@media screen and (max-width:868px){
206+
.container{
207+
width: 100%;
208+
left: 0;
209+
}
210+
.keywordsContainer input{
211+
width: 95%;
212+
}
213+
}
214+
215+
@media screen and (max-width:640px) {
216+
.topContainer{
217+
height: fit-content;
218+
margin-block: 5%;
219+
}
220+
.titleContainer, .imgContainer{
221+
width: 100%;
222+
}
223+
.titleContainer textarea{
224+
height: 350px;
225+
}
226+
.topContainer, .topContent, .buttons{
227+
flex-direction: column;
228+
gap: 20px;
229+
}
230+
.endButton, .toggleThemeButton{
231+
width: 100%;
232+
justify-content: center;
233+
}
234+
.blogContent{
235+
min-height: 350px;
236+
background-color: var(--footer-bg);
237+
margin-block: 5%;
238+
border-radius: 10px;
239+
}
240+
}
241+

0 commit comments

Comments
 (0)