Skip to content

Commit bf8b907

Browse files
committed
first commit for site
1 parent 2855a42 commit bf8b907

34 files changed

+27148
-2617
lines changed

CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
html2canvas.com
1+
html2canvas.hertzen.com

about.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <title>html2canvas - Screenshots with JavaScript</title> <meta name=viewport content="width=device-width, initial-scale=1.0"> <meta name=description content="Screenshot creation with JavaScript"> <meta name=author content="Niklas von Hertzen"> <link href="css/bootstrap.css" rel=stylesheet> <style type="text/css">body{padding-top:60px;padding-bottom:40px}</style> <!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> </head> <body> <div class="navbar navbar-fixed-top"> <div class=navbar-inner> <div class=container> <a class="btn btn-navbar" data-toggle=collapse data-target=".nav-collapse"> <span class=icon-bar></span> <span class=icon-bar></span> <span class=icon-bar></span> </a> <a class=brand href="index.html">html2canvas</a> <div class=nav-collapse> <ul class=nav> <li class=active><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> <li><a href="documentation.html">Documentation</a></li> <li><a href="examples.html">Examples</a></li> <li><a href="https://github.com/niklasvh/html2canvas/downloads">Download</a></li> </ul> <p class="navbar-text pull-right" style="padding-top:5px;margin-bottom:-5px;"> <a href="http://twitter.com/share" class=twitter-share-button data-url="http://html2canvas.hertzen.com/" data-text="html2canvas - screenshots with #JavaScript" data-count=horizontal data-via=niklasvh>Tweet</a> <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> <g:plusone size=medium annotation=inline href="http://html2canvas.hertzen.com" width=250></g:plusone> </p> </div> </div> </div> </div> <a href="http://github.com/niklasvh/html2canvas"><img style="position: fixed; top: 0; right: 0; border: 0;z-index:9999;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a> <div class=container> <h1>About</h1> <h3>JavaScript HTML renderer</h3> <p>This script allows you to take "screenshots" of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM and as such may not be 100% accurate to the real representation as it does not make an actual screenshot, but builds the screenshot based on the information available on the page.</p> <h3>Contributors</h3> <ul> <li><a href="https://github.com/niklasvh/html2canvas/commits/master?author=niklasvh">niklasvh</a></li> <li><a href="https://github.com/niklasvh/html2canvas/commits/master?author=cobexer">cobexer</a></li> <li><a href="https://github.com/niklasvh/html2canvas/commits/master?author=cthackers">cthackers</a></li> <li><a href="https://github.com/niklasvh/html2canvas/commits/master?author=gatapia">gatapia</a></li> <li><a href="https://github.com/niklasvh/html2canvas/commits/master?author=oleksiy-nesterov">oleksiy-nesterov</a></li> </ul> <hr> <footer> <p> Created by <a href="http://hertzen.com">Niklas von Hertzen</a> <a href="https://twitter.com/Niklasvh" class=twitter-follow-button data-show-count=false>Follow @Niklasvh</a> <script>!function(e,a,f){var c,b=e.getElementsByTagName(a)[0];if(!e.getElementById(f)){c=e.createElement(a);c.id=f;c.src="//platform.twitter.com/widgets.js";b.parentNode.insertBefore(c,b)}}(document,"script","twitter-wjs");</script> </p> </footer> </div> <script src="script.js"></script> <script>var _gaq=_gaq||[];_gaq.push(["_setAccount","UA-188600-10"]);_gaq.push(["_trackPageview"]);(function(){var b=document.createElement("script");b.type="text/javascript";b.async=true;b.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(b,a)})();(function(){var a=document.createElement("script");a.type="text/javascript";a.async=true;a.src="https://apis.google.com/js/plusone.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)})();</script> </body> </html>

build.xml

Lines changed: 76 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,101 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
22
<project name="html2canvas" basedir="." default="build">
33
<property name="src.dir" location="src"/>
4+
<property name="js.dir" location="js"/>
45
<property name="lib.dir" location="../lib"/>
5-
<property name="build.dir" location="build"/>
6-
<property name="dist" location="dist"/>
76
<property name="jquery-externs" value="jquery-1.4.4.externs.js"/>
87

98
<property name="JS_NAME" value="html2canvas.js"/>
109
<property name="JS_NAME_MIN" value="html2canvas.min.js"/>
1110
<property name="JQUERY_PLUGIN_NAME" value="jquery.plugin.html2canvas.js"/>
12-
<loadfile property="version" srcfile="version.txt" />
13-
14-
<fileset id="sourcefiles" dir="${src.dir}">
15-
<include name="LICENSE"/>
16-
<include name="Core.js"/>
17-
<include name="Generate.js"/>
18-
<include name="Parse.js"/>
19-
<include name="Preload.js"/>
20-
<include name="Queue.js"/>
21-
<include name="Renderer.js"/>
11+
12+
<fileset id="index" dir="${src.dir}">
13+
<include name="header.html"/>
14+
<include name="index.html"/>
15+
<include name="footer.html"/>
2216
</fileset>
2317

