Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- 
  Containing div not necessary in index.html,  
  as ng-app is attached to <html> element
-->
<div ng-app="myApp" ng-controller="BusinessCardController">

<nav id="header" class="navbar navbar-default" role="navigation">
  <div id="header_left" class="navbar-brand" title="Angular Card Generator">
    ACG Angular Card Generator
  </div>
</nav>

<div class="wrapper">
  <div class="panel-group" id="accordion1">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion1" href="#collapseOne">
            <i class="fa fa-user fa-fw"></i>Full Name
          </a>
        </h4>
      </div>
      <div id="collapseOne" class="panel-collapse collapse in">
        <div class="panel-body">
          Full Name: <input type="text" ng-model="user.name" placeholder="Full Name" />
        </div>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion1" href="#collapseTwo">
            <i class="fa fa-star fa-fw"></i>Occupation
          </a>
        </h4>
      </div>
      <div id="collapseTwo" class="panel-collapse collapse">
        <div class="panel-body">
          Occupation: <input type="text" ng-model="user.occupation" placeholder="Occupation" />
        </div>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion1" href="#collapseThree">
            <i class="fa fa-comment fa-fw"></i>Email</a>
          </a>
        </h4>
      </div>
      <div id="collapseThree" class="panel-collapse collapse">
        <div class="panel-body">
          Email: <input type="text" ng-model="user.email" placeholder="Email-ID" />
        </div>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion1" href="#collapseFour">
            <i class="fa fa-hand-o-right fa-fw"></i>Personal Link 1
          </a>
        </h4>
      </div>
      <div id="collapseFour" class="panel-collapse collapse">
        <div class="panel-body">
          http://<input type="text" ng-model="user.link1" placeholder="Personal Link-1" />
        </div>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion1" href="#collapseFive">
            <i class="fa fa-hand-o-right fa-fw"></i>Personal Link 2
          </a>
        </h4>
      </div>
      <div id="collapseFive" class="panel-collapse collapse">
        <div class="panel-body">
          http://<input type="text" ng-model="user.link2" placeholder="Personal Link-2" />
        </div>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion1" href="#collapseSix">
            <i class="fa fa-picture-o fa-fw"></i>Company Logo
          </a>
        </h4>
      </div>
      <div id="collapseSix" class="panel-collapse collapse">
        <div class="panel-body">
          http://<input type="text" ng-model="user.companylogo" placeholder="Company Logo URL" />
        </div>
      </div>
    </div>
  </div>

  <div class="card" style="
   background: -webkit-linear-gradient(top, {{ user.color1 }} , {{ user.color2 }});
   background: -o-linear-gradient(top,{{ user.color1 }}, {{ user.color2 }});
   background: -moz-linear-gradient(top,{{ user.color1 }}, {{ user.color2 }});
   background: linear-gradient(top,{{ user.color1 }}, {{ user.color2 }});
   color:{{ user.textcolor1 }};">

    <img ng-src="{{ user.companylogo }}" class="logo">

    <div class="details">
      <h1>{{ user.name }}</h1>
      <h2 style="color:{{ user.textcolor2 }};">{{ user.occupation }}</h2>

      <hr>

      <p style="color:{{ user.textcolor2 }};">
        <a ng-href="mailto:{{ user.email }}">{{ user.email }}</a>
      </p>

      <p style="color:{{ user.textcolor2 }};">
        <a ng-href="http://{{ user.link1 }}">{{ user.link1 }}</a>
      </p>

      <p style="color:{{ user.textcolor2 }};">
        <a ng-href="http://{{ user.link2 }}">{{ user.link2 }}</a>
      </p>

      <div class="social">
        <span class="twitter" style="color:{{ user.textcolor1 }};">
          <a ng-href="https://www.twitter.com/{{ user.tusername }}" title="@{{ user.tusername }}">
            <i class="fa fa-twitter fa-fw"></i>
          </a>
          <span class="twitter-handle" ng-show="!user.fusername && !user.gusername">
            @{{user.tusername}}
          </span>
        </span>

        <span class="facebook" style="color:{{ user.textcolor1 }};" ng-if="user.fusername">
          <a ng-href="https://www.facebook.com/{{ user.fusername }}" title="{{ user.name }} on Facebook" >
            <i class="fa fa-facebook fa-fw"></i>
          </a>
        </span>
        <span class="gplus" style="color:{{ user.textcolor1 }};" ng-if="user.gusername">
          <a ng-href="https://www.google.com/{{ user.gusername }}" title="{{ user.name }} on Google+">
            <i class="fa fa-google-plus fa-fw"></i>
          </a>
        </span>
      </div>
    </div>
  </div>
    <div class="panel-group" id="accordion2">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion2" href="#collapseSeven">
            <i class="fa fa-qrcode fa-fw"></i>Card Gradient Color
          </a>
        </h4>
      </div>
      <div id="collapseSeven" class="panel-collapse collapse in">
        <div class="panel-body">
          From: <input type="color" ng-model="user.color1" placeholder="Card Color1" />&nbsp;
          To: <input type="color" ng-model="user.color2" placeholder="Card Color2" />
        </div>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion2" href="#collapseEight">
            <i class="fa fa-angle-right fa-fw"></i>Text Color 1
          </a>
        </h4>
      </div>
      <div id="collapseEight" class="panel-collapse collapse">
        <div class="panel-body">
          Text-Color 1: <input type="color" ng-model="user.textcolor1" placeholder="Text-Color 1" />
        </div>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion2" href="#collapseNine">
            <i class="fa fa-angle-right fa-fw"></i>Text Color 2
          </a>
        </h4>
      </div>
      <div id="collapseNine" class="panel-collapse collapse">
        <div class="panel-body">
          Text-Color 2: <input type="color" ng-model="user.textcolor2" placeholder="Text-Color 2" />
        </div>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion2" href="#collapseTen">
            <i class="fa fa-twitter fa-fw"></i>Twitter
          </a>
        </h4>
      </div>
      <div id="collapseTen" class="panel-collapse collapse">
        <div class="panel-body">
          twitter.com/<input type="text" ng-model="user.tusername" placeholder="Twitter Username" />
        </div>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion2" href="#collapseEleven">
            <i class="fa fa-facebook fa-fw"></i>Facebook
          </a>
        </h4>
      </div>
      <div id="collapseEleven" class="panel-collapse collapse">
        <div class="panel-body">
          facebook.com/<input type="text" ng-model="user.fusername" placeholder="Facebook Profile" />
        </div>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion2" href="#collapseTwelve">
            <i class="fa fa-google-plus fa-fw"></i>Google+
          </a>
        </h4>
      </div>
      <div id="collapseTwelve" class="panel-collapse collapse">
        <div class="panel-body">
          google.com/<input type="text" ng-model="user.gusername" placeholder="Google+ Profile" />
        </div>
      </div>
    </div>
  </div>
