Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings: Fix alignment issues for non-English languages.

sayamsamal7fcac3288b13
diff --git a/static/styles/image_upload_widget.css b/static/styles/image_upload_widget.css
index 1c89a4a331e..8d7c8d5c2c8 100644
--- a/static/styles/image_upload_widget.css
+++ b/static/styles/image_upload_widget.css
@@ -24,13 +24,26 @@
border-radius: 5px;
}
+ .image_upload_button {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ text-align: center;
+ justify-content: center;
+ border-radius: 5px;
+ box-shadow: 0 0 10px hsla(0, 0%, 0%, 0.1);
+ z-index: 99;
+ }
+
.image-delete-button {
background: none;
border: none;
cursor: pointer;
color: hsl(0, 0%, 75%);
opacity: 0;
- padding: 3px 0;
+ padding: 0;
position: absolute;
font-size: 2rem;
top: 10px;
@@ -39,6 +52,14 @@
line-height: 20px;
}
+ .image-delete-text,
+ .image-upload-text,
+ .image-disabled-text {
+ box-sizing: border-box;
+ width: 100%;
+ padding: 0 10px;
+ }
+
.image-delete-button:focus,
.image-delete-button:hover {
color: hsl(0, 0%, 100%);
@@ -121,19 +142,6 @@
/* CSS related to settings page user avatar upload widget only */
#user-avatar-upload-widget {
- .image_upload_button {
- position: absolute;
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- text-align: center;
- justify-content: center;
- border-radius: 5px;
- box-shadow: 0 0 10px hsla(0, 0%, 0%, 0.1);
- z-index: 99;
- }
-
.image-disabled-text {
color: hsl(0, 0%, 85%);
cursor: not-allowed;
@@ -147,14 +155,6 @@
font-size: 3rem;
}
- .image-delete-text,
- .image-upload-text,
- .image-disabled-text {
- box-sizing: border-box;
- width: 100%;
- padding: 0 10px;
- }
-
.image_upload_spinner {
top: 40%;
right: 40%;
@@ -190,16 +190,6 @@
border-radius: 5px;
box-shadow: 0 0 10px hsla(0, 0%, 0%, 0.1);
- .image-delete-text {
- top: 40px;
- right: 18px;
- }
-
- .image-upload-text {
- top: 40px;
- right: 18px;
- }
-
.image_upload_spinner {
width: 40px;
height: 40px;
@@ -219,13 +209,6 @@
width: 220px;
height: 55px;
text-align: center;
- margin: 0 80px 0 20px;
-
- .image-upload-text,
- .image-delete-text {
- top: 17px;
- right: 80px;
- }
.upload-spinner-background {
left: 0;
@@ -237,6 +220,11 @@
top: 5%;
right: 40%;
}
+
+ .image-delete-button {
+ top: 5px;
+ right: 5px;
+ }
}
#realm-day-logo-upload-widget {
@@ -248,9 +236,15 @@
}
.realm-logo-block {
- display: inline-block;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ padding: 0 20px;
}
-.realm-logo-title {
- padding-left: 30%;
+.realm-logo-group {
+ display: flex;
+ justify-content: space-around;
+ flex-wrap: wrap;
}
diff --git a/static/templates/settings/organization_profile_admin.hbs b/static/templates/settings/organization_profile_admin.hbs
index e3149912ed3..1f38de4977d 100644
--- a/static/templates/settings/organization_profile_admin.hbs
+++ b/static/templates/settings/organization_profile_admin.hbs
@@ -47,23 +47,25 @@
</div>
<p>{{t "A wide image for the upper left corner of the app." }}</p>
- <div class="realm-logo-block realm-logo-section">
- <h5 class="realm-logo-title">{{t 'Day logo' }}</h5>
- {{> image_upload_widget
- widget = "realm-day-logo"
- upload_text = (t "Upload logo")
- delete_text = (t "Delete logo")
- is_editable_by_current_user = user_can_change_logo
- image = realm_logo_url }}
- </div>
- <div class="realm-logo-block realm-logo-section">
- <h5 class="realm-logo-title">{{t 'Night logo' }}</h5>
- {{> image_upload_widget
- widget = "realm-night-logo"
- upload_text = (t "Upload logo")
- delete_text = (t "Delete logo")
- is_editable_by_current_user = user_can_change_logo
- image = realm_night_logo_url }}
+ <div class="realm-logo-group">
+ <div class="realm-logo-block realm-logo-section">
+ <h5 class="realm-logo-title">{{t 'Day logo' }}</h5>
+ {{> image_upload_widget
+ widget = "realm-day-logo"
+ upload_text = (t "Upload logo")
+ delete_text = (t "Delete logo")
+ is_editable_by_current_user = user_can_change_logo
+ image = realm_logo_url }}
+ </div>
+ <div class="realm-logo-block realm-logo-section">
+ <h5 class="realm-logo-title">{{t 'Night logo' }}</h5>
+ {{> image_upload_widget
+ widget = "realm-night-logo"
+ upload_text = (t "Upload logo")
+ delete_text = (t "Delete logo")
+ is_editable_by_current_user = user_can_change_logo
+ image = realm_night_logo_url }}
+ </div>
</div>
<h3 class="light">
{{t "Deactivate organization" }}