Skip to content

Change advertisement position in new pydata theme #1358

Closed

Description

@AdamRJensen

Is your feature request related to a problem? Please describe.
With the new pydata theme implemented in #1173, the ads from readthedocs have become much more prominent. E.g., the main pvlib landing page in the latest version is dominated by the advertisement (see screenshot from a phone below):

Describe the solution you'd like
While there are good reasons for having the advertisement, I do not think that it should be the most dominant feature that greets users.

One solution would be to move the advertisement to the bottom of the page. Though I have not been able to determine if this is possible with the theme. Perhaps @choldgraf could add a comment on this?

I noticed that other sites using the template also feature the ad at the top on the mobile version, e.g., pydata theme, binder, and jupyterhub.

Additional context
I fully support changing to the new theme btw.

Activity

  1. wholmgren commented on Dec 16, 2021

    @wholmgren
    Member

    Of these options:

    1. Pay readthedocs
    2. Hack the theme
    3. Build the docs in the ci, post to a github.io repository.
    4. Live with the ads

    I prefer 4, 1, 3, 2.

    Would be nice if PVPMC could pay for rtd ad free hosting and, while we're at it, a domain name too. While the combined price of that is roughly $100 per year, I'm guessing the overhead in making that happen is on the order of $1000 per year, unfortunately. Maybe there's a more efficient path through numfocus or github sponsors.

  2. changed the title [-]Change add position in new pydata theme[/-] [+]Change advertisement position in new pydata theme[/+] on Dec 16, 2021
  3. choldgraf commented on Dec 16, 2021

    @choldgraf

    I think that the right long-term solution is to make the sidebar collapsible when you're on mobile, rather than having it displayed at the top of the page. Agreed it is sub-optimal

  4. AdamRJensen commented on Dec 16, 2021

    @AdamRJensen
    MemberAuthor

    Another option would be to move the advertisement to the right-hand side. This only would require a minor change of the sphinx settings and avoids the advertisement being placed at the top on smartphones.

    In general the left-hand side of a webpage tends to get the most attention, so either way, I would favor moving the advertisement to the right.

  5. choldgraf commented on Dec 16, 2021

    @choldgraf

    ah I just realized that you could do this already with theme configuration, by following these instructions:

    https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/sections.html#the-left-sidebar

    You should try putting the sidebar-ethical-ads snippet in the footer:

    https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/sections.html#the-footer

    does that work?

  6. AdamRJensen commented on Dec 17, 2021

    @AdamRJensen
    MemberAuthor

    @choldgraf I successfully moved the ad to the footer in #1359 and it worked like a charm!

    I really think it's a win-win, it moves the advertisement to the bottom on smartphones and makes it less dominating in the browser version.

    Would it make sense to make this the default for the theme?

  7. choldgraf commented on Dec 17, 2021

    @choldgraf

    well we probably don't want the advertisement in the footer on a full width, since it'd generally be hidden, but I think the "hidden sidebar" that I mentioned above is a reasonable compromise

  8. added this to the 0.9.1 milestone on Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions