|
| 1 | +<!doctype html> |
| 2 | +<html lang="en"> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8" /> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 6 | + <title>CheerpJ Upload/Download Applet Demo</title> |
| 7 | + |
| 8 | + <style> |
| 9 | + :root { |
| 10 | + --header-height: 60px; |
| 11 | + --bg-color: #f0f2f5; |
| 12 | + --text-color: #333; |
| 13 | + --header-bg: #ffffff; |
| 14 | + --border-color: #ddd; |
| 15 | + } |
| 16 | + |
| 17 | + * { |
| 18 | + box-sizing: border-box; |
| 19 | + } |
| 20 | + |
| 21 | + body { |
| 22 | + font-family: |
| 23 | + -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, |
| 24 | + Arial, sans-serif; |
| 25 | + margin: 0; |
| 26 | + padding: 0; |
| 27 | + background-color: var(--bg-color); |
| 28 | + color: var(--text-color); |
| 29 | + height: 100vh; |
| 30 | + display: flex; |
| 31 | + flex-direction: column; |
| 32 | + overflow: hidden; |
| 33 | + /* Prevent body scroll, let applet handle it if needed */ |
| 34 | + } |
| 35 | + |
| 36 | + header { |
| 37 | + background-color: var(--header-bg); |
| 38 | + border-bottom: 1px solid var(--border-color); |
| 39 | + padding: 0 20px; |
| 40 | + height: auto; |
| 41 | + min-height: var(--header-height); |
| 42 | + display: flex; |
| 43 | + flex-direction: column; |
| 44 | + justify-content: center; |
| 45 | + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); |
| 46 | + z-index: 10; |
| 47 | + } |
| 48 | + |
| 49 | + h1 { |
| 50 | + margin: 10px 0 5px 0; |
| 51 | + font-size: 1.5rem; |
| 52 | + font-weight: 600; |
| 53 | + text-align: center; |
| 54 | + } |
| 55 | + |
| 56 | + code { |
| 57 | + background: #eee; |
| 58 | + padding: 2px 4px; |
| 59 | + border-radius: 4px; |
| 60 | + font-size: 0.85em; |
| 61 | + font-family: |
| 62 | + ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, |
| 63 | + "Liberation Mono", monospace; |
| 64 | + } |
| 65 | + |
| 66 | + #applet-container { |
| 67 | + flex: 1; |
| 68 | + /* Take remaining space */ |
| 69 | + position: relative; |
| 70 | + width: 100%; |
| 71 | + height: 100%; |
| 72 | + background: #fff; |
| 73 | + } |
| 74 | + |
| 75 | + cheerpj-applet { |
| 76 | + display: block; |
| 77 | + width: 100%; |
| 78 | + height: 100%; |
| 79 | + border: none; |
| 80 | + } |
| 81 | + </style> |
| 82 | + </head> |
| 83 | + |
| 84 | + <body> |
| 85 | + <header> |
| 86 | + <h1>File Upload/Download Applet Demo</h1> |
| 87 | + </header> |
| 88 | + |
| 89 | + <div id="applet-container"> |
| 90 | + <cheerpj-applet |
| 91 | + archive="NoteAppletDemo.jar" |
| 92 | + code="NoteApplet" |
| 93 | + width="100%" |
| 94 | + height="100%" |
| 95 | + > |
| 96 | + Your browser cannot handle the applet tag! |
| 97 | + </cheerpj-applet> |
| 98 | + </div> |
| 99 | + </body> |
| 100 | +</html> |
0 commit comments