Skip to content

Commit

Permalink
new footer layout
Browse files Browse the repository at this point in the history
  • Loading branch information
smth committed Aug 21, 2012
1 parent 05d327e commit 0d9f976
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 26 deletions.
27 changes: 27 additions & 0 deletions css/grey.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
html {
background-color: #efefef;
}

.topbar {
background-color: #EEEEEE;
}
Expand Down Expand Up @@ -322,3 +326,26 @@
.magazine .featured .text h2 a {
color: #333333;
}


/* Footer */
/* ====== */

body > footer {
background-color: #efefef;
background-image: none;
border-top-width: 1px;
border-top-style: solid;
border-top-color: #e5e5e5;
}
body > footer > .inner {
background-image:none;
text-shadow:none;
}
body > footer > .inner,
body > footer > .inner a,
body > footer > .inner a:hover,
body > footer > .inner h3 {
color:#404040;
text-shadow:none;
}
57 changes: 57 additions & 0 deletions css/okfn-wordpress.css
Original file line number Diff line number Diff line change
Expand Up @@ -2560,3 +2560,60 @@ p:empty {
.banner > .carousel.photo-stack .carousel-control {
bottom: 100px;
}


/* Footer */
/* ====== */

body > footer h3 {
font-size:14px;
}

#footer-widget-area > div#fourth {
float:left;
clear:left;
width:50% !important;
}
#footer-widget-area > div#fourth .menu {
margin:0px;
opacity:0.7;
}
#footer-widget-area > div#fourth .widget_nav_menu .menu li {
display: inline-block;
line-height: 20px;
padding:0px;
}
#footer-widget-area > div#fourth .widget_nav_menu .menu li a {
border-right-width: 1px;
border-right-style: solid;
border-right-color: #333333;
padding-right:5px;
padding-left:2px;
}
#footer-widget-area > div#fourth .widget_nav_menu .menu li:first-of-type a {
padding-left:0px;
}
#footer-widget-area > div#fourth .widget_nav_menu .menu li:last-of-type a {
border:none;
}

.footer-buttons {
text-align:right;
}
.footer-buttons a {
display:inline-block;
height:20px;
}
.footer-buttons .twitter,
.footer-buttons .facebook {
background-image: url(../images/social-icons-small.png);
background-repeat: no-repeat;
width:20px;
overflow:hidden;
text-indent:-9999px;
margin-left:2px;
text-align:left;
}
.footer-buttons .twitter {
background-position: 0px -150px;
}
19 changes: 17 additions & 2 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
if ( is_active_sidebar( 'first-footer-widget-area' ) ) $active_footers++;
if ( is_active_sidebar( 'second-footer-widget-area' ) ) $active_footers++;
if ( is_active_sidebar( 'third-footer-widget-area' ) ) $active_footers++;
if ( is_active_sidebar( 'fourth-footer-widget-area' ) ) $active_footers++;
//if ( is_active_sidebar( 'fourth-footer-widget-area' ) ) $active_footers++;
if ( $active_footers > 0) :
$footer_width = (940 - 20 * ($active_footers - 1)) / $active_footers;
?>
Expand All @@ -46,14 +46,29 @@
<div class="row">
<div id="footer-widgets">
<?php get_sidebar( 'footer' ) ?>
<div class="footer-buttons">
<?php if ( !empty( $okfn_twitter_username ) && $okfn_twitter_link == "true" && $okfn_twitter_location != "default" ) : ?>
<a class="twitter" href="https://twitter.com/<?php echo $okfn_twitter_username ?>">twitter</a>
<? endif; ?>
<?php if ( !empty( $okfn_facebook_username ) && $okfn_facebook_link == "true" && $okfn_facebook_location != "default" ) : ?>
<a class="facebook" href="http://www.facebook.com/<?php echo $okfn_facebook_username ?>">facebook</a>
<? endif; ?>

<?php if ( $okfn_flattr_okfn == "true" ) : ?>
<a href="http://flattr.com/thing/605365/Open-Knowledge-Foundation" target="_blank">
<img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" />
</a>
<? endif; ?>
</div>
</div><!-- /footer-widgets -->
</div><!-- /row -->
<?php endif; ?>

