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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                
<html>
  <head>
    <!-- Required meta tags-->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <!-- Your app title -->
    <title>Lifespace</title>
    <!-- Path to Framework7 iOS CSS theme styles-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/framework7/1.6.5/css/framework7.material.min.css">
    <!-- Path to Framework7 iOS related color styles -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/framework7/1.6.5/css/framework7.material.colors.css">
    <!-- Path to your custom app styles-->
    <link rel="stylesheet" href="path/to/my-app.css">
    
        <!-- Path to your custom app icons -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
      rel="stylesheet"> 
  </head>
  <body>
    <!-- Status bar overlay for full screen mode (PhoneGap) -->
    <div class="statusbar-overlay"></div>
    <!-- Panels overlay-->
    <div class="panel-overlay"></div>
    <!-- Left panel with reveal effect-->
    <div class="panel panel-left panel-reveal">
      <div class="content-block">
        <p>Left panel content goes here</p>
      </div>
    </div>
    <!-- Views -->
    <div class="views">
      <!-- Your main view, should have "view-main" class -->
      <div class="view view-main">
        <!-- Pages container, because we use fixed-through navbar and toolbar, it has additional appropriate classes-->
        <div class="pages navbar-fixed ">
          <!-- Page, "data-page" contains page name -->
          <div data-page="index" class="page">            
              <!-- Top Navbar-->
              <div class="navbar">
                <div class="navbar-inner">

                  <div class="left sliding">
<div class="item-media" style="margin-left:10px; margin-top:10px">
                      <img src="http://www.iconarchive.com/download/i102645/graphicloads/flat-finance/person.ico" width="44"></div>
                    <div class="item-inner" style="margin-left:10px">
                      <div class="item-title-row">
                        <div class="item-title" style="font-size:18px; line-height:23px">Nombre de usuario</div>
                      </div>
                      <div class="item-subtitle" style="font-size:14px; line-height:15px">En linea</div>
                    </div>
                    
                  </div>
                   
                  
                  <div class="right">
                    <!-- Right link contains only icon - additional "icon-only" class
                      Additional "open-panel" class tells app to open panel when we click on this link-->
                    <a href="#" class="link icon-only"><i class="material-icons">more_vert</i></a>
                  </div>
                </div>
              </div>          
            
              <!-- messagebar -->
  <div class="toolbar messagebar">
    <div class="toolbar-inner">
      <textarea placeholder="Escribir mensaje"></textarea><a href="#" class="link"><i class="material-icons color-blue">send</i></a>
    </div>
  </div>
            
              <div class="page-content messages-content">
 
<div class="messages">
      <div class="messages-date">Sunday, Feb 9 <span>12:58</span></div>
      <div class="message message-sent">
        <div class="message-text">Hello</div>
      </div>
      <div class="message message-sent">
        <div class="message-text">How are you?</div>
      </div>
      <div class="message message-received">
        <div class="message-name">Kate</div>
        <div class="message-text">I am fine, thanks</div>
        <div style="background-image:url(http://lorempixel.com/output/people-q-c-100-100-9.jpg)" class="message-avatar"></div>
      </div>
      <div class="messages-date">Sunday, Feb 3 <span>11:58</span></div>
      <div class="message message-sent">
        <div class="message-text">Nice photo?</div>
      </div>
      <div class="message message-sent message-pic">
        <div class="message-text"><img src="http://lorempixel.com/300/300/"></div>
        <div class="message-label">Delivered</div>
      </div>
      <div class="message message-received">
        <div class="message-name">Kate</div>
        <div class="message-text">Wow, awesome!</div>
        <div style="background-image:url(http://lorempixel.com/output/people-q-c-100-100-9.jpg)" class="message-avatar"></div>
      </div>
    </div>
                
                
    
              </div>
            

            
 </div>
        </div>
      </div>
    </div>
    <!-- Path to Framework7 Library JS-->
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/framework7/1.6.5/js/framework7.min.js"></script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/framework7/1.6.5/js/framework7.js"></script>
    <!-- Path to your app js-->
    <script type="text/javascript" src="path/to/my-app.js"></script>
  </body>
</html>              
              
            
!

CSS

              
                

.item-media {
  margin: auto;
}


              
            
!

JS

              
                // Initialize app
var myApp = new Framework7({
   hideTabbarOnPageScroll: true,
   showBarsOnPageScrollEnd: true,
});

// If we need to use custom DOM library, let's save it to $$ variable:
var $$ = Dom7;
 
// Add view
var mainView = myApp.addView('.view-main', {
  // Because we want to use dynamic navbar, we need to enable it for this view:
  dynamicNavbar: true
});

// Conversation flag
var conversationStarted = false;
 
// Init Messages
var myMessages = myApp.messages('.messages', {
  autoLayout:true
});
 
// Init Messagebar
var myMessagebar = myApp.messagebar('.messagebar');
 
// Handle message
$$('.messagebar .link').on('click', function () {
  // Message text
  var messageText = myMessagebar.value().trim();
  // Exit if empy message
  if (messageText.length === 0) return;
 
  // Empty messagebar
  myMessagebar.clear()
 
  // Random message type
  var messageType = (['sent', 'received'])[Math.round(Math.random())];
 
  // Avatar and name for received message
  var avatar, name;
  if(messageType === 'received') {
    avatar = 'http://lorempixel.com/output/people-q-c-100-100-9.jpg';
    name = 'Kate';
  }
  // Add message
  myMessages.addMessage({
    // Message text
    text: messageText,
    // Random message type
    type: messageType,
    // Avatar and name:
    avatar: avatar,
    name: name,
    // Day
    day: !conversationStarted ? 'Today' : false,
    time: !conversationStarted ? (new Date()).getHours() + ':' + (new Date()).getMinutes() : false
  })
 
  // Update conversation flag
  conversationStarted = true;
}); 
              
            
!
999px

Console