Skip to content

WIP feat(docs): routing in production #210

Merged

Conversation

Margar1ta
Copy link
Contributor

Для корректной работы роутинга в GitHub Pages необходимо создать файл 404.html (из PR) и поместить в корень сайта (https://positive-js.github.io/mosaic-previews/) - на него GitHub Pages будет вести при запросе несуществующих на сервере ссылок, а 404.html в свою очередь переадресует запрос на нужное приложение с route в get параметрах для ангуляра.

myakovleva and others added 4 commits August 23, 2019 12:52
feat(docs): routing in production

routing in production for Github Pages with 404.html file hook

Breaking Changes: none
feat(docs): routing in production

correcting routing

Breaking Changes: none
feat(docs): correcting routing

correcting routing

Breaking Changes: none
feat(docs): correcting serverSlash for mosaic-previews

correcting routing

Breaking Changes: none
<script>
const serverSlash = 5;
const route = location.href.split("/");
route.splice(0,serverSlash);
Copy link
Contributor

@tverskih tverskih Aug 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mind whitespaces accross the code.

const serverSlash = 5;
const route = location.href.split("/");
route.splice(0,serverSlash);
const path = `${location.href.split("/").slice(0,serverSlash).join("/")}${location.search? location.search + '&' : '?'}nextRoute=${route}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refactor the "magic" to be more readable (e. g. additional variables with understandable name, maybe new methods, etc.

@Margar1ta Margar1ta changed the title feat(docs): routing in production WIP feat(docs): routing in production Aug 26, 2019
@pimenovoleg
Copy link
Member

@tverskih мы учтем твои замечания, сейчас надо проверить сборку.

@pimenovoleg pimenovoleg merged commit 781cab3 into positive-js:feature/docs Aug 26, 2019
pimenovoleg pushed a commit that referenced this pull request Sep 9, 2019
@Margar1ta Margar1ta deleted the feature/UIM-75-dev_routing branch September 11, 2019 09:18
pimenovoleg pushed a commit that referenced this pull request Sep 27, 2019
pimenovoleg pushed a commit that referenced this pull request Oct 11, 2019
pimenovoleg pushed a commit that referenced this pull request Oct 25, 2019
pimenovoleg added a commit that referenced this pull request Nov 5, 2019
* 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
roll314 pushed a commit to roll314/mosaic that referenced this pull request Nov 7, 2019
* 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants