develop ready to be stable enough #5
@@ -459,12 +459,12 @@ def parse_query(query_override: str = None):
|
||||
|
||||
if len(result) > 17:
|
||||
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 += (
|
||||
"<h3>1828 Webster Definitions</h3> Click on the word to get the definition."
|
||||
)
|
||||
result += "<div class='dictionary-section'><h3>1828 Webster Definitions</h3><p>Click on the word to get the definition.</p></div>"
|
||||
split_query = query.replace(",", " ").split(" ")
|
||||
if len(split_query) > 20:
|
||||
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>"
|
||||
logging.debug(f"parse_query.define = '{word}'")
|
||||
result += "<script src='/js/collapsible.js'></script>"
|
||||
result += "<hr>"
|
||||
# result += search()
|
||||
#logging.debug(f"parse_query.search = '{result}'")
|
||||
result += "</div>"
|
||||
return result
|
||||
|
||||
|
||||
|
||||
@@ -103,6 +103,25 @@ body {
|
||||
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 */
|
||||
a {
|
||||
color: var(--color-link);
|
||||
|
||||
Reference in New Issue
Block a user