Merge branch 'feature/side-by-side'

This commit is contained in:
Hideaki Tanabe 2018-10-09 23:02:52 +09:00
commit b82ef5dd1b
4 changed files with 11 additions and 27 deletions

View File

@ -30,6 +30,7 @@ see [Wikipedia](http://en.wikipedia.org/wiki/Markdown)
----
## changelog
* 13-Jan-2015 re-design
* 17-Feb-2013 re-design
* 19-May-2011 launch

View File

@ -42,10 +42,12 @@ img {
#header h1 {
color: #fff;
padding-bottom: 10px;
}
ul#menu {
/*v2.*/
display: none;
margin: 0;
padding: 0;
list-style: none;
@ -111,9 +113,13 @@ ul#menu a.active li {
#content .mode {
border: 1px solid #ddd;
border-radius: 3px;
width: 465px;
display: inline-block;
vertical-align: top;
}
#content .mode ul.submenu {
display: none;
list-style: none;
margin: 0;
padding: 5px;
@ -140,7 +146,7 @@ ul#menu a.active li {
}
#preview {
display: none;
margin-left: 20px;
}

View File

@ -69,7 +69,7 @@
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></li>
<li class="facebook"><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fmarkdownlivepreview.com&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;font=tahoma&amp;colorscheme=dark&amp;action=like&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></li>
</ul>
<div id="copyright">Copyright 2013 <a href="https://twitter.com/tanabe">tanabe</a>.</div>
<div id="copyright">Copyright 2015 <a href="https://twitter.com/tanabe">tanabe</a>.</div>
</div>
<script type="text/javascript">

View File

@ -51,28 +51,6 @@ $(function() {
var isEdited = false;
$(window).scroll(function() {
var scrollTop = $(window).scrollTop();
scrollTops[currentMode] = scrollTop;
if ((scrollTop > titleHeight)) {
header.css({
'position' : 'fixed',
'top' : fixedTop + 'px',
'z-index' : '100'
});
container.css({
'margin-top' : headerHeight + 'px'
});
} else {
header.css('position', 'static');
container.css({
'margin-top' : 0
});
}
});
$('#markdown').val(example);
$('#output').html(markdown.toHTML(example));
$('#markdown').bind('keyup', function() {
@ -110,14 +88,13 @@ $(function() {
event.preventDefault();
if (window.confirm('Are you sure you want to delete?')) {
$('#markdown').val('');
$('#output').html('');
}
});
//autoresize
$('textarea').autosize();
//$('#markdown').focus();
//leave
$(window).bind('beforeunload', function() {
if (isEdited) {