}
.yuu-overlay *:focus {
- box-shadow: 0 0 5px hsla(276, 66%, 80%, 1.0);
-moz-box-shadow: 0 0 5px hsla(276, 66%, 80%, 1.0);
-webkit-box-shadow: 0 0 5px hsla(276, 66%, 80%, 1.0);
+ box-shadow: 0 0 5px hsla(276, 66%, 80%, 1.0);
outline: none;
}
}
input[type=checkbox][data-yuu-command]:focus + label[for] {
- box-shadow: 0 0 5px hsla(276, 66%, 80%, 1.0);
-moz-box-shadow: 0 0 5px hsla(276, 66%, 80%, 1.0);
-webkit-box-shadow: 0 0 5px hsla(276, 66%, 80%, 1.0);
+ box-shadow: 0 0 5px hsla(276, 66%, 80%, 1.0);
outline: 0;
}
#!/usr/bin/env python
-# Turn a website into an HTML5 application with an application cache
-# manifest.
-#
-# http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html
-# https://developer.mozilla.org/en/docs/HTML/Using_the_application_cache
+"""Turn a website into an HTML5 application
+
+
+This turns a directory into the simplest possible offline web
+application, by making a manifest containing every file in the
+directory, then inserting it into each HTML document.
+
+For more information about the HTML5 application cache, see:
+
+- http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html
+- https://developer.mozilla.org/en/docs/HTML/Using_the_application_cache
+
+"""
import os
import re
-import shutil
import time
+
def is_html(filename):
return filename.lower().endswith(".html")
+
def main(appdir):
if not os.path.isdir(appdir):
raise StandardError("input (%r) is not a directory" % appdir)
try:
appdir = sys.argv[1]
except IndexError:
- raise SystemExit("Usage: %s appdir" %(
- sys.argv[0]))
+ raise SystemExit("Usage: %s appdir" % sys.argv[0])
else:
main(appdir)
-
import os
import re
-import shutil
import time
import json
+
def is_html(filename):
return filename.lower().endswith(".html")
+
def attr(name):
- return "data-" + name + """=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?"""
+ return ("data-" + name
+ + """=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?""")
+
def main(appdir, version=None):
if not os.path.isdir(appdir):
for root, dirnames, filenames in os.walk(appdir):
root = os.path.relpath(root, appdir)
for filename in filenames:
- if filename.lower() == "index.html":
+ flower = filename.lower()
+ if flower == "index.html":
indexes.append(os.path.join(root, filename))
- if ("icon" in filename.lower()
- and filename.lower().endswith((".ico", ".png"))):
+ if ("icon" in flower and flower.endswith((".ico", ".png"))):
icons.append(os.path.join(root, filename))
indexes.sort(key=lambda fn: (fn.count("/"), fn))
import plistlib
import shutil
import json
-import re
-from os.path import join, basename
+from os.path import join
+
def xp_filename(basename):
return re.sub('["<>*?|\\\\]', "_",
basename.replace("/", "-").replace(":", "."))
+
def versionify(version):
return ".".join(filter(lambda x: x.isdigit(),
re.split("[-+.]", version))[:3])
+
def main(nwdir, nwpackage):
if not os.path.isdir(nwdir):
raise StandardError("input (%r) is not a directory" % nwdir)
nwzip = zipfile.ZipFile(nwpackage)
icnss = filter(lambda f: f.lower().endswith(".icns"),
- nwzip.namelist())
+ nwzip.namelist())
package = json.load(nwzip.open("package.json"))
app = join(nwdir, "nwjs.app")
title = package["window"]["title"]
if __name__ == "__main__":
import sys
main(*sys.argv[1:])
-