Skip to content

Commit

Permalink
fix local demo
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfung888 committed Feb 6, 2020
1 parent a85d8a0 commit 88b636a
Show file tree
Hide file tree
Showing 8 changed files with 178 additions and 0 deletions.
14 changes: 14 additions & 0 deletions demo/alg.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src='../roofpig_and_three.min.js'></script>
<style>
body {font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size: 11px;}
.roofpig {width:160px; height:210px; float: left; margin:4px;}
</style>
</head>
<h2>Roofpig 'alg' demo</h2>
<div class="roofpig" data-config="alg=F U F' U F U2 F' | flags=showalg">Basic moves</div>

<div class="roofpig" data-config="alg=M E' S2 x y' z2 Rw Uw' Lw2 | flags=showalg">Standard advanced moves</div>

<div class="roofpig" data-config="alg=F+B' U+U< R2+LZ+U>>| algdisplay=rotations 2p| flags=showalg">Roofpig advanced moves</div>
30 changes: 30 additions & 0 deletions demo/cubexp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src='../roofpig_and_three.min.js'></script>
<style>
body {
font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
font-size: small
}
.roofpig {
width:100px;
height:116px;
margin: 4px;
float:left;
background-color: #cc9;
}
</style>
</head>
<h2>Roofpig Cubexp Lab</h2>

<div class="roofpig" data-config="colored=UFR DFR LF R">UFR DFR LF R</div>
<div class="roofpig" data-config="colored=UfR DFr lF R">UfR DFr lF R</div>
<div class="roofpig" data-config="colored=F*">F*</div>
<div class="roofpig" data-config="colored=FR*">FR*</div>
<div class="roofpig" data-config="colored=U-">U-</div>
<div class="roofpig" data-config="colored=BD-">BD-</div>
<div class="roofpig" data-config="colored=BLD-">BLD-</div>
<div class="roofpig" data-config="colored=FB-">FB-</div>
<div class="roofpig" data-config="colored=r">r</div>
<div class="roofpig" data-config="colored=*/mc">*/mc</div>
<div class="roofpig" data-config="colored=r/e">r/e</div>
29 changes: 29 additions & 0 deletions demo/other.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src='../roofpig_and_three.min.js'></script>
<style>
body {
font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
font-size: 10px;
}
div.roofpig {
width:120px;
height:160px;
margin: 0px;
float:left;
}
</style>
</head>
<h2>Roofpig various options Demo</h2>

<div class="roofpig" data-config="colors=F:r R:#fee U:#f99 L:pink B:#f44 D:#fdd">colors in pink</div>
<div class="roofpig" data-config="colors=solved:plum ignored:#cfc cube:yellow | colored=UD- | solved=D*">non sticker colors</div>
<div class="roofpig" data-config="flags=startsolved|alg=F L F U' R U F2 L2 U' L' B D' B' L2 U">startsolved</div>

<div class="roofpig" data-config="algdisplay=fancy2s | alg=F D2 UZ+R>>|flags=showalg">algdisplay=fancy2s</div>
<div class="roofpig" data-config="algdisplay=rotations 2p| alg=F D2 UZ+R>>|flags=showalg">algdisplay=rotations 2p</div>

