⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 site.jsl

📁 数据仓库工具
💻 JSL
📖 第 1 页 / 共 2 页
字号:
                <j:set var="poweredbytitle">${maven.xdoc.poweredby.title}</j:set>
                <j:set var="poweredbyurl">${maven.xdoc.poweredby.url}</j:set>
                <j:if test="${!empty(poweredbyimage)}">
                	<div style="margin-top: 20px; width: 100%; text-align: center;">
                		<a href="${poweredbyurl}" title="${poweredbytitle}"><img style="border: 1px solid black" src="${relativePath}/images/logos/${poweredbyimage}"/></a>
                	</div>
                </j:if>
              
                <j:if test="${date == 'navigation-bottom'}">
                  <div>
                    <small>Last published: ${build.date}</small>
                  </div>
                </j:if>
              </div>
            </td>
            <td rowspan="2">
              <div id="bodycol">
                <!-- Insert MAIN body here -->
                <div class="app">
                  <!-- FIXME really shouldn't use $doc, but jelly loses it's context again -->
                  <jsl:applyTemplates select="$doc/document/body/section"/>
                  <jsl:applyTemplates select="$doc/document/body/glossary" />
                  <jsl:applyTemplates select="$doc/document/body/release" />
                  <jsl:applyTemplates select="$doc/document/body/changelog" />
                  <jsl:applyTemplates select="$doc/document/body/taskList" />
                  <jsl:applyTemplates select="$doc/document/body/goals" />
                </div>
              </div>
            </td>
          </tr>
        </table>
        <div id="footer">
          <table style='width:100%' border="0" cellspacing="0" cellpadding="4">
            <jsl:applyTemplates select="$nav/body/footer"/>
            <tr>
              <td>
                <j:if test="${!empty(pom.organization.name)}">
                  <j:if test="${!empty(pom.inceptionYear)}">
                    <j:if test="${pom.inceptionYear == mavenCurrentYear}">
                      &#169; ${mavenCurrentYear}, ${pom.organization.name}
                    </j:if>
                    <j:if test="${pom.inceptionYear != mavenCurrentYear}">
                      &#169; ${pom.inceptionYear}-${mavenCurrentYear}, ${pom.organization.name}
                    </j:if>
                  </j:if>
                  <j:if test="${empty(pom.inceptionYear)}">
                    &#169; ${mavenCurrentYear}, ${pom.organization.name}
                  </j:if>
                </j:if>

                <j:if test="${date == 'bottom'}">
                  - Last published: ${build.date}
                </j:if>
              </td>
              <j:if test="${date == 'bottom-right'}">
                <td style='width: auto; text-align:right'>Last published: ${build.date}</td>
              </j:if>
            </tr>
          </table>
        </div>
      </body>
    </html>
  </jsl:template>

  <!-- process the properties of the doc -->
  <jsl:template match="properties" trim="false">
    <!-- stick head block here later -->
  </jsl:template>

  <!-- Process a menu for the navigation bar -->
  <jsl:template match="menu" trim="false">
    <div>
      <strong><x:expr select="@name"/></strong>
      <jsl:applyTemplates select="item"/>
    </div>
  </jsl:template>

  <jsl:template match="item" trim="false">
    <x:set var="item" select="."/>
    <x:set var="_name" select="string(@name)"/>
    <x:set var="_link" select="string(@href)"/>
    <x:set var="_img" select="string(@img)"/>

    <div>
      <small>
      	<j:if test="${navbean.isSelected(item.get(0))}">
      		<b><doc:itemLink name="${_name}" link="${_link}" img="${_img}"/></b>
      	</j:if>
      	<j:if test="${!navbean.isSelected(item.get(0))}">
      		<doc:itemLink name="${_name}" link="${_link}" img="${_img}"/>
      	</j:if>
      </small>
	  <j:if test="${!navbean.isCollapsed(item.get(0))}">
        <jsl:applyTemplates select="item"/>
      </j:if>
    </div>
  </jsl:template>

  <!-- Process the breadcrumb navbar -->
  <jsl:template match="links" trim="false">
    <j:set var="linkCount" value="1"/>
    <x:forEach var="link" select="item">
      <j:if test="${linkCount != 1}">|</j:if>
      <j:set var="_name"><x:expr select="@name"/></j:set>
      <j:set var="_link"><x:expr select="@href"/></j:set>
      <doc:itemLink name="${_name}" link="${_link}"/>
      <j:set var="linkCount" value="${1+linkCount}"/>
    </x:forEach>
  </jsl:template>

  <!-- process a documentation section -->
  <jsl:template match="section" trim="false">
    <div class="h3">
      <j:set var="_sectionName"><x:expr select="@name"/></j:set>
      <j:if test="${!empty(_sectionName)}">
        <h3>
          <a name="${_sectionName}">${_sectionName}</a>
        </h3>
      </j:if>
      <jsl:applyTemplates select="*"/>
    </div>
  </jsl:template>

  <jsl:template match="subsection" trim="false">
    <div class="h4">
      <j:set var="_sectionName"><x:expr select="@name"/></j:set>
      <j:if test="${!empty(_sectionName)}">
        <h4>
          <a name="${_sectionName}">${_sectionName}</a>
        </h4>
      </j:if>
      <jsl:applyTemplates select="*"/>
    </div>
  </jsl:template>

  <jsl:template match="source" trim="false">
    <div id="source">
      <pre><x:expr select="."/></pre>
    </div>
  </jsl:template>

  <jsl:template match="footer" trim="false">
    <tr>
      <td>
        <jsl:applyTemplates select="*"/>
      </td>
    </tr>
  </jsl:template>

  <jsl:template match="table" trim="false">
    <j:set var="rowcount" value="0"/>
    <table cellpadding="3" cellspacing="2" border="1" width="100%">
      <jsl:applyTemplates select="*"/>
    </table>
  </jsl:template>

  <jsl:template match="tr" trim="false">
    <j:choose>
      <j:when test="${rowMode == 'a'}">
        <j:set var="rowMode" value="b"/>
      </j:when>
      <j:otherwise>
        <j:set var="rowMode" value="a"/>
      </j:otherwise>
    </j:choose>

    <!-- copy attributes FIXME: Shouldn't this only be colspan|rowspan? -->
    <x:element name="tr"><j:whitespace trim="true">
      <x:attribute name="class">${rowMode}</x:attribute>
      <x:forEach var="attr" select="@*">
        <x:attribute name="${attr.name}">${attr.value}</x:attribute>
      </x:forEach>
      <jsl:applyTemplates select="*"/>
