Skip to content

Commit

Permalink
视窗调整
Browse files Browse the repository at this point in the history
  • Loading branch information
Weslie0803 committed Oct 24, 2022
1 parent 755609c commit 3203eaa
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
抽奖软件UI.zip
analysis.md
抽奖方案设计3.0(2).pdf
抽奖软件UI/
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
your browser</a> to improve your experience.</p>
<![endif]-->
<div id="container" class="container">
<div id="stage">
<!-- <div id="stage">
<div id="shape" class="cube backfaces cubeShow_0">
<div id="card0" class="plane one">0</div>
<div id="card1" class="plane two">1</div>
Expand All @@ -28,7 +28,7 @@
<div id="card8" class="plane nine">8</div>
<div id="card9" class="plane ten">9</div>
</div>
</div>
</div> -->
<div class="row">
<div class="col-xs-4">
<div id="num1" class="showNum"></div>
Expand Down
28 changes: 19 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,25 @@ $(document).ready(function () {
const url = new URL(window.location.href);
var minNum = 1, maxNum = 999, size = 4, hasBackground = false, cardBackground = false, showMode = 0;

minNum = parseInt(url.searchParams.get("min") || "1");
maxNum = parseInt(url.searchParams.get("max") || "999");
if (maxNum<1000)
{
$("#num4").parent().remove();
$(".col-xs-4").css("width","33.33333333%");
size=3;
}
else size = 4;
minNum = parseInt(url.searchParams.get("min") || "0");
maxNum = parseInt(url.searchParams.get("max") || "99");
if (maxNum<1000) {
$("#num4").parent().remove();
$(".col-xs-4").css("width","33.33333333%");
size=3;
if (maxNum < 100) {
$("#num3").parent().remove();
$(".col-xs-4").css("width", "50%");
size=2;
if (maxNum<10) {
$("#num2").parent().remove();
$(".col-xs-4").css("width", "100%");
$(".container").css("max-width", "400px");
size=1;
}
}
}
else size = 4;
const customBackground = url.searchParams.get("bg_url");
cardBackground = false;
showMode = 1;
Expand Down
5 changes: 3 additions & 2 deletions scripts.72999ec6.css
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ body {
}

.showNum {
height: 200px;
height: 400px;
border: 1px solid #fff;
border-radius: 12px;
box-sizing: border-box;
Expand All @@ -810,7 +810,8 @@ body {

.row {
margin-right: 0;
margin-left: 0
margin-left: 0;
margin-top: 15%
}

body {
Expand Down

0 comments on commit 3203eaa

Please sign in to comment.