Skip to content

Commit 5dab14b

Browse files
authored
Merge pull request #614 from OZI-Project/main
Release
2 parents f6298b6 + ebb8363 commit 5dab14b

6 files changed

Lines changed: 80 additions & 27 deletions

File tree

ozi_core/fix/parser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from ozi_core.ui.defaults import FIX_PRETTY
1717
from ozi_core.ui.defaults import FIX_STRICT
1818

19+
TRANSLATION.mime_type = 'text/plain;charset=UTF-8'
1920
parser = ArgumentParser(
2021
prog='ozi-fix',
2122
description=sys.modules[__name__].__doc__,

ozi_core/new/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def main(args: list[str] | None = None) -> None: # pragma: no cover
6767
ozi_new.argv = shlex.join(args) if args else shlex.join(sys.argv[1:])
6868
match ozi_new:
6969
case ozi_new if ozi_new.new in ['i', 'interactive']:
70-
TRANSLATION.mime_type = 'text/plain;charset=UTF-8'
7170
fd = sys.stdin.fileno()
7271
original_attributes = termios.tcgetattr(fd)
7372
tty.setraw(sys.stdin)

ozi_core/new/parser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from ozi_core._i18n import TRANSLATION
1515
from ozi_core.ui.defaults import COPYRIGHT_HEAD
1616

17+
TRANSLATION.mime_type = 'text/plain;charset=UTF-8'
1718
parser = argparse.ArgumentParser(
1819
prog='ozi-new',
1920
description=sys.modules[__name__].__doc__,

ozi_core/ui/ozi-fix.html

Lines changed: 70 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,80 @@
44
<meta charset="UTF-8" />
55
<title>ozi-fix webui</title>
66
<script src="webui.js"></script>
7-
<style>
8-
{webui_prompt_css}
9-
</style>
7+
<link href="css/style.css" rel="stylesheet">
108
</head>
119
<body>
12-
<!-- The Modal - Hidden by default but immediately shown by the backend -->
13-
<input type='checkbox' class="hide-modal" id="HideDisclaimer" checked>
14-
<div id="Disclaimer" class="modal">
15-
<!-- Modal content -->
10+
<div id="Disclaimer" class="modal" aria-modal="true">
1611
<div class="modal-content">
17-
<h3 id="Disclaimer-title">{TRANSLATION('adm-disclaimer-title')}</h3>
18-
<span class="close" id="CloseDisclaimer">&times;</span>
19-
<br>
20-
<textarea rows=20 cols=80 readonly>{disclaimer_text}</textarea>
12+
<h3 id="Disclaimer-title">{TRANSLATION('adm-disclaimer-title')}</h3>
13+
<span class="close" id="CloseDisclaimer">&times;</span>
14+
<hr>
15+
<span class="textarea" id="disclaimer-text" role="textbox" readonly>{disclaimer_text}</span>
2116
</div>
2217
</div>
23-
<input type='checkbox' id="HidePage1Contents" class="hide-page">
24-
<div id="Page1Contents", class="page">
25-
<h1>{TRANSLATION('web-core-metadata')}</h1>
26-
<nav aria-label="Breadcrumb" class="breadcrumb">
27-
<ol>
28-
<li id='Page1'><span aria-current="page">{TRANSLATION('web-core-metadata')}</span></li>
29-
<li id='Page2'>{TRANSLATION('edit-menu-btn-license')}</li>
30-
<li id='Page3'>{TRANSLATION('term-classifier')}{TRANSLATION('sp')}{TRANSLATION('term-metadata')}</li>
31-
</ol>
32-
</nav>
33-
<br>
34-
</div>
18+
<div id="OptionsContents" class="" aria-modal="true" hidden>
19+
<div class="modal-content">
20+
<h3 id="Options-title">{TRANSLATION('btn-options')}</h3>
21+
<span class="close" id="CloseOptions">&times;</span>
22+
<hr>
23+
<fieldset>
24+
<legend id="user-interface-options">{TRANSLATION('term-user-interface')}</legend>
25+
<label for="locale" id="label-locale">{TRANSLATION('opt-menu-language-text')}</label>
26+
<select id="locale">
27+
{locale_choices}
28+
</select>
29+
</fieldset>
30+
<fieldset>
31+
<legend id="output-options">{TRANSLATION('term-output')}</legend>
32+
<label for="copyright-head" id="label-copyright-head">{TRANSLATION('opt-menu-copyright-head-input')}</label>
33+
<h5 id="err-copyright-head" style="color: #dbdd52">&nbsp;</h5>
34+
<div class="row">
35+
<span
36+
class="textarea"
37+
id="copyright-head"
38+
OnKeyUp="document.getElementById('err-copyright-head').innerHTML='&nbsp;';"
39+
autocomplete="off"
40+
contenteditable
41+
>{config['new']['copyright_head'] if config['new']['copyright_head'] else COPYRIGHT_HEAD}</span>
42+
</div>
43+
<div class="row justify-end">
44+
<label for="update-wrapfile" id="label-update-wrapfile"
45+
>{TRANSLATION('opt-menu-update-wrapfile').replace('$value', '')}</label
46+
>
47+
<input type="checkbox" id="update-wrapfile" {'checked' if config['new']['update_wrapfile'] else ''}/>
48+
</div>
49+
</fieldset>
50+
<fieldset>
51+
<legend id="input-options">{TRANSLATION('term-input')}</legend>
52+
<div class="row justify-end">
53+
<label for="strict" id="label-strict"
54+
>{TRANSLATION('opt-menu-strict').replace('$value', '')}</label
55+
>
56+
<input type="checkbox" id="strict" />
57+
</div>
58+
<div class="row justify-end">
59+
<label for="pretty" id="label-pretty"
60+
>{TRANSLATION('opt-menu-pretty').replace('$value', '')}</label
61+
>
62+
<input type="checkbox" id="pretty" />
63+
</div>
64+
</fieldset>
65+
<button id="SaveOptions">{TRANSLATION('btn-save')}</button>
66+
</div>
67+
</div>
68+
<form id="ozi-fix" method="post">
69+
<h1 id="PageHeading">{TRANSLATION('web-core-metadata')}</h1>
70+
<nav aria-label="Breadcrumb" role="tablist" class="breadcrumb">
71+
<menu>
72+
<li id="Page1" role="tab" aria-controls="Page1Contents" aria-disabled="true" tabindex="-1" aria-current="page"><span>{TRANSLATION('term-missing').capitalize()}</span></li>
73+
<li id="Page2" role="tab" tabindex="0" aria-controls="Page2Contents">{TRANSLATION('edit-menu-btn-license')}</li>
74+
<li id="Page3" role="tab" tabindex="0" aria-controls="Page3Contents">{TRANSLATION('term-classifier')}{TRANSLATION('sp')}{TRANSLATION('term-metadata')}</li>
75+
<li id="Page4" role="tab" tabindex="0" aria-controls="Page4Contents">{TRANSLATION('term-create-project')}</li>
76+
</menu>
77+
<menu>
78+
<li id="Options" role="tab" tabindex="0" aria-controls="OptionsContents">{TRANSLATION('btn-options')}</li>
79+
</menu>
80+
</nav>
81+
</form>
3582
</body>
3683
</html>

ozi_core/ui/ozi-new.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
<meta charset="UTF-8" />
55
<title>ozi-new webui</title>
66
<script src="webui.js"></script>
7-
<link href="css/style.css" rel="stylesheet"></head>
7+
<link href="css/style.css" rel="stylesheet">
88
</head>
99
<body>
10-
<!-- The Modal - Hidden by default but immediately shown by the backend -->
1110
<div id="Disclaimer" class="modal" aria-modal="true">
12-
<!-- Modal content -->
1311
<div class="modal-content">
1412
<h3 id="Disclaimer-title">{TRANSLATION('adm-disclaimer-title')}</h3>
1513
<span class="close" id="CloseDisclaimer">&times;</span>

ozi_core/ui/style.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
11
@font-face {
22
font-family: 'AtkinsonHyperlegible' sans-serif;
33
font-weight: normal;
4+
font-display: swap;
45
/* Chrome 4+, Firefox 3.5, Opera 10+, Safari 3—5 */
56
src: url('https://oziproject.dev/assets/brand/fonts/atkinsonhyperlegible/AtkinsonHyperlegible-Regular.ttf') format('truetype');
67
}
78
@font-face {
89
font-family: 'AtkinsonHyperlegible' sans-serif;
910
font-weight: bold;
11+
font-display: swap;
1012
/* Chrome 4+, Firefox 3.5, Opera 10+, Safari 3—5 */
1113
src: url('https://oziproject.dev/assets/brand/fonts/atkinsonhyperlegible/AtkinsonHyperlegible-Bold.ttf') format('truetype');
1214
}
1315
@font-face {
1416
font-family: 'AtkinsonHyperlegible' sans-serif;
1517
font-weight: normal;
1618
font-style: italic;
19+
font-display: swap;
1720
/* Chrome 4+, Firefox 3.5, Opera 10+, Safari 3—5 */
1821
src: url('https://oziproject.dev/assets/brand/fonts/atkinsonhyperlegible/AtkinsonHyperlegible-Italic.ttf') format('truetype');
1922
}
2023
@font-face {
2124
font-family: 'AtkinsonHyperlegible' sans-serif;
2225
font-weight: bold;
2326
font-style: italic;
27+
font-display: swap;
2428
/* Chrome 4+, Firefox 3.5, Opera 10+, Safari 3—5 */
2529
src: url('https://oziproject.dev/assets/brand/fonts/atkinsonhyperlegible/AtkinsonHyperlegible-BoldItalic.ttf') format('truetype');
2630
}
2731
@font-face {
2832
font-family: 'NotoSerifHK' serif;
2933
font-weight: 200 900;
34+
font-display: swap;
35+
font-variant-east-asian: traditional;
3036
/* Chrome 4+, Firefox 3.5, Opera 10+, Safari 3—5 */
3137
src: url('https://oziproject.dev/assets/brand/fonts/notoserifhk/NotoSerifHK[wght].ttf') format('truetype supports variations');
3238
}
3339
@font-face {
3440
font-family: 'MartianMono' monospace;
3541
font-weight: 100 800;
3642
font-stretch: 75% 112.5%;
43+
font-display: swap;
3744
/* Chrome 4+, Firefox 3.5, Opera 10+, Safari 3—5 */
3845
src: url('https://oziproject.dev/assets/brand/fonts/martianmono/MartianMono[wdth\,wght].ttf') format('truetype supports variations');
3946
}

0 commit comments

Comments
 (0)