</j:whitespace></x:element>
  </jsl:template>

  <!--************************-->
  <!-- glossary documentation -->
  <!--************************-->
  <jsl:template match="glossary" trim="false">
    <jsl:applyTemplates select="glossary-entries/glossary-entry" />
  </jsl:template>
      
  <jsl:template match="glossary-entry" trim="false">
    <strong><x:expr select="name" /></strong>
    <br/>
    <x:expr select="definition" />
    <p/>
  </jsl:template>

      <!--************************-->
      <!-- goals documentation    -->
      <!--************************-->
      <jsl:template match="goals" trim="false">
        <!-- reset row alternation -->
        <j:set var="rowMode" value="" />
        <div class="h3">
          <h3><a name="Goals">Goals</a></h3>
          <table>
            <tr width='100%'><th>Goal</th><th>Description</th></tr>
            <jsl:applyTemplates select="goal"/>
          </table>
        </div>
      </jsl:template>
      
      <!-- a goal -->
        <!-- FIXME: this is copied from tr - there must be a way of
             calling templates in jsl? -->
      <jsl:template match="goal" trim="false">
        <j:choose>
          <j:when test="${rowMode == 'a'}">
            <j:set var="rowMode" value="b"/>
          </j:when>
          <j:otherwise>
            <j:set var="rowMode" value="a"/>
          </j:otherwise>
        </j:choose>
        
        <x:element name="tr"><j:whitespace trim="true">
          <x:attribute name="class">${rowMode}</x:attribute>
          <j:set var="_goalName"><x:expr select="./name" /></j:set>
          <td width='20%'><a name="${_goalName}">${_goalName}</a></td>
          <td width='80%'><jsl:applyTemplates select="description" /></td>
</j:whitespace></x:element>
      </jsl:template>   
      
      <jsl:template match="description">
        <x:expr select="."/>
      </jsl:template>

      <!--************************-->
      <!-- changelog documentation-->
      <!--************************-->
      <jsl:template match="changelog" trim="false">
        <j:set var="rowMode" value="" />
        <table width="100%">
          <tr>
            <th>Date</th><th>Author</th><th>Files/Message</th>
          </tr>
          <jsl:applyTemplates select="changelog-entry" />
        </table>
      </jsl:template>

      <!-- transform a changelog entry -->
      <!-- FIXME: tr code copied from above -->
      <jsl:template match="changelog-entry" trim="false">
        <j:choose>
          <j:when test="${rowMode == 'a'}">
            <j:set var="rowMode" value="b"/>
          </j:when>
          <j:otherwise>
            <j:set var="rowMode" value="a"/>
          </j:otherwise>
        </j:choose>
        
        <x:element name="tr"><j:whitespace trim="true">
          <x:attribute name="class">${rowMode}</x:attribute>
          
          <td><x:expr select="date" /> <x:expr select="time" /></td>
          <td><x:expr select="author"/></td>
          <td><jsl:applyTemplates select="*" />
            <pre><x:expr select="msg"/></pre>
          </td>
</j:whitespace></x:element>
      </jsl:template>

      <jsl:template match="file">
        <j:set var="url">${pom.repository.url}<x:expr select="name"/></j:set>
        <j:set var="revUrl">${url}?<x:expr select="revision"/>&amp;content-type=text/vnd.viewcvs-markup</j:set>
        <a href="${url}"><x:expr select="name"/></a> - 
        <a href="${revUrl}">v<x:expr select="revision"/></a>
        <br/>
      </jsl:template>


  <!-- copy any other elements through -->
  <jsl:template match="*" trim="false">
    <jsl:copy trim="false">
      <jsl:applyTemplates trim="false"/>
    </jsl:copy>
   </jsl:template>

   <!-- element values don't pass through as text -->
   <jsl:template match="@*"/>

</jsl:stylesheet>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -