|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 4 | + |
| 5 | +<!-- Disable zooming: --> |
| 6 | +<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
| 7 | + |
| 8 | +<head> |
| 9 | + <title>obamify</title> |
| 10 | + |
| 11 | + <meta name="description" content="revolutionary new technology that turns any image into obama"> |
| 12 | + <meta name="keywords" content="image processing, image morphing, optimal transport, meme generator"> |
| 13 | + <meta name="author" content="Spu7Nix"> |
| 14 | + <meta name="robots" content="index, follow"> |
| 15 | + |
| 16 | + <meta property="og:type" content="website"> |
| 17 | + <meta property="og:url" content="https://obamify.com/"> |
| 18 | + <meta property="og:title" content="obamify"> |
| 19 | + <meta property="og:description" content="revolutionary new technology that turns any image into obama"> |
| 20 | + <meta property="og:image" content="https://obamify.com/assets/android-chrome-512x512.png"> |
| 21 | + <meta property="og:image:width" content="512"> |
| 22 | + <meta property="og:image:height" content="512"> |
| 23 | + <meta property="og:site_name" content="obamify"> |
| 24 | + |
| 25 | + <meta property="twitter:card" content="summary_large_image"> |
| 26 | + <meta property="twitter:url" content="https://obamify.com/"> |
| 27 | + <meta property="twitter:title" content="obamify"> |
| 28 | + <meta property="twitter:description" content="revolutionary new technology that turns any image into obama"> |
| 29 | + <meta property="twitter:image" content="https://obamify.com/assets/android-chrome-512x512.png"> |
| 30 | + |
| 31 | + <meta name="application-name" content="obamify"> |
| 32 | + <meta name="format-detection" content="telephone=no"> |
| 33 | + |
| 34 | + <!-- config for our rust wasm binary. go to https://trunkrs.dev/assets/#rust for more customization --> |
| 35 | + |
| 36 | +<script type="module"> |
| 37 | +import init, * as bindings from 'https://spu7nix.github.io/obamify/obamify.js'; |
| 38 | +const wasm = await init({ module_or_path: 'https://spu7nix.github.io/obamify/obamify_bg.wasm' }); |
| 39 | + |
| 40 | + |
| 41 | +window.wasmBindings = bindings; |
| 42 | + |
| 43 | + |
| 44 | +dispatchEvent(new CustomEvent("TrunkApplicationStarted", {detail: {wasm}})); |
| 45 | + |
| 46 | +</script> |
| 47 | + <!-- this is the base url relative to which other urls will be constructed. trunk will insert this from the public-url option --> |
| 48 | + <base href="https://spu7nix.github.io/obamify/" /> |
| 49 | + |
| 50 | + <link rel="icon" href="https://spu7nix.github.io/obamify/favicon.ico"/> |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + <link rel="manifest" href="manifest.json"> |
| 63 | + <link rel="apple-touch-icon" href="assets/apple-touch-icon.png"> |
| 64 | + <meta name="theme-color" media="(prefers-color-scheme: light)" content="white"> |
| 65 | + <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#404040"> |
| 66 | + |
| 67 | + <style> |
| 68 | + html { |
| 69 | + /* Remove touch delay: */ |
| 70 | + touch-action: manipulation; |
| 71 | + } |
| 72 | + |
| 73 | + body { |
| 74 | + /* Light mode background color for what is not covered by the egui canvas, |
| 75 | + or where the egui canvas is translucent. */ |
| 76 | + background: #909090; |
| 77 | + } |
| 78 | + |
| 79 | + @media (prefers-color-scheme: dark) { |
| 80 | + body { |
| 81 | + /* Dark mode background color for what is not covered by the egui canvas, |
| 82 | + or where the egui canvas is translucent. */ |
| 83 | + background: #404040; |
| 84 | + } |
| 85 | + } |
| 86 | + |
| 87 | + /* Allow canvas to fill entire web page: */ |
| 88 | + html, |
| 89 | + body { |
| 90 | + overflow: hidden; |
| 91 | + margin: 0 !important; |
| 92 | + padding: 0 !important; |
| 93 | + height: 100%; |
| 94 | + width: 100%; |
| 95 | + } |
| 96 | + |
| 97 | + /* Make canvas fill entire document: */ |
| 98 | + canvas { |
| 99 | + margin-right: auto; |
| 100 | + margin-left: auto; |
| 101 | + display: block; |
| 102 | + position: absolute; |
| 103 | + top: 0; |
| 104 | + left: 0; |
| 105 | + width: 100%; |
| 106 | + height: 100%; |
| 107 | + } |
| 108 | + |
| 109 | + .centered { |
| 110 | + margin-right: auto; |
| 111 | + margin-left: auto; |
| 112 | + display: block; |
| 113 | + position: absolute; |
| 114 | + top: 50%; |
| 115 | + left: 50%; |
| 116 | + transform: translate(-50%, -50%); |
| 117 | + color: #f0f0f0; |
| 118 | + font-size: 24px; |
| 119 | + font-family: Ubuntu-Light, Helvetica, sans-serif; |
| 120 | + text-align: center; |
| 121 | + } |
| 122 | + |
| 123 | + #rfd-output { |
| 124 | + font-weight: bold; |
| 125 | + padding-bottom: 10px; |
| 126 | + padding-top: 10px; |
| 127 | + } |
| 128 | + |
| 129 | + #rfd-input { |
| 130 | + font-weight: bold; |
| 131 | + padding-bottom: 10px; |
| 132 | + padding-top: 10px; |
| 133 | + } |
| 134 | + |
| 135 | + #rfd-card { |
| 136 | + font-family: Arial, Helvetica, sans-serif; |
| 137 | + border: white 1px solid; |
| 138 | + border-radius: 10px; |
| 139 | + } |
| 140 | + |
| 141 | + /* ---------------------------------------------- */ |
| 142 | + /* Loading animation from https://loading.io/css/ */ |
| 143 | + .lds-dual-ring { |
| 144 | + display: inline-block; |
| 145 | + width: 24px; |
| 146 | + height: 24px; |
| 147 | + } |
| 148 | + |
| 149 | + .lds-dual-ring:after { |
| 150 | + content: " "; |
| 151 | + display: block; |
| 152 | + width: 24px; |
| 153 | + height: 24px; |
| 154 | + margin: 0px; |
| 155 | + border-radius: 50%; |
| 156 | + border: 3px solid #fff; |
| 157 | + border-color: #fff transparent #fff transparent; |
| 158 | + animation: lds-dual-ring 1.2s linear infinite; |
| 159 | + } |
| 160 | + |
| 161 | + @keyframes lds-dual-ring { |
| 162 | + 0% { |
| 163 | + transform: rotate(0deg); |
| 164 | + } |
| 165 | + |
| 166 | + 100% { |
| 167 | + transform: rotate(360deg); |
| 168 | + } |
| 169 | + } |
| 170 | + |
| 171 | + /* Bottom-left corner icons */ |
| 172 | + .bottom-left-icons { |
| 173 | + position: fixed; |
| 174 | + bottom: 20px; |
| 175 | + left: 20px; |
| 176 | + display: flex; |
| 177 | + flex-direction: column; |
| 178 | + gap: 12px; |
| 179 | + z-index: 1000; |
| 180 | + } |
| 181 | + |
| 182 | + .icon-link { |
| 183 | + position: relative; |
| 184 | + display: flex; |
| 185 | + align-items: center; |
| 186 | + justify-content: center; |
| 187 | + width: 48px; |
| 188 | + height: 48px; |
| 189 | + background-color: rgba(0, 0, 0, 1.0); |
| 190 | + border-radius: 8px; |
| 191 | + transition: all 0.2s ease; |
| 192 | + text-decoration: none; |
| 193 | + overflow: visible; |
| 194 | + } |
| 195 | + |
| 196 | + .icon-link:hover { |
| 197 | + transform: scale(1.1); |
| 198 | + background-color: rgba(0, 0, 0, 1.0); |
| 199 | + } |
| 200 | + |
| 201 | + .icon-link img { |
| 202 | + width: 32px; |
| 203 | + height: 32px; |
| 204 | + border-radius: 6px; |
| 205 | + } |
| 206 | + |
| 207 | + .icon-text { |
| 208 | + position: absolute; |
| 209 | + left: 100%; |
| 210 | + bottom: 0; |
| 211 | + background-color: rgba(0, 0, 0, 0.9); |
| 212 | + color: white; |
| 213 | + padding: 8px 8px; |
| 214 | + padding-left: 8px; |
| 215 | + border-radius: 0 8px 8px 0; |
| 216 | + font-family: Fira Code, monospace, sans-serif; |
| 217 | + font-size: 10px; |
| 218 | + white-space: nowrap; |
| 219 | + margin-left: 0px; |
| 220 | + opacity: 0; |
| 221 | + transform: translateX(-10px); |
| 222 | + transition: all 0.3s ease; |
| 223 | + pointer-events: none; |
| 224 | + z-index: 10; |
| 225 | + } |
| 226 | + |
| 227 | + .bottom-left-icons:hover .icon-text { |
| 228 | + padding-left: 18px; |
| 229 | + opacity: 1; |
| 230 | + transform: translateX(0); |
| 231 | + } |
| 232 | + |
| 233 | + .bottom-left-icons:hover .icon-link { |
| 234 | + border-radius: 12px 12px 0 12px; |
| 235 | + } |
| 236 | + |
| 237 | + .error { |
| 238 | + padding-top: 10px; |
| 239 | + font-size: small; |
| 240 | + opacity: 0.6; |
| 241 | + } |
| 242 | + </style> |
| 243 | +<link rel="modulepreload" href="https://spu7nix.github.io/obamify/obamify.js" crossorigin="anonymous"><link rel="preload" href="https://spu7nix.github.io/obamify/obamify_bg.wasm" crossorigin="anonymous" as="fetch" type="application/wasm"></head> |
| 244 | + |
| 245 | +<body> |
| 246 | + <!-- The WASM code will resize the canvas dynamically --> |
| 247 | + <!-- the id is hardcoded in main.rs . so, make sure both match. --> |
| 248 | + <canvas id="the_canvas_id"></canvas> |
| 249 | + |
| 250 | + <!-- the loading spinner will be removed in main.rs --> |
| 251 | + <div class="centered" id="loading_text"> |
| 252 | + <noscript>You need javascript to use this website</noscript> |
| 253 | + <p style="font-size:16px"> |
| 254 | + Loading… |
| 255 | + </p> |
| 256 | + <div class="lds-dual-ring"></div> |
| 257 | + </div> |
| 258 | + |
| 259 | + <!-- Bottom-left corner icons --> |
| 260 | + <div class="bottom-left-icons"> |
| 261 | + <a href="https://github.com/Spu7Nix/obamify" class="icon-link" target="_blank" rel="noopener noreferrer"> |
| 262 | + <img src="assets/github-mark-white.svg" alt="source code" /> |
| 263 | + <span class="icon-text">source code</span> |
| 264 | + </a> |
| 265 | + <a href="https://spu7nix.net" class="icon-link" target="_blank" rel="noopener noreferrer"> |
| 266 | + <img src="assets/pfp_transparent.png" alt="Spu7Nix" /> |
| 267 | + <span class="icon-text">my website</span> |
| 268 | + </a> |
| 269 | + </div> |
| 270 | + |
| 271 | + <!--Register Service Worker. this will cache the wasm / js scripts for offline use (for PWA functionality). --> |
| 272 | + <!-- Force refresh (Ctrl + F5) to load the latest files instead of cached files --> |
| 273 | + <script> |
| 274 | + // We disable caching during development so that we always view the latest version. |
| 275 | + if ('serviceWorker' in navigator && window.location.hash !== "#dev") { |
| 276 | + window.addEventListener('load', function () { |
| 277 | + navigator.serviceWorker.register('sw.js'); |
| 278 | + }); |
| 279 | + } |
| 280 | + </script> |
| 281 | +</body> |
| 282 | + |
| 283 | +</html> |
| 284 | + |
| 285 | +<!-- Powered by egui: https://github.com/emilk/egui/ --> |
0 commit comments