Skip to content
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

Styling: Edit this page buttons pointing at GitHub source .md file #14

Closed
peterjc opened this issue Apr 13, 2016 · 13 comments
Closed

Styling: Edit this page buttons pointing at GitHub source .md file #14

peterjc opened this issue Apr 13, 2016 · 13 comments

Comments

@peterjc
Copy link
Member

peterjc commented Apr 13, 2016

e.g. from http://biopython.org/wiki/GitUsage want an easy link back to https://github.com/biopython/biopython.github.io/blob/master/wiki/GitUsage.md from where the user can start editing (if they have a GitHub account etc).

@MarkusPiotrowski
Copy link
Contributor

Do you want this for every page? Then we can probably implement this with a fixed head element like "Edit this page on GitHub [GitHub icon]", combined with a link using something like {{ site.name }}? Or even better in the side-bar?
If you want to put this only selected pages, it is probably easiest to attach a linked GitHub icon to the first headline.

@peterjc
Copy link
Member Author

peterjc commented Apr 13, 2016

I was thinking every page - probably some liquid template code putting https://github.com/biopython/biopython.github.io/blob/master/ in front of the current page's relative path? i.e. Functionally a replacement for the Wiki's edit button.

Layout wise, perhaps in the footer - see also #20?

@MarkusPiotrowski
Copy link
Contributor

Here in the header, how do you like this?

edit-button

You can test it here.

@peterjc
Copy link
Member Author

peterjc commented Apr 14, 2016

Functionally that's exactly what I had in mind - that would certainly be a useful step forwards 👍

Visually, I'm not sure it goes with the current template (the font size looks bigger than than the other text, and the underlining is unusual), but I'm open to polling the community for the overall site look anyway.

@MarkusPiotrowski
Copy link
Contributor

MarkusPiotrowski commented Apr 14, 2016

I took the design from another template, without changing anything (since I'm not using Jekyll, I have to work and test online to see what I'm doing). The styling can be adjusted. The underlining you see is just an artefact from using the "back" button (like in the sidebar it underlines when hovering). The font is indeed more bold.

@MarkusPiotrowski
Copy link
Contributor

MarkusPiotrowski commented Apr 15, 2016

Would it be OK to anchor such button in the default.html template, or are there pages that shouldn't be included? I tried the wiki.html template, but there are (too) many Wiki pages that don't use this template.

@peterjc
Copy link
Member Author

peterjc commented Apr 15, 2016

Right now the wiki pages use either wiki (most), page (the few which appear in the side bar) or tagpage (the old MediaWiki category pages). I suspect that the final "landing" page could end up being a uniquely styled page type...

Probably it would be fine to use the default.html template?

@peterjc
Copy link
Member Author

peterjc commented Apr 26, 2016

@MarkusPiotrowski
Copy link
Contributor

This is a very clear and simple version, just a right-top justified link with a thin horizontal bar. Like a header (left part may later be used for navigation, e.g. page title or path). Wiith the functionality described in http://ben.balter.com/2015/09/13/github-pages-edit-button/, e.g. the file is opened in editing mode in GitHub.

untitled-1

You can test it (temporarily) here.

@peterjc
Copy link
Member Author

peterjc commented May 18, 2016

Let's go with your new version for now?

@MarkusPiotrowski
Copy link
Contributor

When you press the button you are directed to the Biopython web site respository, the file opens in Edit mode and you are advised that you don't have writing privilegs. So if you submit, this will open a branch on your local respository and you can do the pull request from there. If you are not logged in to GitHub you are directed to GitHub login page.

untitled-1

Thus I think we can close this issue.

@peterjc
Copy link
Member Author

peterjc commented May 19, 2016

Perfect, thank you!

@peterjc peterjc closed this as completed May 19, 2016
@peterjc
Copy link
Member Author

peterjc commented Jun 1, 2016

Fixed with a2b3c5b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants