-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
137 lines (132 loc) · 3.71 KB
/
index.html
File metadata and controls
137 lines (132 loc) · 3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<title>Script Printer - シナリオテキストを収録用台本に変換</title>
<style>
:root {
--font-size: 12pt;
--font-size-large: 15pt;
--font-serif: "ヒラギノ明朝 Pro", "Hiragino Mincho Pro", serif;
--font-sans: "ヒラギノ角ゴ ProN", "Hiragino Kaku Gothic ProN", sans-serif;
--height: 210mm;
--padding-bottom: 40mm;
--margin: 10mm;
--highlight-color: #666666;
}
body {
writing-mode: vertical-rl;
font-family: var(--font-serif);
margin: var(--margin);
padding: 0;
height: var(--height);
}
.page {
box-sizing: border-box;
padding-bottom: var(--padding-bottom);
font-size: var(--font-size);
}
.character-dialogue {
display: inline-block; /* キャラクター名とセリフを縦に表示 */
margin-block: 3mm; /* キャラクター名とセリフのブロック間の余白 */
height: 100%;
position: relative;
}
.character-name {
font-weight: bold;
font-family: var(--font-sans);
position: absolute;
height: 40mm;
text-align: end;
padding-bottom: 2mm;
}
.dialogue {
margin-top: 50mm; /* キャラクター名とセリフの間の余白 */
display: block;
}
.highlighted {
font-weight: bold;
user-select: none;
cursor: pointer;
}
.highlighted .character-name {
background-color: var(--highlight-color);
color: white;
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
.highlighted .dialogue {
font-size: var(--font-size-large);
}
.dialogue-index {
position: absolute;
right: calc(-0.95 * var(--font-size));
color: var(--highlight-color);
font-family: var(--font-sans);
font-size: calc(0.75 * var(--font-size));
}
/* サマリのスタイル */
#scriptSummary {
margin-left: var(--margin);
input,
textarea {
font: inherit;
background: none;
padding: 0;
border: none;
height: 100%;
width: auto;
resize: none;
}
#characterList,
#dialogueCountResult {
font-family: var(--font-sans);
color: var(--highlight-color);
user-select: none;
}
label {
padding: 2px;
margin: 2px;
display: inline-block;
cursor: pointer;
border: 1px solid transparent;
&:has(input:checked) {
background-color: var(--highlight-color); /* チェックされたキャラクターの背景色 */
color: white;
font-weight: bold;
}
&:hover {
border: 1px solid var(--highlight-color);
}
input {
display: none;
}
}
}
/* 印刷時のスタイル */
@media print {
@page {
size: A4 landscape;
margin: var(--margin);
}
body {
margin: 0;
}
}
</style>
</head>
<body>
<!-- 概要を表示 -->
<div id="scriptSummary">
<h1>
<input type="file" id="fileInput" accept=".txt" onchange="loadScript()" />
<textarea id="fileTitle" style="display: none"></textarea>
</h1>
<p id="characterList"></p>
<p id="dialogueCountResult"></p>
</div>
<!-- 台本が表示されるコンテナ -->
<div id="scriptContainer" class="page"></div>
<script src="script.js"></script>
</body>
</html>