fixed dictionary section styling and header layout
This commit is contained in:
@@ -459,12 +459,12 @@ def parse_query(query_override: str = None):
|
|||||||
|
|
||||||
if len(result) > 17:
|
if len(result) > 17:
|
||||||
return result
|
return result
|
||||||
result = "<!DOCTYPE html>"
|
result = search()
|
||||||
result += search()
|
# Remove the closing </div> from search() so we can add dictionary content inside .responses
|
||||||
|
if result.endswith("</div>"):
|
||||||
|
result = result[:-6] # Remove last </div>
|
||||||
result += "<style>" + cached["css_collapsible"] + "</style>"
|
result += "<style>" + cached["css_collapsible"] + "</style>"
|
||||||
result += (
|
result += "<div class='dictionary-section'><h3>1828 Webster Definitions</h3><p>Click on the word to get the definition.</p></div>"
|
||||||
"<h3>1828 Webster Definitions</h3> Click on the word to get the definition."
|
|
||||||
)
|
|
||||||
split_query = query.replace(",", " ").split(" ")
|
split_query = query.replace(",", " ").split(" ")
|
||||||
if len(split_query) > 20:
|
if len(split_query) > 20:
|
||||||
return "Your Query is too long. 20 Words or less."
|
return "Your Query is too long. 20 Words or less."
|
||||||
@@ -480,9 +480,7 @@ def parse_query(query_override: str = None):
|
|||||||
result += "<div class='definition'>" + definition + "</div>"
|
result += "<div class='definition'>" + definition + "</div>"
|
||||||
logging.debug(f"parse_query.define = '{word}'")
|
logging.debug(f"parse_query.define = '{word}'")
|
||||||
result += "<script src='/js/collapsible.js'></script>"
|
result += "<script src='/js/collapsible.js'></script>"
|
||||||
result += "<hr>"
|
result += "</div>"
|
||||||
# result += search()
|
|
||||||
#logging.debug(f"parse_query.search = '{result}'")
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,25 @@ body {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Dictionary Section */
|
||||||
|
.dictionary-section {
|
||||||
|
margin: var(--space-xl) 0 var(--space-lg) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dictionary-section h3 {
|
||||||
|
font-family: var(--font-ui);
|
||||||
|
font-size: 1.5rem;
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
margin-bottom: var(--space-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dictionary-section p {
|
||||||
|
font-family: var(--font-ui);
|
||||||
|
font-size: 0.95rem;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Links */
|
/* Links */
|
||||||
a {
|
a {
|
||||||
color: var(--color-link);
|
color: var(--color-link);
|
||||||
|
|||||||
Reference in New Issue
Block a user