css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
                  <span class="nav">
      <span class="nav-logo" onclick="showMain()">LOGO</span>
      <span class="nav-group">
        <span id="about" class="nav-item" onclick="showAbout()">about</span>
        <span id="portfolio" class="nav-item"  onclick="showPortfolio()">portfolio</span>
        <span id="contact" class="nav-item" onclick="showContact()">contact</span>
      </span>
    </span>
    <span class="main">
      <span class="main-title">&#60span&#62 WORLD</span>
      <span class="main-subtitle">a site made using only &#60span&#62 & &#60input&#62 HTML tags</span>
    </span>
    <span class="about hidden">
      <span class="about-pic"></span>
      <span class="about-info">Hi! I am Sorin and I'm playing around with html, css and javascript.</span>
    </span>
    <span class="portfolio hidden">
      <span class="fa fa-chevron-left fa-5" onclick="slideLeft()"></span>
      <span id="slide-1" class="carousel-item codepen active" data-url="" data-height="360" data-theme-id="0" data-slug-hash="YqgEQK" data-default-tab="result" data-user="sorinr" data-embed-version="2"></span>
      <span id="slide-2" class="carousel-item codepen" data-url="" data-height="360" data-theme-id="0" data-slug-hash="bpJmQP" data-default-tab="result" data-user="sorinr" data-embed-version="2"></span>
      <span id="slide-3" class="carousel-item codepen" data-url="" data-height="360" data-theme-id="0" data-slug-hash="LZVqmJ" data-default-tab="result" data-user="sorinr" data-embed-version="2"></span>
      <span id="slide-4" class="carousel-item codepen" data-url="" data-height="360" data-theme-id="0" data-slug-hash="VaJKrw" data-default-tab="result" data-user="sorinr" data-embed-version="2"></span>
      <span class="fa fa-chevron-right fa-5 hidden" onclick="slideRight()"></span>
    </span>
    <span class="contact hidden">
      <span class="contact-form">
        <span class="contact-title">&#60 Contact Me &#62</span>
        <input tyoe="text" placeholder="Your Name..." name="name" required>
        <input type="email" placeholder="Your email address..." name="email" required>
        <input type="text" placeholder="Short message..." name="message" required>
        <span class="contact-form-button" onclick="goSubmit()">send</span>
      </span>
      <span class="contact-info">
        <span id="map"></span>
      </span>
      <span class="contact-media">
        <span class="fa fa-github fa-5"></span>
        <span class="fa fa-twitter fa-5"></span>
        <span class="fa fa-codepen fa-5"></span>
      </span>
    </span>
  <span id="overlay"></span>
  <span class="modal">
    <span class="modal-title"></span>
    <span class="modal-message">Your message was succesfully sent. Thank you.</span>
    <span class="modal-close-button" onclick="closeModal()">Close</span>
  </span>
            
          
