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

Cyanine theme: infos about author, date missing #423

Open
thenktor opened this issue Nov 29, 2023 · 5 comments
Open

Cyanine theme: infos about author, date missing #423

thenktor opened this issue Nov 29, 2023 · 5 comments
Labels

Comments

@thenktor
Copy link

Hi,

I've installed Typemill v2 with Cyanine 2.0.1 and activated article author and article date on top of the page, but the info is not shown.

@trendschau trendschau added the bug label Nov 30, 2023
@trendschau
Copy link
Member

I will check it for next release

@xprssnst
Copy link

Same thing here. The printer and edit icons are gone also.

@ToastStudios
Copy link

I peeked in page.twig and it seems that the eval of settings.themes.cyanine.datePosition.top returns false. It turns out that:
dump(settings.themes.cyanine.datePosition) returns an array: array(1) { [0]=> string(3) "top" } or array(0) { } if no option is set. You can check for values in array in if statement at line 48+:

{% if ("top" in settings.themes.cyanine.datePosition or "top" in settings.themes.cyanine.authorPosition or "top" in settings.themes.cyanine.gitPosition or "top" in settings.themes.cyanine.printPosition) %}
    <div class="f5 pv1 flex justify-between">
        <div class="byline">
            {% if "top" in settings.themes.cyanine.datePosition %}
                <time pubdate datetime="{{ published }}" class="pr2">{{ settings.themes.cyanine.dateIntro }} {{ published|date(settings.themes.cyanine.dateFormat)  }}</time>
            {% endif %}
            {% if "top" in settings.themes.cyanine.authorPosition %}
                <adress class="pr2">{{ settings.themes.cyanine.authorIntro }} {{ metatabs.meta.author|default(settings.author) }}</adress>
            {% endif %}
        </div>
        <div class="funcicons">
            {% if "top" in settings.themes.cyanine.gitPosition %}
                <a class="link" title="edit on github" href="{{ settings.themes.cyanine.gitLink }}{{ item.path }}">{% if settings.themes.cyanine.editIcon %}<svg class="icon baseline icon-pencil"><use xlink:href="#icon-pencil"></use></svg>{% else %}{{ settings.themes.cyanine.editText }}{% endif %}</a>
            {% endif %}
            {% if "top" in settings.themes.cyanine.printPosition %}
                <a class="link" title="open printer dialogue" href="#" onclick="if (window.print) {window.print();}">{% if settings.themes.cyanine.printIcon %}<svg class="icon baseline icon-printer"><use xlink:href="#icon-printer"></use></svg>{% else %}{{ settings.themes.cyanine.printText }}{% endif %}</a>
            {% endif %}
        </div>
    </div>
{% endif %}

And I changed icon-edit to icon-pencil since icon-edit does not exist.
There might be surely a better way to handle this, but for me it does the thing. And you have to adapt these changes to *.bottom as well if you wish to use it.

@trendschau
Copy link
Member

ok, thank you for the contribution, I forgot about this issue and will look into it again

@trendschau
Copy link
Member

@ToastStudios good solution, I implemented it for next release, thank you!

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

No branches or pull requests

4 participants