Mercurial
diff mrjunejune/test/snapshots/tools_file_converter_index.html.snapshot @ 109:1c446ab6f945
[MrJuneJune] New Blog about writing Seobeo library.
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Sat, 03 Jan 2026 19:37:51 -0800 |
| parents | 092afa595764 |
| children | d6d578b49a19 |
line wrap: on
line diff
--- a/mrjunejune/test/snapshots/tools_file_converter_index.html.snapshot Sat Jan 03 17:29:12 2026 -0800 +++ b/mrjunejune/test/snapshots/tools_file_converter_index.html.snapshot Sat Jan 03 19:37:51 2026 -0800 @@ -4,17 +4,149 @@ Connection: close Body: -reload" href="/public/fonts/more-sugar.regular.otf" as="font" type="font/otf" crossorigin> +/woff" crossorigin> +<link rel="preload" href="/public/fonts/atkinson-bold.woff" as="font" type="font/woff" crossorigin> + +<link rel="preload" href="/public/fonts/more-sugar.extras.otf" as="font" type="font/otf" crossorigin> +<link rel="preload" href="/public/fonts/more-sugar.regular.otf" as="font" type="font/otf" crossorigin> <link rel="preload" href="/public/fonts/more-sugar.thin.otf" as="font" type="font/otf" crossorigin> <link rel="preload" href="/base.css" as="style" /> <link rel="stylesheet" href="/base.css" /> - <link rel="stylesheet" href="/tools/index.css" /> - </head> - <body> - <style> + <style> + .container { + max-width: 800px; + margin: 2rem auto; + padding: 2rem; + } + + .converter-section { + border-radius: 8px; + border: 2px solid var(--lightgray); + padding: 2rem; + margin-bottom: 2rem; + } + + .converter-section h2 { + margin-top: 0; + color: var(--black); + } + + .file-input-wrapper { + margin: 1rem 0; + } + + .file-input-wrapper label { + display: block; + margin-bottom: 0.5rem; + font-weight: 600; + } + + input[type="file"] { + padding: 0.75rem; + border: 2px dashed #ccc; + border-radius: 4px; + background: white; + font-size: 16px; + } + + button { + background: var(--purple); + font-family: "More Thin", sans-serif; + color: var(--gray-gradient); + border: none; + padding: 0.75rem 1.5rem; + border-radius: 4px; + cursor: pointer; + font-size: 1rem; + margin-top: 1rem; + min-height: 44px; + } + + button:hover { + background: var(--orange); + } + + button:disabled { + background: var(--gray); + cursor: not-allowed; + } + + .result { + margin-top: 1rem; + padding: 1rem; + background: white; + border-radius: 4px; + display: none; + } + + .result.show { + display: block; + } + + .result.success { + border-left: 4px solid var(--blue); + } + + .result.error { + border-left: 4px solid var(--red); + } + + .download-link { + display: inline-block; + margin-top: 0.5rem; + color: var(--awesome); + text-decoration: none; + } + + .download-link:hover { + text-decoration: underline; + } + + .loading { + display: none; + margin-top: 1rem; + } + + .loading.show { + display: block; + } + + /* Mobile responsive */ + @media (max-width: 720px) { + .container { + padding: 1rem; + margin: 1rem auto; + } + + .converter-section { + padding: 1.5rem 1rem; + } + + .converter-section h2 { + font-size: 1.5rem; + } + + .file-input-wrapper label { + font-size: 1rem; + } + + button { + font-size: 1.1rem; + padding: 1rem 1.5rem; + } + + .result { + padding: 1rem; + font-size: 1rem; + } + } + </style> +</head> +<body> + <style> :root { --header-background: var(--white); --header-color: rgb(var(--black)); @@ -152,23 +284,55 @@ <script src="/index.js"></script> - <main> - <h1 class="title"> Tools </h1> - <ul class="nav-list"> - <li><a href="/tools/markdown_to_html">MarkDown to HTML</a></li> - <li><a href="/tools/file_converter">Images to Webp / Video to Mp4</a></li> - </ul> - <h3> TODOs </h3> - <p> Probably should add this... </p> - <ul class="nav-list"> - <li>- Simple online LaTex editor.</li> - <li>- Online HLS player.</li> - </ul> - </main> - <div style="display: flex; align-items: center; justify-content: center; margin: 30px 0px;"> + + <div class="container"> + <h1>File Format Converter</h1> + <p>Convert your images and videos to different formats using FFmpeg</p> + + <div class="converter-section"> + <h2>Image to WebP Converter</h2> + <p>Upload an image file (PNG, JPG, GIF, etc.) to convert it to WebP format</p> + + <div class="file-input-wrapper"> + <label for="imageInput">Choose an image file:</label> + <input type="file" id="imageInput" accept="image/*"> + </div> + + <button id="convertImageBtn" onclick="convertImageToWebP()">Convert to WebP</button> + + <div class="loading" id="imageLoading">Converting... Please wait.</div> + + <div class="result" id="imageResult"> + <p id="imageMessage"></p> + <a id="imageDownload" class="download-link" style="display: none;">Download WebP Image</a> + </div> + </div> + + <div class="converter-section"> + <h2>Video to MP4 Converter</h2> + <p>Upload a video file (AVI, MOV, MKV, etc.) to convert it to MP4 format</p> + + <div class="file-input-wrapper"> + <label for="videoInput">Choose a video file:</label> + <input type="file" id="videoInput" accept="video/*"> + </div> + + <button id="convertVideoBtn" onclick="convertVideoToMP4()">Convert to MP4</button> + + <div class="loading" id="videoLoading">Converting... Please wait.</div> + + <div class="result" id="videoResult"> + <p id="videoMessage"></p> + <a id="videoDownload" class="download-link" style="display: none;">Download MP4 Video</a> + </div> + </div> + <div style="display: flex; align-items: center; justify-content: center; margin: 30px 0px;"> <small>© 2026 June Park</small> </div> - </body> -</htmlLocation: /tools/file_converter + </div> + <script src="/tools/file_converter/index.js"></script> +</body> +</htmlLocation: /tools/markdown_to_html +Location: /tools/file_converter