<commit_before><?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     Home page
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     This file is part of XML-to-bootstrap.
     https://github.com/acch/XML-to-bootstrap

     Copyright 2016 <NAME>
     Released under the MIT license
     (https://github.com/acch/XML-to-bootstrap/blob/master/LICENSE)

     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

  <!-- this template generates HTML code for the start (home) page -->
  <xsl:template name="home">

    <!-- generate home page -->
    <xsl:call-template name="html.page">
      <xsl:with-param name="title" select="/site/home/title" />
      <xsl:with-param name="subtitle" select="/site/home/subtitle" />
      <xsl:with-param name="content" select="/site/home" />
      <xsl:with-param name="banner.style">text-xs-center</xsl:with-param>
    </xsl:call-template>

  </xsl:template>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     Home page contents
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

  <xsl:template match="home">

    <!-- put content inside a text column -->
    <xsl:call-template name="element.textcolumn">
      <xsl:with-param name="content">

        <!-- introduction -->
        <!-- TODO: add semantic vocabulary/description -->
        <article class="text-xs-center">

          <!-- copy introduction from XML directly, excluding collapsed text -->
          <xsl:call-template name="copy.content">
            <xsl:with-param name="content" select="introduction" />
            <xsl:with-param name="exclude">collapse</xsl:with-param>
          </xsl:call-template>

          <!-- collapsed section -->
          <div class="collapse" id="intrdctn">
            <!-- copy collapsed introduction text from XML directly -->
            <xsl:call-template name="copy.content">
              <xsl:with-param name="content" select="introduction/collapse" />
            </xsl:call-template>
          </div>

          <!-- link to expand collapsed section -->
          <a class="x2b-expnd collapsed m-b-1" data-toggle="collapse" href="#intrdctn" aria-expanded="false" aria-controls="intrdctn">
            More&#8230;
          </a>

        </article><!-- /introduction -->

      </xsl:with-param>
    </xsl:call-template>

    <!-- section cards -->
    <div class="row text-xs-center">

      <!-- responsive column -->
      <div class="{$style.cardcolumn}">

        <!-- articles card -->
        <div class="[ card card-block ] m-b-2">

          <!-- card heading -->
          <h3 class="card-title">
            <xsl:choose>
              <xsl:when test="$articles">
                <a href="{$site.url}articles.html">
                  <xsl:value-of select="/site/articles/title" />
                </a>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="/site/articles/title" />
              </xsl:otherwise>
            </xsl:choose>
          </h3>

          <!-- card body -->
          <p class="card-text">
            <xsl:choose>
              <xsl:when test="$articles">
                <xsl:value-of select="/site/articles/introduction" />
              </xsl:when>
              <xsl:otherwise>
                <span class="text-muted">
                  Coming soon&#8230;
                </span>
              </xsl:otherwise>
            </xsl:choose>
          </p>

          <!-- icon -->
          <xsl:choose>
            <xsl:when test="$articles">
              <a href="{$site.url}articles.html">
                <xsl:call-template name="element.icon.squared">
                  <xsl:with-param name="icon">fa-newspaper-o</xsl:with-param>
                  <xsl:with-param name="size">fa-3x</xsl:with-param>
                </xsl:call-template>
              </a>
            </xsl:when>
            <xsl:otherwise>
              <xsl:call-template name="element.icon.squared">
                <xsl:with-param name="icon">fa-newspaper-o</xsl:with-param>
                <xsl:with-param name="size">fa-3x</xsl:with-param>
                <xsl:with-param name="disabled" select="true()" />
              </xsl:call-template>
            </xsl:otherwise>
          </xsl:choose>

        </div><!-- /card -->

      </div><!-- /column -->
      <div class="{$style.cardcolumn}">

        <!-- projects card -->
        <div class="[ card card-block ] m-b-2">

          <!-- card heading -->
          <h3 class="card-title">
            <xsl:choose>
              <xsl:when test="$projects">
                <a href="{$site.url}projects.html">
                  <xsl:value-of select="/site/projects/title" />
                </a>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="/site/projects/title" />
              </xsl:otherwise>
            </xsl:choose>
          </h3>

          <!-- card body -->
          <p class="card-text">
            <xsl:choose>
              <xsl:when test="$projects">
                <xsl:value-of select="/site/projects/introduction" />
              </xsl:when>
              <xsl:otherwise>
                <span class="text-muted">
                  Coming soon&#8230;
                </span>
              </xsl:otherwise>
            </xsl:choose>
          </p>

          <!-- icon -->
          <xsl:choose>
            <xsl:when test="$projects">
              <a href="{$site.url}projects.html">
                <xsl:call-template name="element.icon.squared">
                  <xsl:with-param name="icon">fa-rocket</xsl:with-param>
                  <xsl:with-param name="size">fa-3x</xsl:with-param>
                </xsl:call-template>
              </a>
            </xsl:when>
            <xsl:otherwise>
              <xsl:call-template name="element.icon.squared">
                <xsl:with-param name="icon">fa-rocket</xsl:with-param>
                <xsl:with-param name="size">fa-3x</xsl:with-param>
                <xsl:with-param name="disabled" select="true()" />
              </xsl:call-template>
            </xsl:otherwise>
          </xsl:choose>

        </div><!-- /card -->

      </div><!-- /column -->
      <div class="{$style.cardcolumn}">

        <!-- galleries card -->
        <div class="[ card card-block ] m-b-2">

          <!-- card heading -->
          <h3 class="card-title">
            <xsl:choose>
              <xsl:when test="$galleries">
                <a href="{$site.url}galleries.html">
                  <xsl:value-of select="/site/galleries/title" />
                </a>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="/site/galleries/title" />
              </xsl:otherwise>
            </xsl:choose>
          </h3>

          <!-- card body -->
          <p class="card-text">
            <xsl:choose>
              <xsl:when test="$galleries">
                <xsl:value-of select="/site/galleries/introduction" />
              </xsl:when>
              <xsl:otherwise>
                <span class="text-muted">
                  Coming soon&#8230;
                </span>
              </xsl:otherwise>
            </xsl:choose>
          </p>

          <!-- icon -->
          <xsl:choose>
            <xsl:when test="$galleries">
              <a href="{$site.url}galleries.html">
                <xsl:call-template name="element.icon.squared">
                  <xsl:with-param name="icon">fa-picture-o</xsl:with-param>
                  <xsl:with-param name="size">fa-3x</xsl:with-param><commit_msg>Add .x2b-hdng-lnk to properly format headings in overview pages<commit_after><?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     Home page
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     This file is part of XML-to-bootstrap.
     https://github.com/acch/XML-to-bootstrap

     Copyright 2016 <NAME>
     Released under the MIT license
     (https://github.com/acch/XML-to-bootstrap/blob/master/LICENSE)

     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

  <!-- this template generates HTML code for the start (home) page -->
  <xsl:template name="home">

    <!-- generate home page -->
    <xsl:call-template name="html.page">
      <xsl:with-param name="title" select="/site/home/title" />
      <xsl:with-param name="subtitle" select="/site/home/subtitle" />
      <xsl:with-param name="content" select="/site/home" />
      <xsl:with-param name="banner.style">text-xs-center</xsl:with-param>
    </xsl:call-template>

  </xsl:template>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     Home page contents
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

  <xsl:template match="home">

    <!-- put content inside a text column -->
    <xsl:call-template name="element.textcolumn">
      <xsl:with-param name="content">

        <!-- introduction -->
        <!-- TODO: add semantic vocabulary/description -->
        <article class="text-xs-center">

          <!-- copy introduction from XML directly, excluding collapsed text -->
          <xsl:call-template name="copy.content">
            <xsl:with-param name="content" select="introduction" />
            <xsl:with-param name="exclude">collapse</xsl:with-param>
          </xsl:call-template>

          <!-- collapsed section -->
          <div class="collapse" id="intrdctn">
            <!-- copy collapsed introduction text from XML directly -->
            <xsl:call-template name="copy.content">
              <xsl:with-param name="content" select="introduction/collapse" />
            </xsl:call-template>
          </div>

          <!-- link to expand collapsed section -->
          <a class="x2b-expnd collapsed m-b-1" data-toggle="collapse" href="#intrdctn" aria-expanded="false" aria-controls="intrdctn">
            More&#8230;
          </a>

        </article><!-- /introduction -->

      </xsl:with-param>
    </xsl:call-template>

    <!-- section cards -->
    <div class="row text-xs-center">

      <!-- responsive column -->
      <div class="{$style.cardcolumn}">

        <!-- articles card -->
        <div class="[ card card-block ] m-b-2">

          <!-- card heading -->
          <h3 class="card-title">
            <xsl:choose>
              <xsl:when test="$articles">
                <a class="x2b-hdng-lnk" href="{$site.url}articles.html">
                  <xsl:value-of select="/site/articles/title" />
                </a>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="/site/articles/title" />
              </xsl:otherwise>
            </xsl:choose>
          </h3>

          <!-- card body -->
          <p class="card-text">
            <xsl:choose>
              <xsl:when test="$articles">
                <xsl:value-of select="/site/articles/introduction" />
              </xsl:when>
              <xsl:otherwise>
                <span class="text-muted">
                  Coming soon&#8230;
                </span>
              </xsl:otherwise>
            </xsl:choose>
          </p>

          <!-- icon -->
          <xsl:choose>
            <xsl:when test="$articles">
              <a href="{$site.url}articles.html">
                <xsl:call-template name="element.icon.squared">
                  <xsl:with-param name="icon">fa-newspaper-o</xsl:with-param>
                  <xsl:with-param name="size">fa-3x</xsl:with-param>
                </xsl:call-template>
              </a>
            </xsl:when>
            <xsl:otherwise>
              <xsl:call-template name="element.icon.squared">
                <xsl:with-param name="icon">fa-newspaper-o</xsl:with-param>
                <xsl:with-param name="size">fa-3x</xsl:with-param>
                <xsl:with-param name="disabled" select="true()" />
              </xsl:call-template>
            </xsl:otherwise>
          </xsl:choose>

        </div><!-- /card -->

      </div><!-- /column -->
      <div class="{$style.cardcolumn}">

        <!-- projects card -->
        <div class="[ card card-block ] m-b-2">

          <!-- card heading -->
          <h3 class="card-title">
            <xsl:choose>
              <xsl:when test="$projects">
                <a class="x2b-hdng-lnk" href="{$site.url}projects.html">
                  <xsl:value-of select="/site/projects/title" />
                </a>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="/site/projects/title" />
              </xsl:otherwise>
            </xsl:choose>
          </h3>

          <!-- card body -->
          <p class="card-text">
            <xsl:choose>
              <xsl:when test="$projects">
                <xsl:value-of select="/site/projects/introduction" />
              </xsl:when>
              <xsl:otherwise>
                <span class="text-muted">
                  Coming soon&#8230;
                </span>
              </xsl:otherwise>
            </xsl:choose>
          </p>

          <!-- icon -->
          <xsl:choose>
            <xsl:when test="$projects">
              <a href="{$site.url}projects.html">
                <xsl:call-template name="element.icon.squared">
                  <xsl:with-param name="icon">fa-rocket</xsl:with-param>
                  <xsl:with-param name="size">fa-3x</xsl:with-param>
                </xsl:call-template>
              </a>
            </xsl:when>
            <xsl:otherwise>
              <xsl:call-template name="element.icon.squared">
                <xsl:with-param name="icon">fa-rocket</xsl:with-param>
                <xsl:with-param name="size">fa-3x</xsl:with-param>
                <xsl:with-param name="disabled" select="true()" />
              </xsl:call-template>
            </xsl:otherwise>
          </xsl:choose>

        </div><!-- /card -->

      </div><!-- /column -->
      <div class="{$style.cardcolumn}">

        <!-- galleries card -->
        <div class="[ card card-block ] m-b-2">

          <!-- card heading -->
          <h3 class="card-title">
            <xsl:choose>
              <xsl:when test="$galleries">
                <a class="x2b-hdng-lnk" href="{$site.url}galleries.html">
                  <xsl:value-of select="/site/galleries/title" />
                </a>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="/site/galleries/title" />
              </xsl:otherwise>
            </xsl:choose>
          </h3>

          <!-- card body -->
          <p class="card-text">
            <xsl:choose>
              <xsl:when test="$galleries">
                <xsl:value-of select="/site/galleries/introduction" />
              </xsl:when>
              <xsl:otherwise>
                <span class="text-muted">
                  Coming soon&#8230;
                </span>
              </xsl:otherwise>
            </xsl:choose>
          </p>

          <!-- icon -->
          <xsl:choose>
            <xsl:when test="$galleries">
              <a href="{$site.url}galleries.html">
                <xsl:call-template name="element.icon.squared">
                  <xsl:with-param name="icon">fa-picture-o</xsl:with-param>
                  <xsl:with-param name="size">fa-3x</xsl:with-param>
{'fraction_non_alphanumeric': 0.20895712556539467, 'fraction_numerical': 0.006115818309231063, 'mean_word_length': 1.6352190700016787, 'pattern_counts': {'":': 0, '<': 385, '<?xml version=': 2, '>': 385, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2795654', 'n_tokens_mistral': 4844, 'n_tokens_neox': 4231, 'n_words': 718}