responsiveness

This commit is contained in:
2025-07-05 01:13:17 +00:00
parent 59abe5f5a1
commit 8082ec66ea

View File

@ -132,7 +132,10 @@
border-radius: 8px;
padding: 30px;
z-index: 1000;
max-width: 500px;
max-width: 90vw;
width: 800px;
max-height: 80vh;
overflow-y: auto;
display: none;
}
@ -140,16 +143,26 @@
margin-bottom: 20px;
color: #fff;
font-size: 18px;
text-align: center;
}
.help-content {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 30px;
margin-top: 20px;
}
#help-popup .help-section {
margin-bottom: 20px;
margin-bottom: 0;
}
#help-popup .help-section h4 {
color: #ccc;
margin-bottom: 10px;
font-size: 14px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
padding-bottom: 5px;
}
#help-popup .help-section p {
@ -383,6 +396,125 @@
z-index: 1001;
display: none;
}
/* Responsive Design */
@media (max-width: 768px) {
#topbar {
flex-wrap: wrap;
height: auto;
padding: 10px;
}
#topbar .title {
margin-right: 10px;
margin-bottom: 5px;
}
#topbar .controls {
flex-wrap: wrap;
gap: 5px;
margin-left: 0;
}
#topbar button {
padding: 4px 8px;
font-size: 11px;
}
#topbar label {
font-size: 11px !important;
margin-right: 5px !important;
}
#topbar select {
padding: 2px !important;
font-size: 11px !important;
}
#help-popup {
width: 95vw;
max-width: 95vw;
max-height: 90vh;
padding: 20px;
}
.help-content {
grid-template-columns: 1fr;
gap: 20px;
}
#editor-panel {
height: 120px;
}
#editor {
font-size: 14px;
padding: 10px;
}
#shader-library {
width: 100%;
right: -100%;
}
#shader-library-trigger {
width: 30px;
}
}
@media (max-width: 480px) {
#topbar {
padding: 5px;
}
#topbar .title {
font-size: 12px;
}
#topbar button {
padding: 3px 6px;
font-size: 10px;
}
#topbar label {
font-size: 10px !important;
}
#topbar select {
font-size: 10px !important;
}
#help-popup {
padding: 15px;
}
#help-popup h3 {
font-size: 16px;
}
#help-popup .help-section h4 {
font-size: 13px;
}
#help-popup .help-section p {
font-size: 11px;
}
#editor-panel {
height: 100px;
}
#editor {
font-size: 12px;
padding: 8px;
}
}
@media (min-width: 1200px) {
.help-content {
grid-template-columns: repeat(3, 1fr);
}
}
</style>
</head>
<body>
@ -457,6 +589,7 @@
<button class="close-btn">&times;</button>
<h3>Bitfielder Help</h3>
<div class="help-content">
<div class="help-section">
<h4>Keyboard Shortcuts</h4>
<p><strong>Ctrl+Enter</strong> - Execute shader code</p>
@ -467,13 +600,6 @@
<p><strong>?</strong> - Show this help</p>
</div>
<div class="help-section">
<h4>Shader Library</h4>
<p>Hover over the <strong>right edge</strong> of the screen to access the shader library</p>
<p>Save shaders with custom names and search through them</p>
<p>Use <strong>edit</strong> to rename, <strong>del</strong> to delete</p>
</div>
<div class="help-section">
<h4>Variables</h4>
<p><strong>x, y</strong> - Pixel coordinates</p>
@ -489,6 +615,13 @@
<p><strong>+ - * / %</strong> - Math operations</p>
</div>
<div class="help-section">
<h4>Shader Library</h4>
<p>Hover over the <strong>right edge</strong> of the screen to access the shader library</p>
<p>Save shaders with custom names and search through them</p>
<p>Use <strong>edit</strong> to rename, <strong>del</strong> to delete</p>
</div>
<div class="help-section">
<h4>Render Modes</h4>
<p><strong>Classic</strong> - Original colorful mode</p>
@ -503,6 +636,7 @@
<p><strong>Export PNG</strong> - Save current frame as image</p>
</div>
</div>
</div>
<div id="performance-warning">
Performance warning: Shader taking too long to render!