<div class="roofpig" data-config="hover=far">hover=far</div>
<div class="roofpig" data-config="hover=5">hover=5</div>
<div class="roofpig" data-config="hover=near">hover=near</div>
<div class="roofpig" data-config="hover=none">hover=none</div>
33 changes: 33 additions & 0 deletions demo/readme.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<head>
<style>
body {
font-family: Calibri;
margin-left: 1em;
}
</style>
</head>
<body>
<h2>Offline demo</h2>
<p>
The original roofpig demos are at jsfiddle.net
They are no longer operational, because they tried to load the roofpig_and_three.js over http.
Therefore, I downloaded the demo file so I can run them offline.
</p><p>
The demo files refer to the roofpig JS file at the root of this repo.
The script has non-ANSI characters, and most browsers will not like it.
To browse the demo locally, you may need to manually add BOM at the start of the file.
A bom.txt is included under /lib for you.
</p>
<p>
Also, I added an extra demo file for the changes I made to the repo.
</p>
<h2>Demo pages</h2>
<ul>
<li><a href='alg.html'>alg notation demo</a></li>
<li><a href='cubexp.html'>cubeexp demo</a></li>
<li><a href='solved.html'>solved and colored demo</a></li>
<li><a href='tweaks.html'>setupmoves and tweaks demo</a></li>
<li><a href='other.html'>other parameters demo</a></li>
<li><a href='sample.html'>feature sample demo</a></li>
</ul>
</body>
22 changes: 22 additions & 0 deletions demo/sample.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src='../roofpig_and_three.min.js'></script>
<style>
body {
font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
font-size: 10px;
}
div.roofpig {
width:150px;
height:193px;
margin: 5px;
float:left;
}</style>
</head>
<h2>Roofpig Feature Sample</h2>

<div class="roofpig" data-config="alg=L' U2 L U2 R U' L' U L+R'| colored=U*| flags=showalg|hover=none">Simple. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Helpful -></div>

<div class="roofpig" data-config="alg=L+R U+R>>|colors=F:#fff B:#000 L:pink R:purple U:#0d0 D:#07f c:cyan|tweaks=x:Bdr X:Fdr" style="background-color:#dff;">Customizable. Edgy.</div>

<div class="roofpig" data-config="algdisplay=fancy2s | pov=dFr| alg=D'+D> F F>> R' U F>> L2 D2 L D2+D<< B R' U' B' U B2 R' B' R' B R D< L' B' L B' L2 B' L' B' L2 B L B L2 B2|flags=showalg|hover=far|speed=200" style="width:313px; height: 370px;">Big. Visible. Fast.</div>
27 changes: 27 additions & 0 deletions demo/solved.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src='../roofpig_and_three.min.js'></script>
<style>
body {
font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
font-size: small
}
.roofpig {
width:100px;
height:116px;
margin: 5px;
float:left;
background-color: #cc9;
}
</style>
</head>
<h2>Roofpig solved and colored Lab</h2>

<div class="roofpig" data-config="colored=D*/e */m">Cross</div>
<div class="roofpig" data-config="colored=U- U">F2L</div>
<div class="roofpig" data-config="colored=U*|solved=U-">PLL</div>
<div class="roofpig" data-config="colored=u|solved=U-">OLL</div>
<div class="roofpig" data-config="colored=ULB-">Petrus Step 1</div>
<div class="roofpig" data-config="colored=UL-">Petrus Step 2</div>
<div class="roofpig" data-config="colored=u/me f/me|solved=UF-">Petrus Step 3</div>
<div class="roofpig" data-config="colored=U- u/me UF|solved=UF-">Petrus Step 4</div>
22 changes: 22 additions & 0 deletions demo/tweaks.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src='../roofpig_and_three.min.js'></script>
<style>
body {
font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
font-size: small
}
.roofpig {
width:120px;
height:136px;
margin: 4px;
float:left;
}
</style>
</head>
<h2>Roofpig 'setupmoves' and 'tweaks' Lab</h2>

<div class="roofpig" data-config="setupmoves=M2 E2 ">setupmoves</div>
<div class="roofpig" data-config="solved=*|tweaks=F:Ubr R:ULB- B:UFL B:UL B:UBL">color tweaks</div>
<div class="roofpig" data-config="colored=D |solved=D |tweaks=X:UF x:RU X:Rf x:Fr">X tweaks</div>
<div class="roofpig" data-config="tweaks=U:Fur U:Luf U:Rub U:Ulb X:Rub x:Fur x:Luf x:Ubl| solved=U-| colored=u/me| colors=U:b| hover=2.7">All at once</div>
1 change: 1 addition & 0 deletions lib/bom.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@


0 comments on commit 88b636a

Please sign in to comment.