Skip to content

Instantly share code, notes, and snippets.

@furball514
Created September 13, 2017 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save furball514/f923e5e9711fa04a36b23632160c651f to your computer and use it in GitHub Desktop.
Save furball514/f923e5e9711fa04a36b23632160c651f to your computer and use it in GitHub Desktop.
social network

Redesigned-Social-Network

initially named studentHub now its a simple static layout for social media

A Pen created at CodePen.io. You can find this one at http://codepen.io/collection/AedkPj/
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>logged in</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css'>
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'>
<link rel="stylesheet" href="css2/page2.css">
</head>
<body>
<head><link href="https://fonts.googleapis.com/css?family=Maven+Pro" rel="stylesheet"> <script src="https://apis.google.com/js/platform.js" async defer> </script> </head>
<body>
<div class="row">
<div id="options"> <ul>
<li><a id="profile" href="#option1">&nbsp;&nbsp;<span class="fa fa-user"></span>&nbsp;&nbsp;Profile</a></li>
<li><a id="nfeed" href="#option2">&nbsp;<span class="fa fa-newspaper-o"></span>&nbsp;Newsfeed</a></li>
<li><a id="fave" href="#option3">&nbsp;<span class="fa fa-heart"></span>&nbsp;Favourites</a></li>
<li><a id="about" href="#option4">&nbsp;<span class="fa fa-info-circle"></span>&nbsp;&nbsp;About</a></li>
</ul> </div>
<div class="container">
<div id="signout"> <a href="#" class="btn" onclick="signOut();">Sign out</a> </div> <br> <hr>
<div class="content">
<div id="option1">
Name: <br>
<span> </span>
E-mail: <br>
<span> </span>
Profile Pic: <br>
<span> </span>
</div>
<div id="option2">
<section> </section>
<section id="submit">
<hr>
<span class="row"> <textarea rows="5"> </textarea> <button class="btn"> <span class="fa fa-paper-plane"> </span> Submit </button> </span>
</section>
</div>
<div id="option3">
</div>
<div id="option4">
</div>
</div>
</div>
</div>
<audio id="gg" src="https://www.soundjay.com/button/sounds/button-50.mp3"> </audio>
</body>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script>
<script src="js2/page2.js"></script>
</body>
</html>
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Homepage </title>
<meta name="viewport" content="width=device-width, initial-scale=1"><meta name="google-signin-client_id" content="998291664250-7e7k5vrk9lts2ponbo1gsq6mp4751736.apps.googleusercontent.com">
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'>
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css'>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<head> <script src="https://apis.google.com/js/platform.js" async defer> </script>
<link href="https://fonts.googleapis.com/css?family=Maven+Pro" rel="stylesheet">
</head>
<body>
<div class="container-fluid">
<div class="row">
<div id="title" class="col-md-10">
<h1> studentHub </h1>
<!--name/logo goes here-->
</div>
<div id="sign-in">
<div class="g-signin2" data-onsuccess="onSignIn"></div>
</div> </div>
<hr>
<div class="row">
<div id="info" class="col-md-6">
<p>Connect With The World Using studentHub! </p>
<a href="page2.html"> Go to next page </a> <img id="connect-img"
class="img-responsive" src="https://www.tnooz.com/wp-content/uploads/2013/09/connect-world.jpg" alt="image">
</div>
&nbsp;
<div id="sign-up" class="col-md-5.5">
<h3>Don't have a Google Account? Sign up here.</h3>
<a href="https://accounts.google.com/SignUp?hl=en" target="_blank"> <img id="sign-up-img" class="img-responsive" src="https://theloginsupport.com/wp-content/uploads/2015/10/Gmail-Create-your-Google-Account-SignUp-form-filled.png"> </a>
</div>
</div>
</div>
</body>
<!-- https://developers.google.com/identity/sign-in/web/backend-auth -->
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>
function main () {
function onSignIn(googleUser) {
var profile = googleUser.getBasicProfile();
console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
console.log('Name: ' + profile.getName());
console.log('Image URL: ' + profile.getImageUrl());
console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
}
}
//notasecret
$(document).ready(main);

MIT License

Copyright (c) 2017 Karthik Nallasivan

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

