Skip to content

Commit

Permalink
DRY scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
aG0aep6G committed Jan 26, 2015
1 parent ee5d31b commit 87867ee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
10 changes: 10 additions & 0 deletions dlang.org.ddoc
Expand Up @@ -22,6 +22,16 @@ CODE_LCURL=$(D {)
CODE_PERCENT=$(D %)
CODE_PIPE=$(D |)
CODE_RCURL=$(D })
_=

COMMON_SCRIPTS =
$(SCRIPTLOAD https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js)
$(SCRIPT window.jQuery || document.write('<script src="$(ROOT)/js/jquery-1.7.2.min.js">\x3C/script>'))
$(SCRIPTLOAD $(ROOT)/js/codemirror-compressed.js)
$(SCRIPTLOAD $(ROOT)/js/run.js)
$(SCRIPTLOAD $(ROOT)/js/cssmenu.js)
_=

CONSOLE=$(TC pre, console notranslate, $0)
COPYRIGHT=Copyright &copy; 1999-$(YEAR) by Digital Mars $(REG), All Rights Reserved
CPPCODE=$(TC pre, cppcode notranslate, $0)
Expand Down
6 changes: 1 addition & 5 deletions doc.ddoc
Expand Up @@ -4,12 +4,8 @@ $(DOCTYPE_OPENHTML_COPYRIGHT_HEAD)
$(TOP)
$(BODY)
$(FOOTER)
$(SCRIPTLOAD https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js)
$(SCRIPT window.jQuery || document.write('<script src="js/jquery-1.7.2.min.js">\x3C/script>'))
$(SCRIPTLOAD js/codemirror-compressed.js)
$(SCRIPTLOAD js/run-main-website.js)
$(SCRIPTLOAD js/run.js)
$(SCRIPTLOAD js/cssmenu.js)
$(COMMON_SCRIPTS)
</body>
</html>
_=
Expand Down
6 changes: 1 addition & 5 deletions std.ddoc
Expand Up @@ -10,12 +10,8 @@ $(DIVID content,
$(BODY)
)
$(FOOTER)
$(SCRIPTLOAD https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js)
$(SCRIPT window.jQuery || document.write('<script src="../js/jquery-1.7.2.min.js">\x3C/script>'))
$(SCRIPTLOAD ../js/codemirror-compressed.js)
$(SCRIPTLOAD ../js/run.js)
$(COMMON_SCRIPTS)
$(SCRIPTLOAD ../js/listanchors.js)
$(SCRIPTLOAD ../js/cssmenu.js)
$(SCRIPT jQuery(document).ready(listanchors);)
</body>
</html>
Expand Down

0 comments on commit 87867ee

Please sign in to comment.