Skip to content

Commit 7ea5d5d

Browse files
committed
SConstruct and style.css: latest add-on template edits.
Template edits: * Custom version in ad-don readme title * HTML5 * CSS edits
1 parent edd254a commit 7ea5d5d

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

sconstruct

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NVDA add-on template SCONSTRUCT file
2-
#Copyright (C) 2012, 2014 Rui Batista <[email protected]>
3-
#This file is covered by the GNU General Public License.
4-
#See the file COPYING.txt for more details.
2+
# Copyright (C) 2012-2020 Rui Batista, Noelia Martinez, Joseph Lee
3+
# This file is covered by the GNU General Public License.
4+
# See the file COPYING.txt for more details.
55

66
import codecs
77
import gettext
@@ -27,13 +27,12 @@ def md2html(source, dest):
2727
mdText = mdText.replace(k, v, 1)
2828
htmlText = markdown.markdown(mdText)
2929
with codecs.open(dest, "w", "utf-8") as f:
30-
f.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
31-
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n" +
32-
" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n" +
33-
"<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"%s\" lang=\"%s\">\n" % (lang, lang) +
30+
f.write("<!DOCTYPE html>\n" +
31+
"<html lang=\"%s\">\n" % lang +
3432
"<head>\n" +
35-
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n" +
36-
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\" media=\"screen\"/>\n" +
33+
"<meta charset=\"UTF-8\">\n" +
34+
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n" +
35+
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\" media=\"screen\">\n" +
3736
"<title>%s</title>\n" % title +
3837
"</head>\n<body>\n"
3938
)
@@ -71,6 +70,9 @@ elif env["version"] is not None:
7170
if "channel" in env and env["channel"] is not None:
7271
env["addon_updateChannel"] = env["channel"]
7372

73+
buildVars.addon_info["addon_version"] = env["addon_version"]
74+
buildVars.addon_info["addon_updateChannel"] = env["addon_updateChannel"]
75+
7476
addonFile = env.File("${addon_name}-${addon_version}.nvda-addon")
7577

7678
def addonGenerator(target, source, env, for_signature):
@@ -120,8 +122,6 @@ def createAddonBundleFromPath(path, dest):
120122

121123
def generateManifest(source, dest):
122124
addon_info = buildVars.addon_info
123-
addon_info["addon_version"] = env["addon_version"]
124-
addon_info["addon_updateChannel"] = env["addon_updateChannel"]
125125
with codecs.open(source, "r", "utf-8") as f:
126126
manifest_template = f.read()
127127
manifest = manifest_template.format(**addon_info)

style.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
@charset "utf-8";
22
body {
33
font-family : Verdana, Arial, Helvetica, Sans-serif;
4-
color : #FFFFFF;
5-
background-color : #000000;
64
line-height: 1.2em;
75
}
86
h1, h2 {text-align: center}
@@ -26,5 +24,3 @@ a { text-decoration : underline;
2624
text-decoration : none;
2725
}
2826
a:focus, a:hover {outline: solid}
29-
:link {color: #0000FF;
30-
background-color: #FFFFFF}

0 commit comments

Comments
 (0)