changeset 15:c5bf4e02958e

add/delete credentials, new layout, alpha version ribbon, contact
author Mathias Gebbe <mgebbe@intevation.de>
date Thu, 12 Jun 2014 20:51:10 +0200
parents c1b736a859c9
children d2208a4ed5c8
files index.js_to_pump.io-client-app_lib_routes public/contact.html public/images/ribbon.png public/images/ribbonl.png public/stylesheets/style.css views/index.jade views/login.jade
diffstat 7 files changed, 142 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/index.js_to_pump.io-client-app_lib_routes	Thu Jun 12 10:36:52 2014 +0200
+++ b/index.js_to_pump.io-client-app_lib_routes	Thu Jun 12 20:51:10 2014 +0200
@@ -22,6 +22,7 @@
     uuid = require("node-uuid"),
     User = require("../models/user"),
     Host = require("../models/host"),
+    Usermap = require("../../../../lib/usermap.js"),
     RequestToken = require("../models/requesttoken"),
     RememberMe = require("../models/rememberme"),
     site = require("../models/site");
@@ -41,7 +42,18 @@
     var hosts, users, bank = Host.bank();
 
     if (req.user) {
-        res.render('index', { pageTitle: "pumpbridge" , user: req.user});
+      var fb=false, gp=false, tw=false;
+       Usermap.search({
+         user_pumpio: req.user.id
+       }, function(err, result) {
+          if(err) res.render('login', { pageTitle: "pumpbridge" });
+          _.each(result, function(um) {
+            if ( um.id.indexOf('@facebook') != -1 ) fb=true;
+            if ( um.id.indexOf('@twitter') != -1 ) tw=true;
+            if ( um.id.indexOf('@google') != -1 ) gp=true;
+          });
+          res.render('index', { pageTitle: "pumpbridge" , user: req.user, usermapfb: fb, usermapgp: gp, usermaptw: tw});
+         });
     } else {
         res.render('login', { pageTitle: "pumpbridge" });
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/public/contact.html	Thu Jun 12 20:51:10 2014 +0200
@@ -0,0 +1,44 @@
+<html>
+<head>
+<title>pumpbridge</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+</head>
+<body bgcolor="#FFF">
+Angaben gemäß § 5 TMG:
+<!--
+ _     _                                         _ <br>
+| |   | |                                       | |<br>
+| |__ | | ___  ___ ___ _   _ _ __ ___ _ __    __| | ___<br>
+| '_ \| |/ _ \/ __/ __| | | | '__/ _ \ '_ \  / _` |/ _ \<br>
+| |_) | |  __/\__ \__ \ |_| | | |  __/ | | || (_| |  __/<br>
+|_.__/|_|\___||___/___/\__,_|_|  \___|_| |_(_)__,_|\___|<br>
+-->
+<br>
+
+<h3>Contact:</h3><br>
+Type: PERSON<br>
+Name: Mathias Gebbe<br>
+Address: Quellwiese 47<br>
+PostalCode: 49080<br>
+City: Osnabrück<br>
+CountryCode: DE<br>
+Phone: +49.15150661709<br>
+Email: mathias.gebbe@gmail.com<br>
+Changed: 2013-10-01T21:23:02+02:00<br>
+<br>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+<input type="hidden" name="cmd" value="_donations">
+<input type="hidden" name="business" value="ebbegebbe@aol.com">
+<input type="hidden" name="lc" value="DE">
+<input type="hidden" name="item_name" value="Mathias Gebbe">
+<input type="hidden" name="no_note" value="0">
+<input type="hidden" name="currency_code" value="EUR">
+<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
+<input type="image" src="https://www.paypalobjects.com/de_DE/DE/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen – mit PayPal.">
+
+<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
+</form>
+</p>
+
+</body>
+</html>
Binary file public/images/ribbon.png has changed
Binary file public/images/ribbonl.png has changed
--- a/public/stylesheets/style.css	Thu Jun 12 10:36:52 2014 +0200
+++ b/public/stylesheets/style.css	Thu Jun 12 20:51:10 2014 +0200
@@ -4,7 +4,7 @@
   text-align: left;
   padding-top: 80px;
   color: silver;
-  font: 14px "Lucida Grande", Helvetica, Arial, sans-serif!important;
+  font: 16x "Lucida Grande", Helvetica, Arial, sans-serif!important;
 }
 
 a {
@@ -16,8 +16,8 @@
 }
 
 .login {
+ font: 16x "Lucida Grande", Helvetica, Arial, sans-serif!important;
  color: black!important; 
- font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
 }
 
 #gp, #tw, #fb{
