Skip to content

fixes learn #43, add feedback link to github page for content #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions themes/jquery/functions.jquery.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,12 @@ function jq_page_links_for_category( $category ) {
return $ret;
}

function jq_get_github_url() {
global $post;
$source_path = get_post_meta( $post->ID, "source_path" )[0];
$github_prefix = 'https://github.com/jquery/'.get_stylesheet().'/tree/master/'.$source_path;

return $github_prefix;
}

?>
2 changes: 1 addition & 1 deletion themes/jquery/page.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
</div><!-- .inner -->
</div><!-- #body -->

<?php get_footer(); ?>
<?php get_footer(); ?>
4 changes: 3 additions & 1 deletion themes/learn.jquery.com/page.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
<?php get_template_part( 'content', 'page' ); ?>

<?php comments_template( '', true ); ?>

<h2>Suggestions, Problems, Feedback</h2>
<a class="btn" href="<?php echo jq_get_github_url(); ?>"><i class="icon-github"></i> Open an Issue or Submit a Pull Request on GitHub</a>

</div>
<!-- /inner -->

Expand Down
4 changes: 4 additions & 0 deletions themes/learn.jquery.com/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ Template: jquery
letter-spacing: 0;
margin: 4px 0 0 0;
}

#body .inner .icon-github {
color:#30b9f8;
}