-
Notifications
You must be signed in to change notification settings - Fork 39
feat(docs): storing theme and active color #274
feat(docs): storing theme and active color #274
Conversation
this.changeThemeOnBody(); | ||
} | ||
|
||
setColor(i) { | ||
this.activeColor = this.colors[i]; | ||
localStorage.setItem('PT_color', `${i}`); |
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.
на будущее: вынести ключи localStorage в константы (например, Enum)
@@ -23,7 +23,7 @@ | |||
|
|||
<div class="flex-spacer"></div> | |||
|
|||
<div class="docs-navbar-dropdown"> | |||
<div class="docs-navbar-dropdown" style="visibility: hidden;"> |
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.
почему через style?
} | ||
} | ||
|
||
initActiveColor() { |
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.
на будущее: подумай, ты можешь эти два метода свернуть в один с аргументами.
Я переместила ключи localStorage в константы и перенесла стиль visibility: hidden в класс docs-navbar-dropdown_hidden. |
* chore: init docs * chore: test commit - 3 #UIM-4 (+14 squashed commit) Squashed commit: [a355848] chore: test commit - 3 #UIM-4 [d5b74eb] chore: test commit - 2 (#UIM-4) [a9f165c] chore: test commit (#4) [8ec0506] fix: base-href parametr [5c47f43] fix: ci PR NUmbers [539390d] fix: ci PR NUmbers [0c59de1] fix: correct deps for ci [1e867ee] fix: build [5d0c17d] chore: added preview docs script * testing stage [665b0a7] feat: added unit test config and 1 simple spec [39b6f25] fix: angular cli build [c641ade] chore: fixes McTreeSelection, await fix in master [240ac61] chore: tree-selection test [96b5b92] chore: added prod build for docs (+7 squashed commit) Squashed commit: [0dd9d64] chore: version for stackblitz [66610cf] chore: added stackblitz [2c20840] chore: updated code snippets [e11b757] chore: updated css [fc86734] chore: updated ts paths [ef81da5] chore: added button overview [b8f4450] chore: added pages (+3 squashed commit) Squashed commit: [203cb20] chore: updated example generator [e70432d] chore: updated example generator [7f33804] chore: updated dgeni generator * chore: updated to angular cdk * chore: added cleanup docs script * chore: base layout * chore: added dropdown * chore: added sidenav * chore: fixed button preview * chore: added styles for doc view * chore: updated router and buttond description * chore: added left sidebar data * feat(docs): fixing docs's scroll (#181) * chore: remove container * chore: remove container * feat(docs): navbar styling (#185) * chore: updated accordion animation * chore: display correct module for entry-point * feat(docs): navbar color picker corrected (#188) * feat(docs): sidenav styling (#189) * feat(docs): anchors component was added (#191) * feat(docs): footer was added (#193) * feat(docs): anchor routing was added (#192) * chore: adde sevice workers * chore: small update for sidebar styles * feat(docs): styling generated from markdown content (#199) * fix: path to doc-content * feat(docs): styling code editor (#200) * fix: return mosaic-examples script * fix: return angular-cli * fix: stackblitz button * chore: remove unused componentes and updated path to assets * fix: small fix for anchors * chore: added checkbox example * feat(docs): routing in production (#210) * feat(docs): checkbox documentation (#214) * feat(docs): list styling (#215) * feat(docs): image styling (#212) * feat(docs): code editor styling (#216) * feat(docs): 404 routing with localStorage (#220) * feat(docs): angular anchors (#223) * feat(docs): anchors are working with base href (#224) * feat(docs): code editor stiling fixed for Edge (#226) * feat(docs): changing list padding (#227) * fix: safari logo height * feat(docs): svg logo (#230) * feat(docs): smooth scroll (#231) * feat(docs): color correction (#233) * feat(docs): correcting example viewer (#234) Setting min height, hiding bottom shade when showing whole sourse and correcting munber's generation. * feat(docs): deleting routing to button/overview by default (#235) * feat(docs): version dropdown styling (#237) * feat(docs): updating component's colors (#238) * feat(docs): checkbox indeterminate example (#236) * feat(docs): theme change functionality added (#239) * feat: group examples * feat(docs): switch hint-text color to less-contrast-text and adding the dark theme for code editor (#241) * chore: stackblitz * chore: added assets for stackblitz * feat(docs): active color change feature (#242) * feat(docs): fixing stackblitz icon and footer's link for correct theme styling (#243) * feat(docs): styling missing code example (#244) * feat(docs): lost code alert (#247) * feat(docs): dark theme background (#250) * feat(docs): styling active color dropdown (#251) * feat(docs): sidenav background (#240) * feat(docs): new highlightjs themes (#252) * feat(docs): increase_header_padding (#255) * feat(docs): show/hide editor fix WIP (#254) * feat(docs): adding transparent buttons to navbar (#257) * feat(docs): setting footer higher then stackblitz link (#258) * feat(docs): styling code copy button (#259) * feat(docs): changing typography from static to depended on theme (#260) * feat(docs): increase debounceTime for smooth scroll support (#262) * feat(docs): set target=_blank to links (#264) * feat(docs): fixing dark background for Edge (#266) * feat(docs): sidenav selected and focus styles correction (#265) * feat(docs): moving logo to assets for safary support (#263) * feat(docs): styling failed to load documents * feat(docs): correcting copy tooltip position * feat(docs): fixing code editor switсh * feat(docs): fixing color picker in Edge (#273) * feat(docs): setting animation for component-overview (#275) * feat(docs): storing theme and active color (#274) * feat(docs): refactoring navbar component (#276) * feat(docs): disabling selected route (#277) * feat(docs): styling tables (#279) * feat(docs): correcting animation's start and adaptivity (#288) * feat(docs): adding components description (#287) * feat(docs): adding embed icons in stackblitz examples (#300) @ptsecurity/mosaic-icons version is updated in stackblitz writer. mc-icons.css is switched to mc-icons-embed.css with embed icon font included. * chore: updated lock file * fix: correct component name * chore: added firebase config * fix(docs): fixing dropdown trigger icon (#301) * chore: simple ru localization for button * chore: updated firebase tools * chore: updated SVG logo & button desc * feat(docs): styling blocks of code in markdown WIP (#307) Copy icon is added through TS by createCopyIcons function. Unfortunately it is not possible to add manually triggering tooltip, so onclick animation is used for UI matter. * chore: updated md docs * chore: firebase config v8 * chore: fixed raio-button example * chore: fixed checkbox * chore: docs for Icon * chore: docs for checkbox * feat(docs): restyling code copy icon (#312) Bringing code copy icon in example viewer and markdown to the same view. Tooltip isn't used anymore. * chore: added badges * feat(docs): setting content width (#313) setting content width to calc(100% - 600px) for empty examples and correct view in Edge * chore: badges style * feat(docs): adding dropdown examples (#322) Dropdown overview and nested dropdown examples are added. * chore: test build * feat(docs): adding page title to anchors (#323) Page title is added to anchor's menu and is separated by border-bottom. Bug of not updating anchors on contentRenderFailed error is fixed. * feat(docs): adding alerts example (#324) * feat: added documentation for Links
* chore: init docs * chore: test commit - 3 #UIM-4 (+14 squashed commit) Squashed commit: [a355848] chore: test commit - 3 #UIM-4 [d5b74eb] chore: test commit - 2 (#UIM-4) [a9f165c] chore: test commit (positive-js#4) [8ec0506] fix: base-href parametr [5c47f43] fix: ci PR NUmbers [539390d] fix: ci PR NUmbers [0c59de1] fix: correct deps for ci [1e867ee] fix: build [5d0c17d] chore: added preview docs script * testing stage [665b0a7] feat: added unit test config and 1 simple spec [39b6f25] fix: angular cli build [c641ade] chore: fixes McTreeSelection, await fix in master [240ac61] chore: tree-selection test [96b5b92] chore: added prod build for docs (+7 squashed commit) Squashed commit: [0dd9d64] chore: version for stackblitz [66610cf] chore: added stackblitz [2c20840] chore: updated code snippets [e11b757] chore: updated css [fc86734] chore: updated ts paths [ef81da5] chore: added button overview [b8f4450] chore: added pages (+3 squashed commit) Squashed commit: [203cb20] chore: updated example generator [e70432d] chore: updated example generator [7f33804] chore: updated dgeni generator * chore: updated to angular cdk * chore: added cleanup docs script * chore: base layout * chore: added dropdown * chore: added sidenav * chore: fixed button preview * chore: added styles for doc view * chore: updated router and buttond description * chore: added left sidebar data * feat(docs): fixing docs's scroll (positive-js#181) * chore: remove container * chore: remove container * feat(docs): navbar styling (positive-js#185) * chore: updated accordion animation * chore: display correct module for entry-point * feat(docs): navbar color picker corrected (positive-js#188) * feat(docs): sidenav styling (positive-js#189) * feat(docs): anchors component was added (positive-js#191) * feat(docs): footer was added (positive-js#193) * feat(docs): anchor routing was added (positive-js#192) * chore: adde sevice workers * chore: small update for sidebar styles * feat(docs): styling generated from markdown content (positive-js#199) * fix: path to doc-content * feat(docs): styling code editor (positive-js#200) * fix: return mosaic-examples script * fix: return angular-cli * fix: stackblitz button * chore: remove unused componentes and updated path to assets * fix: small fix for anchors * chore: added checkbox example * feat(docs): routing in production (positive-js#210) * feat(docs): checkbox documentation (positive-js#214) * feat(docs): list styling (positive-js#215) * feat(docs): image styling (positive-js#212) * feat(docs): code editor styling (positive-js#216) * feat(docs): 404 routing with localStorage (positive-js#220) * feat(docs): angular anchors (positive-js#223) * feat(docs): anchors are working with base href (positive-js#224) * feat(docs): code editor stiling fixed for Edge (positive-js#226) * feat(docs): changing list padding (positive-js#227) * fix: safari logo height * feat(docs): svg logo (positive-js#230) * feat(docs): smooth scroll (positive-js#231) * feat(docs): color correction (positive-js#233) * feat(docs): correcting example viewer (positive-js#234) Setting min height, hiding bottom shade when showing whole sourse and correcting munber's generation. * feat(docs): deleting routing to button/overview by default (positive-js#235) * feat(docs): version dropdown styling (positive-js#237) * feat(docs): updating component's colors (positive-js#238) * feat(docs): checkbox indeterminate example (positive-js#236) * feat(docs): theme change functionality added (positive-js#239) * feat: group examples * feat(docs): switch hint-text color to less-contrast-text and adding the dark theme for code editor (positive-js#241) * chore: stackblitz * chore: added assets for stackblitz * feat(docs): active color change feature (positive-js#242) * feat(docs): fixing stackblitz icon and footer's link for correct theme styling (positive-js#243) * feat(docs): styling missing code example (positive-js#244) * feat(docs): lost code alert (positive-js#247) * feat(docs): dark theme background (positive-js#250) * feat(docs): styling active color dropdown (positive-js#251) * feat(docs): sidenav background (positive-js#240) * feat(docs): new highlightjs themes (positive-js#252) * feat(docs): increase_header_padding (positive-js#255) * feat(docs): show/hide editor fix WIP (positive-js#254) * feat(docs): adding transparent buttons to navbar (positive-js#257) * feat(docs): setting footer higher then stackblitz link (positive-js#258) * feat(docs): styling code copy button (positive-js#259) * feat(docs): changing typography from static to depended on theme (positive-js#260) * feat(docs): increase debounceTime for smooth scroll support (positive-js#262) * feat(docs): set target=_blank to links (positive-js#264) * feat(docs): fixing dark background for Edge (positive-js#266) * feat(docs): sidenav selected and focus styles correction (positive-js#265) * feat(docs): moving logo to assets for safary support (positive-js#263) * feat(docs): styling failed to load documents * feat(docs): correcting copy tooltip position * feat(docs): fixing code editor switсh * feat(docs): fixing color picker in Edge (positive-js#273) * feat(docs): setting animation for component-overview (positive-js#275) * feat(docs): storing theme and active color (positive-js#274) * feat(docs): refactoring navbar component (positive-js#276) * feat(docs): disabling selected route (positive-js#277) * feat(docs): styling tables (positive-js#279) * feat(docs): correcting animation's start and adaptivity (positive-js#288) * feat(docs): adding components description (positive-js#287) * feat(docs): adding embed icons in stackblitz examples (positive-js#300) @ptsecurity/mosaic-icons version is updated in stackblitz writer. mc-icons.css is switched to mc-icons-embed.css with embed icon font included. * chore: updated lock file * fix: correct component name * chore: added firebase config * fix(docs): fixing dropdown trigger icon (positive-js#301) * chore: simple ru localization for button * chore: updated firebase tools * chore: updated SVG logo & button desc * feat(docs): styling blocks of code in markdown WIP (positive-js#307) Copy icon is added through TS by createCopyIcons function. Unfortunately it is not possible to add manually triggering tooltip, so onclick animation is used for UI matter. * chore: updated md docs * chore: firebase config v8 * chore: fixed raio-button example * chore: fixed checkbox * chore: docs for Icon * chore: docs for checkbox * feat(docs): restyling code copy icon (positive-js#312) Bringing code copy icon in example viewer and markdown to the same view. Tooltip isn't used anymore. * chore: added badges * feat(docs): setting content width (positive-js#313) setting content width to calc(100% - 600px) for empty examples and correct view in Edge * chore: badges style * feat(docs): adding dropdown examples (positive-js#322) Dropdown overview and nested dropdown examples are added. * chore: test build * feat(docs): adding page title to anchors (positive-js#323) Page title is added to anchor's menu and is separated by border-bottom. Bug of not updating anchors on contentRenderFailed error is fixed. * feat(docs): adding alerts example (positive-js#324) * feat: added documentation for Links
No description provided.