piccolo-orm / piccolo_theme

A clean and modern Sphinx theme.
https://piccolo-theme.readthedocs.io/en/latest/
MIT License
93 stars 10 forks source link

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

Open dem1995 opened 1 year ago

dem1995 commented 1 year ago

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 commented 1 year ago

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: