-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 2b1ac40 🚀
- Loading branch information
0 parents
commit 87e6280
Showing
13 changed files
with
1,757 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
# Author: emilk, https://github.com/emilk/eframe_template/blob/master/.github/workflows/pages.yml | ||
|
||
name: Github Pages | ||
|
||
# By default, runs if you push to master. keeps your deployed app in sync with master branch. | ||
on: | ||
push: | ||
branches: | ||
- main | ||
# to only run when you do a new github release, comment out above part and uncomment the below trigger. | ||
# on: | ||
# release: | ||
# types: | ||
# - published | ||
|
||
permissions: | ||
contents: write # for committing to gh-pages branch. | ||
|
||
jobs: | ||
build-github-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 # repo checkout | ||
- uses: actions-rs/toolchain@v1 # get rust toolchain for wasm | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: wasm32-unknown-unknown | ||
override: true | ||
- name: Rust Cache # cache the rust build artefacts | ||
uses: Swatinem/rust-cache@v1 | ||
- name: Download and install Trunk binary | ||
run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- | ||
- name: Build # build | ||
# "${GITHUB_REPOSITORY#*/}" evaluates into the name of the repository | ||
# using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico . | ||
# this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested | ||
# relatively as eframe_template/favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which | ||
# will obviously return error 404 not found. | ||
run: ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}" | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: dist | ||
# this option will not maintain any history of your previous pages deployment | ||
# set to false if you want all page build to be committed to your gh-pages branch history | ||
single-commit: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Rust Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
release: | ||
name: release ${{ matrix.target }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [ {name: x86_64-pc-windows-gnu} ] | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Compile and release | ||
uses: rust-build/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
TOOLCHAIN_VERSION: nightly | ||
RUSTTARGET: ${{ matrix.target.name }} | ||
STATIC_LINKING: true | ||
EXTRA_FILES: "README.md LICENSE config.toml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
# Default view settings | ||
show_timer_miliseconds = false | ||
show_delta = true | ||
show_neighbors = true | ||
unlimited_zoom = false # enabling may lead to extreme increase in memory usage | ||
probe_marked = false | ||
tile_spacings = [0.0, 0.0, 10.0, 10.0] | ||
|
||
# YELLOW, BROWN, LIGHT_GREEN, WHITE, KHAKI, DARK_BLUE, DARK_GREEN, GOLD | ||
highlight_colors = [ "#FFFF00", "#A52A2A", "#90EE90", "#FFFFFF", "#F0E68C", "#000088", "#006400", "#FFD700" ] | ||
|
||
# Default values for a new game | ||
default_preset = 6 | ||
|
||
[[preset]] | ||
name = "2D Minesweeper - Beginner" | ||
size = [9, 9, 1, 1, 1, 1] | ||
mines = 10 | ||
|
||
[[preset]] | ||
name = "2D Minesweeper - Intermediate" | ||
size = [16, 16, 1, 1, 1, 1] | ||
mines = 40 | ||
|
||
[[preset]] | ||
name = "2D Minesweeper - Expert" | ||
size = [30, 16, 1, 1, 1, 1] | ||
mines = 99 | ||
|
||
[[preset]] | ||
name = "3D Minesweeper - Rubik" | ||
size = [3, 3, 3, 1, 1, 1] | ||
mines = 5 | ||
|
||
[[preset]] | ||
name = "4D Minesweeper - Sudoku" | ||
size = [3, 3, 3, 3, 1, 1] | ||
mines = 15 | ||
|
||
[[preset]] | ||
name = "4D Minesweeper - Elevator" | ||
size = [4, 4, 3, 4, 1, 1] | ||
wrap = [false, false, false, true, false, false] | ||
mines = 15 | ||
|
||
[[preset]] | ||
name = "4D Minesweeper - 4^4" | ||
size = [4, 4, 4, 4, 1, 1] | ||
mines = 20 | ||
|
||
[[preset]] | ||
name = "6D Minesweeper - 3^6" | ||
size = [3, 3, 3, 3, 3, 3] | ||
mines = 60 |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
|
||
<!-- Disable zooming: --> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | ||
|
||
|
||
<!-- change this to your project name --> | ||
<title>eframe template</title> | ||
|
||
<!-- config for our rust wasm binary. go to https://trunkrs.dev/assets/#rust for more customization --> | ||
<script type="module">import init from '/minesweeper6d/minesweeper6d-a4918a98ca055792.js';init('/minesweeper6d/minesweeper6d-a4918a98ca055792_bg.wasm');</script> | ||
<!-- this is the base url relative to which other urls will be constructed. trunk will insert this from the public-url option --> | ||
<base href="/minesweeper6d/"> | ||
|
||
<link rel="icon" href="/minesweeper6d/favicon-f402c8741ce815ec.ico"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<link rel="manifest" href="manifest.json"> | ||
<link rel="apple-touch-icon" href="icon_ios_touch_192.png"> | ||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white"> | ||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#404040"> | ||
|
||
<style> | ||
html { | ||
/* Remove touch delay: */ | ||
touch-action: manipulation; | ||
} | ||
|
||
body { | ||
/* Light mode background color for what is not covered by the egui canvas, | ||
or where the egui canvas is translucent. */ | ||
background: #909090; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
body { | ||
/* Dark mode background color for what is not covered by the egui canvas, | ||
or where the egui canvas is translucent. */ | ||
background: #404040; | ||
} | ||
} | ||
|
||
/* Allow canvas to fill entire web page: */ | ||
html, | ||
body { | ||
overflow: hidden; | ||
margin: 0 !important; | ||
padding: 0 !important; | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
/* Position canvas in center-top: */ | ||
canvas { | ||
margin-right: auto; | ||
margin-left: auto; | ||
display: block; | ||
position: absolute; | ||
top: 0%; | ||
left: 50%; | ||
transform: translate(-50%, 0%); | ||
} | ||
|
||
.centered { | ||
margin-right: auto; | ||
margin-left: auto; | ||
display: block; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
color: #f0f0f0; | ||
font-size: 24px; | ||
font-family: Ubuntu-Light, Helvetica, sans-serif; | ||
text-align: center; | ||
} | ||
|
||
/* ---------------------------------------------- */ | ||
/* Loading animation from https://loading.io/css/ */ | ||
.lds-dual-ring { | ||
display: inline-block; | ||
width: 24px; | ||
height: 24px; | ||
} | ||
|
||
.lds-dual-ring:after { | ||
content: " "; | ||
display: block; | ||
width: 24px; | ||
height: 24px; | ||
margin: 0px; | ||
border-radius: 50%; | ||
border: 3px solid #fff; | ||
border-color: #fff transparent #fff transparent; | ||
animation: lds-dual-ring 1.2s linear infinite; | ||
} | ||
|
||
@keyframes lds-dual-ring { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
|
||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
</style> | ||
|
||
<link rel="preload" href="/minesweeper6d/minesweeper6d-a4918a98ca055792_bg.wasm" as="fetch" type="application/wasm" crossorigin=""> | ||
<link rel="modulepreload" href="/minesweeper6d/minesweeper6d-a4918a98ca055792.js"></head> | ||
|
||
<body> | ||
<!-- The WASM code will resize the canvas dynamically --> | ||
<!-- the id is hardcoded in main.rs . so, make sure both match. --> | ||
<canvas id="the_canvas_id"></canvas> | ||
|
||
<!--Register Service Worker. this will cache the wasm / js scripts for offline use (for PWA functionality). --> | ||
<!-- Force refresh (Ctrl + F5) to load the latest files instead of cached files --> | ||
<script> | ||
// We disable caching during development so that we always view the latest version. | ||
if ('serviceWorker' in navigator && window.location.hash !== "#dev") { | ||
window.addEventListener('load', function () { | ||
navigator.serviceWorker.register('sw.js'); | ||
}); | ||
} | ||
</script> | ||
|
||
|
||
|
||
|
||
|
||
</body></html><!-- Powered by egui: https://github.com/emilk/egui/ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "egui Template PWA", | ||
"short_name": "egui-template-pwa", | ||
"icons": [ | ||
{ | ||
"src": "./icon-256.png", | ||
"sizes": "256x256", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "./maskable_icon_x512.png", | ||
"sizes": "512x512", | ||
"type": "image/png", | ||
"purpose": "any maskable" | ||
}, | ||
{ | ||
"src": "./icon-1024.png", | ||
"sizes": "1024x1024", | ||
"type": "image/png" | ||
} | ||
], | ||
"lang": "en-US", | ||
"id": "/index.html", | ||
"start_url": "./index.html", | ||
"display": "standalone", | ||
"background_color": "white", | ||
"theme_color": "white" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.