diff --git a/core/static/user/user_godfathers.scss b/core/static/user/user_godfathers.scss new file mode 100644 index 00000000..23f71741 --- /dev/null +++ b/core/static/user/user_godfathers.scss @@ -0,0 +1,104 @@ +.container { + display: flex; + flex-direction: column; + gap: 10px; + padding: 10px; + box-sizing: border-box; + + > form { + margin: 0; + } +} + +.users { + display: flex; + flex-direction: row; + flex-wrap: wrap; + list-style-type: none; + margin: 0; + gap: 10px +} + +.users-card { + display: flex; + flex-direction: column; + gap: 10px; + width: 150px; + padding: 10px; + background-color: rgba(0, 0, 0, .05); + border-radius: 10px; + + @media (max-width: 375px) { + width: 100%; + } + + // Django moment + > div.mini_profile_link { + position: relative; + + > a { + &.mini_profile_link { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 10px; + + @media (max-width: 375px) { + flex-direction: row; + justify-content: flex-start; + align-items: flex-start; + } + + > span { + height: 150px; + width: 100%; + + @media (max-width: 375px) { + height: 80px; + width: 80px; + } + + > img { + width: 100%; + max-width: 100%; + max-height: 100%; + height: auto; + object-fit: contain; + + @media (max-width: 375px) { + max-width: 100%; + max-height: 80px; + } + } + } + + >em { + text-align: center; + + @media (max-width: 375px) { + margin-top: 10px; + } + } + } + + &:last-of-type { + margin-top: 10px; + display: block; + text-align: center; + color: orangered; + + @media (max-width: 375px) { + position: absolute; + bottom: 0%; + right: 0; + } + } + } + } + + // Django moment + > a.mini_profile_link { + display: none; + } +} \ No newline at end of file diff --git a/core/templates/core/user_godfathers.jinja b/core/templates/core/user_godfathers.jinja index 9a01be43..73f8af23 100644 --- a/core/templates/core/user_godfathers.jinja +++ b/core/templates/core/user_godfathers.jinja @@ -1,45 +1,68 @@ {% extends "core/base.jinja" %} {% from "core/macros.jinja" import user_link_with_pict, delete_godfather %} +{%- block additional_css -%} + +{%- endblock -%} + {% block title %} {% trans user_name=profile.get_display_name() %}{{ user_name }}'s family{% endtrans %} {% endblock %} {% block content %} -
- {% trans %}Show family picture{% endtrans %}
+- {% trans %}Show ancestors tree{% endtrans %}
+ + + {% trans %}Show ancestors tree{% endtrans %} + {% else %}{% trans %}No godfathers / godmothers{% endtrans %} {% endif %} + + {% if profile.godchildren.exists() %}
- {% trans %}Show descent tree{% endtrans %}
+ + + {% trans %}Show descent tree{% endtrans %} + {% else %}{% trans %}No godchildren{% endtrans %} {% endif %} - {% if profile == user or user.is_root %} + + {% if profile == user or user.is_root %}