ソースを参照

Anisble integration (beta)

Tobias Südkamp 7 年 前
コミット
ff8712a0c6
4 ファイル変更140 行追加40 行削除
  1. 15 1
      README.md
  2. 14 34
      index.html
  3. 5 5
      ffms.css
  4. 106 0
      index.html.j2

+ 15 - 1
README.md

@@ -1 +1,15 @@
-# nodesmap-page
+# nodesmap-page
+
+### Set-up
+
+- .html file generated by Ansible (.html.j2)
+- CSS: ffms.css
+- JS: search.js
+
+
+### to do:
+
+- Bootstrap CDN --> lokale Installation (?)
+- proper Ansible implementation
+-- single domaines in community list 
+- Link zu dem Logo zentralisieren (?)

+ 14 - 34
index.html

@@ -50,7 +50,8 @@
       <p><a href="https://forum.freifunk-muensterland.de/">Freifunk Münsterland Forum</a></p>
     </div>
     <div class="col-md-4 col-sm-4">
-        <table id="ffms-align-center" class="table table-list-search table-hover">
+        <div class="ffms-align-center">
+        <table  class="table table-list-search table-hover">
           <thead>
             <tr>
               <th>
@@ -59,54 +60,33 @@
             </tr>
           </thead>
           <tbody>
-            <!-- Alle Domänen einfügen -->
+            <!-- Alle Domänen einfügen 
             <tr>
-              <td><a href="#">01 - Münster</a></td>
-            </tr>
-            <tr>
-              <td><a href="#">06 - Test: Westmünsterland</a></td>
-            </tr>
-            <tr>
-              <td><a href="#">07 - Telgte</a></td>
-            </tr>
-            <tr>
-              <td><a href="#">08 - Gescher</a></td>
-            </tr>
-            <tr>
-              <td><a href="#">09 - Stadtlohn</a></td>
-            </tr>
-            <tr>
-              <td><a href="#">10 - Multidomänen-L2TP-Test</a></td>
-            </tr>
-            <tr>
-              <td><a href="#">11 - Bocholt</a></td>
-            </tr>
-            <tr>
-              <td><a href="#">12 - Dülmen</a></td>
-            </tr>
-            <tr>
-              <td><a href="#">26 - Borken</a></td>
-            </tr>
+              <td><a href="mapXX/"> XX - name</a></td>
+            </tr> -->
+            
           </tbody>
         </table>
+        </div>
     </div>
     <div class="col-md-4 col-sm-4">
-        <table id="ffms-align-center" class="table  table-list-search table-hover">
+        <div class="ffms-align-center">
+        <table class="table  table-list-search table-hover">
           <thead>
             <tr>
               <th><div style=text-align:center><h4>Gruppen</h4></div></th>
             </tr>
           </thead>
           <tbody>
-            <!-- Alle Communities einfügen -->
-            <tr>
-              <td><a href="map_Borken/">Community Borken - 26</a></td>
-            </tr>
+            <!-- Alle Communities einfügen 
             <tr>
-              <td><a href="map_Münster/">Community Münster - 01,16</a></td>
+                <td><a href=""> </a></td>
             </tr>
+            -->
+
           </tbody>
         </table>
+        </div>
     </div>
 
   </div>

+ 5 - 5
ffms.css

@@ -1,10 +1,10 @@
 @media screen and (max-width: 767px) {
-	#ffms-logo {
+    #ffms-logo {
 		width: 110px;
-  }
-  #ffms-align-center{
-    text-align:center;
-  }
+    }
+    .ffms-align-center{
+        text-align:center;
+    }
 }
 
 

+ 106 - 0
index.html.j2

@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<html lang="en"><!-- Mit Ansible erzeugt - änderungen werden überschrieben -->
+<head>
+  <title>{{freifunk.name}} - Karten</title>
+  <meta charset="utf-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1">
+  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
+  <link rel="stylesheet" href="ffms.css">
+  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
+  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
+</head>
+<body>
+	<div class="container">
+	  <div class="page-header">
+    <div class="row">
+      <div class="col-md-2 col-sm-3">
+        <img id="ffms-logo" src="logo.svg" class="img" alt="Logo Freifunk Münsterland">
+      </div>
+      <div class="col-md-10 col-sm-9">
+        <h2>Karten - {{freifunk.name}}
+    <br/><small>Karten der einzelnen Domänen und der Communities</small></h2>
+      </div>
+    </div>
+    </div>
+  </div>
+  <div class="container">
+  <div class="row">
+    <!-- Suchfeld und Links -->
+    <div class="col-md-4 col-sm-4">
+      <form action="#" method="get">
+        <div class="input-group">
+          <!-- USE TWITTER TYPEAHEAD JSON WITH API TO SEARCH -->
+          <input class="form-control" id="system-search" name="q" placeholder="Suche nach" required>
+          <span class="input-group-btn">
+          <button type="submit" class="btn btn-default"><i class="glyphicon glyphicon-search"></i></button>
+          </span>
+        </div>
+      </form>
+      <br/>
+      <p><strong><a href="map/">Gesamtkarte des Freifunk Münsterlands</a></strong></p>
+      <p><a href="https://freifunk-muensterland.de">Freifunk Münsterland</a></p>
+      <p><a href="https://wiki.freifunk-muensterland.de/">Freifunk Münsterland Wiki</a></p>
+      <p><a href="https://forum.freifunk-muensterland.de/">Freifunk Münsterland Forum</a></p>
+    </div>
+    <!-- Spalte mit Domänen -->
+    <div class="col-md-4 col-sm-4">
+        <div class="ffms-align-center">
+        <table  class="table table-list-search table-hover">
+          <thead>
+            <tr>
+              <th>
+                  <div style=text-align:center><h4>Domänen</h4></div>
+              </th>
+            </tr>
+          </thead>
+          <tbody>
+            <!-- Alle Domänen einfügen 
+            <tr>
+              <td><a href="mapXX/"> XX - name</a></td>
+            </tr> -->
+{% for domaene in domaenen|dictsort %}
+            <tr>
+              <td><a href="map{{domaene[0]}}/">Domäne {{domaene[0]}}</a> - {{domaene[1].name}} </td>
+            </tr>
+{% endfor %}
+          </tbody>
+        </table>
+        </div>
+    </div>
+    <!-- Spalte mit Gruppen -->
+{% set communities = domaenen | list | map('extract', domaenen, 'community') | list | unique | sort %}
+    <div class="col-md-4 col-sm-4">
+        <div class="ffms-align-center">
+        <table class="table  table-list-search table-hover">
+          <thead>
+            <tr>
+              <th><div style=text-align:center><h4>Gruppen</h4></div></th>
+            </tr>
+          </thead>
+          <tbody>
+            <!-- Alle Communities einfügen 
+            <tr>
+                <td><a href=""> </a></td>
+            </tr>
+            -->
+{% for community in communities %}
+{% if community != "None" %}
+            <tr>
+                <td>Community <a href="map_{{community}}/">{{community}}</a></td>
+            </tr>
+{% endif %}
+{% endfor %}
+          </tbody>
+        </table>
+        </div>
+    </div>
+  </div>
+  </div>
+     <!-- Bootstrap core JavaScript
+    ================================================== -->
+     <!-- Placed at the end of the document so the pages load faster -->
+    <script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
+    <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
+    <script src="search.js"></script>
+</body>