Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add styles for userguide and changes #12027

Merged
merged 6 commits into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ dlldata.c
*.pdb
.sconsign.dblite
user_docs/*/*.html
user_docs/*/*.css
user_docs/*/keyCommands.t2t
user_docs/build.t2tConf
extras/controllerClient/x86/nvdaController.h
extras/controllerClient/x64
extras/controllerClient/arm64
source/_buildVersion.py
user_docs/*/keyCommands.t2t
output
testOutput
user_docs/build.t2tConf
launcher/nvda_logo.wav
uninstaller/UAC.nsh
*.pyc
Expand Down
21 changes: 20 additions & 1 deletion sconstruct
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,30 @@ t2tBuildConf = env.Textfile(userDocsDir.File("build.t2tConf"), [
r"%!PreProc: NVDA_COPYRIGHT_YEARS {}".format(versionInfo.copyrightYears),
])

userGuideConf = os.path.join(userDocsDir.path, 'userGuide.t2tconf')
globalConf = os.path.join(userDocsDir.path, 'global.t2tconf')
changesConf = os.path.join(userDocsDir.path, 'changes.t2tconf')
styles = os.path.join(userDocsDir.path, 'styles.css')

#Allow all t2t files to be converted to html in user_docs
#As we use scons Glob this will also include the keyCommands.t2t files
for t2tFile in env.Glob(os.path.join(userDocsDir.path,'*','*.t2t')):
htmlFile=env.txt2tags(t2tFile)
#txt2tags can not be run in parallel so make sure scons knows this
env.SideEffect('_txt2tags',htmlFile)
# All of our t2t files require build.t2tConf.
env.Depends(htmlFile,t2tBuildConf)
styleInstallPath = os.path.dirname(t2tFile.abspath)
installedStyle = env.Install(styleInstallPath, styles)
env.Depends(
htmlFile,
[
t2tBuildConf,
userGuideConf,
globalConf,
changesConf,
styles,
installedStyle
])
# Build unicode CLDR dictionaries
env.SConscript('cldrDict_sconscript',exports=['env', 'sourceDir'])

Expand Down Expand Up @@ -402,9 +418,12 @@ env.Alias("launcher", launcher)
clientArchive = env.ZipArchive(outputDir.File("%s_controllerClient.zip" % outFilePrefix), clientDir, relativeTo=clientDir)
env.Alias("client", clientArchive)

outputStylesFile=env.Command(outputDir.File("styles.css"),userDocsDir.File('styles.css'),Copy('$TARGET','$SOURCE'))
changesFile=env.Command(outputDir.File("%s_changes.html" % outFilePrefix),userDocsDir.File('en/changes.html'),Copy('$TARGET','$SOURCE'))
env.Depends(changesFile, outputStylesFile)
env.Alias('changes',changesFile)
userGuideFile=env.Command(outputDir.File("userGuide.html"),userDocsDir.File('en/userGuide.html'),Copy('$TARGET','$SOURCE'))
env.Depends(userGuideFile, outputStylesFile)
env.Alias('userGuide',userGuideFile)

def makePot(target, source, env):
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ What's New in NVDA
- NVDA now prevents the user from performing Windows 10 OCR if screen curtain is enabled. (#11911)
- Updated Unicode Common Locale Data Repository (CLDR) to 38.1. (#11943)
- Added more mathematical symbols to the symbols dictionary. (#11467)
- The user guide, changes file, and key commands listing now have a refreshed appearance. (#12027)


== Bug Fixes ==
Expand Down
2 changes: 2 additions & 0 deletions user_docs/global.t2tconf
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@
% Therefore, strip the BOM from the title.
%!PostProc(html): \<(TITLE|H1)\>\xef\xbb\xbf <\1>

%!Options: --style styles.css

% This provides the macros NVDA_VERSION, NVDA_URL and NVDA_COPYRIGHT_YEARS.
%!includeconf: build.t2tconf
57 changes: 57 additions & 0 deletions user_docs/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
body {
margin: 0 auto;
max-width: 50em;
font-family: "Helvetica", "Arial", sans-serif;
line-height: 1.5;
padding: 4em 1em;
color: #333;
}

h1 {
color:white;
background-color: #472F5F; /* NVDA purple */
}

h2 {
margin-top: 1em;
padding-top: 1em;
}

h2, h3, h4, a {
color: #472F5F; /* NVDA purple */
}

strong {
color: #000;
}

/* tables */
table, td, th {
border:1px solid black;
}
table{
border-collapse: collapse;
}
td, th {
padding: 0.25em;
}
th {
color: #472F5F; /* NVDA purple */
}

/* code / pre */
code,
pre {
background: #f5f7f9;
border-bottom: 1px solid #d8dee9;
color: #a7adba;
}

code {
padding: 2px 4px;
vertical-align: text-bottom;
}
pre {
padding: 1em;
border-left: 2px solid #69c;
}