feat(board): python_pyodide板卡状态栏添加新tab 生命游戏
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
<style>
|
||||
div[m-id="{{d.mId}}"] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] .game-info {
|
||||
margin-bottom: 20px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] .grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(10, 30px);
|
||||
grid-template-rows: repeat(10, 30px);
|
||||
gap: 1px;
|
||||
margin: 20px auto;
|
||||
width: fit-content;
|
||||
background-color: #ddd;
|
||||
border: 2px solid #333;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] .cell {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background-color: white;
|
||||
border: 1px solid #ccc;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] .cell.alive {
|
||||
background-color: #4CAF50;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] .cell:hover {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] .cell.alive:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] .controls {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] button {
|
||||
padding: 10px 20px;
|
||||
margin: 0 5px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] .start-btn {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] .pause-btn {
|
||||
background-color: #ff9800;
|
||||
color: white;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] .reset-btn {
|
||||
background-color: #f44336;
|
||||
color: white;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] .random-btn {
|
||||
background-color: #9C27B0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] button:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] button:disabled {
|
||||
background-color: #cccccc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
div[m-id="{{d.mId}}"] .generation-counter {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin: 10px 0;
|
||||
padding-top: 10px;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
<div m-id="{{d.mId}}" class="page-item">
|
||||
<div class="generation-counter">{{d.epoch}}: <span class="generation">0</span></div>
|
||||
<div class="grid"></div>
|
||||
<div class="controls">
|
||||
<button class="start-btn">{{d.start}}</button>
|
||||
<button class="pause-btn" disabled>{{d.pause}}</button>
|
||||
<button class="random-btn">{{d.random}}</button>
|
||||
<button class="reset-btn">{{d.reset}}</button>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user