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.

            
              <head>
  <meta charset="utf-8">
  <title>Stock</title>
  <meta name="description" content="Stock">
  <meta name="viewport" content="width=device-width">
  <link rel="stylesheet" href="css/reset.css">
  <link rel="stylesheet" href="css/styles.css">
  <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
  <script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
  <script src="http://www.parsecdn.com/js/parse-1.2.13.min.js"></script>
  <script type="text/javascript" src="http://stocker.parseapp.com/js/stock.js"></script>
  <script type="text/javascript" src="http://stocker.parseapp.com/js/header.js"></script>
  <script type="text/javascript" src="http://stocker.parseapp.com/js/underscore.js"></script>
</head>

<body>
  <div class="content"></div>
  <script type="text/template" id="login-template">
    <header>
        <div class="container">
            <div class="header-left">
                <a href="index.html"><img class="logo" src="http://stocker.parseapp.com/img/main_logo.png"></a>
            </div>
            <div class="header-right">
              <ul id="signup">
                <li><span class="signup-menu">サインアップ</span>
                <ul class="child">
                  <li>
                    <form class="signup-form">
                      <div class="error parts" style="display:none;"></div>
                      <input type="text" id="signup-username" pattern="^[0-9A-Za-z]+$" placeholder="ユーザー名" />
                      <input type="password" id="signup-password" placeholder="パスワード" />
                      <button class="btn signup-btn">新規登録</button>
                    </form>
                  </li>
                </ul>
                </li>
              </ul>
            </div>
        </div>
    </header>

    <main>
      <div class="login">
        <form class="login-form">
          <div class="error" style="display:none"></div>
          <input type="text" id="login-username" class="parts" pattern="^[0-9A-Za-z]+$" placeholder="ユーザー名" />
          <input type="password" id="login-password" class="parts" placeholder="パスワード" />
          <button class="btn login-btn parts">ログイン</button>
        </form>
      </div>
    </main>

    <footer>
        <div class="container">
            <img src="http://stocker.parseapp.com/img/footer_logo.png">
        </div>
    </footer>
  </script>

  <script type="text/template" id="manage-todos-template">

    <div id="user-info">
      担当者: <%= Parse.User.current().escape("username") %>
    </div>

    <div class="section">
        <header>
            <div class="container">
                <div class="header-left">
                    <a href="index.html"><img class="logo" src="http://stocker.parseapp.com/img/main_logo.png"></a>
                </div>
                <div class="header-right">
                    <div class="logout">
                        <a href="#">ログアウト</a>
                    </div>
                </div>
            </div>
        </header>

      <div id="main">
        <input id="toggle-all" type="checkbox">
        <label for="toggle-all">Mark all as complete</label>
      </div>

      <div id="todo-stats"></div>
    </div>

  </script>

  <script type="text/template" id="item-template">
    <li class="<%= done ? 'completed' : '' %>">
      <div class="view">
        <input class="toggle" type="checkbox" <%= done ? 'checked="checked"' : '' %>>
        <label class="todo-content"><%= _.escape(content) %></label>
        <button class="todo-destroy"></button>
      </div>
      <input class="edit" value="<%= _.escape(content) %>">
    </li>
  </script>

  <script type="text/template" id="stats-template">
    <footer id="footer">
      <span id="todo-count"><strong><%= remaining %></strong> <%= remaining == 1 ? 'item' : 'items' %> left</span>
      <ul id="filters">
        <li>
          <a href="javascript:void(0)" id="all" class="selected">All</a>
        </li>
        <li>
          <a href="javascript:void(0)" id="active">Active</a>
        </li>
        <li>
          <a href="javascript:void(0)" id="completed">Completed</a>
        </li>
      </ul>
      <button id="clear-completed">Clear completed (<%= done %>)</button>
    </footer>
  </script>
</body>

</html>
            
          
!
            
              /********** パーツ **********/
a {
	text-decoration: none;
}

input {
	font-size: 13px;
	padding: 4px 3px;
}

.container {
	padding: 0 15px;
	margin: 0 auto;
}

.btn {
	color: white;
	font-weight: bold;
	padding: 8px 12px;
	display: inline-block;
	opacity: 0.8;
	border-radius: 4px;
	border-style: none;
}

.btn:hover {
	opacity: 1;
}

.error {
    text-align: left;
    border: 1px solid red;
    width: 300px;
    padding: 10px 20px;
    background-color: #FDEFF0;
    font-size: 12px;
}

/********** ヘッダー **********/
header {
	width: 100%;
	height: 65px;
	background-color: rgba(34, 49, 52, 0.9);
	position: fixed;
		top: 0;
	z-index: 10;
}

.header-left {
	position: fixed;
		left: 0;
	line-height: 65px;
}

.header-left a {
	display: block;
	line-height: 65px;
}

.header-right {
    position: fixed;
        right: 0;
}

.header-right a{
    color: #fff;
}

/********** サインアップ **********/
ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

ul#signup li {
    float: left;
    position: relative;
}

.signup-menu {
    display: block;
    background-color: #777;
	padding: 0 20px;
	font-size: 13px;
	font-weight: bold;
	line-height: 65px;
	letter-spacing: 1px;
    opacity: 0.6;
    color: #fff;
}

ul.child{
    width: 430px;
    display: none;
    background-color: rgba(255, 255, 255, 0.3);
    position: absolute;
    	left: -319px;
	z-index: 100;
    margin-left: 5px;
}

.signup-form {
	padding: 0 20px;
}

.signup-form .error {
	margin-top: 10px;
	color: black;
}

#signup-username {
	margin: 10px 0;
}

#signup-password {
}

.signup-btn {
	font-size: 13px;
	font-weight: bold;
	letter-spacing: 1px;
	margin-left: 10px;
    background-color: #239b76;
}

/********** コンテンツ **********/
main {
	height: 200px;
	padding: 180px 0;
	background-image: url(http://stocker.parseapp.com/img/top.jpg);
	background-size: cover;
}


/********** ログイン **********/
.login {
	width: 500px;
	display: block;
	margin: 0 auto;
}

.login-form .parts {
	display: block;
	margin: 10px auto;
}

.login-form .error {
	margin: 0 auto;
}

#login-username {
}

#login-password {
}

.login-btn {
	font-size: 13px;
	background-color: #239b76;
}

/********** ログアウト **********/
.logout {
    display: block;
    background-color: #777;
    padding: 0 20px;
    font-size: 13px;
    font-weight: bold;
    line-height: 65px;
    letter-spacing: 1px;
    opacity: 0.6;
}


/********** user-info **********/
#user-info {
	margin-top: 65px;
}

/********** footer **********/
footer {
	padding-top: 30px;
}

footer img {
	width: 140px;
	opacity: 0.8;
}
            
          
!
            
              $(function(){
	// サインアップメニューボタンのhover
	$('.signup-menu').hover(
		function(){
			$('.signup-menu').css('opacity','1').css('cursor','pointer');
			$('.logout').show();
		},
		function(){
			$('.signup-menu').css('opacity','0.6').css('cursor','auto');
		}
	);

	// サインアップメニューボタン クリック時のサインアップ画面のスライドトグル
	$('.signup-menu').click(
		function(){
				$('ul.child','#signup li').slideToggle(500);
		}
	);

	// サインアップ画面以外の部分クリック時のサインアップ画面のスライドアップ
	$(document).click(
		function(){
			if (!$.contains($('#signup li')[0], event.target)) {
				$('ul.child','#signup li').slideUp(500);
			}
		}
	);

	// ログアウトボタンのhover
	$('.logout').hover(
		function(){
			$('.logout').css('opacity','1').css('cursor','pointer');
		},
		function(){
			$('.logout').css('opacity','0.6').css('cursor','auto');
		}
	);

	// ログアウトの確認ダイアログ
	$('.logout').click(function() {
		if (!confirm('ログアウトします。\nよろしいですか?')) {
			return false;
		}
	});
});
            
          
!
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.

Console