diff --git a/app/main/routes.py b/app/main/routes.py index fd01e5a6..9935c479 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -28,7 +28,7 @@ def faq(): @login_required def dashboard(): users = [ - u.to_json_serializeable(filter_by_privacy_settings=True, include_avatar_relationship=True) for u + u.to_json_serializeable(filter_by_privacy_settings=True) for u in User.query.filter(User.is_public == True, User.id != current_user.id).all() ] return render_template('main/dashboard.html.j2', title='Dashboard', users=users) diff --git a/app/static/js/RessourceLists/PublicUserList.js b/app/static/js/RessourceLists/PublicUserList.js index f00e145d..f5c93b8b 100644 --- a/app/static/js/RessourceLists/PublicUserList.js +++ b/app/static/js/RessourceLists/PublicUserList.js @@ -47,7 +47,7 @@ class PublicUserList extends RessourceList { return { 'id': user.id, 'member-since': user.member_since, - 'avatar': user.avatar ? `/profile/${user.id}/avatars/${user.avatar.id}` : '/static/images/user_avatar.png', + 'avatar': user.avatar ? `/profile/${user.id}/avatar` : '/static/images/user_avatar.png', 'username': user.username, 'full-name': user.full_name ? user.full_name : '', 'location': user.location ? user.location : '', diff --git a/app/templates/admin/edit_user.html.j2 b/app/templates/admin/edit_user.html.j2 index 13e8a473..c963b7f7 100644 --- a/app/templates/admin/edit_user.html.j2 +++ b/app/templates/admin/edit_user.html.j2 @@ -11,16 +11,16 @@
- {{ edit_general_settings_form.hidden_tag() }} + {{ edit_profile_settings_form.hidden_tag() }}
General settings - {{ wtf.render_field(edit_general_settings_form.username, material_icon='person') }} - {{ wtf.render_field(edit_general_settings_form.email, material_icon='email') }} + {{ wtf.render_field(edit_profile_settings_form.username, material_icon='person') }} + {{ wtf.render_field(edit_profile_settings_form.email, material_icon='email') }}
- {{ wtf.render_field(edit_general_settings_form.submit, material_icon='send') }} + {{ wtf.render_field(edit_profile_settings_form.submit, material_icon='send') }}
diff --git a/app/templates/main/dashboard.html.j2 b/app/templates/main/dashboard.html.j2 index a7d642b7..e296dd85 100644 --- a/app/templates/main/dashboard.html.j2 +++ b/app/templates/main/dashboard.html.j2 @@ -44,24 +44,29 @@

Social

-
-
-
- Other users and groups -

Find other users and follow them to see their corpora and groups.

-
-
+
+
+ Other users and groups +

Find other users and follow them to see their corpora and groups.

+
-
-
-
- Public corpora -

Find public corpora

-
+
+
+ Public corpora +

Find public corpora

+
+ mail +
+
+
+
Title
+

A bunch of text

+
+
{% endblock page_content %} diff --git a/app/templates/main/news.html.j2 b/app/templates/main/news.html.j2 index c374237c..90872657 100644 --- a/app/templates/main/news.html.j2 +++ b/app/templates/main/news.html.j2 @@ -7,10 +7,9 @@

{{ title }}

- +
-
April 2022 update @@ -199,31 +198,44 @@ function mastodonStatusToHtml(status) { return htmlString = ` -
-
- New Actitvity on Mastodon - ${status.content} -
-
- `.trim(); - } - function bisBlogsEntryToHtml(entry) { - return `
-
- Bielefeld University Blogs -
-
+
- ${entry.title['#text']} - ${entry.content['#text']} + New Actitvity on Mastodon + ${status.content}
-
+
+ Mastodon +
`.trim(); } + function bisBlogsEntryToHtml(entry) { + let bisBlogHTMLElement = document.createElement('div'); + bisBlogHTMLElement.classList.add('row'); + bisBlogHTMLElement.innerHTML = ` +
+
+ Bielefeld University Blogs +
+
+
+
+ ${entry.title['#text']} + ${entry.content['#text']} +
+
+
+
+ `.trim(); + let bisBlogImages = bisBlogHTMLElement.querySelectorAll('img'); + bisBlogImages.forEach((img) => { + img.classList.add('responsive-img'); + }); + return bisBlogHTMLElement.outerHTML; + } let aggregatedNewsElement = document.querySelector('#aggregated-news'); aggregateNews().then((aggregatedNews) => { diff --git a/app/templates/profile/profile.html.j2 b/app/templates/profile/profile.html.j2 index c9abac4b..37077ca3 100644 --- a/app/templates/profile/profile.html.j2 +++ b/app/templates/profile/profile.html.j2 @@ -22,7 +22,7 @@
-

{{ user.username }}

+

{{ user.username }}

{% if user.show_last_seen %} @@ -82,8 +82,8 @@ {% endif %}


- {% if current_user.is_authenticated and current_user.id == user.id %} - Edit profile + {% if current_user.is_authenticated and current_user.hashid == user.id %} + Edit profile {% endif %}
@@ -115,8 +115,7 @@ {{ super() }}