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

Feature request: setting to move viewcode source links to be right-aligned #68

Open
dem1995 opened this issue Nov 14, 2023 · 1 comment

Comments

@dem1995
Copy link

dem1995 commented Nov 14, 2023

Current situation: when using viewcode, source links appear immediately after the method declaration. This makes method declarations less readable, particularly when they include a return type.

Feature request: a togglable option to right-align these (or have it appear in the upper-right of the box)

Poor man's implementation (via custom.css)

span.viewcode-link {
    float: right;
}

Proposed user-facing toggle:

html_theme_options = {
    'right_align_source': True, //default false  
}
@dantownsend
Copy link
Member

dantownsend commented Nov 15, 2023

I think I see what you mean. Here's some code which uses view-docs:

https://piccolo-admin.readthedocs.io/en/latest/table_config/index.html#source

You want it to look like this instead:

Screenshot 2023-11-15 at 21 59 55

I need to think about this one:

  • Is it worth just doing this by default, as it's easy to read?
  • Add an icon or something instead in the corner
  • Or just let the user do it using CSS.

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

No branches or pull requests

2 participants