plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Improve the alignment of the navigation bar links

Open simransia opened this issue 3 years ago • 6 comments

The "store" and the "donate" buttons on the navbar are not looking good as they are having unequal widths and are not aligned well on the navbar. Along with that, the "About us" link on the navigation bar is aligned more towards the right which is also not looking good. Secondly, it should be changed from "About us" to "About Us"

So, I want to make the store and donate buttons align to the right and also want to make their widths equal. And I also want to make the margin-left of the "About us" link equal to the margin-left of other navigation links.

BEFORE:

Screenshot (122)

AFTER:

Screenshot (124)

Video for showing responsiveness:

https://user-images.githubusercontent.com/88017902/163152820-f6f36645-8038-475f-b98c-714c0bc623ff.mp4

simransia avatar Apr 13 '22 09:04 simransia

Hello @TildaDares , should I work on this issue and make a pull request?

Please let me know. Thank You!

simransia avatar Apr 13 '22 10:04 simransia

Hmmm I’m not sure 🤔. I like the way all of the nav links related to the public Lab community and the content related to the user are separate.

TildaDares avatar Apr 13 '22 11:04 TildaDares

Yes @TildaDares, I can understand. But I want you to know that I wish to make very few adjustments in the code. You can view the modifications which I want to make by looking at the code below:

Modification 1:

Location: app/views/layouts/_header.html.erb

@@ -79,7 +79,7 @@
           </div>
         </li>
 
-        <li class="nav-item dropdown" style="min-width:80px;">
+        <li class="nav-item dropdown" style="min-width:80px; margin-left:-25px;">
           <div class="nav-link" data-toggle="dropdown" onclick="location.href='#'">
             <!-- <a > -->
             <%= t('layout._header.about.about_title') %>
              <!-- </a> -->
            </div>
         </li>
+     </ul>
 
-        <li class="nav-item d-sm-none d-lg-inline" style="padding:0 10px;">
+     <ul class="navbar-nav ml-auto">
+        <li class="nav-item d-sm-none d-lg-inline" style="padding:0 10px; width:90px;">
           <a class="nav-link btn btn-outline-secondary" target="_blank" href="//store.publiclab.org"><%= t('layout._header.store') %></
a>
         </li>
-        <li class="nav-item d-sm-none d-lg-inline" style="padding:0 10px;">
+        <li class="nav-item d-sm-none d-lg-inline" style="padding:0 10px; width:90px;">
           <a class="nav-link btn btn-outline-secondary" href="/donate"><%= t('layout._header.donate') %></a>
         </li>
 
         <!-- end navbar feature -->

      </ul>

Modification 2:

Location: config/locales/en.yml

@@ -725,7 +725,7 @@ en:
         spectral_workbench: "Spectral Workbench"
         code_community: "Code Community"
       about:
-        about_title: "About us"
+        about_title: "About Us"
         stories: "Stories"
         blog: "Blog"
         about_public_lab: "About Public Lab"

I think this will not break the code flow and all the features will still work as before.

simransia avatar Apr 13 '22 13:04 simransia

@simransia I’m not worried about code breaking. I just don’t see how Store and Donate relate to Dashboard.

TildaDares avatar Apr 13 '22 13:04 TildaDares

Ok @TildaDares , I got it. Then I will not align the Store and donate buttons to the right, which will keep the public lab's community links and the content related to the user separated. I will only make the width of both the buttons equal and modify the "About us" link's margin-left and spelling.

Then the navigation bar will look like this: Screenshot (127)

Can I now create a pull request after applying the mentioned changes?

simransia avatar Apr 13 '22 14:04 simransia

Sounds like a great idea @simransia. Thanks!

TildaDares avatar Apr 13 '22 14:04 TildaDares

solved in https://github.com/publiclab/plots2/pull/11053

cesswairimu avatar Sep 01 '22 18:09 cesswairimu