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.

              <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<div class="box-erp-login">
    <div style="margin-top: 1em"> 
      <label for="session[email]">E-mail</label> 
      <input type="email" name="session[email]" required=""> 
    <div style="margin-top: 1em"> 
      <label for="session[senha]">Senha</label> 
      <input type="password" name="session[senha]" required=""> 
    <div style="margin-top: .5em;"> 
      <label> <input type="checkbox" name="session[conectado]" /> Manter Conectado </label> 
    <div style="margin-top: 1em">
      <button class="submit" type="submit">
      <a target="_blank" href="https://www.seucondominio.com.br/recuperar_senha?no_layout=true&cliente_id_theme=" style="font-size: .8em;"> Esqueci minha senha</a> 

jQuery(function() {

  var loginBoxSel = '.box-erp-login';
  var loginCtrl = {
    host: 'https://www.seucondominio.com.br',
    // host: 'https://7f588076.ngrok.io',
    box: jQuery(loginBoxSel),
    btnSubmit: jQuery(loginBoxSel).find('button'),
    inputEmail: jQuery(loginBoxSel).find('[type="email"]'),
    inputPassword: jQuery(loginBoxSel).find('[type="password"]'),
    inputManterConectado: jQuery(loginBoxSel).find('[name="session[conectado]"]'),
    startLoading: function(){
      this.requesting = true;
      this.btnSubmit.oldText = this.btnSubmit.text();
    stopLoading: function(){
      this.requesting = false;
    process: function(){
      self = this;
      if(self.requesting) return;
      var loginParams = {
        session: {
          email: self.inputEmail.val(),
          senha: self.inputPassword.val(),
          manter_conectado: self.inputManterConectado.is(':checked'),
          cliente_id_theme: null
      var loginUrl = self.host+'/session';

        type: 'POST',
        url: loginUrl,
        data: loginParams,
        xhrFields: {
          withCredentials: true
        crossDomain: true,
        success: function(data){
          // console.log(data)
          var redirectTo = data.redirect_url;
            redirectTo = self.host+redirectTo;
          //alert("Sucesso! \n Redirecione o usuário para "+redirectTo+" com o comando comentado abaixo");
          window.location.href = redirectTo;
        error: function(XMLHttpRequest, textStatus, errorThrown){
          var errors;
          if(XMLHttpRequest.responseText) errors = JSON.parse(XMLHttpRequest.responseText);
          if(errors) alert(errors.message);

    return false;


<div style="background: #940000; color: white; clear: both; margin-top: 2em; padding: 1em">Peça no suporte o código da administradora e em seguida procure aqui nesse código fonte por <b style="font-size:1.5em;">"cliente_id_theme"</b> e coloque o código que lhe foi passado (existem DOIS lugares para fazer essa modificação_</div>
<div style="background: #770000; color: white; padding: 1em">
Importante: Assim que o programador da administrador tenha construído sua tela de login própria, deverá informar um suporte a URL dessa tela. E o suporte deve cadastrar essa URL no formulário de administradora nos DOIS campo: LOGIN URL e LOGOUT URL
  max-width: 14em;
  margin: auto;
  font-size: 1.2em

.box-erp-login input[type='password'], .box-erp-login input[type='email']{
  font-size: 1.2em; 
  box-sizing: border-box; 
  width: 100%; 
  border-radius: .25em; 
  border: solid 2px gray

.box-erp-login button {
  border-radius: .25em; 
  background: #1c2327; 
  border: none; 
  color: #FFF; 
  padding: .5em 1em; 
  font-size: .8em; 
  box-sizing: border-box
🕑 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.