1
- <!DOCTYPE html>
2
- < html >
3
- < head >
4
- < title > Auto PPT</ title >
5
- < meta charset ="UTF-8 ">
6
- < link rel ="icon " href ="https://img1.imgtp.com/2023/06/26/2uA6lVi8.png " type ="image/png ">
7
- < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css "/>
8
- < meta name ="viewport " content ="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes "/>
9
- < meta property ="image " content ="https://img1.imgtp.com/2023/06/26/2uA6lVi8.png "/>
10
- < meta property ="title " content ="Auto PPTX: chatgpt自动生成pptx "/>
11
- < meta
12
- name ="description "
13
- content ="Auto generate pptx using gpt-3.5, Free to use online | 通过gpt-3.5生成PPT,免费在线使用 "
14
- />
15
- < style >
16
- /**背景图变色动画**/
17
- @keyframes background-overlay-animation {
18
- 0% {
19
- background-image : linear-gradient (4deg , rgba (255 , 78 , 36 , 0.3 ) 50% , rgba (255 , 78 , 36 , 0.3 ) 100% ),
20
- url ("https://img1.imgtp.com/2023/07/04/sOFsVAlW.jpg" );
21
- }
22
- 25% {
23
- background-image : linear-gradient (4deg , rgba (213 , 49 , 127 , 0.3 ) 50% , rgba (213 , 49 , 127 , 0.3 ) 100% ),
24
- url ("https://img1.imgtp.com/2023/07/04/sOFsVAlW.jpg" );
25
- }
26
- 50% {
27
- background-image : linear-gradient (4deg , rgba (36 , 182 , 255 , 0.3 ) 50% , rgba (36 , 182 , 255 , 1 ) 100% ),
28
- url ("https://img1.imgtp.com/2023/07/04/sOFsVAlW.jpg" );
29
- }
30
-
31
- 100% {
32
- background-image : linear-gradient (4deg , rgba (0 , 255 , 254 , 0.3 ) 50% , rgba (0 , 255 , 254 , 0.3 ) 100% ),
33
- url ("https://img1.imgtp.com/2023/07/04/sOFsVAlW.jpg" );
34
- }
35
- }
36
- canvas {
37
- width : 100% ;
38
- position : absolute;
39
- top : 0 ;
40
- }
41
- /*** 动画 end****/
42
-
43
-
44
- body {
45
- margin : 0 ;
46
- }
47
-
48
- /* 页面容器 */
49
- .container {
50
- background-image : url ("https://img1.imgtp.com/2023/07/04/sOFsVAlW.jpg" );
51
- background-size : 100% 100% ;
52
- background-position : center;
53
- background-repeat : no-repeat;
54
- height : 100vh ;
55
- display : flex;
56
- flex-direction : column;
57
- align-items : center;
58
- justify-content : center;
59
-
60
- animation : background-overlay-animation 10s linear infinite;
61
- }
62
-
63
- /* 内容样式 */
64
- .content {
65
- text-align : center;
66
- color : # fff ;
67
- font-size : 24px ;
68
- }
69
-
70
- /* 大标题样式 */
71
- .page-title {
72
- color : rgba (58 , 209 , 73 , 0.6 );
73
- text-align : center;
74
- font-size : 48px ; /* 调整标题字体大小 */
75
- font-weight : 500 ;
76
- margin-top : -20px ; /* 调整标题与上方元素的间距 */
77
- font-family : "Microsoft YaHei UI" ;
78
- }
79
-
80
- /* 输入行样式 */
81
- .input-row {
82
- display : flex;
83
- align-items : center;
84
- margin-bottom : 10px ;
85
- }
86
-
87
- .page-input {
88
- width : 100% ;
89
- appearance : none;
90
- outline : none;
91
- padding : 12px 20px ;
92
- box-sizing : border-box;
93
- border-radius : 10px ;
94
- border : 1px solid rgba (58 , 209 , 73 , 0.2 );
95
- box-shadow : 0 0 2px rgba (58 , 209 , 73 , 0.2 );
96
- }
97
-
98
- /* 按钮样式 */
99
- .page-btn {
100
- min-width : 70px ;
101
- margin-left : 10px ;
102
- padding : 12px 20px ;
103
- box-sizing : border-box;
104
- border-radius : 10px ;
105
- outline : none;
106
- border : 0 ;
107
- background : rgba (58 , 209 , 73 , 0.6 );
108
- color : white;
109
- cursor : pointer;
110
- }
111
-
112
- /* GitHub 图标样式 */
113
- .github-icon {
114
- position : absolute;
115
- top : 10px ;
116
- right : 10px ;
117
- }
118
-
119
- .github-icon svg {
120
- fill : white;
121
- height : 30px ;
122
- }
123
- </ style >
124
-
125
- </ head >
126
- < body >
127
- < script src ="./../../pptx_static/particle.min.js "> </ script >
128
- < div class ="container ">
129
- < canvas id ="my_canvas "> </ canvas >
130
- < a class ="github-icon " href ="https://github.com/limaoyi1/Auto_PPT ">
131
- < svg xmlns ="http://www.w3.org/2000/svg " viewBox ="0 0 48 48 " width ="30 " height ="30 ">
132
- < path fill ="#000 "
133
- d ="M23.999 2C12.177 2 2 12.179 2 24.001c0 9.086 5.891 16.767 14.06 19.438 1.03.189 1.407-.447 1.407-1.002v-3.91c-5.715 1.23-6.915-2.749-6.915-2.749-.935-2.353-2.283-2.979-2.283-2.979-1.874-1.278.146-1.252.146-1.252 2.071.148 3.154 2.124 3.154 2.124 1.839 3.18 4.828 2.261 5.998 1.728.186-1.327.715-2.26 1.301-2.779-4.552-.514-9.365-2.276-9.365-10.126 0-2.242.8-4.077 2.12-5.502-.212-.515-.918-2.61.201-5.439 0 0 1.72-.553 5.639 2.107a19.293 19.293 0 0 1 5.007-.67c1.7.005 3.41.228 5.006.67 3.916-2.66 5.634-2.107 5.634-2.107 1.12 2.83.416 4.924.204 5.439 1.322 1.425 2.116 3.26 2.116 5.502 0 7.865-4.82 9.604-9.39 10.11.736.63 1.397 1.876 1.397 3.777v5.583c0 .557.373 1.198 1.417.994C40.106 40.767 46 33.086 46 24.001 46 12.179 35.823 2 23.999 2 "/>
134
- </ svg >
135
- </ a >
136
- < div class ="content ">
137
- < h1 class ="page-title animate__animated animate__zoomInDown "> 自动生成你的PPT</ h1 >
138
-
139
- < div class ="input-row ">
140
- < input type ="text " id ="titleInput " class ="page-input animate__animated animate__backInLeft " placeholder ="请输入PPT的主题 "/>
141
- < button onclick ="callAPI() " class ="page-btn animate__animated animate__backInRight "> 生成</ button >
142
- </ div >
143
- < div class ="input-row ">
144
- < p id ="loadingText " style ="display: none; "> 正在生成 PPT,这大概需要3~5分钟,请稍候...</ p >
145
- </ div >
146
- </ div >
147
- </ div >
148
-
149
- < script >
150
- // 初始化粒子(画布id)
151
- particle . init ( 'my_canvas' ) ;
152
- // 调用api
153
- function callAPI ( ) {
154
- let title = document . getElementById ( "titleInput" ) . value ;
155
- let url = "http://www.limaoyi.top:5000/ppt?title=" + encodeURIComponent ( title ) ;
156
-
157
- // 显示加载文本
158
- let loadingText = document . getElementById ( "loadingText" ) ;
159
- loadingText . style . display = "block" ;
160
-
161
- // 发送 HTTP GET 请求获取流数据
162
- fetch ( url )
163
- . then ( response => {
164
- if ( ! response . ok ) {
165
- throw new Error ( '网络请求错误' ) ;
166
- }
167
- return response . blob ( ) ; // 获取响应数据的二进制流
168
- } )
169
- . then ( blob => {
170
- // 创建 URL 对象
171
- let url = URL . createObjectURL ( blob ) ;
172
-
173
- // 创建一个链接并模拟点击下载
174
- let link = document . createElement ( "a" ) ;
175
- link . href = url ;
176
- link . download = "presentation.pptx" ; // 下载的文件名
177
- link . click ( ) ;
178
-
179
- // 清除 URL 对象
180
- URL . revokeObjectURL ( url ) ;
181
-
182
- // 隐藏加载文本
183
- loadingText . style . display = "none" ;
184
- } )
185
- . catch ( error => {
186
- // 处理错误
187
- console . error ( error ) ;
188
-
189
- // 隐藏加载文本
190
- loadingText . style . display = "none" ;
191
- } ) ;
192
- }
193
- </ script >
194
- </ body >
195
- </ html >
1
+ <!doctype html> < html lang ="en "> < head > < meta charset ="utf-8 "/> < link rel ="icon " href ="./favicon.ico "/> < meta name ="viewport " content ="width=device-width,initial-scale=1 "/> < meta name ="theme-color " content ="#000000 "/> < meta name ="description " content ="Web site|AIGC "/> < link rel ="apple-touch-icon " href ="./logo192.png "/> < link rel ="manifest " href ="./manifest.json "/> < title > AIGC App</ title > < script defer ="defer " src ="./static/js/runtime.1b8d8764.js "> </ script > < script defer ="defer " src ="./static/js/base.0ec2920c.js "> </ script > < script defer ="defer " src ="./static/js/antd.56ea7e9d.js "> </ script > < script defer ="defer " src ="./static/js/lodash.4814a24f.js "> </ script > < script defer ="defer " src ="./static/js/vendors.3862e664.js "> </ script > < script defer ="defer " src ="./static/js/main.aee5e3a4.js "> </ script > < link href ="./static/css/main.05987304.css " rel ="stylesheet "> </ head > < body > < noscript > You need to enable JavaScript to run this app.</ noscript > < div id ="root "> </ div > </ body > </ html >
0 commit comments