*{margin:0;
padding:0;
box-sizing:border-box;}
.container {
padding-right: 0;
padding-left: 0;
margin-right: 10%;
margin-left: 30%;
overflow-y: scroll;
}
body{background-image: linear-gradient(161deg, #008db6 0%, #35005f 100%);
background-attachment: fixed;
color: white;
font-family: "Maven Pro", Helvetica, sans-serif;
font-size: 16px;
font-weight: 400;
}
li a {
display: block;
width: 260px;
padding: 8px 16px;
text-decoration: none;
font-size:1.1em;
border-bottom:1px solid black;
}
a{text-decoration: none;
color: white;}
ul {color: #fff;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
background-color: #222;
list-style-type: none;
margin: 0;
padding: 0;
width: 25%;
height: 100%;
position: fixed;
}
li a:hover {
background-image: linear-gradient(161deg, #008db6 0%, #35005f 100%);
color: white;
text-decoration: none;
}
#signout{float:right}
hr {border-top:1px solid white;}
.active{border-right:10px solid red;}
.btn {
border-radius: 8px;
border: none;
background-color: #001f3f;
margin: 0 4px 10px 8px;
height: 40px;
width: 90px;
box-shadow: 0 3px 0 0 white, inset -1px -3px 10px 1px darkgrey;
color:white;
}
.btn:active {
transform: translate(0, 3px);
box-shadow: none;
}
.btn,
.btn:hover,
.btn:active,
.btn:visited {
text-decoration: none !important;
outline: none !important;
}
#submit{margin-top:400px;
vertical-align: bottom;
margin-bottom: 8px;}
textarea{width: 700px;}
.fa-paper-plane{margin-left: -7px}
/*//998291664250-7e7k5vrk9lts2ponbo1gsq6mp4751736.apps.googleusercontent.com
//hLtHt7DjKQZBEXu9NzZQ1tN_
*/
/*$('#profile').click(function(){$('#profile').addClass('active');
$('#fave, #about, #nfeed').removeClass('active'); });
$('#nfeed').click(function(){$('#profile').removeClass('active');
$('#fave, #about').removeClass('active'); $(this).addClass('active'); });
$('#fave').click(function(){$('#profile').removeClass('active'); $(this).addClass('active');
$('#about, #nfeed').removeClass('active'); });
$('#about').click(function(){$('#profile').removeClass('active');
$(this).addClass('active'); $('#fave, #nfeed').removeClass('active'); }); */
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>logged in</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css'>
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'>
<link rel="stylesheet" href="css2/page2.css">
</head>
<body>
<head><link href="https://fonts.googleapis.com/css?family=Maven+Pro" rel="stylesheet"> <script src="https://apis.google.com/js/platform.js" async defer> </script> </head>
<body>
<div class="row">
<div id="options"> <ul>
<li><a id="profile" href="#option1">&nbsp;&nbsp;<span class="fa fa-user"></span>&nbsp;&nbsp;Profile</a></li>
<li><a id="nfeed" href="#option2">&nbsp;<span class="fa fa-newspaper-o"></span>&nbsp;Newsfeed</a></li>
<li><a id="fave" href="#option3">&nbsp;<span class="fa fa-heart"></span>&nbsp;Favourites</a></li>
<li><a id="about" href="#option4">&nbsp;<span class="fa fa-info-circle"></span>&nbsp;&nbsp;About</a></li>
</ul> </div>
<div class="container">
<div id="signout"> <a href="#" class="btn" onclick="signOut();">Sign out</a> </div> <br> <hr>
<div class="content">
<div id="option1">
Name: <br>
<span> </span>
E-mail: <br>
<span> </span>
Profile Pic: <br>
<span> </span>
</div>
<div id="option2">
<section> </section>
<section id="submit">
<hr>
<span class="row"> <textarea rows="5"> </textarea> <button class="btn"> <span class="fa fa-paper-plane"> </span> Submit </button> </span>
</section>
</div>
<div id="option3">
</div>
<div id="option4">
</div>
</div>
</div>
</div>
<audio id="gg" src="https://www.soundjay.com/button/sounds/button-50.mp3"> </audio>
</body>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script>
<script src="js2/page2.js"></script>
</body>
</html>
function main(){
$("div.content div").hide();
$('#nfeed').addClass('active');
$("#option2").show();
var audio = $('#gg')[0];
$('li').mouseenter(function(){audio.play();}) ;
var object = {
"widgetUrl": "http://codepen.io/furball/pen/MJLKOr",
"signInSuccessUrl": "http://codepen.io/furball/pen/MJLKOr",
"signOutUrl": "http://codepen.io/furball/pen/ggqPpY",
"oobActionUrl": "",
"apiKey": "",
"siteName": "this site",
"signInOptions": ["password","google","twitter"]
};
function signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
console.log('User signed out.');
});
}
$('li a').click(function(){$('li a').removeClass('active');
$(this).addClass('active'); $("div.content div").hide();
var select = $(this).attr("href");
$(select).fadeIn(1000);
});
}
$(document).ready(main);
*{margin:0;
padding:0;
box-sizing:border-box;}
body{background-image: linear-gradient(161deg, #008db6 0%, #35005f 100%);
background-attachment: fixed;
color: white;
font-family: "Maven Pro", Helvetica, sans-serif;
font-size: 16px;
font-weight: 400;
}
#title{text-align:left;}
/*#sign-in{text-align:right;}*/
#sign-up-img{height:350px;
width:350px;
padding-left:10px;
overflow-y: hidden;
}
#connect-img{height:300px;
width:550px;}
.g-signin2,h1{margin-top:15px;
margin-bottom:0.5px;
/*background: black;*/
}
a{color: white;}
hr {border-top:1px solid white;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment