Skip to content

Commit

Permalink
Merge pull request evilsocket#517 from neutralinsomniac/fix_pixelated…
Browse files Browse the repository at this point in the history
…_css

fix: use a css class for the pixelated property, since apparently this still isn't standardized among different browsers
  • Loading branch information
evilsocket authored Nov 4, 2019
2 parents c219864 + 9f9fca0 commit 2549433
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions pwnagotchi/ui/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ def update_frame(img):
cursor: pointer;
text-align: center;
}
.pixelated {
image-rendering:optimizeSpeed; /* Legal fallback */
image-rendering:-moz-crisp-edges; /* Firefox */
image-rendering:-o-crisp-edges; /* Opera */
image-rendering:-webkit-optimize-contrast; /* Safari */
image-rendering:optimize-contrast; /* CSS3 Proposed */
image-rendering:crisp-edges; /* CSS4 Proposed */
image-rendering:pixelated; /* CSS4 Proposed */
-ms-interpolation-mode:nearest-neighbor; /* IE8+ */
}
"""

SCRIPT = """
Expand All @@ -48,8 +58,8 @@ def update_frame(img):
<style>""" + STYLE + """</style>
</head>
<body>
<div style="position: absolute; top:0; left:0; width:100%%;">
<img src="/ui" id="ui" style="width:100%%;image-rendering: pixelated;"/>
<div style="position: absolute; top:0; left:0; width:100%%;" class="pixelated">
<img src="/ui" id="ui" style="width:100%%;"/>
<br/>
<hr/>
<form style="display:inline;" method="POST" action="/shutdown" onsubmit="return confirm('This will halt the unit, continue?');">
Expand Down

0 comments on commit 2549433

Please sign in to comment.