-
Notifications
You must be signed in to change notification settings - Fork 4
feat: polish documentation layout and add styles for improved UI #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
srimon12
wants to merge
3
commits into
pavanjava:main
Choose a base branch
from
srimon12:feat/doc-ui-polish
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <title>{{ page.title }} | QQL Documentation</title> | ||
| <meta name="description" content="{{ site.description }}"> | ||
| <link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}"> | ||
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css"> | ||
| </head> | ||
| <body> | ||
| <div class="app-container"> | ||
| <aside class="sidebar"> | ||
| <div class="sidebar-header"> | ||
| <a href="{{ '/' | relative_url }}" class="brand">QQL</a> | ||
| <p class="version">CLI & Language</p> | ||
| </div> | ||
| <nav class="sidebar-nav"> | ||
| <ul> | ||
| <li class="nav-heading">Documentation</li> | ||
| <li><a href="{{ '/getting-started.html' | relative_url }}" class="{% if page.url contains 'getting-started' %}active{% endif %}">Getting Started</a></li> | ||
| <li><a href="{{ '/insert.html' | relative_url }}" class="{% if page.url contains 'insert' %}active{% endif %}">INSERT / BULK</a></li> | ||
| <li><a href="{{ '/search.html' | relative_url }}" class="{% if page.url contains 'search' %}active{% endif %}">SEARCH / Hybrid</a></li> | ||
| <li><a href="{{ '/filters.html' | relative_url }}" class="{% if page.url contains 'filters' %}active{% endif %}">WHERE Filters</a></li> | ||
| <li><a href="{{ '/collections.html' | relative_url }}" class="{% if page.url contains 'collections' %}active{% endif %}">Collections</a></li> | ||
| <li><a href="{{ '/scripts.html' | relative_url }}" class="{% if page.url contains 'scripts' %}active{% endif %}">Scripts & Dump</a></li> | ||
| <li><a href="{{ '/programmatic.html' | relative_url }}" class="{% if page.url contains 'programmatic' %}active{% endif %}">Programmatic API</a></li> | ||
| <li><a href="{{ '/reference.html' | relative_url }}" class="{% if page.url contains 'reference' %}active{% endif %}">Reference</a></li> | ||
| </ul> | ||
| </nav> | ||
| <div class="sidebar-footer"> | ||
| <a href="https://github.com/pavanjava/qql" target="_blank" rel="noopener">GitHub</a> | ||
| <a href="https://pypi.org/project/qql-cli/" target="_blank" rel="noopener">PyPI</a> | ||
| </div> | ||
| </aside> | ||
| <main class="main-content"> | ||
| <div class="content-wrapper"> | ||
| {{ content }} | ||
| </div> | ||
| </main> | ||
| </div> | ||
| <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script> | ||
| <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/sql.min.js"></script> | ||
| <script> | ||
| document.addEventListener('DOMContentLoaded', () => { | ||
| // Apply true syntax highlighting | ||
| hljs.highlightAll(); | ||
|
|
||
| document.querySelectorAll('.content-wrapper pre').forEach(pre => { | ||
| // Create wrapper | ||
| const wrapper = document.createElement('div'); | ||
| wrapper.className = 'code-wrapper'; | ||
| pre.parentNode.insertBefore(wrapper, pre); | ||
| wrapper.appendChild(pre); | ||
|
|
||
| // Create copy button | ||
| const btn = document.createElement('button'); | ||
| btn.className = 'copy-btn'; | ||
| btn.textContent = 'Copy'; | ||
|
|
||
| btn.addEventListener('click', () => { | ||
| const code = pre.querySelector('code'); | ||
| const text = code ? code.innerText : pre.innerText; | ||
|
|
||
| const markCopied = () => { | ||
| btn.textContent = 'Copied!'; | ||
| btn.classList.add('copied'); | ||
| setTimeout(() => { | ||
| btn.textContent = 'Copy'; | ||
| btn.classList.remove('copied'); | ||
| }, 2000); | ||
| }; | ||
|
|
||
| const markFailed = () => { | ||
| btn.textContent = 'Copy failed'; | ||
| btn.classList.add('copy-error'); | ||
| setTimeout(() => { | ||
| btn.textContent = 'Copy'; | ||
| btn.classList.remove('copy-error'); | ||
| }, 2000); | ||
| }; | ||
|
|
||
| const fallbackCopy = () => { | ||
| const ta = document.createElement('textarea'); | ||
| ta.value = text; | ||
| ta.style.position = 'fixed'; | ||
| ta.style.opacity = '0'; | ||
| document.body.appendChild(ta); | ||
| ta.select(); | ||
| try { | ||
| const copied = document.execCommand('copy'); | ||
| if (copied) markCopied(); | ||
| else markFailed(); | ||
| } catch (e) { | ||
| markFailed(); | ||
| } finally { | ||
| document.body.removeChild(ta); | ||
| } | ||
| }; | ||
|
|
||
| if (navigator.clipboard?.writeText) { | ||
| navigator.clipboard.writeText(text).then(markCopied).catch(fallbackCopy); | ||
| } else { | ||
| fallbackCopy(); | ||
| } | ||
| }); | ||
|
|
||
| wrapper.appendChild(btn); | ||
| }); | ||
| }); | ||
| </script> | ||
| </body> | ||
| </html> | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: pavanjava/qql
Length of output: 158
🏁 Script executed:
Repository: pavanjava/qql
Length of output: 100
🏁 Script executed:
Repository: pavanjava/qql
Length of output: 100
🏁 Script executed:
Repository: pavanjava/qql
Length of output: 101
🏁 Script executed:
Repository: pavanjava/qql
Length of output: 7987
🌐 Web query:
cdnjs highlight.js 11.9.0 github-dark.min.css integrity💡 Result:
The Highlight.js 11.9.0 library is hosted on cdnjs, and you can access the github-dark.min.css file via the following URL: https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css [1]. While Highlight.js provides Subresource Integrity (SRI) digests for its CDN-hosted assets to ensure security [2][3], there is no single, universally managed list that explicitly embeds the SRI hash directly within the library's metadata for every individual style file in the same way it does for the core JavaScript files [3]. To obtain the correct integrity hash for github-dark.min.css, you should generate it directly from the source file at the CDN URL using a tool like the SRI Hash Generator or by running a command such as
openssl dgst -sha384 -binary | openssl base64 -Aon the downloaded file. Using a hardcoded hash from a third-party source is generally discouraged to avoid potential mismatches if CDN assets are updated or modified. [1][2][3]Citations:
Add SRI to cdnjs highlight.js assets
docs/_layouts/default.htmlloadshighlight.jsCSS/JS from cdnjs at lines 9, 42, and 43 withoutintegrity(SRI) andcrossorigin. Addintegrity(SHA-384) andcrossorigin="anonymous"for each of the exact URLs.Suggested patch
🤖 Prompt for AI Agents