@@ -30,7 +30,12 @@
  text-align: center;
 }
 
-.headline {
+.headlinebox {
+ display: inline-block;
+ position: relative;
+}
+
+.headline{
  font-size: 50px;
 }
 
@@ -59,3 +64,9 @@
 .footer a {
  color: silver!important; 
 }
+
+.ribbon {
+ position: absolute;
+ top: 6px;
+ left: -25px;
+}
--- a/views/index.jade	Thu Jun 12 10:36:52 2014 +0200
+++ b/views/index.jade	Thu Jun 12 20:51:10 2014 +0200
@@ -37,12 +37,12 @@
 
      gapi.signin.render('gp-root', {
       'callback': 'signinCallback',
-      'clientid': 'GOOGLEPLUSCLIENTID.apps.googleusercontent.com',
+      'clientid': 'GOOGLEPLUSID.apps.googleusercontent.com',
       'redirecturi': 'postmessage',
       'response_type' : 'code',
       'accesstype': 'offline',
       'approvalprompt': 'force',
-      'cookiepolicy': "https://pumpbridge.me",
+      'cookiepolicy': "https://server.example",
       'requestvisibleactions': 'http://schemas.google.com/AddActivity',
       'scope': 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email'
      });
@@ -96,10 +96,34 @@
      }
 
 
