Skip to content

Commit

Permalink
The renderer now attach the theme value onto the html tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadnasriya committed Jul 28, 2024
1 parent 491faf1 commit 411f0e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nasriya/hypercloud",
"version": "1.0.6",
"version": "1.0.7",
"description": "Nasriya HyperCloud is a lightweight Node.js HTTP2 framework.",
"main": "./dist/cjs/hypercloud.js",
"module": "./dist/esm/hypercloud.js",
Expand Down
2 changes: 1 addition & 1 deletion src/services/renderer/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class Renderer {
const htmlTagStartIndex = this.#_rendered.indexOf('<html');
const hasHTML = htmlTagStartIndex > -1;

const newHTMLTag = `<html lang="${this.#_data.lang}" dir="${this.#_data.dir}">`;
const newHTMLTag = `<html lang="${this.#_data.lang}" dir="${this.#_data.dir}" theme=${this.#_request.colorScheme}>`;

if (hasHTML) {
const fromHtml = this.#_rendered.substring(htmlTagStartIndex)
Expand Down

0 comments on commit 411f0e3

Please sign in to comment.