Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved style for userlink block #314

Closed
saymoncoppi opened this issue Aug 31, 2023 · 5 comments
Closed

Improved style for userlink block #314

saymoncoppi opened this issue Aug 31, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@saymoncoppi
Copy link

saymoncoppi commented Aug 31, 2023

Hello @fabiocaccamo since I was trying to improve the appearance of userlink block I realized that we could also adjust the CSS of language-selector for a better experience on different media sizes. Related issue: 246

I made these changes to keep elements together no matter the media size.

Using Notebook (1900x1400):
image

Simulating an iPhone:
image

It is not finished bc the goal was just to share a contribution to the project. Check the results and take a look at CSS styles I made.
Course a CSS expert could be better than this, but was enough to get the benefits of the UI improvements.
Let me know if I can help with something...

My files, pls don't judge lol

.../templates/admin/base_site.html

{% extends "admin/base_site.html" %}
{% load i18n %}
{% load static %}
{% block extrastyle %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static 'css/extra_base_site.css' %}"    />
{%endblock%}

...static;css/extra_base_site.css

#logout-form button {
  color: #747474;
}

#logout-form button:hover {
  color: #333333;
}

.admin-interface .language-chooser {
  display: inline-block;
  position: unset !important;
}

.language-chooser-select-form select {
  /* display: block; */
  width: 65px;
  margin-top: -9px;
  margin-left: -15px;
  font-size: 11px;
  font-weight: 300;
  outline: none;
  border: 0px;
  border-style: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  color: #747474;
}

.language-chooser-select-form::before {
  content: '/';
  font-size: 11px;
  font-weight: 300;
  left: -17px;
  color: #747474;
  display: inline-block;
  position: absolute;
}

.language-chooser-select-form::after {
  content: '';
  border-width: 5px;
  border-style: solid;
  border-color: transparent;
  border-top-color: #ccc;
  display: inline-block;
  border-radius: 2px;
  position: absolute;
  right: -10px;
  bottom: 10px;
}


.language-chooser-select-form select:hover {
  color: #333333;
}

@media (max-width: 768px),
(max-width: 1024px) {
  .language-chooser-select-form select {
    margin-top: 0px !important;
    margin-left: 0px !important;
  }

  .language-chooser-select-form::before {
    left: -1px !important;
    top: 5px !important;
  }
}

.language-chooser-select-form select option {
  margin-top: 30px !important;
  display: inline-block !important;
}

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@fabiocaccamo
Copy link
Owner

Hi @saymoncoppi
I don't understand what this style does, could you share two screenshots before/after please?

@saymoncoppi
Copy link
Author

Using the current CSS version

before:

2023-09-04.08.29.10.mp4

after:

2023-09-04.08.34.27.mp4

What I did?

I switched the position attribute to "unset".
So the element could follow the others and keep UI doesn't matter the resolution or window size.

.admin-interface .language-chooser {
  display: inline-block;
  position: unset !important;
}

Check the behavior when I switched from the original CSS to mine:

2023-09-04.08.43.59.mp4

Let me know if you realize the difference.
See you!

@fabiocaccamo
Copy link
Owner

@saymoncoppi I'm sorry, I didn't understand before, now I got the point.

Thank you for the CSS, I will adjust it a bit and add an checkbox option for using it or not.

@fabiocaccamo
Copy link
Owner

@saymoncoppi testing the language control appearance on Firefox / Chrome / Safari on MacOS, here how I see the supported controls:

default select control

Screenshot 2023-11-01 at 12 22 32

minimal select control

Screenshot 2023-11-01 at 12 23 21

@fabiocaccamo fabiocaccamo closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2023
@saymoncoppi
Copy link
Author

saymoncoppi commented Nov 1, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

2 participants