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

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Personal Cabinet</title>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.13/vue.min.js"></script>
  <script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
</head>
<body>
  <div style="max-width: 1200px; margin: 0 auto;" id="app_form">
      <z-account></z-account>
  </div>
</body>
</html>
              
            
!

CSS

              
                .bg {
  background-color: white;
  padding: 20px;
  position: relative;
}

.bg2 {
  background-color: #08497b;
  padding: 20px;
  color: white;
}

.main_select {
  text-align: right;
}

.clearfix {
  clear: both;
  font-size: 0px;
}

.about_company {
  .grid .col-4 {
    text-align: left;
    margin: 0 0 1.0em;
  }

  .grid .col-8 {
    text-align: left;
    margin: 0 0 1.0em;
  }
}

  .modal-mask {
    position: fixed;
    z-index: 9998;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .5);
    display: table;
    transition: opacity .3s ease;
  }

  .modal-wrapper {
    display: table-cell;
    vertical-align: middle;
  }

  .modal-container {
    width: 300px;
    margin: 0px auto;
    padding: 20px 30px;
    background-color: #fff;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .33);
    transition: all .3s ease;
    font-family: Helvetica, Arial, sans-serif;
  }

  .modal-header h3 {
    margin-top: 0;
    color: #42b983;
  }

  .modal-body {
    margin: 20px 0;
  }

  .modal-default-button {
    float: right;
  }

  .modal-enter {
    opacity: 0;
  }

  .modal-leave-active {
    opacity: 0;
  }

  .modal-enter .modal-container,
  .modal-leave-active .modal-container {
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }


  .form_z span {
    line-height: 20px;
  }

  .tabs {
    list-style-type: none;
    padding: 0;
    margin: 0;
    position: relative;
  }

  .grid .col-7 {
    margin:0 0 0.6em;
  }

  .tabs:after {
    content: "";
    clear: both;
    display: block;
    height: 700px; /* пофиксить высоту должна регулироваться автоматически!!!*/
  }

  .tabs li {
    float: left;
  }

  .tabs li > input {
    display: none;
  }

  .tabs li > label {
    display: inline-block;
    border-right-width: 0;
    border-bottom-width: 0;
    height: 30px;
    line-height: 30px;
    padding: 5px 20px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  .tabs .tab-content {
    display: none;
    width: 68%;
    position: absolute;
    left: 0;
    padding: 20px;
    border-top: 1px solid #e6dfdf;
    overflow-y: auto;
    -moz-transition: opacity .5s ease-in-out;
    -webkit-transition: opacity .5s ease-in-out;
    transition: opacity .5s ease-in-out;
  }

  .tabs li > input:checked + label {
    color: #08497B;
    border-bottom: 0.1072em solid #08497B;
  }

  .tabs li > label:hover {
    color: #08497B;
  }

  .tabs li > input:checked ~ .tab-content {
    display: block;
  }


  .person_profile_info {
    padding: 15px 0 15px 0; width: 450px;
  }

  .person_profile_field_name {
    color: #000;
    font: bold 14px/26px 'Roboto-Regular', sans-serif;
    padding: 0px 50px 0px 0;
  }

  .person_profile_field_value {
    float:right;
    position: relative;
    width: 247px;
  }

  .person_profile_field_value input {
    color: #9a9191;
  }

  .gender_checkbox {
    display: inline-block;
  }

  .add_button {
    margin: 1em 0.25em 0 0;
  }

  .grid.row:after, .grid .row:after {
    content: "";
    display: block;
    clear: both;
  }

.grid .col-7 {
    width: 58.333%;
    float: left;
}

.form_z .button {
    font-size: 14px;
    line-height: 20px;
    font-family: Arial, serif;
    display: inline-block;
    border-style: solid;
    border-width: 1px;
    border-radius: 3px;
    padding: 11px 21px;
    font-weight: bold;
    background-color: #FFFFFF;
    border-color: #2F71A3;
    color: #2F71A3;
    transition: 0.3s;
    text-decoration: none;
    cursor: pointer;
}

.form_z .submit.button, .form_z .primary.button {
    background-color: #F66C00;
    border-color: #F66C00;
    color: #FFFFFF;
    border-width: 2px;
    padding: 10px 20px;
}

.grid .col-5 {
    float: left;
    width: 41.664%;
}
  .form_z fieldset {
    padding: 10px;
    margin-top: 10px;
    border-style: solid;
    border-width: 1px;
    border-color: #EFEFEF;
    border-radius: 3px;
}

.zenoselect {
  background-color: white;
  border: 1px solid #EFEFEF;
  color: #666666;
  margin: 0px;
  padding: 11px 29px 11px 9px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /*background: url("/market/desktop/img/zenoselect.svg") no-repeat right 9px center;*/
  background: url("\
    data:image/svg+xml;\
    utf8,\
    <svg\
      baseProfile='full'\
      width='11px'\
      height='7px'\
      viewBox='0 0 11 7'\
      xmlns='http://www.w3.org/2000/svg'\
      xmlns:xlink='http://www.w3.org/1999/xlink'\
      xmlns:ev='http://www.w3.org/2001/xml-events'\
      version='1.1'>\
      <path d='\
        M 0 0\
        L 11 0\
        L 5.5 7\
        Z\
        ' stroke='none' style='fill:rgb(246,108,0);' />\
      Sorry, your browser does not support inline SVG.\
    </svg>\
  ") no-repeat right 9px center;
}

/* CAUTION: IE hackery ahead */
.zenoselect::-ms-expand { 
  display: none; /* remove default arrow on ie10 and ie11 */
}

/* target Internet Explorer 9 to undo the custom arrow */
@media screen and (min-width:0\0) {
  .zenoselect {
    background:none\9;
    padding: 5px\9;
  } 
}

.form_z input {
    border-style: solid;
    border-width: 1px;
    border-color: #EFEFEF;
    border-radius: 3px;
    padding: 11px 21px;
    font-size: 14px;
    line-height: 20px;
    font-family: Arial, serif;
    background-color: white;
}
              
            
!

JS

              
                window.vue = {}
window.vue.application = {}
window.vue.application.app = {}
window.vue.application.app.data = {}
window.vue.application.app.component = {}
window.vue.application.app.component.company_registration = {}
window.vue.application.app.component.company_registration.data = {}
window.vue.application.app.component.personal_account = {}
window.vue.application.app.component.personal_account.data = {}
window.vue.application.app.component.personal_account.data.add_new_company = {}
window.vue.application.app.component.company_registration.data.company_info = {}


var CompanyRegistration = {
  data: function() {
    return {
      company_info: {
        company_name: '',
        current: 'ИП',
        inn: '',
        juridical_name: '',
        ogrn: '',
        kpp: '',
        bik: '',
        bank_name: '',
        correspondent_account: '',
        checking_account: '',
        phone_number: '',
        email: ''
      }
    }
  },
  template: `\
  <div class="company_registr">\
    <div class="main_field">\
      <div class="tab_menu">\
          <ul class="tabs">\
            <li>\
              <input type="radio" name="tabs" id="tab-1" checked>\
              <label for="tab-1">Регистрация новой компания</label>\
              <div class="tab-content">\
                <form class="form_z grid">\
                  <div class="row">\
                    <div class="col-5">\
                      <label style="display: inline-block; font-weight:bold;">Название компании</label>\
                    </div>\
                    <div class="col-7">\
                      <input style="width:50%;" placeholder="Введите название компании" v-model="company_info.company_name"></input>\
                    </div>\
                  </div>\
                  <div class="row">\
                    <div class="col-5">\
                      <label style="font-weight:bold;">Правовая форма</label>\
                    </div>\
                    <div class="col-7">\
                      <select class="zenoselect" v-model="company_info.current" style="width:60%;">\
                        <option value="ИП">\
                            ИП\
                          </option>\
                          <option value="Комерческая организация">\
                            Комерческая организация\
                          </option>\
                          <option value="Бюджетная организация">\
                            Бюджетная организация\
                          </option>\
                          <option value="Банк">\
                            Банк\
                          </option>\
                      </select>\
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-5">
                      <label style="display: inline-block; font-weight:bold;">ИНН</label>\
                    </div>
                    <div class="col-7">
                      <input style="width:50%" v-model="company_info.inn" placeholder="ИНН"></input>\
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-5">
                      <label style="display: inline-block; font-weight:bold;">Юридическое название компании</label>\
                    </div>
                    <div class="col-7">
                      <input style="width:50%" v-model="company_info.juridical_name" placeholder="Юридическое название компании"></input>\
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-5">
                      <label style="display: inline-block; font-weight:bold;">ОГРН</label>\
                    </div>
                    <div class="col-7">
                      <input style="width:50%" v-model="company_info.ogrn" placeholder="ОГРН"></input>\
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-5">
                      <label style="display: inline-block; font-weight:bold;">КПП</label>\
                    </div>
                    <div class="col-7">
                      <input style="width:50%" v-model="company_info.kpp" placeholder="КПП"></input>\
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-5">
                      <label style="display: inline-block; font-weight:bold;">БИК</label>\
                    </div>
                    <div class="col-7">
                      <input style="width:50%" v-model="company_info.bik" placeholder="БИК"></input>\
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-5">
                      <label style="display: inline-block; font-weight:bold;">Название банка</label>\
                    </div>
                    <div class="col-7">
                      <input style="width:50%" v-model="company_info.bank_name" placeholder="Название банка"></input>\
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-5">
                      <label style="display: inline-block; font-weight:bold;">Корреспондентский счет</label>\
                    </div>
                    <div class="col-7">
                      <input style="width:50%" v-model="company_info.correspondent_account" placeholder="Корреспондентский счет"></input>\
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-5">
                      <label style="display: inline-block; font-weight:bold;">Расчетный счет</label>\
                    </div>
                    <div class="col-7">
                      <input style="width:50%" v-model="company_info.checking_account" placeholder="Расчетный счет"></input>\
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-5">
                      <label style="display: inline-block; font-weight:bold;">Контактный телефон компании</label>\
                    </div>
                    <div class="col-7">
                      <input style="width:50%" v-model="company_info.phone_number" placeholder="Контактный телефон компании"></input>\
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-5">
                      <label style="display: inline-block; font-weight:bold;">Электронный адрес компании</label>\
                    </div>
                    <div class="col-7">
                      <input style="width:50%" v-model="company_info.email" placeholder="Электронный адрес компании"></input>\
                    </div>
                  </div> 
                  <input type="" value="Зарегистрировать компанию" v-on:click="add_company_to_hash" class="primary button">
                </form>\
              </div>\
            </li>\
          </ul>\
      </div>\
    </div>\
  </div>\
  `,
  methods: {
    add_company_to_hash: function() {
      var company_name = this.company_info.company_name
      var law_form = this.company_info.current
      var all_company_info = this.company_info
      EventBus.$emit('registation_new_company' , {
          name: company_name,
          company_law_form: law_form,
          all_info: all_company_info,
      })
      this.$router.push(`/person_info`)
      var current = 'info'
      var modal = true
      EventBus.$emit('current_tab' ,  {
        current: current,
      })
    }
  }
}



var AllCompanies = {
  data: function() {
    return {
      info: []
    }
  },
  created() {
    EventBus.$on('company_index', function(data) {
      this.info = data
    }.bind(this))
  },
	template:`
		<div class="about_company">\
        <div class="main_field">\
          <div class="tab_menu">\
            <ul class="tabs">\
              <li>\
                <input type="radio" name="tabs" id="tab-1" checked>\
                <label for="tab-1">Профиль организации</label>\
                <div class="tab-content">\
                  <form class="form_z grid">\
                    <div class="row">\
                      <div class="col-5">\
                        <label style="font-weight:bold;">Наименование организации</label>\
                      </div>\
                      <div class="col-7">\
                        <span style="width:50%;">\
                         {{ this.info.name }}\
                        </span>\
                      </div>\
                    </div>\
                    <div class="row">\
                      <div class="col-5">\
                        <label style="font-weight:bold;">Правовая форма</label>\
                      </div>\
                      <div class="col-7">\
                        <span style="width:50%;">\
                         {{ this.info.company_law_form }}\
                        </span>\
                      </div>\
                    </div>\
                    <div class="row">\
                      <div class="col-5">\
                        <label style="font-weight:bold;">ИНН</label>\
                      </div>\
                      <div class="col-7">\
                        <span style="width:50%;">\
                         {{ this.info.all_info.inn }}\
                        </span>\
                      </div>\
                    </div>\
                    <div class="row">\
                      <div class="col-5">\
                        <label style="font-weight:bold;">Юридическое название компании</label>\
                      </div>\
                      <div class="col-7">\
                        <span style="width:50%;">\
                         {{ this.info.all_info.juridical_name }}\
                        </span>\
                      </div>\
                    </div>\
                    <div class="row">\
                      <div class="col-5">\
                        <label style="font-weight:bold;">ОГРН</label>\
                      </div>\
                      <div class="col-7">\
                        <span style="width:50%;">\
                         {{ this.info.all_info.ogrn }}\
                        </span>\
                      </div>\
                    </div>\
                    <div class="row">\
                      <div class="col-5">\
                        <label style="font-weight:bold;">КПП</label>\
                      </div>\
                      <div class="col-7">\
                        <span style="width:50%;">\
                         {{ this.info.all_info.kpp }}\
                        </span>\
                      </div>\
                    </div>\
                    <div class="row">\
                      <div class="col-5">\
                        <label style="font-weight:bold;">БИК</label>\
                      </div>\
                      <div class="col-7">\
                        <span style="width:50%;">\
                         {{ this.info.all_info.bik }}\
                        </span>\
                      </div>\
                    </div>\
                    <div class="row">\
                      <div class="col-5">\
                        <label style="font-weight:bold;">Название банка</label>\
                      </div>\
                      <div class="col-7">\
                        <span style="width:50%;">\
                         {{ this.info.all_info.bank_name}}\
                        </span>\
                      </div>\
                    </div>\
                    <div class="row">\
                      <div class="col-5">\
                        <label style="font-weight:bold;">Корреспондентский счет</label>\
                      </div>\
                      <div class="col-7">\
                        <span style="width:50%;">\
                         {{ this.info.all_info.correspondent_account }}\
                        </span>\
                      </div>\
                    </div>\
                    <div class="row">\
                      <div class="col-5">\
                        <label style="font-weight:bold;">Расчетный счет</label>\
                      </div>\
                      <div class="col-7">\
                        <span style="width:50%;">\
                         {{ this.info.all_info.checking_account }}\
                        </span>\
                      </div>\
                    </div>\
                    <div class="row">\
                      <div class="col-5">\
                        <label style="font-weight:bold;">Телефон</label>\
                      </div>\
                      <div class="col-7">\
                        <span style="width:50%;">\
                         {{ this.info.all_info.phone_number }}\
                        </span>\
                      </div>\
                    </div>\
                    <div class="row">\
                      <div class="col-5">\
                        <label style="font-weight:bold;">Электронный адрес компании</label>\
                      </div>\
                      <div class="col-7">\
                        <span style="width:50%;">\
                         {{ this.info.all_info.email }}\
                        </span>\
                      </div>\
                    </div>\
                  </form>\
                </div>\
              </li>\
              <li>\
                <input type="radio" name="tabs" id="tab-2">\
                <label for="tab-2">История заказов компании</label>\
                <div class="tab-content">\
                  1 \
                </div>\
              </li>\
              <li>\
                <input type="radio" name="tabs" id="tab-3">\
                <label for="tab-3">Участники</label>\
                <div class="tab-content">\
                  Тут будет инфа кто в компании рулит \
                </div>\
              </li>\
            </ul>\
          </div>\
        </div>\
      </div>\
    `,
	methods: {
	}
}

var PersonalAccount = {
	data: function() {
  	return {
    	account: window.vue.application.app.data.account,
    	current: 'info',
    	companies: []
    }
  },
  created() {
    EventBus.$on('registation_new_company', function(data) {
      this.companies.push(data)
    }.bind(this))
    EventBus.$on('current_tab', function(data) {
      this.current = data.current
    }.bind(this))
  },
  template: '\
    <div class="z-account">\
      <h1 class="header">Личный кабинет</h1>\
      <div class="bg">\
        <div class="main_select">\
          <div class="component_select">\
            <select class="zenoselect" ref="mySelect" v-model="current" v-on:click="whichIndex" v-on:change="onChange">\
              <option value="info">\
                Инфо о клиенте\
              </option>\
              <option value="add">\
                Добавить новую организацию\
              </option>\
              <option v-for="(company, index) in companies" :key="index" value="companies">\
                <div class="company_law_form">{{ company.company_law_form }} </div>\
                <div class="company_name">{{ company.name }}</div>\
              </option>\
            </select>\
          </div>\
          <div class="component_view">\
            <router-view></router-view>\
          </div>\
          <div class="clearfix"></div>\
        </div>\
      </div>\
    </div>\
  ',
  beforeDestroy() {
    EventBus.$off('registation_new_company')
  },
  methods: {
    whichIndex: function (){
      var sel = this.$refs.mySelect.selectedIndex
      var options = this.$refs.mySelect.options
      var company_index = options[sel].index
      if (company_index > 1) {
        var correct_index = company_index - 2
        var info_about_company = this.companies[correct_index]
        EventBus.$emit('company_index' , info_about_company)
      }
    },
    onChange: function(){
      if (this.current == 'info') {
        this.$router.push(`/person_info`)
      }
      if (this.current == 'add') {
        this.$router.push(`/new_company`)
      }
      if (this.current == 'companies') {
        this.$router.push(`/companies_tab`)
      }
    }
  },
  beforeMount: function(){
      this.onChange()
  },
}

var PersonInfo = {
    data: function() {
      return {
        profile_info: {
          personal_info:[
            {
              'id':'email',
              password: false,
              'text':'E-mail',
              'value':'example@example.ru'
            },
            {
              'id':'password',
              password: true,
              'text':'Текущий пароль',
              'value':'qwerty123456'
            },
            {
              'id':'name',
              password: false,
              'text':'Имя',
              'value':'Василий'
            },
            {
              'id':'Sername',
              password: false,
              'text':'Фамилия',
              'value':'Пупыркин'
            },
            {
              'id':'phone',
              password: false,
              'text':'Телефон',
              'value':'+79542342343'
            },
            {
              'id':'date',
              password: false,
              'text':'Дата рождения',
              'value':'06.05.1991'
            }
          ],
          sex: {
            gender: ['Мужской','Женский'],
            currentValue:'Мужской',
            'text':'Пол'
          }
        },
        // стили
        style: {
          input_disable: {
            'border':'0',
            'background': 'none'
          }
        }
      }
    },
    template:'\
      <div class="personal_info">\
        <div class="main_field">\
          <div class="tab_menu">\
            <ul class="tabs">\
              <li>\
                <input type="radio" name="tabs" id="tab-1" checked>\
                <label for="tab-1">История заказов</label>\
                <div class="tab-content">\
                  1 \
                </div>\
              </li>\
              <li>\
                <input type="radio" name="tabs" id="tab-2">\
                <label for="tab-2">Профиль</label>\
                <div class="tab-content">\
                  <div class="person_profile_info" v-for="field in profile_info.personal_info" :key="field.id">\
                    <span class="person_profile_field_name">\
                      {{ field.text }}:\
                    </span>\
                    <div class="person_profile_field_value">\
                      <input disabled="disabled" maxlength="24" :value="field.value" :style="style.input_disable">\
                      </div>\
                    </div>\
                    <div class="person_profile_info">\
                      <span class="person_profile_field_name">\
                        {{ profile_info.sex.text }}:\
                      </span>\
                      <div class="person_profile_field_value">\
                        <div class="gender_checkbox" v-for="field in profile_info.sex.gender" :key="field">\
                          <span>\
                            {{ field }}\
                          </span>\
                          <label class="gender_label"><input :value="field" v-model="profile_info.sex.currentValue" type="radio" checked name="male"/>{{  }}</label>\
                        </div>\
                    </div>\
                  </div>\
                </div>\
              </li>\
              <li>\
                <input type="radio" name="tabs" id="tab-3">\
                <label for="tab-3">Подписка на рассылку</label>\
                <div class="tab-content">\
                  3 \
                </div>\
              </li>\
            </ul>\
          </div>\
        </div>\
      </div>\
    '
  }
  

var router = new VueRouter({
	routes: [
		{ path:'/account', component: PersonalAccount },
		{ path:'/new_company', component: CompanyRegistration },
		{ path:'/companies_tab', component: AllCompanies },
		{ path:'/person_info', component: PersonInfo },
	]
})

const EventBus = new Vue ()

var my_app = new Vue({
	router: router,
	data: window.vue.application.app.data,
	components: {
		'z-account': PersonalAccount
	}
}).$mount('#app_form')
              
            
!
999px
How would you React if I said I love Vue?

Console