Checkpoint current interactive fiction state

This commit is contained in:
2026-05-14 21:17:43 +02:00
parent c745efd1d2
commit 873049f7e6
183 changed files with 13755 additions and 1459 deletions
+186 -38
View File
@@ -112,6 +112,9 @@ body.switched {
}
:root {
--book-width: 2727px;
--book-height: 1691px;
--book-scale: 1;
font-size: calc(var(--book-height)/(34 * 1.5));
--img-aspect-ratio: 1.613;
--aspect-ratio: min(var(--viewport-aspect-ratio), var(--img-aspect-ratio));
@@ -194,7 +197,7 @@ h3 {
p, #ruler,#indent {
font-size: 1.2rem;
line-height: 1.2;
line-height: 1.45;
color: rgba(0,0,0,0.9);
margin-block-end: 0;
margin-block-start: 0;
@@ -234,6 +237,14 @@ img {
text-transform: uppercase;
}
.story-drop-cap {
position: absolute;
left: 0;
top: 0;
font-size: calc(2 * 1.45em);
line-height: 1;
}
.drop-quote {
font-size: 180%;
line-height: 1;
@@ -366,7 +377,9 @@ ol.choice {
}
#book {
position: relative;
position: fixed;
left: 50%;
top: 50%;
width: var(--book-width);
height: var(--book-height);
background-image: url('../images/book-3057904.png');
@@ -375,6 +388,8 @@ ol.choice {
background-repeat: no-repeat; /* Prevents repeating the image when aspect ratio doesn't match */
perspective: 500px;
perspective-origin: 50% 50%;
transform: translate(-50%, -50%) scale(var(--book-scale));
transform-origin: center center;
}
#page_left, #page_right {
@@ -410,7 +425,7 @@ ol.choice {
#page_right {
/* background-color: rgba(200,200,200,0.5); */
right: 7%;
height: calc(28 * 1.2 * 1.2rem);
height: calc(28 * 1.45 * 1.2rem);
padding-bottom: 0;
/* transform: translateX(-1%) translateY(2%) rotateX(0deg) rotateY(-1deg) rotateZ(0deg); */
}
@@ -554,16 +569,22 @@ ol.choice {
/* Command history */
#command_history {
max-height: 120px;
max-height: 8rem;
overflow-y: auto;
font-size: 16px;
margin-bottom: 15px;
font-size: 1rem;
line-height: 1.2;
margin-bottom: 1rem;
border-top: 1px solid #d1c8b9;
padding-top: 10px;
padding-top: 0.6rem;
scrollbar-width: thin;
scrollbar-color: #8b7765 rgba(255, 255, 255, 0.1);
}
#command_history .history-item {
margin-bottom: 0.25rem;
color: rgba(0, 0, 0, 0.82);
}
#command_history::-webkit-scrollbar {
width: 6px;
}
@@ -643,6 +664,20 @@ ol.choice {
z-index: 1; /* Ensure cursor appears above text */
}
html[data-process-state="command-waiting"],
html[data-process-state="command-waiting"] * {
cursor: var(--process-cursor, wait) !important;
}
html[data-process-state="waiting-generating"],
html[data-process-state="waiting-generating"] *,
html[data-process-state="playing-generating"],
html[data-process-state="playing-generating"] *,
html[data-process-state="playing-ready"],
html[data-process-state="playing-ready"] * {
cursor: var(--process-cursor, progress) !important;
}
/* Placeholder styling - lighter and italic, with padding to avoid cursor overlap */
#player_input::placeholder {
color: #aaa;
@@ -691,13 +726,37 @@ ol.choice {
text-align: justify;
text-justify: inter-word;
margin-bottom: 1.2em;
line-height: 1.5;
line-height: 1.45;
}
#story p.story-chapter-heading {
position: relative;
height: auto;
margin: 0 0 1.45em 0;
text-align: center;
font-size: 1.2rem;
font-style: italic;
line-height: 1.45;
}
#story p.story-textblock-start {
margin-top: 1.45em;
}
/* Typography for word elements in rendered paragraphs */
.word {
display: inline-block;
position: absolute;
opacity: 0;
visibility: hidden;
}
strong {
font-weight: bold;
}
em {
font-style: italic;
}
/* Typography for hyphen at line breaks */
@@ -722,6 +781,29 @@ ol.choice {
margin: 0 5px;
}
body:not([data-game-running="true"]) #command_input {
display: none;
}
#start_prompt {
position: absolute;
inset: 0;
display: none;
align-items: center;
justify-content: center;
text-align: center;
padding: 0 12%;
font-family: 'EB Garamond', var(--book-font), serif;
font-size: 34px;
font-style: italic;
color: rgba(45, 34, 24, 0.78);
pointer-events: none;
}
body:not([data-game-running="true"]) #start_prompt {
display: flex;
}
/* Options Modal Styling */
.modal {
position: fixed;
@@ -734,17 +816,21 @@ ol.choice {
align-items: center;
z-index: 1000;
background-color: rgba(0, 0, 0, 0.5);
box-sizing: border-box;
padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
.modal-content {
background-color: rgba(255, 252, 245, 0.97);
border-radius: 0.4rem;
box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.4);
width: calc(var(--book-height) * 0.7);
max-width: 90%;
max-height: calc(var(--book-height) * 0.9);
overflow-y: auto;
padding: 1.5rem;
width: min(42rem, calc(100vw - 2rem));
max-width: 100%;
max-height: calc(100vh - 2rem);
display: flex;
flex-direction: column;
overflow: hidden;
padding: 0;
font-family: 'EB Garamond', var(--book-font), serif;
color: #333;
position: relative;
@@ -756,11 +842,12 @@ ol.choice {
.modal-header {
display: flex;
flex: 0 0 auto;
justify-content: space-between;
align-items: center;
margin-bottom: 1.2rem;
margin-bottom: 0;
border-bottom: 1px solid #d9c8a9;
padding-bottom: 0.7rem;
padding: 1rem 1.5rem 0.7rem 1.5rem;
}
.modal-header h2 {
@@ -779,6 +866,7 @@ ol.choice {
cursor: pointer;
color: #7a6e59;
font-family: 'EB Garamond', var(--book-font), serif;
line-height: 1;
}
.close:hover {
@@ -789,6 +877,55 @@ ol.choice {
margin-bottom: 1.5rem;
}
.modal-body {
flex: 1 1 auto;
overflow-y: auto;
padding: 1rem 1.5rem;
}
.modal-footer {
flex: 0 0 auto;
border-top: 1px solid #d9c8a9;
padding: 0.8rem 1.5rem 1rem;
text-align: right;
}
.modal-footer button,
.option-item input[type="text"],
.option-item input[type="password"],
.option-item input[type="url"] {
background-color: transparent;
border: 1px solid black;
border-radius: 0.25rem;
color: rgba(0,0,0,0.9);
font-family: 'EB Garamond', var(--book-font), serif;
font-size: 1rem;
}
.modal-footer button {
padding: 0.35rem 1rem;
cursor: pointer;
}
.modal-footer button:hover {
background-color: rgba(0,0,0,0.06);
}
.option-item input[type="text"],
.option-item input[type="password"],
.option-item input[type="url"] {
box-sizing: border-box;
width: min(18rem, 60%);
padding: 0.3rem 0.5rem;
}
.option-item input[type="text"]:focus,
.option-item input[type="password"]:focus,
.option-item input[type="url"]:focus {
outline: none;
box-shadow: 0 0 0 2px rgba(90, 57, 33, 0.14);
}
.options-section h3 {
font-family: 'EB Garamond', var(--book-font), serif;
font-weight: normal;
@@ -804,6 +941,7 @@ ol.choice {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
margin-bottom: 0.7rem;
padding: 0.25rem 0;
}
@@ -812,6 +950,36 @@ ol.choice {
font-family: 'EB Garamond', var(--book-font), serif;
font-size: 1rem;
color: #4a4234;
flex: 1 1 auto;
}
.option-item .slider-value {
min-width: 3rem;
text-align: right;
}
.provider-status-list {
margin: 0.5rem 0 1rem;
border: 1px solid #e9ddc8;
border-radius: 0.25rem;
}
.provider-status-row {
display: grid;
grid-template-columns: minmax(7rem, 1fr) auto;
gap: 1rem;
padding: 0.35rem 0.5rem;
border-bottom: 1px solid #eee4d2;
font-size: 0.9rem;
}
.provider-status-row:last-child {
border-bottom: none;
}
.provider-status-value {
font-style: italic;
text-align: right;
}
/* Elegant checkboxes */
@@ -912,29 +1080,9 @@ ol.choice {
text-align: center;
}
/* API Settings in options Panel */
.api-settings-container {
margin-top: 10px;
padding: 10px;
border: 1px solid rgba(200, 200, 200, 0.2);
border-radius: 5px;
background-color: rgba(50, 50, 60, 0.3);
}
.api-settings-container input[type="text"],
.api-settings-container input[type="password"] {
width: 100%;
padding: 8px;
border: 1px solid #555;
border-radius: 4px;
background-color: rgba(30, 30, 35, 0.8);
color: #eee;
font-family: monospace;
}
.api-settings-container input[type="text"]::placeholder,
.api-settings-container input[type="password"]::placeholder {
color: #888;
.api-settings {
margin-top: 1rem;
padding: 0;
}
.elevenlabs-setting,