Quellcode durchsuchen

fixed alert classes

Eddie Machado vor 13 Jahren
Ursprung
Commit
9dca741f1e
5 geänderte Dateien mit 47 neuen und 40 gelöschten Zeilen
  1. 18 18
      comments.php
  2. 15 15
      functions.php
  3. 8 1
      library/css/style.css
  4. 4 4
      library/less/style.less
  5. 2 2
      sidebar.php

+ 18 - 18
comments.php

@@ -8,7 +8,7 @@ The comments page for Bones
     die ('Please do not load this page directly. Thanks!');
 
   if ( post_password_required() ) { ?>
-  	<div class="alert help">
+  	<div class="alert alert-help">
     	<p class="nocomments"><?php _e("This post is password protected. Enter the password to view comments.", "bonestheme"); ?></p>
   	</div>
   <?php
@@ -27,25 +27,25 @@ The comments page for Bones
 	  		<li><?php next_comments_link() ?></li>
 	 	</ul>
 	</nav>
-	
+
 	<ol class="commentlist">
 		<?php wp_list_comments('type=comment&callback=bones_comments'); ?>
 	</ol>
-	
+
 	<nav id="comment-nav">
 		<ul class="clearfix">
 	  		<li><?php previous_comments_link() ?></li>
 	  		<li><?php next_comments_link() ?></li>
 		</ul>
 	</nav>
-  
+
 	<?php else : // this is displayed if there are no comments so far ?>
 
 	<?php if ( comments_open() ) : ?>
     	<!-- If comments are open, but there are no comments. -->
 
 	<?php else : // comments are closed ?>
-	
+
 	<!-- If comments are closed. -->
 	<!--p class="nocomments"><?php _e("Comments are closed.", "bonestheme"); ?></p-->
 
@@ -65,7 +65,7 @@ The comments page for Bones
 	</div>
 
 	<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
-  	<div class="alert help">
+  	<div class="alert alert-help">
   		<p><?php printf( __('You must be %1$slogged in%2$s to post a comment.', 'bonestheme'), '<a href="<?php echo wp_login_url( get_permalink() ); ?>">', '</a>' ); ?></p>
   	</div>
 	<?php else : ?>
@@ -77,44 +77,44 @@ The comments page for Bones
 	<p class="comments-logged-in-as"><?php _e("Logged in as", "bonestheme"); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e("Log out of this account", "bonestheme"); ?>"><?php _e("Log out", "bonestheme"); ?> <?php _e("&raquo;", "bonestheme"); ?></a></p>
 
 	<?php else : ?>
-	
+
 	<ul id="comment-form-elements" class="clearfix">
-		
+
 		<li>
 		  <label for="author"><?php _e("Name", "bonestheme"); ?> <?php if ($req) _e("(required)"); ?></label>
 		  <input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" placeholder="<?php _e('Your Name*', 'bonestheme'); ?>" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
 		</li>
-		
+
 		<li>
 		  <label for="email"><?php _e("Mail", "bonestheme"); ?> <?php if ($req) _e("(required)"); ?></label>
 		  <input type="email" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" placeholder="<?php _e('Your E-Mail*', 'bonestheme'); ?>" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
 		  <small><?php _e("(will not be published)", "bonestheme"); ?></small>
 		</li>
-		
+
 		<li>
 		  <label for="url"><?php _e("Website", "bonestheme"); ?></label>
 		  <input type="url" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" placeholder="<?php _e('Got a website?', 'bonestheme'); ?>" tabindex="3" />
 		</li>
-		
+
 	</ul>
 
 	<?php endif; ?>
-	
+
 	<p><textarea name="comment" id="comment" placeholder="<?php _e('Your Comment here...', 'bonestheme'); ?>" tabindex="4"></textarea></p>
-	
+
 	<p>
 	  <input name="submit" type="submit" id="submit" class="button" tabindex="5" value="<?php _e('Submit', 'bonestheme'); ?>" />
 	  <?php comment_id_fields(); ?>
 	</p>
-	
-	<div class="alert info">
+
+	<div class="alert alert-info">
 		<p id="allowed_tags" class="small"><strong>XHTML:</strong> <?php _e('You can use these tags', 'bonestheme'); ?>: <code><?php echo allowed_tags(); ?></code></p>
 	</div>
-	
+
 	<?php do_action('comment_form', $post->ID); ?>
-	
+
 	</form>
-	
+
 	<?php endif; // If registration required and not logged in ?>
 </section>
 

+ 15 - 15
functions.php

@@ -4,7 +4,7 @@ Author: Eddie Machado
 URL: htp://themble.com/bones/
 
 This is where you can drop your custom functions or
-just edit things like thumbnail sizes, header images, 
+just edit things like thumbnail sizes, header images,
 sidebars, comments, ect.
 */
 
@@ -50,8 +50,8 @@ require_once('library/custom-post-type.php'); // you can disable this if you lik
 // Thumbnail sizes
 add_image_size( 'bones-thumb-600', 600, 150, true );
 add_image_size( 'bones-thumb-300', 300, 100, true );
-/* 
-to add more sizes, simply copy a line from above 
+/*
+to add more sizes, simply copy a line from above
 and change the dimensions & name. As long as you
 upload a "featured image" as large as the biggest
 set width or height, all the other sizes will be
@@ -60,7 +60,7 @@ auto-cropped.
 To call a different size, simply change the text
 inside the thumbnail function.
 
-For example, to call the 300 x 300 sized image, 
+For example, to call the 300 x 300 sized image,
 we would use the function:
 <?php the_post_thumbnail( 'bones-thumb-300' ); ?>
 for the 600 x 100 image:
@@ -83,15 +83,15 @@ function bones_register_sidebars() {
     	'before_title' => '<h4 class="widgettitle">',
     	'after_title' => '</h4>',
     ));
-    
-    /* 
+
+    /*
     to add more sidebars or widgetized areas, just copy
-    and edit the above sidebar code. In order to call 
+    and edit the above sidebar code. In order to call
     your new sidebar just use the following code:
-    
+
     Just change the name to whatever your new
     sidebar's id is, for example:
-    
+
     register_sidebar(array(
     	'id' => 'sidebar2',
     	'name' => __('Sidebar 2', 'bonestheme'),
@@ -101,28 +101,28 @@ function bones_register_sidebars() {
     	'before_title' => '<h4 class="widgettitle">',
     	'after_title' => '</h4>',
     ));
-    
+
     To call the sidebar in your template, you can just copy
     the sidebar.php file and rename it to your sidebar's name.
     So using the above example, it would be:
     sidebar-sidebar2.php
-    
+
     */
 } // don't remove this bracket!
 
 /************* COMMENT LAYOUT *********************/
