Difference between revisions of "Debug.rythm"

From BITPlan Wiki
Jump to navigation Jump to search
(Created page with "= Links = = Source = <source lang='html4strict'> @// Rythm template for the WikiCMS approach @args() { String content, String lang, String title, Map<String,Object> s...")
 
Line 13: Line 13:
 
<html lang="@(lang)">
 
<html lang="@(lang)">
 
<head>
 
<head>
 +
  <!-- https://de.wikipedia.org/wiki/Bootstrap_(Framework) -->
 
   <meta charset="utf-8"/>
 
   <meta charset="utf-8"/>
 
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
   <title>@(title)</title>
 
   <title>@(title)</title>
  <script src="http://io.bitplan.com/js/tagcanvas.min.js" type="text/javascript"></script>
+
    <!-- Einbinden des Bootstrap-Stylesheets -->
  <style>
+
    <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css">
     body{
+
 
      margin: 2vw auto;
+
    <!-- optional: Einbinden der jQuery-Bibliothek -->
      max-width: 60em;
+
    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.4.min.js"></script>
    }
+
 
    * {
+
     <!-- optional: Einbinden der Bootstrap-JavaScript-Plugins -->
      font-family: Arial, Helvetica, sans-serif;
+
     <script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"></script>
    }
+
  </head>
    header,footer{
 
      background-color: #FFFFFF;
 
      text-align: center;
 
    }
 
    footer {
 
      clear:both;
 
    }
 
    nav a:link,a:visited {
 
      text-decoration: none;
 
     }
 
    a:hover {
 
      color: #FFFFFF;
 
      background-color: rgba(255,128,00,0.5);
 
    }
 
    main,article{
 
    }
 
    main {
 
      padding: 2vw;margin:1vw;
 
    }
 
    h1,h2,h3 {
 
      color: #FF8000;
 
    }
 
    .floatleft {
 
      float: left;
 
      margin: 1vw;
 
    }
 
    .floatright {
 
      float: right;
 
      margin: 1vw;
 
    }
 
    .logo {
 
      width: 6vw;
 
      float:left;
 
    }
 
    .copyright {
 
      font-size: 0.5vw;
 
    }
 
    .imprint {
 
      font-size: 0.8vw;
 
    }
 
  </style>
 
</head>
 
  
 
<body>
 
<body>
Line 76: Line 35:
 
     languageCode=languageCodeObj.toString();
 
     languageCode=languageCodeObj.toString();
 
   }
 
   }
}
 
@if ("de".equals(languageCode)) {
 
        <a class='logo' href='http://training.bitplan.com/index.php/Willkommen'>
 
          <img src='http://wiki.bitplan.com/images/wiki/7/7a/BITPlanLogo2012FontLess.svg' width='100%'>
 
        </a>
 
        <nav>
 
          <a href='http://training.bitplan.com/index.php/Trainings'>Trainings</a>
 
          <a href='http://training.bitplan.com/index.php/Leistungen'>Leistungen</a>
 
          <a href='http://training.bitplan.com/index.php/Kontakt'>Kontakt</a>
 
        </nav>
 
} else {
 
        <a class='logo' href='http://training.bitplan.com/index.php/Welcome'>
 
          <img src='http://wiki.bitplan.com/images/wiki/7/7a/BITPlanLogo2012FontLess.svg' width='100%'>
 
        </a>
 
        <nav>
 
          <a href='http://training.bitplan.com/index.php/Training_en'>Trainings</a>
 
          <a href='http://training.bitplan.com/index.php/Services'>Services</a>
 
          <a href='http://training.bitplan.com/index.php/Contact'>Contact</a>
 
        </nav>
 
 
}
 
}
 
     </header>
 
     </header>
     <main>
+
     <section class="container">
 +
      <h2>SMW Properties</h2>
 +
      <!-- Tabelle mit abwechselnder Zellenhintergrundfarbe und Außenrahmen -->
 +
      <table class="table table-striped table-bordered">
 +
        <thead>
 +
          <tr>
 +
            <th>#</th>
 +
            <th>Name</th>
 +
            <th>Value</th>
 +
          </tr>
 +
        </thead>
 +
        <tbody>
 +
@{int index=0;}
 +
        @for(String key:smwprops.keySet()) {
 +
          <tr>
 +
            <td>@(index++)</td>
 +
            <td>@(key)</td>
 +
            <td>@(smwprops.get(key))</td>
 +
          </tr>
 +
        }
 +
        </tbody>
 +
      </table>
 
       <article>@(content)</article>
 
       <article>@(content)</article>
     </main>
+
     </section>
    <footer>
+
  </body>
      <nav>
 
        <span class='copyright'>© 2017&nbsp;
 
          <a href='http://www.bitplan.com'>BITPlan GmbH.</a>&nbsp;Alle Rechte vorbehalten.
 
        </span>
 
        &nbsp;
 
@if ("de".equals(languageCode)) {
 
        <span class='imprint'><a href='http://training.bitplan.com/index.php/Impressum'>Impressum</a></span>
 
} else {
 
        <span class='imprint'><a href='http://training.bitplan.com/index.php/Imprint'>Imprint</a></span>
 
}
 
      </nav>
 
    </footer>
 
</body>
 
 
</html>
 
</html>
 
</source>
 
</source>

Revision as of 16:32, 29 October 2017

Links

Source

@// Rythm template for the WikiCMS approach
@args() {
  String content,
  String lang,
  String title,
  Map<String,Object> smwprops; 
}
<!doctype html>
<html lang="@(lang)">
<head>
  <!-- https://de.wikipedia.org/wiki/Bootstrap_(Framework) -->
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>@(title)</title>
    <!-- Einbinden des Bootstrap-Stylesheets -->
    <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css">

    <!-- optional: Einbinden der jQuery-Bibliothek -->
    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.4.min.js"></script>

    <!-- optional: Einbinden der Bootstrap-JavaScript-Plugins -->
    <script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"></script>
  </head>

<body>
    <header>
@{
  Object languageCodeObj=smwprops.get("Language_code");
  String languageCode="de";
  if (languageCodeObj!=null) {
    languageCode=languageCodeObj.toString();
  }
}
    </header>
    <section class="container">
      <h2>SMW Properties</h2>
      <!-- Tabelle mit abwechselnder Zellenhintergrundfarbe und Außenrahmen -->
      <table class="table table-striped table-bordered">
        <thead>
          <tr>
            <th>#</th>
            <th>Name</th>
            <th>Value</th>
          </tr>
        </thead>
        <tbody>
@{int index=0;}
        @for(String key:smwprops.keySet()) {
          <tr>
            <td>@(index++)</td>
            <td>@(key)</td>
            <td>@(smwprops.get(key))</td>
           </tr>
        }
        </tbody>
      </table>
      <article>@(content)</article>
    </section>
  </body>
</html>