Explorar o código

Cleanup Staging-dark: don't need web only files before and after compile. Todo: tweak link colors & update Staging-dark's styles.css.

Martijn Laan hai 1 ano
pai
achega
2e8d131405

+ 16 - 7
ISHelp/ISHelpGen/ISHelpGen.dpr

@@ -13,7 +13,7 @@ uses
   UIsxclassesParser in 'UIsxclassesParser.pas';
 
 const
-  Version = '1.15';
+  Version = '1.16';
 
   XMLFileVersion = '1';
 
@@ -70,7 +70,8 @@ type
   end;
 
 var
-  SourceDir, OutputDir, Postfix: String;
+  SourceDir, OutputDir: String;
+  NoContentsHtm: Boolean;
   Keywords, DefinedTopics, TargetTopics, SetupDirectives: TStringList;
   TopicsGenerated: Integer = 0;
   CurrentTopicName: String;
@@ -940,8 +941,10 @@ procedure Go;
               begin
                 Writeln('  - Generating hh_generated_contents.hhc');
                 GenerateHTMLHelpContents(Node);
-                Writeln('  - Generating contents.htm');
-                GenerateStaticContents(Node);
+                if not NoContentsHtm then begin
+                  Writeln('  - Generating contents.htm');
+                  GenerateStaticContents(Node);
+                end;
               end;
             elSetupTopic: ParseTopic(Node, True);
             elTopic: ParseTopic(Node, False);
@@ -984,8 +987,10 @@ begin
 
     Writeln('- Generating hh_generated_index.hhk');
     GenerateHTMLHelpIndex;
-    Writeln('- Generating contentsindex.js');
-    GenerateStaticIndex;
+    if not NoContentsHtm then begin
+      Writeln('- Generating contentsindex.js');
+      GenerateStaticIndex;
+    end;
   finally
     SetupDirectives.Free;
     TargetTopics.Free;
@@ -1009,9 +1014,13 @@ begin
       Halt(2);
     end;
     SourceDir := ParamStr(1) + '\';
-    Postfix := ParamStr(2);
+    var Postfix := ParamStr(2);
     OutputDir := SourceDir + 'Staging' + Postfix + '\';
 
+    NoContentsHtm := not FileExists(SourceDir + 'contents-template.htm');
+    if NoContentsHtm then
+      Writeln('Running in NoContentsHtm mode');
+
     OleCheck(CoInitialize(nil));  { for MSXML }
 
     StartTime := GetTickCount;

+ 0 - 7
ISHelp/Staging-dark/.gitignore

@@ -1,12 +1,5 @@
-contents.js
-contents-template.htm
-index.htm
-index.php
 stoplist.stp
 topic.js
-contents.htm
-contentsindex.js
 hh_generated_contents.hhc
 hh_generated_index.hhk
 isetup-dark.chm
-topic_*.htm

+ 0 - 125
ISHelp/Staging-dark/contents.css

@@ -1,125 +0,0 @@
-/*
-  Inno Setup
-  Copyright (C) 1997-2024 Jordan Russell
-  Portions by Martijn Laan
-  For conditions of distribution and use, see LICENSE.TXT.
-
-  Style sheet used by contents.htm
-*/
-
-BODY {
-	font-family: "Segoe UI", Tahoma, sans-serif;
-	font-size: 75%;   /* 9pt (12px/16px) */
-	margin: 0;
-	background-color: #1f1f1f;
-	color:#d6d6d6;
-}
-INPUT {
-	font: inherit;
-}
-
-
-#tabbar {
-	background-color: #403E41;
-	color: #d6d6d6;
-	padding-top: 6px;
-	cursor: default;
-	-moz-user-select: none;
-}
-#tabbar TD {
-	padding: 0;
-	font-weight: bold;
-}
-#tabbar TD.selectedtab {
-	background-color: #1f1f1f;
-	padding: 2px 6px 3px 6px;
-	border-bottom: none;
-}
-#tabbar TD.unselectedtab {
-	padding: 3px 7px 2px 7px;
-	cursor: pointer;
-}
-#tabbar A {
-	background-color: transparent;
-	color: #d6d6d6;
-	text-decoration: none;
-	outline: none;
-}
-#tabbar TD.selectedtab A {
-	cursor: default;
-}
-#tabbar TD.unselectedtab:hover A {
-	color: #0078D4;
-}
-
-
-#tabbody-contents A {
-	/* Using inline-block because otherwise, second line of wrapped text
-	   doesn't line up with first, and on IE6, the focus rect doesn't extend
-	   all the way to the edges of Highlight area */
-	display: inline-block;
-	padding: 1px 2px;
-}
-#tabbody-contents A:link,
-#tabbody-contents A:visited,
-#tabbody-contents A:active {
-	color: #d6d6d6;
-	background-color: transparent;
-	text-decoration: none;
-}
-#tabbody-contents A:hover {
-	color: #0078D4;
-	background-color: transparent;
-}
-#tabbody-contents A.selectedlink:link,
-#tabbody-contents A.selectedlink:visited {
-	color: #d6d6d6;
-	background-color: #403E41;
-}
-/* It would be cleaner to use :focus, but IE<8 doesn't support it */
-#tabbody-contents A.focusedlink:link,
-#tabbody-contents A.focusedlink:visited {
-	color: HighlightText;
-	background-color: Highlight;
-	outline-color: #d6d6d6;   /* needed for focus rect to appear on Firefox (3.5) */
-}
-#tabbody-contents TABLE {
-	border-collapse: collapse;
-}
-#tabbody-contents TD {
-	padding: 0 0 1px 0;
-}
-#tabbody-contents IMG {
-	width: 16px;
-	height: 16px;
-	border-style: none;
-	padding-right: 2px;
-}
-
-
-#tabbody-index {
-	padding: 4px 2px;
-	white-space: nowrap;
-	-moz-user-select: none;
-}
-#tabbody-index A {
-	display: inline-block;
-	min-width: 100%;
-	overflow: visible;
-}
-#tabbody-index A:link,
-#tabbody-index A:visited,
-#tabbody-index A:active {
-	color: #d6d6d6;
-	background-color: transparent;
-	text-decoration: none;
-}
-#tabbody-index A:hover {
-	color: #0078D4;
-	background-color: transparent;
-}
-#tabbody-index A:focus {
-	color: HighlightText;
-	background-color: Highlight;
-	outline-color: #d6d6d6;   /* needed for focus rect to appear on Firefox (3.5) */
-}

+ 2 - 0
ISHelp/compile.bat

@@ -36,6 +36,8 @@ if errorlevel 1 goto failed
 call :generate_help -dark
 if errorlevel 1 goto failed
 
+del /q Staging-dark\topic_*.htm
+
 echo Success!
 exit /b 0
 

+ 0 - 4
ISHelp/synch-darkfiles.bat

@@ -4,10 +4,6 @@ cd /d %~dp0
 
 echo - Synching files from Staging to Staging-dark
 
-copy Staging\contents.js Staging-dark
-copy Staging\contents-template.htm Staging-dark
-copy Staging\index.htm Staging-dark
-copy Staging\index.php Staging-dark
 copy Staging\stoplist.stp Staging-dark
 copy Staging\topic.js Staging-dark