From d1c2ce4f90ef85cce326ca3d4d610c57d68177ce Mon Sep 17 00:00:00 2001 From: John Paul Date: Mon, 15 Oct 2012 10:47:50 -0400 Subject: [PATCH] fixes learn #43, add feedback link to github page for content --- themes/jquery/functions.jquery.php | 18 ++++++++++++++++++ themes/learn.jquery.com/page.php | 4 +++- themes/learn.jquery.com/style.css | 4 ++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/themes/jquery/functions.jquery.php b/themes/jquery/functions.jquery.php index 5339acbb..634bef57 100644 --- a/themes/jquery/functions.jquery.php +++ b/themes/jquery/functions.jquery.php @@ -96,4 +96,22 @@ function jq_page_links_for_category( $category ) { return $ret; } +function jq_get_github_url() { + $url = $_SERVER['REQUEST_URI']; + $path = parse_url($url)['path']; + $github_prefix = 'https://github.com/jquery/'.get_stylesheet().'/tree/master/page'; + + return $github_prefix . str_lreplace('/','.md', $path); +} + +function str_lreplace($search, $replace, $subject) { + $pos = strrpos($subject, $search); + + if($pos !== false) { + $subject = substr_replace($subject, $replace, $pos, strlen($search)); + } + + return $subject; +} + ?> diff --git a/themes/learn.jquery.com/page.php b/themes/learn.jquery.com/page.php index c6b09390..f855ba3d 100644 --- a/themes/learn.jquery.com/page.php +++ b/themes/learn.jquery.com/page.php @@ -11,7 +11,9 @@ - +

Suggestions, Problems, Feedback

+ Open an Issue or Submit a Pull Request on GitHub + diff --git a/themes/learn.jquery.com/style.css b/themes/learn.jquery.com/style.css index b19d1ddb..44074166 100755 --- a/themes/learn.jquery.com/style.css +++ b/themes/learn.jquery.com/style.css @@ -59,3 +59,7 @@ Template: jquery letter-spacing: 0; margin: 4px 0 0 0; } + +#body .inner .icon-github { + color:#30b9f8; +}