Difference between revisions of "Design.rythm"

From BITPlan Wiki
Jump to navigation Jump to search
Line 4: Line 4:
 
<source lang='html4strict'>
 
<source lang='html4strict'>
 
@// Rythm template for the WikiCMS approach
 
@// Rythm template for the WikiCMS approach
@import com.bitplan.smw.PropertyMap
+
@include(wiki.MediaWiki.BITPlan.rythm)
@args() {
+
@header(languageCode,title)
  String content,
+
<script src="http://io.bitplan.com/js/tagcanvas.min.js" type="text/javascript"></script>
  String lang,
+
@style()
  String title,
 
  PropertyMap smwprops;
 
}
 
<!doctype html>
 
<html lang="@(lang)">
 
<head>
 
  <meta charset="utf-8"/>
 
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
  <title>@(title)</title>
 
  <script src="http://io.bitplan.com/js/tagcanvas.min.js" type="text/javascript"></script>
 
  <style>
 
    body{
 
      margin: 2vw auto;
 
      max-width: 60em;
 
    }
 
    * {
 
      font-family: Arial, Helvetica, sans-serif;
 
    }
 
    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;
 
    }
 
    ul li{
 
      margin-bottom:1vh;
 
    }
 
 
 
/** Language styles */
 
 
 
span.lang-de, span.lang-De {
 
padding-right: 25px;
 
background: url(http://wiki.bitplan.com/images/e/e7/Lang-De.gif) center right no-repeat;
 
}
 
 
 
span.lang-en, span.lang-En {
 
padding-right: 25px;
 
background: url(http://wiki.bitplan.com/images/7/78/Lang-En.gif) center right no-repeat;
 
}
 
  </style>
 
 
</head>
 
</head>
 
 
<body>
 
<body>
 
     <header>
 
     <header>
@{
 
  Object languageCodeObj=smwprops.get("_LCODE");
 
  String languageCode="de";
 
  if (languageCodeObj!=null) {
 
    languageCode=languageCodeObj.toString();
 
  }
 
}
 
 
@if ("de".equals(languageCode)) {
 
@if ("de".equals(languageCode)) {
 
         <a class='logo' href='http://training.bitplan.com/index.php/Willkommen'>
 
         <a class='logo' href='http://training.bitplan.com/index.php/Willkommen'>
Line 99: Line 17:
 
         <nav>
 
         <nav>
 
           <a href='http://training.bitplan.com/index.php/Trainings'>Trainings</a>
 
           <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://www.bitplan.com/index.php/Leistungen'>Leistungen</a>
           <a href='http://training.bitplan.com/index.php/Kontakt'>Kontakt</a>
+
           <a href='http://www.bitplan.com/index.php/Kontakt'>Kontakt</a>
 
         </nav>
 
         </nav>
 
} else {
 
} else {
Line 108: Line 26:
 
         <nav>
 
         <nav>
 
           <a href='http://training.bitplan.com/index.php/Trainings/en'>Trainings</a>
 
           <a href='http://training.bitplan.com/index.php/Trainings/en'>Trainings</a>
           <a href='http://training.bitplan.com/index.php/Services'>Services</a>
+
           <a href='http://www.bitplan.com/index.php/Services'>Services</a>
           <a href='http://training.bitplan.com/index.php/Contact'>Contact</a>
+
           <a href='http://www.bitplan.com/index.php/Contact'>Contact</a>
 
         </nav>
 
         </nav>
 
}
 
}
Line 116: Line 34:
 
       <article>@(content)</article>
 
       <article>@(content)</article>
 
     </main>
 
     </main>
    <footer>
+
@footer()
      <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>
 
 
</source>
 
</source>

Revision as of 16:40, 3 November 2017

Links

Source

@// Rythm template for the WikiCMS approach
@include(wiki.MediaWiki.BITPlan.rythm)
@header(languageCode,title)
<script src="http://io.bitplan.com/js/tagcanvas.min.js" type="text/javascript"></script>
@style()
</head>
<body>
    <header>
@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://www.bitplan.com/index.php/Leistungen'>Leistungen</a>
          <a href='http://www.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/Trainings/en'>Trainings</a>
          <a href='http://www.bitplan.com/index.php/Services'>Services</a>
          <a href='http://www.bitplan.com/index.php/Contact'>Contact</a>
        </nav>
}
    </header>
    <main>
      <article>@(content)</article>
    </main>
@footer()