Cam's Pizzeria
+High-Performance Pizza Generation powered by WebAssembly
+Create Your Masterpiece
+Click the button to generate a random, high-performance pizza.
+diff --git a/.github/workflows/wasm-build.yml b/.github/workflows/wasm-build.yml new file mode 100644 index 0000000..3b12eb6 --- /dev/null +++ b/.github/workflows/wasm-build.yml @@ -0,0 +1,33 @@ +name: Build WASM Logic + +on: + push: + branches: [ feat-web-optimization-wasm, main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Emscripten + uses: mymindstorm/setup-emscripten@v1 + + - name: Compile C to WASM + run: | + emcc src/pizza.c -o docs/pizza.js \ + -s EXPORTED_FUNCTIONS='["_get_random_pizza_name", "_get_random_pizza_ingredients", "_calculate_parallax", "_malloc", "_free"]' \ + -s EXPORTED_RUNTIME_METHODS='["ccall", "cwrap", "UTF8ToString"]' \ + -s MODULARIZE=1 \ + -s EXPORT_NAME="Module" \ + -O3 + + - name: Deploy to GitHub Pages + uses: peaceiris/github-action-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs diff --git a/docs/css/print.min.css b/docs/css/print.min.css new file mode 100644 index 0000000..c39471f --- /dev/null +++ b/docs/css/print.min.css @@ -0,0 +1 @@ +@media print{*{color:#000!important;background:0 0!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline;color:#444!important}a[href]:after{content:' (' attr(href) ')'}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}} \ No newline at end of file diff --git a/docs/css/style.css` b/docs/css/style.css` new file mode 100644 index 0000000..a99ad87 --- /dev/null +++ b/docs/css/style.css` @@ -0,0 +1,158 @@ +:root { + --primary: #ff4d4d; + --primary-hover: #ff1a1a; + --bg-dark: #0f172a; + --bg-card: rgba(30, 41, 59, 0.7); + --text-main: #f8fafc; + --text-muted: #94a3b8; + --accent: #fbbf24; + --glass-border: rgba(255, 255, 255, 0.1); +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: 'Inter', sans-serif; + background-color: var(--bg-dark); + color: var(--text-main); + overflow-x: hidden; + min-height: 100vh; + display: flex; + justify-content: center; + align-items: center; +} + +.background-parallax { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: -1; + background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%); + opacity: 0.8; +} + +.container { + width: 100%; + max-width: 800px; + padding: 2rem; + text-align: center; +} + +.hero { + margin-bottom: 3rem; +} + +.title { + font-family: 'Pacifico', cursive; + font-size: 4rem; + margin-bottom: 0.5rem; +} + +.highlight { + color: var(--primary); +} + +.subtitle { + font-size: 1.2rem; + color: var(--text-muted); +} + +.wasm-badge { + background: linear-gradient(45deg, #6366f1, #a855f7); + color: white; + padding: 2px 8px; + border-radius: 4px; + font-size: 0.9rem; + font-weight: bold; +} + +.generator-card { + background: var(--bg-card); + backdrop-filter: blur(12px); + border: 1px solid var(--glass-border); + border-radius: 24px; + padding: 3rem; + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); + transition: transform 0.3s ease; +} + +.generator-card:hover { + transform: translateY(-5px); +} + +.card-header h2 { + font-size: 2rem; + margin-bottom: 1rem; +} + +.card-header p { + color: var(--text-muted); + margin-bottom: 2rem; +} + +.result-area { + margin-bottom: 2rem; + padding: 2rem; + background: rgba(0, 0, 0, 0.2); + border-radius: 16px; + border: 1px dashed var(--glass-border); +} + +.pizza-name { + font-size: 2.5rem; + font-weight: 900; + color: var(--accent); + margin-bottom: 1rem; + min-height: 3rem; +} + +.pizza-ingredients { + font-size: 1.1rem; + color: var(--text-main); + line-height: 1.6; + font-style: italic; +} + +.btn-primary { + background-color: var(--primary); + color: white; + border: none; + padding: 1rem 2.5rem; + font-size: 1.2rem; + font-weight: bold; + border-radius: 50px; + cursor: pointer; + transition: all 0.2s ease; + box-shadow: 0 10px 15px -3px rgba(255, 77, 77, 0.4); +} + +.btn-primary:hover { + background-color: var(--primary-hover); + transform: scale(1.05); + box-shadow: 0 20px 25px -5px rgba(255, 77, 77, 0.5); +} + +.info-footer { + margin-top: 3rem; + color: var(--text-muted); +} + +.stats-grid { + display: flex; + justify-content: center; + gap: 2rem; + margin-top: 1rem; + font-size: 0.9rem; +} + +.stat-item { + background: rgba(255, 255, 255, 0.05); + padding: 0.5rem 1rem; + border-radius: 8px; +} diff --git a/docs/css/style.min.css b/docs/css/style.min.css new file mode 100644 index 0000000..1af61bb --- /dev/null +++ b/docs/css/style.min.css @@ -0,0 +1 @@ +html{font-size:100%;overflow-y:scroll;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:none}body{font-size:14px;font-weight:400;line-height:1.61;margin:0}body,button,input,select,textarea{font-family:'Open Sans',sans-serif;color:#333}a{color:#12c}a:visited{color:#61c}a:focus{outline:thin dotted}a:hover,a:active{color:#c00;outline:0}b,strong{font-weight:bold}pre,code{font-family:monospace,monospace;font-size:1em}ul,ol{margin:1em 0;padding:0 0 0 20px}img{max-width:100%;border:0}body{background:#fff}header,footer,.container{max-width:45em;margin:0 auto}header{padding:0 .5em;color:#c90b0b}header img{float:left;border-radius:40px}header p{font-size:1.5em;font-weight:bold;padding-left:4em}header p span{font-size:.8em;font-weight:normal}.hero{font-size:1.2em;padding:2em;border-top:1px solid #ccc;border-bottom:1px solid #ccc;background-color:#f8f8f8}.content{padding:1em 1em}.content li{font-size:1.1em;list-style-type:none}li img{float:left;padding-right:1em}li p{font-size:.9em;font-style:italic}footer{padding:0 .5em;border-top:1px solid #ccc}footer span{font-style:italic;float:right}@media only screen and (max-width:480px){body{font-size:12px}header p{padding-left:4.5em}} \ No newline at end of file diff --git a/docs/img/.gitignore b/docs/img/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/docs/img/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/docs/img/2048.png b/docs/img/2048.png new file mode 100644 index 0000000..c2203ca Binary files /dev/null and b/docs/img/2048.png differ diff --git a/docs/img/DeskTop-Score-90+.png b/docs/img/DeskTop-Score-90+.png new file mode 100644 index 0000000..4a04c03 Binary files /dev/null and b/docs/img/DeskTop-Score-90+.png differ diff --git a/docs/img/Pizzera-FPS.png b/docs/img/Pizzera-FPS.png new file mode 100644 index 0000000..b5ba497 Binary files /dev/null and b/docs/img/Pizzera-FPS.png differ diff --git a/docs/img/Screen Shot 2017-07-16 at 11.20.31 PM.png b/docs/img/Screen Shot 2017-07-16 at 11.20.31 PM.png new file mode 100644 index 0000000..8e3f24f Binary files /dev/null and b/docs/img/Screen Shot 2017-07-16 at 11.20.31 PM.png differ diff --git a/docs/img/cam_be_like.jpg b/docs/img/cam_be_like.jpg new file mode 100644 index 0000000..2a58b31 Binary files /dev/null and b/docs/img/cam_be_like.jpg differ diff --git a/docs/img/index-page-FPS.png b/docs/img/index-page-FPS.png new file mode 100644 index 0000000..419edb5 Binary files /dev/null and b/docs/img/index-page-FPS.png differ diff --git a/docs/img/mobile-score-90+.png b/docs/img/mobile-score-90+.png new file mode 100644 index 0000000..05d60cc Binary files /dev/null and b/docs/img/mobile-score-90+.png differ diff --git a/docs/img/mobilewebdev.jpg b/docs/img/mobilewebdev.jpg new file mode 100644 index 0000000..3a71425 Binary files /dev/null and b/docs/img/mobilewebdev.jpg differ diff --git a/docs/img/profilepic.jpg b/docs/img/profilepic.jpg new file mode 100644 index 0000000..a503d1c Binary files /dev/null and b/docs/img/profilepic.jpg differ diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..2cf1548 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,49 @@ + + +
+ + +High-Performance Pizza Generation powered by WebAssembly
+Click the button to generate a random, high-performance pizza.
+