change to html5 style
This commit is contained in:
parent
d43d44bf66
commit
a596f79814
|
@ -211,9 +211,10 @@ class BServer:
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>""" + _("Boxes - %s") % _(name), """</title>
|
<title>""" + _("Boxes - %s") % _(name), """</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
<link rel="icon" type="image/svg+xml" href="static/boxes-logo.svg" sizes="any">
|
<link rel="icon" type="image/svg+xml" href="static/boxes-logo.svg" sizes="any">
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico">
|
<link rel="icon" type="image/x-icon" href="static/favicon.ico">
|
||||||
<link rel="stylesheet" href="static/self.css" type="text/css" />
|
<link rel="stylesheet" href="static/self.css">
|
||||||
""", self.scripts % (len(box.argparser._action_groups)-3), """
|
""", self.scripts % (len(box.argparser._action_groups)-3), """
|
||||||
<meta name="flattr:id" content="456799">
|
<meta name="flattr:id" content="456799">
|
||||||
</head>
|
</head>
|
||||||
|
@ -229,7 +230,7 @@ class BServer:
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<hr />
|
<hr>
|
||||||
<h2 style="margin: 0px 0px 0px 20px;" >""", _(name), """</h2>
|
<h2 style="margin: 0px 0px 0px 20px;" >""", _(name), """</h2>
|
||||||
<p>""", _(box.__doc__) if box.__doc__ else "", """</p>
|
<p>""", _(box.__doc__) if box.__doc__ else "", """</p>
|
||||||
<form action="%s" method="GET">
|
<form action="%s" method="GET">
|
||||||
|
@ -264,7 +265,7 @@ class BServer:
|
||||||
</div>
|
</div>
|
||||||
-->
|
-->
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<hr />
|
<hr>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
""")
|
""")
|
||||||
no_img_msg = _('There is no image yet. Please donate an image of your project on <a href="https://github.com/florianfesti/boxes/issues/140">GitHub</a>!')
|
no_img_msg = _('There is no image yet. Please donate an image of your project on <a href="https://github.com/florianfesti/boxes/issues/140">GitHub</a>!')
|
||||||
|
@ -273,7 +274,7 @@ class BServer:
|
||||||
result.append(markdown.markdown(_(box.description)))
|
result.append(markdown.markdown(_(box.description)))
|
||||||
|
|
||||||
result.append(f'''<div>
|
result.append(f'''<div>
|
||||||
<img src="static/samples/{box.__class__.__name__}.jpg" width="100%" onerror="this.parentElement.innerHTML = '{no_img_msg}';"/>
|
<img src="static/samples/{box.__class__.__name__}.jpg" width="100%" onerror="this.parentElement.innerHTML = '{no_img_msg}';">
|
||||||
</div>
|
</div>
|
||||||
''')
|
''')
|
||||||
|
|
||||||
|
@ -297,9 +298,10 @@ class BServer:
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>""" + _("Boxes.py") + """</title>
|
<title>""" + _("Boxes.py") + """</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
<link rel="icon" type="image/svg+xml" href="static/boxes-logo.svg" sizes="any">
|
<link rel="icon" type="image/svg+xml" href="static/boxes-logo.svg" sizes="any">
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico">
|
<link rel="icon" type="image/x-icon" href="static/favicon.ico">
|
||||||
<link rel="stylesheet" href="static/self.css" type="text/css" />
|
<link rel="stylesheet" href="static/self.css">
|
||||||
<script>
|
<script>
|
||||||
function change(group, img_link){
|
function change(group, img_link){
|
||||||
document.getElementById("sample-"+group).src = img_link;
|
document.getElementById("sample-"+group).src = img_link;
|
||||||
|
@ -332,7 +334,7 @@ class BServer:
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<hr />
|
<hr>
|
||||||
<div class="menu" style="width: 100%">
|
<div class="menu" style="width: 100%">
|
||||||
""" ]
|
""" ]
|
||||||
for nr, group in enumerate(self.groups):
|
for nr, group in enumerate(self.groups):
|
||||||
|
@ -340,7 +342,7 @@ class BServer:
|
||||||
<h3 id="h-{nr}" class="open" onclick="showHide('{nr}')"
|
<h3 id="h-{nr}" class="open" onclick="showHide('{nr}')"
|
||||||
onmouseenter="change('{group.name}', 'static/samples/{group.thumbnail}')"
|
onmouseenter="change('{group.name}', 'static/samples/{group.thumbnail}')"
|
||||||
onmouseleave="changeback('{group.name}')">{_(group.title)}</h3>
|
onmouseleave="changeback('{group.name}')">{_(group.title)}</h3>
|
||||||
<img style="width: 200px;" id="sample-{group.name}" src="static/nothing.png" alt="" />
|
<img style="width: 200px;" id="sample-{group.name}" src="static/nothing.png" alt="">
|
||||||
<div id="{nr}"><ul>''')
|
<div id="{nr}"><ul>''')
|
||||||
for box in group.generators:
|
for box in group.generators:
|
||||||
name = box.__name__
|
name = box.__name__
|
||||||
|
@ -359,7 +361,7 @@ class BServer:
|
||||||
|
|
||||||
<div style="width: 5%; float: left;"></div>
|
<div style="width: 5%; float: left;"></div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<hr />
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
</div>""" + self.footer(lang) + """
|
</div>""" + self.footer(lang) + """
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue