Permalink
Browse files

Various tweaks

  • Loading branch information...
1 parent 3cd5837 commit bc6973679bc7d696fe39f6975b8d6b96a97748f8 @somerandomdude somerandomdude committed May 9, 2011
Showing with 57 additions and 22 deletions.
  1. +0 −4 README
  2. +4 −3 admin/css/franklin-street-options.css
  3. +28 −2 functions.php
  4. +9 −9 index.php
  5. +1 −1 stylesheets/css/forms.css
  6. +15 −3 stylesheets/less/forms.less
View
4 README
@@ -1,12 +1,9 @@
TODO:
- -Rename categories_wrapper.php and comment_wrapper.php to template_categories.php and template_comments.php
-Update screenshot.png
-main.js: Fix colorbox AJAX pull
-images.less: Fix placement image
-srd.less: Better semantic setup for follow component
- -RSS post footer widget?
-
+Admin panels
-Make Franklin Street a whole section in Wordpress admin
@@ -16,7 +13,6 @@ TODO:
-Tiers can choose specific categories to display
-Make all options in functions.php accessible in admin panel
-Option to add custom code to 'head' tag and above 'body' tag
- -Option to toggle AJAX comments on and off
+Template Cleanup
-Serious cleanup of functions.php
@@ -12,10 +12,11 @@ a.franklin-content-section-delete { position:absolute; top:25px; right:25px; }
.franklin-fields { width:320px; float:left; }
.franklin-fields label { display:block; margin-bottom:3px; }
-.franklin-fields input,
-.franklin-fields textarea { width:275px; margin-bottom:13px; }
-.franklin-fields textarea { height:125px; }
+#franklin-content-sections .franklin-fields input,
+#franklin-content-sections .franklin-fields textarea { width:275px; margin-bottom:13px; }
+#franklin-content-sections .franklin-fields textarea { height:125px; }
+#franklin-general textarea { display:block; width: 550px; height:250px; margin-bottom:13px; }
.franklin-categories { width:320px; float:left; }
.franklin-categories p { font-weight:bold; }
View
@@ -186,12 +186,22 @@ function franklin_st_home()
include 'admin/admin-options-home.php';
}
+function franklin_st_general()
+{
+ include 'admin/admin-options-general.php';
+}
+
// add our menus
function franklin_street_admin_menu()
{
add_menu_page( 'Franklin Street', 'Franklin Street', 'manage_options', 'franklin-street', 'franklin_st_home' );
- add_submenu_page( 'franklin-street', 'Franklin Street', 'Home Page Sections', 'manage_options', 'franklin-street', 'franklin_st_home');
+ add_submenu_page( 'franklin-street', 'Franklin Street', 'General', 'manage_options', 'franklin-street-general', 'franklin_st_general');
+ add_submenu_page( 'franklin-street', 'Franklin Street', 'Home Page Sections', 'manage_options', 'franklin-street-home', 'franklin_st_home');
+ /*
+ * TODO:
+ * Add a customize submenu for additional CSS & Javascript to be put in the header and footer
+ */
}
add_action( 'admin_menu', 'franklin_street_admin_menu' );
@@ -205,4 +215,20 @@ function franklin_street_admin_assets()
}
}
-add_action( 'init', 'franklin_street_admin_assets' );
+add_action( 'init', 'franklin_street_admin_assets' );
+
+function franklin_street_footer() {
+
+ $franklin_street_general = get_option( '_franklin_street_general' );
+ if($franklin_street_general) echo $franklin_street_general['footer'];
+}
+
+function franklin_street_header() {
+
+ $franklin_street_general = get_option( '_franklin_street_general' );
+ if($franklin_street_general) echo $franklin_street_general['header'];
+}
+
+add_action('wp_footer', 'franklin_street_footer');
+add_action('wp_head', 'franklin_street_header');
+?>
View
@@ -12,15 +12,14 @@
$franklin_street_sections = get_option( '_franklin_street_home_sections' );
if($franklin_street_sections) {
foreach($franklin_street_sections as $section) {
- $display_type=$section[display_type];
- $title=$section[title];
- $caption=$section[caption];
- $num_posts=$section[num_posts];
- $categories=$section[categories];
+ $display_type=$section['display_type'];
+ $title=$section['title'];
+ $caption=$section['caption'];
+ $num_posts=$section['num_posts'];
+ $categories=$section['categories'];
- $args=array('posts_per_page' => max(0, $num_posts), 'cat' => implode(",",array_filter($categories)));
- $queryObject=null;
- $queryObject = new WP_Query($args);
+ $queryObject = new WP_Query(array('posts_per_page' => $num_posts, 'cat' => implode(",",array_filter($categories))));
+
switch($display_type) {
case 'one_up_reg':
@@ -35,9 +34,10 @@
case 'four_up':
include 'templates/four_up.php';
break;
- default:
+ case 'right_aside':
include 'templates/right_aside.php';
}
+
}
} else {
//Insert default loop
@@ -10,4 +10,4 @@
.reset-dimensions{margin:0;padding:0;}
.incomplete{background-color:rgba(255, 0, 255, 0);}
.show-bounds{background-color:rgba(255, 255, 0, 0.5);}
-@media screen, projection{input[type=text],textarea{font-size:13px;line-height:19px;border:1px solid #5d504f;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#5d504f;} input[type=submit]{font-size:13px;line-height:19px;border:0;padding:6px 10px 6px 10px;cursor:pointer;}}
+@media screen, projection{label{font-family:'Helvetica Neue',Arial,Helvetica,Geneva,sans-serif;font-size:13px;line-height:19px;font-weight:bold;} input[type=text],textarea{font-size:13px;line-height:19px;border:1px solid #5d504f;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#5d504f;} input[type=submit]{display:inline-block;background:#3d302f;color:#f0eceb;-moz-box-shadow:0px 0px 8px rgba(18, 7, 6, 0.3);-webkit-box-shadow:0px 0px 8px rgba(18, 7, 6, 0.3);box-shadow:0px 0px 8px rgba(18, 7, 6, 0.3);padding:4px 10px;border-radius:5px;font-family:'Helvetica Neue',Arial,Helvetica,Geneva,sans-serif;text-align:center;border:0;text-shadow:0px 1px 1px rgba(18, 7, 6, 0.3);}}
@@ -1,5 +1,11 @@
@import "variables";
@media screen, projection {
+ label {
+ font-family: @sans-serif;
+ .font-size-small;
+ font-weight:bold;
+ }
+
input[type=text], textarea {
.font-size-small;
border: 1px solid @color_midtone;
@@ -8,9 +14,15 @@
}
input[type=submit] {
- .font-size-small;
+ display:inline-block;
+ background:@color_dark;
+ color:@color_light;
+ .default-shadow;
+ padding:4px 10px;
+ border-radius:5px;
+ font-family:@sans-serif;
+ text-align:center;
border:0;
- padding:6px 10px 6px 10px;
- cursor: pointer;
+ text-shadow:0px 1px 1px rgba(18, 7, 6,0.3);
}
}

0 comments on commit bc69736

Please sign in to comment.