Skip to content

Commit

Permalink
feat: website update
Browse files Browse the repository at this point in the history
  • Loading branch information
xsf0105 committed Jul 12, 2023
1 parent ee7a921 commit a91125b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ https://www.npmjs.com/package/quark-doc-header

该组件同时被被使用在:

- https://quark.hellobike.com
- https://quarkc.hellobike.com
- https://vue-quarkdesign.hellobike.com
- https://react-quarkdesign.hellobike.com
- https://vanilla-quarkdesign.hellobike.com
Expand Down
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ let n = (C = class extends e {
let t = "";
localStorage.getItem("language") === "en-US" ? (localStorage.setItem("language", "zh-CN"), t = location.href.replace("en-US", "zh-CN")) : (localStorage.setItem("language", "en-US"), t = location.href.replace("zh-CN", "en-US")), location.href = t, window.location.reload();
});
d(this, p, localStorage.getItem("language") === "zh-CN"), d(this, r, i(this, p) ? I["zh-CN"] : I["en-US"]), d(this, u, location.origin), d(this, m, !1), d(this, x, location.host.indexOf("quark.hellobike.com") > -1), d(this, f, location.hostname.split("-").length > 1 ? location.hostname.split("-")[0] : !1), ~["vanilla", "angular", "svelte"].indexOf(location.hostname.split("-")[0]) && d(this, m, !0);
d(this, p, localStorage.getItem("language") === "zh-CN"), d(this, r, i(this, p) ? I["zh-CN"] : I["en-US"]), d(this, u, location.origin), d(this, m, !1), d(this, x, location.host.indexOf("quarkc.hellobike.com") > -1), d(this, f, location.hostname.split("-").length > 1 ? location.hostname.split("-")[0] : !1), ~["vanilla", "angular", "svelte"].indexOf(location.hostname.split("-")[0]) && d(this, m, !0);
}
componentDidMount() {
this.navActive(), localStorage.getItem("language") || localStorage.setItem("language", "zh-CN"), localStorage.getItem("theme") || localStorage.setItem("theme", "light"), this.homeUrl = i(this, u), this.guideUrl = `${i(this, u)}/#/${localStorage.getItem("language")}/guide/quickstart`, this.componentUrl = `${i(this, u)}/#/${localStorage.getItem("language")}/component/button`;
Expand Down Expand Up @@ -296,7 +296,7 @@ let n = (C = class extends e {
e.h("p", { class: "menu-group-title" }, i(this, r).officialLibrary),
e.h(
"a",
{ class: "link menu-link", href: "https://quark.hellobike.com", target: "_blank", rel: "noopener noreferrer" },
{ class: "link menu-link", href: "https://quarkc.hellobike.com", target: "_blank", rel: "noopener noreferrer" },
i(this, r).stack,
e.h(
"svg",
Expand Down
2 changes: 1 addition & 1 deletion lib/index.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quark-doc-header",
"version": "0.3.28",
"version": "0.3.29",
"scripts": {
"dev": "npm run start",
"start": "vite --open",
Expand Down
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class MyComponent extends QuarkElement {
this.#ecosystemLangs = this.#isZhLang ? langs["zh-CN"] : langs["en-US"]
this.#curHost = location.origin // e.g. https://vue-quarkdesign.hellobike.com
this.#isDocNotReady = false
this.#isQuarkc = location.host.indexOf('quark.hellobike.com') > -1 ? true : false
this.#isQuarkc = location.host.indexOf('quarkc.hellobike.com') > -1 ? true : false
this.#techName = location.hostname.split('-').length > 1 ? location.hostname.split('-')[0] : false

if(~['vanilla', 'angular', 'svelte'].indexOf(location.hostname.split('-')[0])) {
Expand Down Expand Up @@ -342,7 +342,7 @@ class MyComponent extends QuarkElement {
</p>
<a
class="link menu-link"
href="https://quark.hellobike.com"
href="https://quarkc.hellobike.com"
target="_blank"
rel="noopener noreferrer"
>
Expand Down

0 comments on commit a91125b

Please sign in to comment.