Skip to content

Commit

Permalink
Refactor home page layout (#6307) (#6321)
Browse files Browse the repository at this point in the history
* Refactor home page layout



* Remove hover from last link



---------


(cherry picked from commit 72c0ed1)

Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 3781eea commit 6658167
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion _includes/banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p class="banner-text-description">Learn to use OpenSearch, the highly scalable and extensible open-source software suite for search, analytics, observability, and other data-intensive applications.</p>
</div>
<div>
<button class="btn-contribute"><span>Contribute<svg width="20" viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></span></button>
<button id="contribute" class="btn-contribute"><span>Contribute<svg width="20" viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></span></button>
</div>
</header>
</section>
8 changes: 4 additions & 4 deletions _includes/cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@
<a href="{{site.url}}{{site.baseurl}}/about/" class='card-link'></a>
<p class="heading">OpenSearch and OpenSearch Dashboards</p>
<p class="description">Learn how to power up your search</p>
<button class="last-link">Documentation &#x2192;</button>
<p class="last-link">Documentation &#x2192;</p>
</div>


<div class="card">
<a href="http://opensearch.org/docs/latest/data-prepper/" class='card-link'></a>
<p class="heading">Data Prepper</p>
<p class="description">Prepare your data for OpenSearch</p>
<button class="last-link" >Documentation &#x2192;</button>
<p class="last-link" >Documentation &#x2192;</p>
</div>

<div class="card">
<a href="http://opensearch.org/docs/latest/clients/" class='card-link'></a>
<p class="heading">Clients</p>
<p class="description">OpenSearch in your programming language</p>
<button class="last-link">Documentation &#x2192;</button>
<p class="last-link">Documentation &#x2192;</p>
</div>


<div class="card">
<a href="http://opensearch.org/docs/latest/benchmark/" class='card-link'></a>
<p class="heading">Benchmark</p>
<p class="description">Track OpenSearch performance</p>
<button class="last-link">Documentation &#x2192;</button>
<p class="last-link">Documentation &#x2192;</p>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@

{% include footer.html %}
<script src="{{ '/assets/js/search.js' | relative_url }}"></script>
<script src="{{ '/assets/js/listener.js' | relative_url }}"></script>
<script src="{{ '/assets/js/home-listener.js' | relative_url }}"></script>
</body>
</html>
7 changes: 3 additions & 4 deletions _sass/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
color: $blue-vibrant-300;
}
> .last-link {
transform: translateY(-1px);
text-decoration: underline;
text-underline-offset: 3px;
}
Expand Down Expand Up @@ -145,7 +144,7 @@
}

.banner-text-header {
font-size: 2.3rem;
font-size: 2.1rem;
font-family: "Open Sans";
font-weight: 300;
@include mq(md) {
Expand All @@ -154,12 +153,12 @@
}

.banner-text-description {
font-size: 1.3rem;
font-size: 1rem;
font-weight: 700;
font-style: normal;
line-height: 2.25rem;
@include mq(md) {
font-size: 1rem;
font-size: 1.3rem;
}
}

Expand Down
5 changes: 5 additions & 0 deletions assets/js/home-listener.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const contributeButton = document.getElementById('contribute');

contributeButton.addEventListener('click', function(event) {
window.open('https://github.com/opensearch-project', '_blank');
});
3 changes: 0 additions & 3 deletions assets/js/listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ document.addEventListener('click', function(event) {
else if (target.matches('.copy-button')) {
window.navigator.clipboard.writeText(target.getAttribute('data-text'));
}
else if (target.matches('.btn-contribute')) {
window.open('https://github.com/opensearch-project', '_blank');
}
});

nav.addEventListener('scroll',(e)=>{
Expand Down

0 comments on commit 6658167

Please sign in to comment.