<div id="row">
<?php do_action( 'bp_footer' ) ?>
</div>
</div><!-- /container -->

</div><!-- /container -->
</div><!-- /inner -->
</footer>

Expand Down
72 changes: 50 additions & 22 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,34 @@ function echo_magazine_post($post, $is_featured) {
"type" => "text"),

array( "type" => "close"),


array( "name" => "Sub-Header",
"type" => "title"),

array( "type" => "open"),

array( "name" => "Sub-header Bar?",
"desc" => "Check this box to display a bar below the header, inclusing breadcrumbs.",
"id" => $shortname."_subheader",
"type" => "checkbox",
"std" => "false"),


array( "name" => "Search in Sub-header?",
"desc" => "Check this box to display add a search field to the sub-header bar.",
"id" => $shortname."_subheader_search",
"type" => "checkbox",
"std" => "false"),

array( "type" => "close"),


array( "name" => "Social",
"type" => "title"),

array( "type" => "open"),

array( "name" => "Twitter Link",
"desc" => "Add link to Twitter profile.",
"id" => $shortname."_twitter_link",
Expand All @@ -332,6 +356,13 @@ function echo_magazine_post($post, $is_featured) {
"id" => $shortname."_twitter_username",
"type" => "text"),

array("name" => "Twitter Location",
"id" => $shortname."_twitter_location",
"type" => "radio",
"desc" => "Where to put Twitter icon",
"options" => array("default" => "Header", "footer" => "Footer", "both" => "Header and Footer"),
"std" => "default"),

array( "type" => "close"),

array( "type" => "open"),
Expand All @@ -347,29 +378,15 @@ function echo_magazine_post($post, $is_featured) {
"id" => $shortname."_facebook_username",
"type" => "text"),

array("name" => "Facebook Location",
"id" => $shortname."_facebook_location",
"type" => "radio",
"desc" => "Where to put Facebook icon",
"options" => array("default" => "Header", "footer" => "Footer", "both" => "Header and Footer"),
"std" => "default"),

array( "type" => "close"),


array( "name" => "Sub-Header",
"type" => "title"),

array( "type" => "open"),

array( "name" => "Sub-header Bar?",
"desc" => "Check this box to display a bar below the header, inclusing breadcrumbs.",
"id" => $shortname."_subheader",
"type" => "checkbox",
"std" => "false"),


array( "name" => "Search in Sub-header?",
"desc" => "Check this box to display add a search field to the sub-header bar.",
"id" => $shortname."_subheader_search",
"type" => "checkbox",
"std" => "false"),

array( "type" => "close"),



array( "name" => "Misc",
"type" => "title"),
Expand Down Expand Up @@ -406,6 +423,17 @@ function echo_magazine_post($post, $is_featured) {
array( "type" => "close"),


array( "type" => "open"),

array( "name" => "Flattr OKFN",
"desc" => "Check this box to add a link to donate to the Open Knowledge Foundation.",
"id" => $shortname."_flattr_okfn",
"type" => "checkbox",
"std" => "false"),

array( "type" => "close"),


);

function mytheme_add_admin() {
Expand Down
4 changes: 2 additions & 2 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@
<div class="container">
<? if (($okfn_twitter_link == "true") or ($okfn_facebook_link == "true")) : ?>
<div class="social-links">
<?php if ( !empty( $okfn_twitter_username ) && $okfn_twitter_link == "true" ) : ?>
<?php if ( !empty( $okfn_twitter_username ) && $okfn_twitter_link == "true" && $okfn_twitter_location != "footer" ) : ?>
<a class="twitter" href="https://twitter.com/<?php echo $okfn_twitter_username ?>">twitter</a>
<? endif; ?>
<?php if ( !empty( $okfn_facebook_username ) && $okfn_facebook_link == "true" ) : ?>
<?php if ( !empty( $okfn_facebook_username ) && $okfn_facebook_link == "true" && $okfn_facebook_location != "footer" ) : ?>
<a class="facebook" href="http://www.facebook.com/<?php echo $okfn_facebook_username ?>">facebook</a>
<? endif; ?>
</div>
Expand Down
Binary file added images/social-icons-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0d9f976

Please sign in to comment.