-		
+
 // Comment Layout
 function bones_comments($comment, $args, $depth) {
    $GLOBALS['comment'] = $comment; ?>
 	<li <?php comment_class(); ?>>
 		<article id="comment-<?php comment_ID(); ?>" class="clearfix">
 			<header class="comment-author vcard">
-			    <?php 
+			    <?php
 			    /*
 			        this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:
 			        echo get_avatar($comment,$size='32',$default='<path_to_url>' );
-			    */ 
+			    */
 			    ?>
 			    <!-- custom gravatar call -->
 			    <?php
@@ -136,7 +136,7 @@ function bones_comments($comment, $args, $depth) {
 				<?php edit_comment_link(__('(Edit)', 'bonestheme'),'  ','') ?>
 			</header>
 			<?php if ($comment->comment_approved == '0') : ?>
-       			<div class="alert info">
+       			<div class="alert alert-info">
           			<p><?php _e('Your comment is awaiting moderation.', 'bonestheme') ?></p>
           		</div>
 			<?php endif; ?>

+ 8 - 1
library/css/style.css

@@ -771,6 +771,11 @@ and will be used across all viewports.
 /*********************
 01. GENERAL STYLES
 *********************/
+html,
+body {
+  /* height: 100%; */
+
+}
 body {
   font-family: "Georgia", Cambria, Times New Roman, Times, serif;
   font-size: 100%;
@@ -867,7 +872,7 @@ h5,
 .h5 {
   font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
   text-rendering: optimizelegibility;
-  font-weight: 500;
+  font-weight: 400;
   /*
 	if you're going to use webfonts, be sure to check your weights
 	http://css-tricks.com/watch-your-font-weight/
@@ -1020,12 +1025,14 @@ and more scalable.
 }
 /* end .entry-content */
 .wp-caption {
+  max-width: 100%;
   background: #eee;
   padding: 5px;
   /* images inside wp-caption */
 
 }
 .wp-caption img {
+  max-width: 100%;
   margin-bottom: 0;
   width: 100%;
 }

+ 4 - 4
library/less/style.less

@@ -104,9 +104,9 @@ iPHONE 5 MEDIA QUERY
 Want to get fancy for no good reason? Knock yourself out.
 */
 @media (device-height: 568px) and (-webkit-min-device-pixel-ratio: 2) {
-  
+
   // iPhone 5 or iPod Touch 5th generation styles (you can include your own file if you want)
-  
+
 }
 
 /*
@@ -116,8 +116,8 @@ sense to print at the bottom. Things like nav, ads, and forms should
 be set to display none.
 */
 @media print {
-	
+
 	@import "_print.less";
-	
+
 } // end of media query
 

+ 2 - 2
sidebar.php

@@ -7,8 +7,8 @@
 					<?php else : ?>
 
 						<!-- This content shows up if there are no widgets defined in the backend. -->
-						
-						<div class="alert help">
+
+						<div class="alert alert-help">
 							<p><?php _e("Please activate some Widgets.", "bonestheme");  ?></p>
 						</div>