Difference between revisions of "MediaWiki:Bootstrap.rythm"

From BITPlan Wiki
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
= Links =
 +
* https://www.w3schools.com/icons/bootstrap_icons_glyphicons.asp
 +
 
= Rythm source =
 
= Rythm source =
 
<source lang='html'>
 
<source lang='html'>
 +
@import com.bitplan.smw.PropertyMap
 +
@import com.bitplan.wikifrontend.PostService
 +
@import javax.ws.rs.core.MultivaluedMap
 +
@args() {
 +
  String content,
 +
  String lang,
 +
  String title,
 +
  PostService postService,
 +
  String postToken,
 +
  PropertyMap smwprops;
 +
}
 +
@{
 +
  Object languageCodeObj=smwprops.get("_LCODE");
 +
  String languageCode="de";
 +
  if (languageCodeObj!=null) {
 +
    languageCode=languageCodeObj.toString();
 +
  }
 +
  boolean de="de".equals(languageCode);
 +
}
 
@// Rythm template for Boostrap initialization and header and footer
 
@// Rythm template for Boostrap initialization and header and footer
 
@def header(String lang,String title) {
 
@def header(String lang,String title) {
Line 10: Line 32:
 
   <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>
  <style>
 
.form-group.required .control-label:after {
 
    color: #d00;
 
    content: "*";
 
    position: absolute;
 
    margin-left: 8px;
 
    top:7px;
 
}
 
  </style>
 
 
}
 
}
 
@// initialize bootstrap
 
@// initialize bootstrap
 
@def bootstrap() {
 
@def bootstrap() {
  <!-- Einbinden des Bootstrap-Stylesheets -->
+
  <!-- Bootstrap-Stylesheet -->
    <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css">
+
  <!-- Latest compiled and minified CSS -->
 +
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
 +
 
 +
  <!-- Optional theme -->
 +
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
 +
 
 +
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.3/css/bootstrapValidator.min.css">
 +
 
 +
  <!-- jQuery-Library -->
 +
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  
    <!-- optional: Einbinden der jQuery-Bibliothek -->
+
  <!-- Latest compiled and minified JavaScript -->
    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.4.min.js"></script>
+
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
  
    <!-- optional: Einbinden der Bootstrap-JavaScript-Plugins -->
+
  <!-- Bootstrap-Validator -->
    <script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"></script>
+
  <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-validator/0.4.5/js/bootstrapvalidator.min.js"> </script>
 
}
 
}
 
</source>
 
</source>
 +
[[Category:RythmTemplate]]

Latest revision as of 16:00, 9 November 2017

Links

Rythm source

@import com.bitplan.smw.PropertyMap
@import com.bitplan.wikifrontend.PostService
@import javax.ws.rs.core.MultivaluedMap
@args() {
  String content,
  String lang,
  String title,
  PostService postService,
  String postToken,
  PropertyMap smwprops; 
}
@{
  Object languageCodeObj=smwprops.get("_LCODE");
  String languageCode="de";
  if (languageCodeObj!=null) {
    languageCode=languageCodeObj.toString();
  }
  boolean de="de".equals(languageCode);
}
@// Rythm template for Boostrap initialization and header and footer
@def header(String lang,String title) {
<!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>
}
@// initialize bootstrap
@def bootstrap() {
  <!-- Bootstrap-Stylesheet -->
  <!-- Latest compiled and minified CSS -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

  <!-- Optional theme -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.3/css/bootstrapValidator.min.css">

  <!-- jQuery-Library -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

  <!-- Latest compiled and minified JavaScript -->
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

  <!-- Bootstrap-Validator -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-validator/0.4.5/js/bootstrapvalidator.min.js"> </script>
}