barentsen / amunra-sphinx-theme

A minimalist theme for Sphinx based on Bootstrap.
https://barentsen.github.io/amunra-sphinx-theme/
BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

GitLab icon to amunra-sphinx-theme #5

Open carlosal1015 opened 4 years ago

carlosal1015 commented 4 years ago

Hello, I would like the possibilty to choose GitLab or GitHub icon since conf.py.

I think that it is easy to implement, like this:

amunra-sphinx-theme/amunra_sphinx_theme/static/css/amunra.css

.github-lab {
    margin-left: 1em;
    vertical-align: middle;
    fill: #fc6d26; /* I do not sure the exact color */
}

amunra-sphinx-theme/amunra_sphinx_theme/layout.html

        {% if theme_gitlab_link %}
          <a href="{{ theme_gitlab_link }}">
            <svg id="logo_art" class="gitlab-icon" data-name="logo art" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1266 559"><defs><style>.cls-2{fill:#fc6d26;}.cls-3{fill:#e24329;}.cls-4{fill:#fca326;}</style></defs><g id="g44"><path id="path46" class="cls-2" d="M461,301.81l-18.91-58.12L404.67,128.41a6.47,6.47,0,0,0-12.27,0L355,243.62H230.66L193.24,128.41a6.47,6.47,0,0,0-12.27,0L143.62,243.62,124.7,301.81a12.89,12.89,0,0,0,4.66,14.39L292.82,435,456.28,316.2A12.9,12.9,0,0,0,461,301.81"/></g><g id="g48"><path id="path50" class="cls-3" d="M292.86,434.89h0L355,243.61H230.7l62.16,191.28Z"/></g><g id="g56"><path id="path58" class="cls-2" d="M292.82,434.9,230.66,243.61h-87L292.82,434.9Z"/></g><g id="g64"><path id="path66" class="cls-4" d="M143.59,243.68h0L124.67,301.8a12.89,12.89,0,0,0,4.66,14.39L292.79,435,143.59,243.68Z"/></g><g id="g72"><path id="path74" class="cls-3" d="M143.61,243.68h87.11L193.23,128.47a6.47,6.47,0,0,0-12.27,0L143.61,243.68Z"/></g><g id="g76"><path id="path78" class="cls-2" d="M292.86,434.9,355,243.61h87.1L292.86,434.9Z"/></g><g id="g80"><path id="path82" class="cls-4" d="M442.07,243.68h0L461,301.8a12.89,12.89,0,0,1-4.66,14.39L292.87,434.89l149.2-191.21Z"/></g><g id="g84"><path id="path86" class="cls-3" d="M442.12,243.68H355l37.42-115.21a6.47,6.47,0,0,1,12.27,0l37.42,115.21Z"/></g></svg>
          </a>
        {% endif %}

amunra-sphinx-theme/amunra_sphinx_theme/theme.conf

[options]
github_link =
gitlab_link =

GitLab's SVG that I found in internet.

<svg id="logo_art" data-name="logo art" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1266 559"><defs><style>.cls-2{fill:#fc6d26;}.cls-3{fill:#e24329;}.cls-4{fill:#fca326;}</style></defs><g id="g44"><path id="path46" class="cls-2" d="M461,301.81l-18.91-58.12L404.67,128.41a6.47,6.47,0,0,0-12.27,0L355,243.62H230.66L193.24,128.41a6.47,6.47,0,0,0-12.27,0L143.62,243.62,124.7,301.81a12.89,12.89,0,0,0,4.66,14.39L292.82,435,456.28,316.2A12.9,12.9,0,0,0,461,301.81"/></g><g id="g48"><path id="path50" class="cls-3" d="M292.86,434.89h0L355,243.61H230.7l62.16,191.28Z"/></g><g id="g56"><path id="path58" class="cls-2" d="M292.82,434.9,230.66,243.61h-87L292.82,434.9Z"/></g><g id="g64"><path id="path66" class="cls-4" d="M143.59,243.68h0L124.67,301.8a12.89,12.89,0,0,0,4.66,14.39L292.79,435,143.59,243.68Z"/></g><g id="g72"><path id="path74" class="cls-3" d="M143.61,243.68h87.11L193.23,128.47a6.47,6.47,0,0,0-12.27,0L143.61,243.68Z"/></g><g id="g76"><path id="path78" class="cls-2" d="M292.86,434.9,355,243.61h87.1L292.86,434.9Z"/></g><g id="g80"><path id="path82" class="cls-4" d="M442.07,243.68h0L461,301.8a12.89,12.89,0,0,1-4.66,14.39L292.87,434.89l149.2-191.21Z"/></g><g id="g84"><path id="path86" class="cls-3" d="M442.12,243.68H355l37.42-115.21a6.47,6.47,0,0,1,12.27,0l37.42,115.21Z"/></g></svg>

Thanks in advance.

barentsen commented 4 years ago

Thanks for the suggestion @carlosal1015! Apologies for my delayed response.

Are you still interested in this feature (i.e. would you use it?) If so, I'm happy to make this happen.

carlosal1015 commented 4 years ago

Hi @barentsen, I had a GitLab Project and I would like to use amunra-sphinx-theme and get the GitLab icon. Don't worry, there is no problem with time.