Created
August 6, 2014 09:42
-
-
Save Mekajiki/dd40d3e8fe73c32ec872 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
color: #666; | |
background-color: #eef; | |
} | |
h2 { | |
font-size: 20px; | |
} | |
h3 { | |
font-size: 18px; | |
} | |
h4 { | |
font-size: 16px; | |
color: #999; | |
} | |
.profile img { | |
display: block; | |
width: 100px; | |
float: left; | |
margin-right: 1em; | |
} | |
.profile h2, | |
.timeline h2 { | |
text-align: center; | |
} | |
.timeline h3 { | |
margin-top: 0; | |
} | |
#profile-wrapper | |
{ | |
margin: 1em; | |
background-color: #fff; | |
border-radius: 0.5em; | |
padding: 1em; | |
} | |
.timeline ul { | |
margin: 1em; | |
background-color: #fff; | |
border-radius: 0.5em; | |
padding: 1em; | |
list-style-type: none; | |
} | |
.timeline li { | |
padding-bottom: 1em; | |
margin-bottom: 1em; | |
border-bottom: solid 1px #eee; | |
} | |
.timeline li .col-md-10 | |
{ | |
padding: 0; | |
} | |
.clearfloat:after { | |
clear:both; | |
content:""; | |
display:block; | |
} | |
.timeline .icon { | |
width: 60px; | |
float: left; | |
margin-right: 1em; | |
} | |
.date { | |
float: right; | |
color: #ccc; | |
} | |
.timeline h3, | |
.timeline h4 { | |
display: inline-block; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<title>ミニブログ</title> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/> | |
<link rel="stylesheet" href="timeline.css"/> | |
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> | |
<script src="timeline.js"></script> | |
</head> | |
<body> | |
<nav class="navbar navbar-default" role="navigation"> | |
<div class="container"> | |
<!-- Brand and toggle get grouped for better mobile display --> | |
<div class="navbar-header"> | |
<a class="navbar-brand" href="#">ミニブログ</a> | |
</div> | |
<!-- Collect the nav links, forms, and other content for toggling --> | |
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> | |
<form class="navbar-form navbar-left" role="search"> | |
<div class="form-group"> | |
<input type="text" class="form-control" placeholder="Search"> | |
</div> | |
<button type="submit" class="btn btn-default">検索</button> | |
</form> | |
</div><!-- /.navbar-collapse --> | |
</div><!-- /.container--> | |
</nav> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-3 profile"> | |
<h2>プロフィール</h2> | |
<div id="profile-wrapper" class="clearfloat"> | |
<img src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username</h4> | |
<button id="tweet-button" class="btn btn-primary" data-toggle="modal" data-target="#tweet-dialog">つぶやく</button> | |
</div> | |
</div> | |
<div class="col-md-9 timeline"> | |
<h2>タイムライン</h2> | |
<ul> | |
<li class="clearfloat"> | |
<img class="icon" src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username1</h4> | |
<p> | |
<a href="#">@username2</a> | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
</p> | |
<div class="button-box"> | |
<button class="btn btn-default reply-btn" data-toggle="modal" data-target="#tweet-dialog">返信</button> | |
<button class="btn btn-default rt-btn">RT</button> | |
</div> | |
<p class="date"> | |
2014/04/01 19:22:39 | |
</p> | |
</li> | |
<li class="clearfloat"> | |
<img class="icon" src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username1</h4> | |
<p> | |
<a href="#">@username2</a> | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
</p> | |
<div class="button-box"> | |
<button class="btn btn-default reply-btn" data-toggle="modal" data-target="#tweet-dialog">返信</button> | |
<button class="btn btn-default rt-btn">RT</button> | |
</div> | |
<p class="date"> | |
2014/04/01 19:22:39 | |
</p> | |
</li> | |
<li class="clearfloat"> | |
<img class="icon" src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username1</h4> | |
<p> | |
<a href="#">@username2</a> | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
</p> | |
<div class="button-box"> | |
<button class="btn btn-default reply-btn" data-toggle="modal" data-target="#tweet-dialog">返信</button> | |
<button class="btn btn-default rt-btn">RT</button> | |
</div> | |
<p class="date"> | |
2014/04/01 19:22:39 | |
</p> | |
</li> | |
<li class="clearfloat"> | |
<img class="icon" src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username1</h4> | |
<p> | |
<a href="#">@username2</a> | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
</p> | |
<div class="button-box"> | |
<button class="btn btn-default reply-btn" data-toggle="modal" data-target="#tweet-dialog">返信</button> | |
<button class="btn btn-default rt-btn">RT</button> | |
</div> | |
<p class="date"> | |
2014/04/01 19:22:39 | |
</p> | |
</li> | |
<li class="clearfloat"> | |
<img class="icon" src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username1</h4> | |
<p> | |
<a href="#">@username2</a> | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
</p> | |
<div class="button-box"> | |
<button class="btn btn-default reply-btn" data-toggle="modal" data-target="#tweet-dialog">返信</button> | |
<button class="btn btn-default rt-btn">RT</button> | |
</div> | |
<p class="date"> | |
2014/04/01 19:22:39 | |
</p> | |
</li> | |
<li class="clearfloat"> | |
<img class="icon" src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username1</h4> | |
<p> | |
<a href="#">@username2</a> | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
</p> | |
<div class="button-box"> | |
<button class="btn btn-default reply-btn" data-toggle="modal" data-target="#tweet-dialog">返信</button> | |
<button class="btn btn-default rt-btn">RT</button> | |
</div> | |
<p class="date"> | |
2014/04/01 19:22:39 | |
</p> | |
</li> | |
<li class="clearfloat"> | |
<img class="icon" src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username1</h4> | |
<p> | |
<a href="#">@username2</a> | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
</p> | |
<div class="button-box"> | |
<button class="btn btn-default reply-btn" data-toggle="modal" data-target="#tweet-dialog">返信</button> | |
<button class="btn btn-default rt-btn">RT</button> | |
</div> | |
<p class="date"> | |
2014/04/01 19:22:39 | |
</p> | |
</li> | |
<li class="clearfloat"> | |
<img class="icon" src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username1</h4> | |
<p> | |
<a href="#">@username2</a> | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
</p> | |
<div class="button-box"> | |
<button class="btn btn-default reply-btn" data-toggle="modal" data-target="#tweet-dialog">返信</button> | |
<button class="btn btn-default rt-btn">RT</button> | |
</div> | |
<p class="date"> | |
2014/04/01 19:22:39 | |
</p> | |
</li> | |
<li class="clearfloat"> | |
<img class="icon" src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username1</h4> | |
<p> | |
<a href="#">@username2</a> | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
</p> | |
<div class="button-box"> | |
<button class="btn btn-default reply-btn" data-toggle="modal" data-target="#tweet-dialog">返信</button> | |
<button class="btn btn-default rt-btn">RT</button> | |
</div> | |
<p class="date"> | |
2014/04/01 19:22:39 | |
</p> | |
</li> | |
<li class="clearfloat"> | |
<img class="icon" src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username1</h4> | |
<p> | |
<a href="#">@username2</a> | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
</p> | |
<div class="button-box"> | |
<button class="btn btn-default reply-btn" data-toggle="modal" data-target="#tweet-dialog">返信</button> | |
<button class="btn btn-default rt-btn">RT</button> | |
</div> | |
<p class="date"> | |
2014/04/01 19:22:39 | |
</p> | |
</li> | |
<li class="clearfloat"> | |
<img class="icon" src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username1</h4> | |
<p> | |
<a href="#">@username2</a> | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
</p> | |
<div class="button-box"> | |
<button class="btn btn-default reply-btn" data-toggle="modal" data-target="#tweet-dialog">返信</button> | |
<button class="btn btn-default rt-btn">RT</button> | |
</div> | |
<p class="date"> | |
2014/04/01 19:22:39 | |
</p> | |
</li> | |
<li class="clearfloat"> | |
<img class="icon" src="person-placeholder.jpg" /> | |
<h3>ユーザ名</h3> | |
<h4>@username1</h4> | |
<p> | |
<a href="#">@username2</a> | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
つぶやき | |
</p> | |
<div class="button-box"> | |
<button class="btn btn-default reply-btn" data-toggle="modal" data-target="#tweet-dialog">返信</button> | |
<button class="btn btn-default rt-btn">RT</button> | |
</div> | |
<p class="date"> | |
2014/04/01 19:22:39 | |
</p> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</div> | |
<div id="tweet-dialog" class="modal fade"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> | |
<h4 class="modal-title">つぶやく</h4> | |
</div> | |
<div class="modal-body"> | |
<textarea class="form-control"> | |
</textarea> | |
</div> | |
<div class="modal-footer"> | |
<button type="button" class="btn btn-default" data-dismiss="modal">キャンセル</button> | |
<button type="button" class="btn btn-primary" data-dismiss="modal">つぶやく</button> | |
</div> | |
</div><!-- /.modal-content --> | |
</div><!-- /.modal-dialog --> | |
</div><!-- /.modal --> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$(".reply-btn").click(function(){ | |
$("h4.modal-title").html('返信する'); | |
}); | |
$("#tweet-button").click(function(){ | |
$("h4.modal-title").html('つぶやく'); | |
}); | |
$(".rt-btn").click(function(){ | |
confirm('RTしますか?'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment