fix banner

This commit is contained in:
Bagatur
2024-10-22 11:34:15 -07:00
parent 4725dfc644
commit 02b4e770d2
3 changed files with 35 additions and 20 deletions

View File

@@ -25,15 +25,27 @@ table.longtable td {
max-width: 600px;
}
/* Banner Styles */
.banner {
background-color: #f0f0f0;
color: #333;
padding: 10px;
text-align: center;
font-weight: bold;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
}
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: #ffcc00;
color: #000;
text-align: center;
padding: 5px 0;
z-index: 1003; /* Highest z-index to sit above everything */
height: 30px; /* Fixed height */
line-height: 20px; /* Vertically center the text */
}
/* Navbar Styles */
#navbar {
position: fixed;
top: 30px; /* Positioned right below the banner */
left: 0;
right: 0;
z-index: 1002; /* Below the banner */
height: 50px; /* Fixed height */
}

View File

@@ -43,12 +43,12 @@
<script id="documentation_options" data-url_root="{{ pathto('', 1) }}"
src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
<script src="{{ pathto('_static/jquery.js', 1) }}"></script>
<div class="banner">
<p>This is the legacy API reference. Please see the latest <a href="https://python.langchain.com/v0.2/api_reference/reference.html">v0.2</a> and <a href="https://python.langchain.com/api_reference/">v0.3</a> API reference build here.</p>
</div>
{%- block extrahead %} {% endblock %}
</head>
<body>
<div class="banner">
<p>This is a legacy site. Please use the latest <a href="https://python.langchain.com/v0.2/api_reference/reference.html">v0.2</a> and <a href="https://python.langchain.com/api_reference/">v0.3</a> API references instead.</p>
</div>
{% include "nav.html" %}
{%- block content %}
<div class="d-flex" id="sk-doc-wrapper">

View File

@@ -452,11 +452,11 @@ a.sk-footer-funding-link:hover {
/* Enables section links to be visible when anchor-linked */
section[id]::before {
display: block;
height: 52px;
margin-top: -52px;
visibility: hidden;
content: "";
display: block;
height: 85px; /* Adjusted from 52px to 80px */
margin-top: -85px; /* Negative margin to offset the anchor position */
visibility: hidden;
content: "";
}
div.sk-page-content {
@@ -488,8 +488,9 @@ div.section h6 {
cursor: pointer;
}
/* Adjusted Page Content Styles */
div.sk-page-content {
margin-top: 52px;
margin-top: 80px; /* Adjusted for the new top offset */
}
@media screen and (min-width: 1400px) {
@@ -1418,6 +1419,8 @@ table.sk-sponsor-table td {
div.sk-sidebar-toc-wrapper {
width: unset;
overflow-x: auto;
padding-top: 85px; /* Adjusted for the new top offset */
height: calc(100vh - 85px); /* Adjusted height */
}
div.sk-sidebar-toc-wrapper > [aria-label="rellinks"] {