Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed inyoka_theme_ubuntuusers/static/img/interwiki/bug.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed inyoka_theme_ubuntuusers/static/img/interwiki/isbn.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
72 changes: 36 additions & 36 deletions inyoka_theme_ubuntuusers/static/style/markup.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,18 @@
a.interwiki {
background-repeat: no-repeat;
}
a.user, a.team, a.search {
/* these links are hardcoded into the markup-parser
and not configurable via the linkmap */
a.user, a.team, a.search, a.ikhaya, a.paste {
background-repeat: no-repeat;
padding-left: 16px;
}

a.paste {
background-image: url(../img/favicon.ico);
}
a.ikhaya {
background-image: url(../img/icons/small/ikhaya.png);
}
a.user {
background-image: url(../img/interwiki/user.png);
}
Expand All @@ -31,46 +38,39 @@ a.team {
a.search {
background-image: url(../img/interwiki/search.png);
}

a.interwiki-bug {
background-image: url(../img/interwiki/bug.png);
padding-left: 20px;
}
a.interwiki-getdeb {
background-image: url(../img/interwiki/getdeb.png);
padding-left: 20px;
}
a.interwiki-googlecode {
background-image: url(../img/interwiki/googlecode.png);
padding-left: 20px;
}
a.interwiki-isbn {
background-image: url(../img/interwiki/isbn.png);
padding-left: 20px;
a[href^="https://wiki.ubuntuusers.de/"] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I question, if hardcoding domains is good.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case the line is kind of a fallback.

In case the user uses the [:wiki:] syntax, the usual css styling applies - or can we apply (we currently don't), with no hardcoded domain.
In case the user uses the generic link syntax (and "hardcodes" the domain), we can still apply the styling by hardcoding the domain too.

background-image: url(../img/icons/small/wiki.png);
background-repeat: no-repeat;
padding-left: 18px;
}
a.interwiki-launchpad {
background-image: url(../img/interwiki/launchpad.png);
padding-left: 20px;
a[href^="https://forum.ubuntuusers.de/post/"] {
background-image: url(../img/icon_minipost.gif);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO this will display the minipost-gif two times beneath a forum post, as there the current minipost-icon is includeded via <img> https://github.com/inyokaproject/theme-ubuntuusers/blob/staging/inyoka_theme_ubuntuusers/templates/forum/topic.html#L288

I dont know if :not(.postinfo) a[href^=…] or something like this could help.

(For interwikilinks this should be working, as they also use a background-image. Nevertheless, it could confuse users, if there exists also an interwikilink for the same url, but with a different icon.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO this will display the minipost-gif two times beneath a forum post, as there the current minipost-icon is includeded via <img> https://github.com/inyokaproject/theme-ubuntuusers/blob/staging/inyoka_theme_ubuntuusers/templates/forum/topic.html#L288

True

I dont know if :not(.postinfo) a[href^=…] or something like this could help.

AFAIK (with :not) you can't select (an attribute of) a parent. We could just remove the img and permalink the full date (which is better usability IMO)

(For interwikilinks this should be working, as they also use a background-image. Nevertheless, it could confuse users, if there exists also an interwikilink for the same url, but with a different icon.)

background-repeat: no-repeat;
padding-left: 12px;
}
a.interwiki-lpuser {
background-image: url(../img/interwiki/lpuser.png);
padding-left: 20px;
a[href^="https://forum.ubuntuusers.de/topic/"] {
background-image: url(../img/forum/topic.png);
background-repeat: no-repeat;
background-size: 14px;
padding-left: 16px;
}
a.interwiki-sourceforge {
background-image: url(../img/interwiki/sourceforge.png);
padding-left: 20px;
a[href^="https://forum.ubuntuusers.de/forum/"] {
background-image: url(../img/icons/small/forum.png);
background-repeat: no-repeat;
padding-left: 16px;
}
a.interwiki-ubuntu {
background-image: url(../img/interwiki/ubuntu.png);
padding-left: 20px;
a[href$=".pdf"]:before {
content: '📄 ';
}
a.interwiki-wikipedia {
background-image: url(../img/interwiki/wikipedia.png);
padding-left: 20px;
a[href^="https://github.com"] {
background-image: url(../img/icons/small/github.png);
background-repeat: no-repeat;
padding-left: 16px;
}
a.interwiki-wikipedia_en {
background-image: url(../img/interwiki/wikipedia_en.png);
padding-left: 20px;
a[href^="http://github.com"] {
background-image: url(../img/icons/small/github.png);
background-repeat: no-repeat;
padding-left: 16px;
}

#page table {
Expand Down
2 changes: 2 additions & 0 deletions inyoka_theme_ubuntuusers/templates/overall.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<link rel="stylesheet" type="text/css" href="{{ href('static', 'style', 'special_day', special_day_css, v=INYOKA_VERSION) }}" />
{% endif %}

<link rel="stylesheet" type="text/css" href="{{ href('media', 'linkmap', linkmap_css) }}" />

{% for title, url in feeds %}
<link rel="alternate" href="{{ url|e }}" title="{{ title|e }}" type="application/atom+xml" />
{% endfor %}
Expand Down
61 changes: 61 additions & 0 deletions inyoka_theme_ubuntuusers/templates/portal/linkmap.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{#
portal/linkmap.html
~~~~~~~~~~~~~~~~~~~

This page administrates the link map for interwiki link shortcuts.

:copyright: (c) 2007-2019 by the Inyoka Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
#}
{% extends 'portal/overall.html' %}

{% set BREADCRUMBS = [(_('Link Map'), href('portal', 'linkmap'))] + BREADCRUMBS|d([]) %}

{% block content %}
<h3>{% trans %}Link Map{% endtrans %}</h3>
<p>
{% trans %}This Page lets you edit, delete and add external link shortcuts. The icons should be of the size 14px x 14px.{% endtrans %}
</p>

<form enctype="multipart/form-data" method="post" action="">
{{ csrf_token() }}
{{ formset.management_form }}
{{ formset.non_form_errors() }}

<table>
<thead>
<tr>
{% for field in formset|first %}
{% if not field.is_hidden %}
<th>
{{ field.label }}
</th>
{% endif %}
{% endfor %}
</tr>
</thead>

<tbody>
{% for form in formset %}
{{ form.non_field_errors() }}
<tr>
{% for field in form %}
{% if not field.is_hidden %}
<td>
{{ field.errors }}
{% endif %}

{{ field }}

{% if not field.is_hidden %}
</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>

<input type="submit" value="{% trans %}Submit{% endtrans %}"/>
</form>
{% endblock %}
5 changes: 4 additions & 1 deletion inyoka_theme_ubuntuusers/templates/portal/overall.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ <h3 class="navi_planet">{{ feed_button(href('portal', 'feeds', 'planet')) }}<a h
<li><a href="{{ href('planet', 'suggest') }}">{% trans %}Suggest a blog{% endtrans %}</a></li>
</ul>
{%- endif %}
{%- if USER.has_perm('portal.change_staticpage') or USER.has_perm('portal.change_staticfile') or USER.has_perm('portal.change_storage') %}
{%- if USER.has_perm('portal.change_staticpage') or USER.has_perm('portal.change_staticfile') or USER.has_perm('portal.change_storage') or USER.has_perm('portal.change_linkmap') %}
<h3 class="navi_config">{% trans %}Configuration{% endtrans %}</h3>
<ul>
{%- if USER.has_perm('portal.change_storage') %}
Expand All @@ -94,6 +94,9 @@ <h3 class="navi_config">{% trans %}Configuration{% endtrans %}</h3>
{%- if USER.has_perm('portal.change_staticpage') %}
<li><a href="{{ href('portal', 'styles') }}">{% trans %}Stylesheets{% endtrans %}</a></li>
{%- endif %}
{% if USER.has_perm('portal.change_linkmap') %}
<li><a href="{{ href('portal', 'linkmap') }}">{% trans %}Linkmap{% endtrans %}</a></li>
{%- endif %}
{%- if USER.has_perm('portal.change_staticpage') %}
<li><a href="{{ href('portal', 'pages') }}">{% trans %}Static pages{% endtrans %}</a></li>
{% endif %}
Expand Down
28 changes: 0 additions & 28 deletions inyoka_theme_ubuntuusers/templates/portal/styles.html

This file was deleted.