[#1545] Website and Documentation anchors should be links to themselves,

visually recognisable
This commit is contained in:
Lukas Eder 2012-07-07 12:00:15 +02:00
parent 55f6c2c53b
commit b8823e6c29
8 changed files with 46 additions and 26 deletions

View File

@ -106,6 +106,20 @@ a:hover {
text-decoration: underline;
}
h2 a, h2 a:link, h2 a:visited, h2 a:hover, h2 a:active {
color: #aaaaaa;
text-decoration: none;
text-shadow: 0 1px 1px #444444;
left: -30px;
position: absolute;
width: 740px;
}
h2 a:hover {
text-decoration: underline;
}
.wrapper {
height: auto;
min-height: 101%;

View File

@ -11,7 +11,7 @@ function printContent() {
global $version;
?>
<h2>Download</h2>
<h2 id="Download"><a href="#Download" name="Download">#</a> Download</h2>
<p>
Get the latest version from SourceForge<br/>
<a href="https://sourceforge.net/projects/jooq/files/Release/" title="Get the latest jOOQ version from SourceForge">https://sourceforge.net/projects/jooq/files/Release/</a>
@ -31,7 +31,7 @@ jOOQ's sources are hosted at GitHub:
<a href="http://github.com/jOOQ/jOOQ" title="jOOQ GitHub repository">git@github.com:jOOQ/jOOQ.git</a>
</p>
<h2>Get the right version of jOOQ</h2>
<h2 id="version"><a href="#version" name="version">#</a> Get the right version of jOOQ</h2>
<p>
For increased quality, jOOQ uses <a href="http://semver.org/" title="jOOQ uses semantic versioning">semantic versioning</a>.
The jOOQ roadmap plans for:
@ -66,12 +66,12 @@ The semi-formal roadmap is here:<br/>
<a href="https://sourceforge.net/apps/trac/jooq/report/6" title="The jOOQ Roadmap">https://sourceforge.net/apps/trac/jooq/report/6</a>
</p>
<h2>License</h2>
<h2 id="License"><a href="#License" name="License">#</a> License</h2>
<p>
jOOQ is distributed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" title="Apache 2.0 License">Apache 2.0 licence</a>
</p>
<h2>Download other products of the jOO* family</h2>
<h2 id="other"><a href="#other" name="other">#</a> Download other products of the jOO* family</h2>
<p>
"jOO*" stands for Java Object Oriented ... It started with jOOQ, an internalised
domain specific language (aka SQL), written in Java. This DSL happens to be a

View File

@ -9,12 +9,12 @@ function getActiveMenu() {
}
function printContent() {
?>
<h2>Philosophy</h2>
<h2 id="Philosophy"><a href="#Philosophy" name="Philosophy">#</a> Philosophy</h2>
<p>SQL was never meant to be abstracted. To be confined in the narrow boundaries
of heavy mappers, hiding the beauty and simplicity of relational data.
SQL was never meant to be object-oriented. SQL was never meant to be
anything other than... SQL!</p>
<h2>What does jOOQ code look like?</h2>
<h2 id="jOOQ-code"><a href="#jOOQ code" name="jOOQ code">#</a> What does jOOQ code look like?</h2>
<p>It's simple. With the jOOQ DSL, SQL looks almost as if it were
natively supported by Java. For instance, get all books published in 2011, ordered by title</p>
@ -68,7 +68,7 @@ create.select(FIRST_NAME, LAST_NAME, count())
</tr>
</table>
<h2>What is jOOQ?</h2>
<h2 id="What-is-jOOQ"><a href="#What-is-jOOQ" name="What-is-jOOQ">#</a> What is jOOQ?</h2>
<p>jOOQ stands for Java Object Oriented Querying. It combines these essential features:</p>
<ul>
@ -79,7 +79,7 @@ create.select(FIRST_NAME, LAST_NAME, count())
<li>Vendor-specific feature support: jOOQ encourages the use of vendor-specific extensions such as stored procedures, UDT's and ARRAY's, recursive queries, and many more.</li>
</ul>
<h2>How does jOOQ help you?</h2>
<h2 id="How-does-jOOQ-help-you"><a href="#How-does-jOOQ-help-you" name="How-does-jOOQ-help-you">#</a> How does jOOQ help you?</h2>
<ul>
<li>Your database always comes FIRST! That's where the schema is, not in your Java code or some XML mapping file.</li>
<li>Your schema is generated in Java. You can use auto-completion in your IDE!</li>
@ -96,7 +96,7 @@ create.select(FIRST_NAME, LAST_NAME, count())
<li>You can be productive again!</li>
</ul>
<h2>When to use jOOQ</h2>
<h2 id="When-to-use-jOOQ"><a href="#When-to-use-jOOQ" name="When-to-use-jOOQ">#</a> When to use jOOQ</h2>
<ul>
<li>When you love your RDBMS of choice, including all its vendor-specific features.</li>
<li>When you love control over your code.</li>
@ -106,7 +106,7 @@ create.select(FIRST_NAME, LAST_NAME, count())
<li>When you love both <a href="http://en.wikipedia.org/wiki/OLAP" title="Online Analytical Processing, advanced SELECT statements, i.e. what none of the ORM's do, but jOOQ does best">OLAP</a> and <a href="http://en.wikipedia.org/wiki/OLTP" title="Online Transaction Processing, i.e. basic CRUD operations, what all ORM's do">OLTP</a></li>
</ul>
<h2>When not to use jOOQ</h2>
<h2 id="When-not-to-use-jOOQ"><a href="#When-not-to-use-jOOQ" name="When-not-to-use-jOOQ">#</a> When not to use jOOQ</h2>
<p>On the other hand, many people like the ease of use of Hibernate or other products, when it comes to simply persisting any domain model in any database. You should not use jOOQ...</p>
<ul>
<li>When you don't care about your database (or "persistence" as you would probably call it).</li>
@ -116,7 +116,7 @@ create.select(FIRST_NAME, LAST_NAME, count())
<li>When you need to write DDL statements. jOOQ only supports DML statements.</li>
</ul>
<h2>What databases are supported</h2>
<h2 id="What-databases-are-supported"><a href="#What-databases-are-supported" name="What-databases-are-supported">#</a> What databases are supported</h2>
<p>Every RDMBS out there has its own little specialties.
jOOQ considers those specialties as much as possible, while trying to
standardise the behaviour in jOOQ. In order to increase the quality of jOOQ,
@ -154,7 +154,7 @@ create.select(FIRST_NAME, LAST_NAME, count())
<li>Teradata</li>
</ul>
<h2>Other requirements</h2>
<h2 id="Other-requirements"><a href="#Other-requirements" name="Other-requirements">#</a> Other requirements</h2>
<p>jOOQ runs with Java 1.6+</p>
<h3>License</h3>

View File

@ -22,7 +22,8 @@ function printContent() {
for ($i = 0; $i < count($contents); $i++) {
if ($i + 1 < count($contents) && substr($contents[$i + 1], 0, 3) == '===') {
print '<h2 id="' . preg_replace('%Version (\d+\.\d+\.\d+).*\n?%', '$1', $contents[$i]) . '">';
$id = trim(preg_replace('%Version (\d+\.\d+\.\d+).*\n?%', '$1', $contents[$i]));
print '<h2 id="' . $id . '"><a href="#' . $id . '" name="' . $id . '">#</a> ';
print $contents[$i];
print '</h2>';
}

View File

@ -32,12 +32,13 @@ function printContent() {
<xsl:apply-templates select="/manual/section/content"/>
<!-- Display the overall table of contents -->
<h2>Table of contents</h2>
<h2 id="toc"><a href="#toc" name="toc">#</a> Table of contents</h2>
<xsl:apply-templates select="/manual/section" mode="toc"/>
<xsl:for-each select="/manual/section//section">
<h2 id="{@id}">
<a name="{@id}"/>
<a name="{@id}" href="#{@id}">#</a>
<xsl:text> </xsl:text>
<xsl:apply-templates select="." mode="chapter-number"/>
<xsl:text> </xsl:text>
<xsl:value-of select="title"/>

View File

@ -44,7 +44,11 @@ function printContent() {
<!-- matching templates -->
<xsl:template match="h3" mode="content">
<h2>
<xsl:variable name="id" select="generate-id(.)"/>
<h2 id="{$id}">
<a href="#{$id}" name="{$id}">#</a>
<xsl:text> </xsl:text>
<xsl:apply-templates mode="content"/>
</h2>
</xsl:template>
@ -54,7 +58,7 @@ function printContent() {
<xsl:apply-templates select="content"/>
<xsl:if test="count(sections/section) &gt; 0">
<h2>Table of contents</h2>
<h2 id="toc"><a href="#toc" name="toc">#</a> Table of contents</h2>
</xsl:if>
<xsl:apply-templates select="." mode="toc"/>

View File

@ -3,7 +3,7 @@
<section id="manual">
<title>The jOOQ User Manual. Multiple Pages</title>
<content>
<h2>Overview</h2>
<h2 id="Overview"><a href="#Overview" name="Overview">#</a> Overview</h2>
<p>This manual is divided into four main sections:</p>
<ul>
<li>

View File

@ -10,7 +10,7 @@ function printContent() {
global $root;
global $version;
?>
<h2>Introduction</h2>
<h2 id="intro"><a href="#intro" name="intro">#</a> Introduction</h2>
<p>
Download and run jOOQ in 6 easy steps:
</p>
@ -25,7 +25,7 @@ Download and run jOOQ in 6 easy steps:
<li><a href="#step6">Step 6: Explore!</a></li>
</ul>
<h2 id="step0">Preparation: Download jOOQ and your SQL driver</h2>
<h2 id="step0"><a href="#step0" name="step0">#</a> Preparation: Download jOOQ and your SQL driver</h2>
<p>
If you haven't already downloaded them, download jOOQ:<br/>
<a href="https://sourceforge.net/projects/jooq/files/Release/" target="_blank" title="jOOQ download">https://sourceforge.net/projects/jooq/files/Release/</a>
@ -52,7 +52,7 @@ If you don't have a MySQL instance up and running yet, get
now! XAMPP is a simple installation bundle for Apache, MySQL, PHP and Perl
</p>
<h2 id="step1">Step 1: Create a SQL database and a table</h2>
<h2 id="step1"><a href="#step1" name="step1">#</a> Step 1: Create a SQL database and a table</h2>
<p>
We're going to create a database called "guestbook" and a corresponding "posts" table. Connect to MySQL via your command line client and type the following:
</p>
@ -68,7 +68,7 @@ CREATE TABLE `posts` (
);
</pre>
<h2 id="step2">Step 2: Generate classes</h2>
<h2 id="step2"><a href="#step2" name="step2">#</a> Step 2: Generate classes</h2>
<p>
In this step, we're going to use jOOQ's command line tools to generate classes that
map to the Posts table we just created. More detailed information about how to
@ -225,7 +225,7 @@ INFO: GENERATION FINISHED! : Total: 791.688ms, +9.143ms
<h2 id="step3">Step 3: Write a main class and establish a MySQL connection</h2>
<h2 id="step3"><a href="#step3" name="step3">#</a> Step 3: Write a main class and establish a MySQL connection</h2>
<p>
Let's just write a vanilla main class in the project containing the generated classes:
</p>
@ -265,7 +265,7 @@ This is pretty standard code for establishing a MySQL connection.
</p>
<h2 id="step4">Step 4: Write a query using jOOQ's DSL</h2>
<h2 id="step4"><a href="#step4" name="step4">#</a> Step 4: Write a query using jOOQ's DSL</h2>
<p>
Let's add a simple query:
</p>
@ -285,7 +285,7 @@ the next step.
</p>
<h2 id="step5">Step 5: Iterate over results</h2>
<h2 id="step5"><a href="#step5" name="step5">#</a> Step 5: Iterate over results</h2>
<p>
After the line where we retrieve the results, let's iterate over the results and
print out the data:
@ -362,7 +362,7 @@ public class Main {
}
</pre>
<h2 id="step6">Step 6: Explore!</h2>
<h2 id="step6"><a href="#step6" name="step6">#</a> Step 6: Explore!</h2>
<p>
jOOQ has grown to be a comprehensive SQL library. For more information, please consider the manual:<br/>
<a href="http://www.jooq.org/manual/" title="jOOQ Manual">http://www.jooq.org/manual/</a>