<!--
 * Copyright 2014 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 -->

<!DOCTYPE html>
<html>
  <head>
    <base target="_top">
    <!-- Use a templated HTML printing scriptlet to import common stylesheet -->
    <?!= HtmlService.createHtmlOutputFromFile('Stylesheet').getContent(); ?>
  </head>
  <body>
    <cursor></cursor><h1>
    To read a specific folder's contents, include that folder's ID as
    a URL parameter: ?folderId=&lt;folder id&gt;. Otherwise the root folder
    will be read. Up to 20 files may be displayed here, in no particular order.
    </h1>
    <h1 id="main-heading">Loading...</h1>
    <div class="block result-display" id="results">
      <div class="hidden" id="error-message">
        Verify that you have permission to access this folder and that the specified folder ID (if any) is correct.
      </div>
    </div>
    <!-- Store data passed to template here, so it is available to the
     imported JavaScript. -->
    <script>
      var folderId = <?= folderId ?>;
    </script>

    <!-- Use a templated HTML printing scriptlet to import JavaScript. -->
    <?!= HtmlService.createHtmlOutputFromFile('JavaScript').getContent(); ?>
  </body>
</html>
