File size: 10,244 Bytes
19e5d94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SlideCraft Studio - PPT Editor</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#3B82F6',
                        secondary: '#1E40AF'
                    }
                }
            }
        }
    </script>
</head>
<body class="bg-gray-100 min-h-screen">
    <custom-navbar></custom-navbar>
    
    <div class="container mx-auto px-4 py-6">
        <div class="grid grid-cols-1 lg:grid-cols-4 gap-6">
            <!-- Sidebar -->
            <div class="lg:col-span-1">
                <custom-sidebar></custom-sidebar>
            </div>
            
            <!-- Main Content -->
            <div class="lg:col-span-3">
                <div class="bg-white rounded-xl shadow-lg p-6">
                    <div class="flex justify-between items-center mb-6">
                        <h1 class="text-2xl font-bold text-gray-800">PPT Editor</h1>
                        <div class="flex space-x-3">
                            <button id="previewMode" class="bg-primary hover:bg-secondary text-white px-4 py-2 rounded-lg transition-colors flex items-center">
                                <i data-feather="eye" class="w-4 h-4 mr-2"></i>
                                Preview
                            </button>
                            <button id="editMode" class="bg-gray-200 hover:bg-gray-300 text-gray-700 px-4 py-2 rounded-lg transition-colors flex items-center">
                                <i data-feather="edit" class="w-4 h-4 mr-2"></i>
                                Edit
                            </button>
                            <button id="exportBtn" class="bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded-lg transition-colors flex items-center">
                                <i data-feather="download" class="w-4 h-4 mr-2"></i>
                                Export
                            </button>
                        </div>
                    </div>
                    
                    <!-- Code Input -->
                    <div class="mb-6">
                        <label class="block text-sm font-medium text-gray-700 mb-2">PPT HTML Code</label>
                        <textarea id="codeInput" class="w-full h-40 p-4 border border-gray-300 rounded-lg font-mono text-sm focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="Paste your PPT HTML code here...">
&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
    &lt;title&gt;Introduction to Thermodynamics&lt;/title&gt;
    &lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"&gt;
    &lt;link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&amp;display=swap" rel="stylesheet"&gt;
    &lt;style&gt;
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background-color: #f5f5f5;
            padding: 20px;
        }
        
        .slide-container {
            width: 1280px;
            min-height: 720px;
            display: flex;
            flex-direction: column;
            font-family: 'Montserrat', sans-serif;
            position: relative;
            background-color: #ffffff;
            color: #333333;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            padding: 40px;
        }
        
        .slide-header {
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid #003366;
        }
        
        .slide-header h1 {
            font-size: 36px;
            font-weight: 600;
            color: #003366;
        }
        
        .content-wrapper {
            display: flex;
            flex: 1;
            gap: 30px;
            margin-top: 10px;
        }
        
        .text-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        
        .text-section {
            margin-bottom: 25px;
        }
        
        .text-section h3 {
            font-size: 20px;
            font-weight: 600;
            color: #003366;
            margin-bottom: 10px;
        }
        
        .text-section p, .text-section li {
            font-size: 16px;
            line-height: 1.5;
            margin-bottom: 8px;
        }
        
        .text-section ul {
            list-style-type: none;
            padding-left: 0;
        }
        
        .text-section li {
            position: relative;
            padding-left: 20px;
        }
        
        .text-section li:before {
            content: "•";
            color: #003366;
            font-weight: bold;
            position: absolute;
            left: 0;
        }
        
        .image-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        
        .image-content img {
            max-width: 100%;
            height: auto;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        
        .fig-caption {
            font-size: 14px;
            color: #666;
            margin-top: 10px;
            text-align: center;
            font-style: italic;
        }
        
        .slide-footer {
            position: absolute;
            bottom: 20px;
            right: 20px;
            font-size: 14px;
            color: #666;
        }
        
        @media (max-width: 1300px) {
            .slide-container {
                width: 100%;
                min-height: 600px;
            }
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div class="slide-container"&gt;
        &lt;div class="slide-header"&gt;
            &lt;h1&gt;Introduction to Thermodynamics&lt;/h1&gt;
        &lt;/div&gt;
        
        &lt;div class="content-wrapper"&gt;
            &lt;div class="text-content"&gt;
                &lt;div class="text-section"&gt;
                    &lt;h3&gt;Definition&lt;/h3&gt;
                    &lt;p&gt;Thermodynamics is the branch of physics that deals with the relationships between heat, work, temperature, energy, and the laws governing energy conversion.&lt;/p&gt;
                &lt;/div&gt;
                
                &lt;div class="text-section"&gt;
                    &lt;h3&gt;Key Concepts&lt;/h3&gt;
                    &lt;ul&gt;
                        &lt;li&gt;&lt;strong&gt;Energy:&lt;/strong&gt; Capacity to do work or produce heat&lt;/li&gt;
                        &lt;li&gt;&lt;strong&gt;Temperature:&lt;/strong&gt; Measure of average kinetic energy&lt;/li&gt;
                        &lt;li&gt;&lt;strong&gt;Entropy:&lt;/strong&gt; Measure of disorder or randomness&lt;/li&gt;
                        &lt;li&gt;&lt;strong&gt;Thermal Equilibrium:&lt;/strong&gt; State where no heat transfer occurs&lt;/li&gt;
                    &lt;/ul&gt;
                &lt;/div&gt;
                
                &lt;div class="text-section"&gt;
                    &lt;h3&gt;Importance&lt;/h3&gt;
                    &lt;p&gt;Thermodynamics forms the foundation for engineering disciplines, chemical processes, physical theories, and explains everyday phenomena from engine operation to climate systems.&lt;/p&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            
            &lt;div class="image-content"&gt;
                &lt;img src="https://www.chemistrylearner.com/wp-content/uploads/2022/08/Laws-of-Thermodynamics.jpg" alt="Thermodynamic System and Surroundings"&gt;
                &lt;p class="fig-caption"&gt;Fig 2.1 Thermodynamic System and Surroundings&lt;/p&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        
        &lt;div class="slide-footer"&gt;
            Slide 2
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
                        </textarea>
                        <div class="flex justify-end mt-2">
                            <button id="loadCode" class="bg-primary hover:bg-secondary text-white px-4 py-2 rounded-lg transition-colors">
                                Load PPT
                            </button>
                        </div>
                    </div>
                    
                    <!-- Canvas Container -->
                    <div class="border-2 border-dashed border-gray-300 rounded-xl p-4 bg-gray-50 min-h-[600px]">
                        <div id="canvasContainer" class="flex justify-center items-center min-h-[500px]">
                            <div id="placeholder" class="text-center text-gray-500">
                                <i data-feather="file" class="w-16 h-16 mx-auto mb-4"></i>
                                <p class="text-lg">Load your PPT code to start editing</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <custom-footer></custom-footer>
    
    <script src="components/navbar.js"></script>
    <script src="components/sidebar.js"></script>
    <script src="components/footer.js"></script>
    <script src="script.js"></script>
    <script>
        feather.replace();
    </script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>