text stringlengths 0 3.02k |
|---|
[3/13/2024 5:43 PM] wildtang3nt |
no promises, I'll see if my boss is up to explore it with me (we're both working on this kubernetes cluster to learn, he's got significantly more k8s experience but his home cluster is very unlike this managed one) |
{Reactions} |
👍 |
[3/14/2024 12:42 AM] g30 |
Unique classes list for Open WebUI, data harvested by me. (taken from `Dark` theme I guess?) All pages except for the login page obviously were harvested for CSS class names. |
{Attachments} |
https://cdn.discordapp.com/attachments/1210732510250541067/1217694208538972160/message.txt?ex=67741eda&is=6772cd5a&hm=cb6ad98916d2bfd217cd5984e411dad9f02168727a3dda5c712b47a24890cf0d& |
[3/14/2024 12:49 AM] g30 |
``` |
function queryAll(selector) { |
return Array.from(document.querySelectorAll(selector)); |
} |
function getUnique(arr) { |
return [...new Set(arr)]; |
} |
function getElementSelectors(element) { |
const selectors = []; |
let currentSelector = ''; |
let parent = element.parentElement; |
while (parent) { |
if (parent.nodeType === Node.ELEMENT_NODE) { |
const siblingIndex = Array.from(parent.children).indexOf(element); |
const siblingSelector = siblingIndex >= 0 ? `:nth-child(${siblingIndex + 1})` : ''; |
currentSelector = `${parent.nodeName.toLowerCase()}${siblingSelector}${currentSelector}`; |
} |
selectors.unshift(currentSelector); |
element = parent; |
parent = parent.parentElement; |
} |
return selectors; |
} |
const elements = queryAll('*'); |
const classToSelectors = {}; |
for (const element of elements) { |
const classNames = (element.className || '').toString().split(' ').filter(c => c); |
for (const className of classNames) { |
if (className) { |
const selectors = getElementSelectors(element).join('.'); |
if (!classToSelectors[className]) { |
classToSelectors[className] = []; |
} |
classToSelectors[className].push(`${selectors}.${className}`); |
} |
} |
} |
const sortedClassNames = getUnique(Object.keys(classToSelectors).sort()); |
for (const className of sortedClassNames) { |
console.log(`class="${className}"`); |
console.log(classToSelectors[className].join('\n')); |
console.log(''); |
} |
``` |
[3/14/2024 9:58 AM] wildtang3nt |
@Jann:1k docker building now for i18n: |
https://github.com/justinh-rahb/open-webui/actions/runs/8281956292 |
{Embed} |
https://github.com/justinh-rahb/open-webui/actions/runs/8281956292 |
Merge pull request #6 from justinh-rahb/feat/add-i18n · justinh-rah... |
ChatGPT-Style WebUI for Ollama (Formerly Ollama WebUI) - Merge pull request #6 from justinh-rahb/feat/add-i18n · justinh-rahb/open-webui@5f22e5f |
https://images-ext-1.discordapp.net/external/6kqDlQ0AyRiS2s9i3-kxLKTshx3yY2Lv78K0pGQnt6U/https/opengraph.githubassets.com/d11f5b2822ef3b0b6a187421b45e054fd7995b4c93e44af965adb53c549a08f0/justinh-rahb/open-webui |
{Reactions} |
❤️ |
[3/14/2024 10:23 AM] wildtang3nt |
```bash |
docker pull ghcr.io/justinh-rahb/open-webui:dev |
``` |
[3/14/2024 5:21 PM] g30 |
Honestly, I am just hoping some of these dev console logs could help for theming. |
{Attachments} |
https://cdn.discordapp.com/attachments/1210732510250541067/1217945792942313574/message.txt?ex=6773b7a9&is=67726629&hm=e0a1ec6dc93c832d7cb737c85424afe585527c0ac3d0cfb962b0de4e1dfbdbf2& |
[3/14/2024 5:22 PM] g30 |
Code to produce this output. Note that a lot of classes made might not even matter for theming. |
``` |
// Get all elements on the page |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.