Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: marpa/twentyeleven_translucence_child
base: 3caff1e8b4
...
head fork: marpa/twentyeleven_translucence_child
compare: fb2877fd7c
  • 8 commits
  • 10 files changed
  • 0 commit comments
  • 1 contributor
2  colors/dark.css
View
@@ -417,7 +417,7 @@ section.recent-posts .other-recent-posts .comments-link a:hover {
color: #ccc;
}
.widget ul li {
- color: #191919;
+ color: #888;
}
.widget_pages a:hover {
border: 1px solid #999;
2  colors/transparent-dark.css
View
@@ -418,7 +418,7 @@ section.recent-posts .other-recent-posts .comments-link a:hover {
color: #ccc;
}
.widget ul li {
- color: #191919;
+ color: #888;
}
.widget_pages a:hover {
border: 1px solid #999;
6 config-sample.php
View
@@ -12,18 +12,18 @@
* Custom headers
******************************************************************************/
$header_dir = get_bloginfo('stylesheet_directory');
-$twentyeleven_translucence_config['custom_header']['central-park']['url'] = "$header_dir/images/headers/central-park.jpg";
+$twentyeleven_translucence_config['custom_header']['central-park']['url'] = "$header_dir/images/headers/central-park.gif";
$twentyeleven_translucence_config['custom_header']['central-park']['thumbnail_url'] = "$header_dir/images/headers/central-park-thumbnail.jpg";
$twentyeleven_translucence_config['custom_header']['central-park']['description'] = __( 'Central Park', '2011-translucence' );
$twentyeleven_translucence_config['custom_header']['central-park']['color_schemes'] = "dark,transparent-dark";
-$twentyeleven_translucence_config['custom_header']['rockefeller-view']['url'] = "$header_dir/images/headers/rockefeller-view.jpg";
+$twentyeleven_translucence_config['custom_header']['rockefeller-view']['url'] = "$header_dir/images/headers/rockefeller-view.gif";
$twentyeleven_translucence_config['custom_header']['rockefeller-view']['thumbnail_url'] = "$header_dir/images/headers/rockefeller-view-thumbnail.jpg";
$twentyeleven_translucence_config['custom_header']['rockefeller-view']['description'] = __( 'Rockefeller View', '2011-translucence' );
$twentyeleven_translucence_config['custom_header']['rockefeller-view']['color_schemes'] = "dark,transparent-dark";
-$twentyeleven_translucence_config['custom_header']['paris-nights01']['url'] = "$header_dir/images/headers/paris-nights01.jpg";
+$twentyeleven_translucence_config['custom_header']['paris-nights01']['url'] = "$header_dir/images/headers/paris-nights01.gif";
$twentyeleven_translucence_config['custom_header']['paris-nights01']['thumbnail_url'] = "$header_dir/images/headers/paris-nights01-thumbnail.jpg";
$twentyeleven_translucence_config['custom_header']['paris-nights01']['description'] = __( 'Paris Nights01', '2011-translucence' );
$twentyeleven_translucence_config['custom_header']['paris-nights01']['color_schemes'] = "dark,transparent-dark";
2  functions.php
View
@@ -68,6 +68,7 @@ function twentyeleven_translucence_add_config() {
* @since 2011 Translucence 1.0
*/
function twentyeleven_translucence_setup() {
+
// define( 'HEADER_IMAGE_WIDTH', 950 );
// define( 'HEADER_IMAGE_HEIGHT', 150 );
}
@@ -288,6 +289,7 @@ function twentyeleven_translucence_default_headers() {
}
add_action('after_setup_theme', 'twentyeleven_translucence_default_headers', 11);
+
/**
* Gets author(s) of a given post
*
BIN  images/headers/central-park.gif
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/headers/paris-nights01.gif
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  images/headers/rockefeller-view.gif
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 js/admin.control.js
View
@@ -0,0 +1,8 @@
+// functions for toggling the display of theme option modes in Translucence
+
+function setThemeOptionsMode(value, options) {
+ var oform = document.getElementById('settings');
+ var options_mode = options+"[options-mode]";
+ oform.elements[options_mode].value = value;
+ oform.submit();
+}
214 js/display.control.js
View
@@ -0,0 +1,214 @@
+// functions for toggling the display of sidebars and page links in Translucence
+
+jQuery(document).ready(function(){
+ //alert("ready");
+ setToggleFromCookie();
+});
+
+function changeText(el, newText) {
+ // Safari work around
+ if (el.innerText) {
+ el.innerText = newText;
+ } else if (el.firstChild && el.firstChild.nodeValue) {
+ el.firstChild.nodeValue = newText;
+ }
+}
+
+function getMetaValue (meta_name) {
+ //alert (meta_name);
+ var meta_elements = document.getElementsByTagName("META");
+ for (var counter=0; counter<meta_elements.length; counter++) {
+ if (meta_elements[counter].name.toLowerCase() == meta_name.toLowerCase()) {
+ return meta_elements[counter].content;
+ }
+ }
+}
+
+
+function setToggleFromCookie () {
+
+ var primary_width = getMetaValue ("primary_width");
+ var secondary_width = getMetaValue ("secondary_width");
+ var tertiary_width = getMetaValue ("tertiary_width");
+ var content_width = getMetaValue ("content_width");
+
+ //alert(cookieprimary+"-"+cookiesecondary+"-"+cookietertiary+"-"+cookietoc);
+ // get all box cookies
+ var cookieprimary = getCookie("hideprimary");
+ var cookiesecondary = getCookie("hidesecondary");
+ var cookietertiary = getCookie("hidetertiary");
+ var cookietoc = getCookie("hidetoc");
+ var toc = document.getElementById('toc');
+
+
+ if (cookieprimary > -1 && (cookieprimary == 1 || cookieprimary == 2)) {
+ document.cookie = "hideprimary=2";
+ toggle('primary', 'sidebar', primary_width, secondary_width, tertiary_width, content_width);
+ } else {
+ //primarybox.style.display = "block";
+ }
+ if (cookiesecondary > -1 && (cookiesecondary == 1 || cookiesecondary == 2)) {
+ //alert('toggle');
+ document.cookie = "hidesecondary=2";
+ toggle('secondary', 'sidebar', primary_width, secondary_width, tertiary_width, content_width);
+ } else {
+ //secondarybox.style.display = "block";
+ }
+ if (cookietertiary > -1 && (cookietertiary == 1 || cookietertiary == 2)) {
+ document.cookie = "hidetertiary=2";
+ toggle('tertiary', 'sidebar', primary_width, secondary_width, tertiary_width, content_width);
+ } else {
+ //tertiarybox.style.display = "block";
+ }
+
+}
+
+// Toggle the visibility of the object, update content width to new context and update toggle links
+function toggle(obj, context, primary_width, secondary_width, tertiary_width, content_width) {
+ var box = document.getElementById(obj);
+ var box_display = getCookie("hide"+obj);
+ var cookieprimary = getCookie("hideprimary");
+ var cookiesecondary = getCookie("hidesecondary");
+ var cookietertiary = getCookie("hidetertiary");
+ var cookietoc = getCookie("hidetoc");
+
+ var primarybox = document.getElementById('primary');
+ var secondarybox = document.getElementById('secondary');
+ var tertiarybox = document.getElementById('tertiary');
+ var contentbox = document.getElementById('content');
+
+ // initialize variable for:
+ // all toggle links
+ // current sidebar box widths
+ // initial box width for box to be toogle
+ // new content width
+ if (box) {
+ var widgetlist = box.getElementsByTagName('ul')[0];
+ var toggle_link_element = "toggle"+obj;
+ var toggle_context_element = "togglecontent"+obj;
+ var toggleLink = document.getElementById(toggle_link_element);
+ var togglecontextlink = document.getElementById(toggle_context_element);
+ var default_box_width;
+ var new_content_width;
+ var current_primary_width;
+ var current_secondary_width;
+ var current_tertiary_width;
+
+ // get width of box to be toggled
+ switch (obj) {
+ case "primary":
+ default_box_width = primary_width;
+ break;
+ case "secondary":
+ default_box_width = secondary_width;
+ break;
+ case "tertiary":
+ default_box_width = tertiary_width;
+ break;
+ }
+
+ // get current widths of each box
+ if (primarybox != null) current_primary_width = primarybox.style.width.replace("px", "");
+ if (secondarybox != null) current_secondary_width = secondarybox.style.width.replace("px", "");
+ if (tertiarybox != null) current_tertiary_width = tertiarybox.style.width.replace("px", "");
+ var width_adjust = 0;
+
+
+ if (current_primary_width == 0 && cookieprimary != 2) width_adjust = width_adjust + Number(primary_width);
+ if (current_secondary_width == 0 && cookiesecondary != 2) width_adjust = width_adjust + Number(secondary_width);
+ if (current_tertiary_width == 0 && cookietertiary != 2) width_adjust = width_adjust + Number(tertiary_width);
+
+
+ // width of box to be toggled
+ box_width = default_box_width+"px";
+
+ // if current box width is NOT its default width
+ // update its width to default and set display to block
+ // calculate new content width
+ // change toggle link text to expand text
+ // set document cookie to hide = 0
+ if (box_display != 2 && box.style.width != box_width) {
+ //if (box.style.width != box_width) {
+ //width_adjust = 50*num_hidden_boxes;
+ box.style.width = box_width;
+ box.style.display = "block";
+ new_content_width = (Number(content_width) + Number(width_adjust)) - Number(default_box_width);
+ new_content_width = new_content_width + "px";
+ //alert("not default: "+new_content_width);
+ document.getElementById('content').style.width = new_content_width;
+ widgetlist.style.display = 'block';
+ document.cookie = "hide"+obj+"=0";
+
+ // update toggle links based on context and location
+ if (context == "content") {
+ if (obj == "tertiary") {
+ changeText(togglecontextlink, "»");
+ } else {
+ changeText(togglecontextlink, "«");
+ }
+ } else if (obj == "tertiary") {
+ changeText(toggleLink, "»");
+ } else {
+ changeText(toggleLink, "«");
+ }
+
+ // if current box IS its default width
+ // update its width to 0 and set display to none
+ // calculate new content width
+ // change toggle link text to collapse text
+ // set document cookie to hide = 1
+ } else {
+ //width_adjust = Number(default_box_width) + Number(adjust);
+ box.style.width = "0px";
+ box.style.display = "none";
+ new_content_width = (Number(content_width) + Number(width_adjust)) + Number(default_box_width);
+ new_content_width = new_content_width + "px";
+ //alert("default: "+new_content_width);
+ document.getElementById('content').style.width = new_content_width;
+ widgetlist.style.display = 'none';
+ document.cookie = "hide"+obj+"=1";
+ if (obj == "tertiary") {
+ changeText(togglecontextlink, "«");
+ } else {
+ changeText(togglecontextlink, "»");
+ }
+ }
+ }
+}
+
+
+function getCookie(c_name) {
+ if (document.cookie.length>0) {
+ c_start=document.cookie.indexOf(c_name + "=");
+ if (c_start!=-1)
+ {
+ c_start=c_start + c_name.length+1;
+ c_end=document.cookie.indexOf(";",c_start);
+ if (c_end==-1) c_end=document.cookie.length;
+ return unescape(document.cookie.substring(c_start,c_end));
+ }
+ }
+ return "";
+}
+
+function toggleToc() {
+ //alert("update");
+ var toc = document.getElementById('toc');
+
+ if (toc) {
+ var toc = toc.getElementsByTagName('ul')[0];
+ var toggleLink = document.getElementById('togglelink');
+
+ if (toc && toggleLink && toc.style.display == 'none') {
+ changeText(toggleLink, "[hide page links]");
+ toc.style.display = 'block';
+ document.cookie = "hidetoc=0";
+ } else if (toc.style.display == 'block') {
+ changeText(toggleLink, "[show page links]");
+ toc.style.display = 'none';
+ document.cookie = "hidetoc=1";
+ }
+ }
+}
+
+
22 style.css
View
@@ -32,6 +32,11 @@ Template: twentyeleven
bottom: -27px;
}
+a {
+ color: #003366;
+ text-decoration: none;
+}
+
/* =Menu
-------------------------------------------------------------- */
@@ -366,6 +371,23 @@ li.current_page_item + ul.children {
top: .75em;
}
+/* Comments link */
+.entry-header .comments-link a {
+ background: transparent url(images/comment-bubble-light-transparent.png) no-repeat;
+ border-color: #222;
+ color: #000;
+}
+.post .entry-header .comments-link a:hover,
+.post .entry-header .comments-link a:focus,
+.post .entry-header .comments-link a:active {
+ background: transparent url(images/comment-bubble-light-transparent-hover.png) no-repeat;
+ color: #fff;
+ font-weight: bold;
+}
+.rtl .entry-header .comments-link a {
+ background-image: url(images/comment-bubble-dark-rtl.png);
+}
+
/* =2011 Translucence modfication to support sidebars on single pages
----------------------------------------------- */

No commit comments for this range

Something went wrong with that request. Please try again.