Post preview, now with extra spiff, from Mark Jaquith. fixes #1701

git-svn-id: https://develop.svn.wordpress.org/trunk@2906 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-09-23 00:44:26 +00:00
parent 861c7128b2
commit 72133b0358
3 changed files with 19 additions and 10 deletions

View File

@ -10,7 +10,9 @@ $messages[3] = __('Custom field deleted.');
<form name="post" action="post.php" method="post" id="post">
<div class="wrap">
<h2><?php _e('Write Post'); ?></h2>
<a id="write-post"></a>
<h2><?php _e('Write Post'); ?><?php if ( 0 != $post_ID ) : ?>
<small class="quickjump"><a href="#preview-post"><?php _e('preview &darr;'); ?></a></small><?php endif; ?></h2>
<?php
if (0 == $post_ID) {

View File

@ -78,15 +78,9 @@ case 'edit':
?>
<div id='preview' class='wrap'>
<h2><?php _e('Post Preview (updated when post is saved)'); ?></h2>
<h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__("Permanent Link: %s"), get_the_title()); ?>"><?php the_title(); ?></a></h3>
<div class="meta"><?php _e("Filed under:"); ?> <?php the_category(','); ?> &#8212; <?php the_author() ?> @ <?php the_time() ?></div>
<div class="storycontent">
<?php
echo apply_filters('the_content', html_entity_decode($post->post_content) );
?>
</div>
<a id="preview-post"></a>
<h2><?php _e('Post Preview (updated when post is saved)'); ?> <small class="quickjump"><a href="#write-post"><?php _e('edit &uarr;'); ?></a></small></h2>
<iframe src="<?php the_permalink(); ?>" width="100%" height="600" />
</div>
<?php
break;

View File

@ -114,6 +114,19 @@ h2 {
margin: 5px 10px;
}
h2 small.quickjump {
display: block;
text-align: right;
}
h2 small.quickjump a {
text-decoration: none;
border-bottom: 0;
font-size: 15px;
background: #f0f8ff;
padding: 5px 10px;
}
img, #footer a {
border: 0;
}