Skip to content

Commit

Permalink
Merge pull request #279 from ontoportal-lirmm/bug/fix-responsiveness-…
Browse files Browse the repository at this point in the history
…issues

Bug: Fix responsiveness issues
  • Loading branch information
syphax-bouazzouni committed Sep 5, 2023
1 parent e675042 commit 4a77c29
Show file tree
Hide file tree
Showing 5 changed files with 317 additions and 15 deletions.
52 changes: 51 additions & 1 deletion app/assets/stylesheets/footer.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
.legal-text {
font-size: 0.9rem;
}
}
footer{
width: 1248px;
background-color: var(--primary-color);
padding: 40px 50px;
}

.footer-header{
display: flex;
justify-content: space-between;
margin-bottom: 40px;
}
.footer-logo{
color: white;
display: flex;
align-items: center;
}
.footer-logo p{
margin-bottom: 0;
font-weight: 700;
font-size: 18px;
margin-left: 20px;
}
.footer-social-media-links a{
margin-left: 20px;
}
.footer-nav-links{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.footer-nav-links div h2{
font-size: 21px;
font-weight: 700;
color: white;
margin-bottom: 10px;
}
.footer-nav-links div div{
display:flex;
flex-direction: column;
}
.footer-nav-links div a{
font-size: 16px;
font-weight: 400;
color: white !important;
margin-bottom: 10px;
opacity: 60%;
}
.footer-nav-links div a:hover{
opacity: 100%;
}
57 changes: 49 additions & 8 deletions app/assets/stylesheets/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ i.fa.fa-caret-square-o-down {
.home-header-title{
position: absolute;
z-index: 4;
width: 481px;
width: 500px;
margin-right: 664px;
margin-top: 123px;
opacity: 0;
transform: translateY(-100%);
animation: slide-and-fade 1s ease forwards;
}
.home-header-title h4{
font-size: 40px;
font-size: 38px;
font-weight: 800;
color: white;
}
Expand Down Expand Up @@ -129,8 +129,9 @@ i.fa.fa-caret-square-o-down {
align-items: center;
}
.home-section{
padding: 0 50px;
margin-top: 70px;
width: 1138px;
width: 1248px;
}
.home-section > h4{
font-size: 20px;
Expand All @@ -147,7 +148,6 @@ i.fa.fa-caret-square-o-down {
}
.home-statistics{
display: flex;
justify-content: space-between;
}
.home-statistics-container{
border-radius: 8px;
Expand All @@ -158,7 +158,7 @@ i.fa.fa-caret-square-o-down {
.home-statistics-container > div {
display: flex;
align-items: center;

flex-wrap: wrap;
}
.home-agroportal-figures{
margin-bottom: 20px;
Expand All @@ -173,7 +173,10 @@ i.fa.fa-caret-square-o-down {
.home-statistics-item{
display: flex;
align-items: center;


}
.home-statistics> :not(:last-child){
margin-right: 49px;
}
.home-statistics-item hr{
height: 83px;
Expand Down Expand Up @@ -314,10 +317,10 @@ i.fa.fa-caret-square-o-down {
justify-content: space-between;
}
.home-sub-section-left{
width: 533px;
width: 550px;
}
.home-sub-section-right{
width: 533px;
width: 550px;
}
.home-sub-section-left h4, .home-sub-section-right h4{
font-size: 20px;
Expand Down Expand Up @@ -456,5 +459,43 @@ i.fa.fa-caret-square-o-down {
to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1300px) {
.home-section{
width: 100%;
}
.home-section-sub-sections-container{
flex-direction: column;
}
.home-random-bubbles{
display: none;
}
.home-header-title{

margin:128px 50px;
width: 500px;

opacity: 0;
transform: translateY(-100%);
animation: slide-and-fade 1s ease forwards;
}
.home-header-title-container{
justify-content: start;
}
.home-sub-section-left {
width: 100%;
}

.home-sub-section-right {
width: 100%;
margin-top: 50px;
}
.home-fair-scores div{
padding: 0 10%;
}
.home-fair-scores{
height: unset;
}
}



190 changes: 190 additions & 0 deletions app/assets/stylesheets/nav_bar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
.nav-container{
display: flex;
justify-content: center;
background-color: var(--primary-color);
}
.top-nav{
display: flex !important;
background-color: var(--primary-color);
align-items: center;
height: 62px;
padding: 8px 42px;
width: 1248px;
}
.nav-responsiveness-container{
display: flex;
justify-content: space-between;
}
.nav-logo{
display: flex;
align-items: center;
}
.nav-logo p{
margin-left: 10px;
color: white;
font-size: 16px;
font-weight: 700;
margin-bottom: 0;
}
.nav-items{
display: flex;
justify-content: space-between;
align-items:center;
width: 1020px;
}
.nav-items > ul {
display: flex;
list-style: none;
margin-bottom: 0;
padding: 0;
}

.nav-items > ul > li {
margin-left: 20px;
}

.nav-items > ul > li > a {
color: white !important;
font-size: 15px;
opacity: 60%;
font-weight: 300;
transition: opacity 0.2s ease-in-out;
}
.nav-items > ul > li > a:hover{
opacity: 100%;
}
.nav-items > ul > li > a.active{
opacity: 100%;
font-weight: 500;
}

.nav-search-container {
width: 50% ;
}
.nav-search-container div > input {
height: 33px;
width: 100%;
outline: none;
opacity: 60%;
border: 1px solid white;
background-color: var(--primary-color);
color: white;
border-radius: 5px;
font-size: 14px;
padding: 0 10px;
}
.nav-search-container div > input:focus{
opacity: 100%;
border-radius: 5px 5px 0 0;
}
.nav-search-container div > input::placeholder{
color: white;
opacity: 60%;
}
.nav-search-container div > input::-ms-input-placeholder{
color: white;
opacity: 60%;
}

.nav-search-container #home-search-drop-down{
position: absolute;
z-index: 9999;
font-size: 12px !important;
width: 228px !important;
}

.nav-language{
background-color: transparent;
width: 47px;
color: white;
border: none;
outline: none;
cursor: pointer;

}
.nav-language option{
background-color: white;
color: black;
}
.nav-items .nav-a{
padding: 3px 34px;
border: 1px solid white;
border-radius: 5px;
color: white !important;
transition: background-color 0.2s ease-in-out;
}
.nav-items .nav-a:hover{
background-color: rgba(255, 255, 255, 0.1);
}

.top-nav .menu-btn i{
color: #fff;
font-size: 22px;
cursor: pointer;
display: none;
}
.top-nav input[type="checkbox"]{
display: none;
}

.top-nav-nav-link{
color: white !important;
padding: 0 !important;
}


@media (max-width: 1300px){
.top-nav .menu-btn i{
display: block;
}
#nav-menu:checked ~ .menu-btn i:before{
content: "\f00d";
}
.nav-items{
display: none;
}
.menu-btn{
position: absolute;
right: 40px;
}
.right-nav-items{
flex-direction: column;
align-items: baseline !important;
}
.nav-search-container .nav-input{
margin-bottom: 0 !important;

}

}
.top-nav.show-responsive {
display: block !important;
background-color: var(--primary-color);
height: unset;
}

.top-nav-ul.show-responsive {
display: block;
}

.nav-items.show-responsive {
flex-direction: column;
width: unset;
display: flex;
align-items: flex-start;
}

.show-responsive {
margin: 15px 0 !important;
}

.supportMenuDropdownLink.show-responsive {
margin-bottom: 15px;
}

.right-nav-items{
display: flex;
align-items: center;
justify-content: space-between;
width: 50%
}
4 changes: 2 additions & 2 deletions app/views/home/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
upload ontology
.home-section
%h4
= portal_name+" services"
Recommender and annotator
%hr.home-section-line/
.home-card
%form{action: "/annotator_recommender_form", method: "post"}
Expand Down Expand Up @@ -109,7 +109,7 @@
%h4 Twitter news
%hr.home-section-line
.home-card.home-twitter-news
%a.twitter-timeline{"data-height" => "349", "data-width" => "533", :href => "https://twitter.com/lagroportal?ref_src=twsrc%5Etfw"} Tweets by lagroportal
%a.twitter-timeline{"data-height" => "349", :href => "https://twitter.com/lagroportal?ref_src=twsrc%5Etfw"} Tweets by lagroportal
%script{:async => "", :charset => "utf-8", :src => "https://platform.twitter.com/widgets.js"}

.home-section
Expand Down
Loading

0 comments on commit 4a77c29

Please sign in to comment.