24-
<path id="jquery-plugin">
25-
<fileset dir="${src.dir}" includes="LICENSE"/>
26-
<fileset dir="${src.dir}/plugins" includes="${JQUERY_PLUGIN_NAME}"/>
27-
</path>
28-
29-
<target name="plugins">
30-
<concat fixlastline="yes" destfile="${build.dir}/${JQUERY_PLUGIN_NAME}">
31-
<path refid="jquery-plugin"/>
18+
19+
20+
<target name="build">
21+
<concat destfile="index.html">
22+
<filelist dir="${src.dir}">
23+
<file name="header.html"/>
24+
<file name="index.html"/>
25+
<file name="footer.html"/>
26+
</filelist>
3227
</concat>
33-
<replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JQUERY_PLUGIN_NAME}" />
34-
</target>
35-
36-
37-
<target name="build" depends="plugins">
38-
<concat fixlastline="yes" destfile="${build.dir}/${JS_NAME}">
39-
<fileset refid="sourcefiles"/>
28+
29+
<concat destfile="documentation.html">
30+
<filelist dir="${src.dir}">
31+
<file name="header.html"/>
32+
<file name="documentation.html"/>
33+
<file name="footer.html"/>
34+
</filelist>
35+
</concat>
36+
37+
<concat destfile="about.html">
38+
<filelist dir="${src.dir}">
39+
<file name="header.html"/>
40+
<file name="about.html"/>
41+
<file name="footer.html"/>
42+
</filelist>
43+
</concat>
44+
45+
<concat destfile="examples.html">
46+
<filelist dir="${src.dir}">
47+
<file name="header.html"/>
48+
<file name="examples.html"/>
49+
<file name="footer.html"/>
50+
</filelist>
51+
</concat>
52+
53+
54+
<concat destfile="script.js">
55+
<filelist dir="${js.dir}">
56+
<file name="jquery-1.7.1.js"/>
57+
<file name="bootstrap.js"/>
58+
<file name="prettify.js"/>
59+
<file name="site.js"/>
60+
</filelist>
4061
</concat>
41-
<replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JS_NAME}" />
42-
</target>
43-
4462

45-
<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask"
46-
classpath="${lib.dir}/compiler.jar" onerror="report"/>
63+
</target>
64+
65+
<target depends="build" name="min">
4766

48-
<target name="release" depends="build">
67+
<apply parallel="false" force="true" dest="." executable="java">
68+
<fileset dir="." includes="*.html" />
69+
<arg value="-jar"/>
70+
<arg path="${lib.dir}/htmlcompressor-1.5.2.jar"/>
71+
<arg line="--remove-quotes"/>
72+
<arg line="--compress-js"/>
73+
<arg line="--compress-css"/>
74+
<srcfile/>
75+
<arg value="-o"/>
76+
<mapper type="identity"/>
77+
<targetfile/>
78+
</apply>
79+
4980
<jscomp compilationLevel="simple" warning="verbose"
5081
debug="false"
51-
output="${build.dir}/${JS_NAME_MIN}">
82+
output="script.min.js">
5283
<externs dir="${lib.dir}">
53-
<file name="${jquery-externs}"/>
84+
<file name="${jquery-externs}"/>
5485
</externs>
55-
<sources dir="${src.dir}">
56-
<!-- need to write them again here since the closure compiler doesn't understand filesets,... -->
57-
<file name="LICENSE"/>
58-
<file name="Core.js"/>
59-
<file name="Generate.js"/>
60-
<file name="Parse.js"/>
61-
<file name="Preload.js"/>
62-
<file name="Queue.js"/>
63-
<file name="Renderer.js"/>
86+
<sources dir=".">
87+
<file name="script.js"/>
6488
</sources>
6589
</jscomp>
66-
<replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JS_NAME_MIN}" />
90+
6791
</target>
92+
93+
94+
95+
96+
<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask"
97+
classpath="${lib.dir}/compiler.jar" onerror="report"/>
98+
6899

69-
<target name="clean">
70-
<delete file="${build.dir}/${JS_NAME}"></delete>
71-
<delete file="${build.dir}/${JS_NAME_MIN}"></delete>
72-
<delete file="${build.dir}/${JQUERY_PLUGIN_NAME}"></delete>
73-
</target>
74100
</project>
75101

0 commit comments

Comments
 (0)