-
     // load facebook api
     script.
      $(document).ready(function () {
+         var usermapfb="#{usermapfb}";
+         var usermaptw="#{usermaptw}";
+         var usermapgp="#{usermapgp}";
+
+         if(usermapfb == 'true'){
+           $('#fbloginbutton2').addClass('hide');
+           $('#fbdeletebutton').removeClass('hide');
+         }else{
+           $('#fbloginbutton2').removeClass('hide');
+           $('#fbdeletebutton').addClass('hide');
+         }
+         if(usermaptw == 'true'){
+           $('#twloginbutton2').addClass('hide');
+           $('#twdeletebutton').removeClass('hide');
+         }else{
+           $('#twloginbutton2').removeClass('hide');
+           $('#twdeletebutton').addClass('hide');
+         }
+         if(usermapgp == 'true'){
+           $('#gploginbutton2').addClass('hide');
+           $('#gpdeletebutton').removeClass('hide');
+         }else{
+           $('#gploginbutton2').removeClass('hide');
+           $('#gpdeletebutton').addClass('hide');
+         }
 
          var twstatus = getCookie('twitterid')
          if (twstatus != "") $('#twstatus').html('<a href=https://twitter.com/account/redirect_by_id/' + twstatus + '> ' + getCookie('twitteruser') + '</a>');
@@ -110,7 +134,7 @@
 
          $.getScript('//connect.facebook.net/de_DE/all.js', function () {
              FB.init({
-                 appId: 'FACEBOOKCLIENTID',
+                 appId: 'FACEBOOKID',
                  status: true
              });
 
@@ -161,10 +185,12 @@
   body
    block content
   .main
-      h1(class='headline') pumpbridge.<br>connecting social networks
+      .headlinebox
+        img(class="ribbon", src="/images/ribbonl.png")
+        h1(class='headline') pumpbridge.<br>connecting social networks
       #pump-root.pump-root
         h4
-          | logged in as:
+          | logged in as:&nbsp;
           a(id='pumpstatus',class='pumpstatus',href=user.homepage)=user.id
       #fb.fb
         #fb-root.fb-root
@@ -174,8 +200,10 @@
           br
           form(class='',action='/bridge',method='post')
            input(id='fbdeleted',name='fbdelete',hidden='true',value=user.id)
-           button(type='submit',class='btn btn-default btn-xs')
+           button(id='fbdeletebutton',type='submit',class='btn btn-default btn-xs',hidden='true')
             | delete credentials
+          button(id='fbloginbutton2',name='fbloginbutton2',class='btn btn-default btn-xs',onClick='$("#fbloginbutton").click()')
+           | add credentials
       #gp.gp
         #gp-root.gp-root
            input(id='gploginbutton',type='image',class='gploginbutton',value='gpLogin',src='images/gp.svg',width='100px',height='100px')
@@ -184,8 +212,10 @@
           br
           form(class='',action='/bridge',method='post')
            input(id='gpdeleted',name='gpdelete',hidden='true',value=user.id)
-           button(type='submit',class='btn btn-default btn-xs')
+           button(name='gpdeletebutton',id='gpdeletebutton',type='submit',class='btn btn-default btn-xs')
             | delete credentials
+          button(id='gploginbutton2',name='gploginbutton2',class='btn btn-default btn-xs',onClick='$("#gploginbutton").click()')
+           | add credentials
       #tw.tw
         #tw-root.tw-root
           a(href='/add-account'): input(type='image',value='twitterlogin',src='images/twitter.svg',width='100px',height='100px')
@@ -194,8 +224,10 @@
           br
           form(class='',action='/bridge',method='post')
            input(id='twdeleted',name='twdelete',hidden='true',value=user.id)
-           button(type='submit',class='btn btn-default btn-xs')
+           button(id='twdeletebutton',type='submit',class='btn btn-default btn-xs')
             | delete credentials
+          button(id='twloginbutton2',name='twloginbutton2',type='submit',class='btn btn-default btn-xs',onClick='location.href="/add-account"')
+           | add credentials
        form(class='',action='/bridge',method='post')
          input(id='pumpid',name='pumpid',hidden='true',value=user.id)
          input(id='pumptoken',name='pumptoken',hidden='true', value=user.token)
@@ -206,6 +238,10 @@
          input(id='gpid',name='gpid',hidden='true')
          input(id='gptoken',name='gptoken',hidden='true',size=100)
          br
+         | you need to extra save the credentials
+         br
+         | for facebook and googleplus
+         br
          input(type='submit',class='btn btn-default',value='save credentials')
    .footer
     #logout.logout
@@ -214,6 +250,8 @@
           input(type='submit',class='btn btn-default',value='logout')
          br
      p.
-      here our bridge will be.
-      <br> visit <a href=https://wald.intevation.org/projects/pumpbridge/>https://wald.intevation.org/projects/pumpbridge/</a>
-
+       <a href=https://wald.intevation.org/hg/pumpbridge/>pumpbridge</a> is Free Software and available under the Apache License 2.0.
+       <br>
+       visit <a href=https://wald.intevation.org/projects/pumpbridge/>https://wald.intevation.org/projects/pumpbridge</a> for more informations!
+       <br>
+       pumpbridge is hosted and operated by <a href=https://io.intevation.de/mgebbe>Mathias Gebbe</a> <a href=/contact.html>(Contact)</a>      <br>
--- a/views/login.jade	Thu Jun 12 10:36:52 2014 +0200
+++ b/views/login.jade	Thu Jun 12 20:51:10 2014 +0200
@@ -9,9 +9,24 @@
  body
    block content
    .main
-    h1(class='headline') pumpbridge.<br>connecting social networks
-    form(action='/login', method='post')
-     input(class='login',id='webfinger',name='webfinger',size=30,type='text',placeholder='user@pumpnetwork.com')
-     br
-     br
-     input(type='submit',class='btn btn-primary',value='Login')
+     .headlinebox
+       img(class="ribbon", src="/images/ribbonl.png")
+       h1(class='headline') pumpbridge.<br>connecting social networks
+     form(action='/login', method='post')
+       |Login with your pump.io account (WebFinger ID) to get started.
+       br 
+       |(No pump.io account yet? <a href="http://pump.io/tryit">Try it</a>!)
+       br
+       input(class='login',id='webfinger',name='webfinger',size=30,type='text',placeholder='user@server.example')
+       br
+       br
+       input(type='submit',class='btn btn-primary',value='Login')
+       br
+       br
+ .footer
+   p.
+     <a href=https://wald.intevation.org/hg/pumpbridge/>pumpbridge</a> is Free Software and available under the Apache License 2.0.
+     <br>
+     visit <a href=https://wald.intevation.org/projects/pumpbridge/>https://wald.intevation.org/projects/pumpbridge</a> for more informations!
+     <br>
+     pumpbridge is hosted and operated by <a href=https://io.intevation.de/mgebbe>Mathias Gebbe</a> <a href=/contact.html>(Contact)</a>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)