Browse Source

Revert "Move user bio to a collapsable <details> in main"

This reverts commit 2942a8f9d0.
merge-requests/64/head
Deimos 6 years ago
parent
commit
0fe509ad2b
  1. 33
      tildes/scss/modules/_user.scss
  2. 1
      tildes/scss/styles.scss
  3. 9
      tildes/scss/themes/_theme_base.scss
  4. 14
      tildes/tildes/templates/user.jinja2

33
tildes/scss/modules/_user.scss

@ -1,33 +0,0 @@
// Copyright (c) 2019 Tildes contributors <code@tildes.net>
// SPDX-License-Identifier: AGPL-3.0-or-later
.user-bio {
@extend %links-text;
@extend %lists-text;
border: 1px solid;
padding: 0.4rem;
margin-bottom: 1rem;
font-size: 0.6rem;
summary::after {
font-size: 0.6rem;
font-style: italic;
content: "Hide bio";
display: none;
}
&[open] {
font-size: 0.8rem;
summary {
&::after {
display: inline;
}
span {
display: none;
}
}
}
}

1
tildes/scss/styles.scss

@ -33,7 +33,6 @@
@import 'modules/time'; @import 'modules/time';
@import 'modules/toast'; @import 'modules/toast';
@import 'modules/topic'; @import 'modules/topic';
@import 'modules/user';
// Note: if you add a new theme, you may also want to add a new theme-color // Note: if you add a new theme, you may also want to add a new theme-color
// meta tag inside the base.jinja2 template, so mobile browsers can match // meta tag inside the base.jinja2 template, so mobile browsers can match

9
tildes/scss/themes/_theme_base.scss

@ -470,15 +470,6 @@
} }
} }
.user-bio {
border-color: map-get($theme, "border");
background-color: map-get($theme, "background-secondary");
&[open] {
color: map-get($theme, "foreground-highlight");
}
}
.is-comment-deleted, .is-comment-removed { .is-comment-deleted, .is-comment-removed {
color: map-get($theme, "foreground-secondary"); color: map-get($theme, "foreground-secondary");
} }

14
tildes/tildes/templates/user.jinja2

@ -48,13 +48,6 @@
</div> </div>
{% endif %} {% endif %}
{% if user.bio_rendered_html %}
<details class="user-bio">
<summary><span>View {{ user.username }}'s bio</span></summary>
{{ user.bio_rendered_html|safe }}
</details>
{% endif %}
{% if posts %} {% if posts %}
{% if request.has_permission("view_history", user) and posts.has_prev_page %} {% if request.has_permission("view_history", user) and posts.has_prev_page %}
<div class="pagination"> <div class="pagination">
@ -127,6 +120,13 @@
<dl> <dl>
<dt>Registered</dt> <dt>Registered</dt>
<dd>{{ user.created_time.strftime('%B %-d, %Y') }}</dd> <dd>{{ user.created_time.strftime('%B %-d, %Y') }}</dd>
{% if user.bio_rendered_html %}
<div class="user-bio">
<dt>Bio</dt>
<dd>{{ user.bio_rendered_html|safe }}</dd>
</div>
{% endif %}
</dl> </dl>
{% if request.has_permission('message', user) %} {% if request.has_permission('message', user) %}

Loading…
Cancel
Save