!
            
              html, body{
  padding: 0px;
  margin: 0px;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
}
html{
  background: url(https://photos-6.dropbox.com/t/2/AAD-DTV-YxdsBJDD3Ihgvjv1lAPrEYYgu3w3g1ewFC3Y8Q/12/58284498/jpeg/32x32/1/_/1/2/html-screen.jpg/EKvAhC0YqBkgBygH/pCaXm6kfbHk0gf8TCnkaQVISCXrOWt1AvFyNSXlNAIo?size=800x600&size_mode=3) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

.nav{
  display: inline-flex;
  flex-direction: row;
  width: 100%;
  height: 64px;
  padding-left: 20px;
  align-items: center;
  color: #ffffff;
  background-color: rgba(0,0,0,.8);
}
.nav-logo{
  text-transform: uppercase;
  font-size: 2em;
}
.nav-logo:hover, .nav-item:hover{
  cursor:pointer;
  color: #cccccc;
}
.nav-group{
  position: absolute;
  right: 20px;
  top: 20px;
}
.nav-item{
  padding-left: 10px;
  padding-right: 10px;
  text-transform: uppercase;
}
.main, .about, .portfolio, .contact{
  margin: 5% auto 0 auto;
  width: 90%;
  height: 400px;
  color: #ffffff;
  background-color: rgba(0,0,0,.8);
}
.main{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.main-title{
  font-size: 4em;
  font-weight:700;
}
.main-subtitle{
  font-size: 1.5em;
  font-weight:100;
  font-style: italic;
}
.about{
  display: flex;
  flex-direction: row;
}

.about-pic{
  display: inline-block;
  height: 300px;
  width: 300px;
  border-radius: 100%;
  margin: 50px;
  background: url('https://res.cloudinary.com/sorinr/image/upload/v1463511342/marc_zz2mgs.jpg') center center;
}
.about-info{
  margin-top: 152px;
  font-size: 2em;
  font-weight: 300;
  font-style: italic;
}
.portfolio{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  font-size: 2.5em;
  font-style: italic;
}
.carousel-item{
  display: inline-block;
  height: 400px;
  width: 100%;
  text-align: center;
}
span.carousel-item:not(.active) {
  display: none;
}
span.fa.fa-chevron-left{
  margin-left: 10px;
}
span.fa.fa-chevron-right{
  margin-right: 10px;
}
embed{
  width: 80% !important;
  margin-top: 20px;
}
.contact{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  font-size: 2.5em;
  font-style: italic;
}
.contact-form{
  display: flex;
  flex-direction: column;
  flex-basis: 30%;
  margin: 20px;
}
.contact-info{
  display: flex;
  flex-direction: row;
  flex-basis: 65%;
  justify-content: center;
  align-items: center;
}
#map{
  display: inline-block;
  width:100%;
  height: 360px;
}
.contact-media{
  display:flex;
  flex-direction: column;
  flex-basis: 5%;
}
.contact-media > span.fa{
  margin: 20px 20px;
}
.contact-media > span.fa:hover{
  color: rgb(105,105,105);
}
.contact-title{
  font-style: normal;
}
.contact-form-button{
  font-size: 0.6em;
  font-style: normal;
  text-align: center;
  text-transform: uppercase;
  margin:20px 0px;
  background-color: rgba(0,0,0,.6);
}
.contact-form-button:hover{
  background-color: rgb(105,105,105);
  cursor:pointer;
}
input{
  margin: 15px 0px;
  font: 16px Roboto;
}

.contact-info{
  font-size: 0.5em;
  font-weight: 100;
  font-style: normal;
}
.overlay{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 998;
  background-color: rgba(105,105,105,0.6);
}
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 35%;
  top: 30%;
  width: 400px;
  height: 300px;
  overflow: auto;
  background-color: rgb(255,255,255);
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.8), 0 12px 40px 0 rgba(0, 0, 0, 0.79);
}
.modal-title{
  display: block;
  margin: 20px 20px;
  font-size: 2em;
  font-weight: 700;
}
.modal-message{
  display: block;
  margin: 40px 20px;
  font-size: 1.5em;
  font-weight: 300;
  font-style: normal;
}
.modal-close-button{
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: rgb(7, 55, 99);
  color: white;
  border: none;
  cursor: pointer;
  padding: 2px 12px 3px 12px;
  text-decoration: none;
}
.hidden{
  display: none;
}
            
          
!
            
              function showMain(){
  $('span').removeClass('hidden animated bounceInLeft');
  $('span.main').addClass("animated bounceInLeft");
  $('span.about,span.portfolio,span.contact').addClass('hidden');
}
function showAbout(){
  $('span').removeClass('hidden animated fadeInDownBig');
  $('span.about').addClass("animated fadeInDownBig");
  $('span.main,span.portfolio,span.contact').addClass('hidden');
}
function showPortfolio(){
  $('span').removeClass('hidden animated flipInX');
  $('span.portfolio').addClass("animated flipInX");
  $('span.main, span.about, span.contact').addClass('hidden');
}
function showContact(){
  $('span').removeClass('hidden animated bounceInRight');
  $('span.contact').addClass("animated bounceInRight");
  $('span.main, span.about, span.portfolio').addClass('hidden');
  initMap();
  google.maps.event.trigger(map, 'resize');
  map.setZoom();
}
function slideLeft(){
  var elid = $('span.carousel-item.active').attr('id');
  var arr = elid.split('-');
  var previd = parseInt(arr[1])-1;
  var prevel = "slide-"+previd;
  if(previd > 0){
    $('#'+elid).removeClass('active');
    $('#'+prevel).addClass('active');
  }
}
function slideRight(){
  var slides = $('span.carousel-item').length;
  var elid = $('span.carousel-item.active').attr('id');
  var arr = elid.split('-');
  var nextid = parseInt(arr[1])+1;
  var nextel = "slide-"+nextid;
  if (nextid <= slides){
    $('#'+elid).removeClass('active');
    $('#'+nextel).addClass('active');
  }
}

function closeModal(){
  $('#overlay').removeClass('overlay');
  $('span.modal').hide();
}

function goSubmit(){
  var name = $('input[name]').val();
  $('span.modal-title').text('Hello '+name+'!');
  $('#overlay').addClass('overlay');
  $('span.modal').show();
}

function initMap() {
  // Create a map object and specify the DOM element for display.
  var map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: 44.3433275, lng: 26.3961951},
    scrollwheel: false,
    zoom: 8
  });
}     

$( document ).ready(function() {
    $('span.main').addClass("animated bounceInLeft");
    $( "span.carousel-item" ).each(function( index ) {
      var slide = $("#"+$( this ).attr('id'));
      var imageUrl = slide.data("url");
      $(slide).css('background', 'url(http://sorinr.netau.net/fcc/assets' + imageUrl + ') no-repeat center center');
    });
});

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console