</div>

<!---->
</div>
              
            
!

CSS

              
                .navbar{
  margin-bottom: 55px;
}

.wrapper{
  display: table; margin: 0 auto;
}

.panel-group{
  width: 300px;
  float: left;
}

.panel-title a{
  display: block;
}

i{
  margin-right:5px;
}

.card{
  float: left;
  border: 1px solid #287cc2;
  font-weight:lighter;
  width: 480px;
  margin: 0 75px;
  box-shadow: 0px 0px 10px rgb(17, 17, 17);
}

.card img{
  float: left;
  padding: 30px 0;
}

.card h1{
  font-size: 30px;
  margin: 15px 0 0 0;
}

.card h2{
  font-size: 22px;
  margin: 10px 0 0 0;
}

.card p{
  font-size: 15px;
  margin: 5px 0 0 0;
}

.social a:hover{
  text-decoration: none;
}

.details{
  width: 95%;
}

.social{
  margin: 15px 0 0 0;
  font-size:20px;
}

.twitter-handle{
  font-size: 15px;
  margin-top: -5px;
}

@media (max-width: 1250px){
  #accordion2{
    float: none;
    clear: both;
    margin-left: 0px;
  }

  .card{
    margin: 0 0 0 50px;
  }
}

@media (max-width: 1000px){
  .card{
    margin: 0;
  }
  
  .navbar{
    margin-bottom: 15px;
  }
  
  .panel-group{
    margin: 0 20px 20px 0;
    width: 250px;
  }
}

              
            
!

JS

              
                'use strict';

angular.module('myApp', [])
.controller('BusinessCardController', function($scope){
  $scope.user = {
    name: 'Tanay Pant',
    occupation: 'White Hat',
    email: 'tanay1337@gmail.com',
    link1: 'www.cyberwizards.org',
    tusername:'tanay1337',
    companylogo: 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/123941/logo.png',
    color1: '#c0c0c0',
    color2: 'white',
    textcolor1: '#287cc2',
    textcolor2: '#666',
    fusername:'...',
    gusername:'+TanayPant1337'
  }
});


              
            
!
999px

Console