diff --git a/src/scss/page/_index.scss b/src/scss/page/_index.scss index 13396e7..9e0dd01 100644 --- a/src/scss/page/_index.scss +++ b/src/scss/page/_index.scss @@ -67,20 +67,6 @@ main .page { flex-flow: row; align-items: start; } - - aside.toc { - width: 25%; - height: 100%; - - min-width: unset; - - position: sticky; - top: calc(1.5rem + var(--navbar-height)); - - display: block; - background-color: unset; - border: unset; - } } } diff --git a/src/views/develop/guides/_sidebar.md b/src/views/develop/guides/_sidebar.md index ae9b145..ef4e57f 100644 --- a/src/views/develop/guides/_sidebar.md +++ b/src/views/develop/guides/_sidebar.md @@ -3,7 +3,7 @@ * :bi-book:Getting Started * [Introduction](/develop/guides) * [Environment Setup](/develop/guides/env-setup) - * Development Workflow + * [Development Workflow](/develop/guides/workflow) * :bi-code:Development * [Web App](/develop/guides/web-app) * [Native App](/develop/guides/native-app) @@ -23,4 +23,6 @@ * Web App * Native App * Firmware - * System \ No newline at end of file + * System +* :bi-lightbulb:Contribute to Guides + * [Document Syntax](/develop/guides/docs-syntax) \ No newline at end of file diff --git a/src/views/develop/guides/docs-syntax.md b/src/views/develop/guides/docs-syntax.md index d894c2f..e8f46a4 100644 --- a/src/views/develop/guides/docs-syntax.md +++ b/src/views/develop/guides/docs-syntax.md @@ -1,6 +1,6 @@ # Document Syntax -How to write documents for this site +How to write documents for this site. ## Markdown Syntax @@ -9,6 +9,18 @@ GFM [here](https://guides.github.com/features/mastering-markdown/). Additionally, we use the following syntax for writing documents: +### Automatic Lead Text + +The first paragraph of a document will be used as +the [lead text](https://getbootstrap.com/docs/5.3/content/typography/#lead). + +To avoid this behavior, you can insert an HTML comment (e.g. <!-- no-lead -->) or +a horizontal rule (`---`) before the first paragraph. + +### Bootstrap Icons + +Use `:bi-icon-name:` to insert a Bootstrap icon. For example, `:bi-book:` will become :bi-book:. + ### Tabbed Code Blocks Inspired by syntax of [readme.com](https://docs.readme.com/rdmd/docs/code-blocks), you can create code blocks diff --git a/src/views/develop/guides/env-setup.md b/src/views/develop/guides/env-setup.md index 88993b1..cc37e6d 100644 --- a/src/views/develop/guides/env-setup.md +++ b/src/views/develop/guides/env-setup.md @@ -38,3 +38,8 @@ After extracting the SDK, run `relocate-sdk.sh` to update the SDK path. ```bash Linux & macOS & WSL /path/to/arm-webos-linux-gnueabi_sdk-buildroot/relocate-sdk.sh ``` + +* Previous + * [Introduction](/develop/guides) +* Next + * [Development Workflow](/develop/guides/workflow) \ No newline at end of file diff --git a/src/views/develop/guides/workflow.md b/src/views/develop/guides/workflow.md new file mode 100644 index 0000000..a2c563a --- /dev/null +++ b/src/views/develop/guides/workflow.md @@ -0,0 +1,10 @@ +# Development Workflow + +Under construction. + + +* Previous + * [Environment Setup](/develop/guides/env-setup) +* Next + * [Developing Web App](/develop/guides/web-app) + * [Developing Native App](/develop/guides/native-app) \ No newline at end of file diff --git a/src/views/toh/search/conditions.ts b/src/views/toh/search/conditions.ts index c3db0c8..08681f9 100644 --- a/src/views/toh/search/conditions.ts +++ b/src/views/toh/search/conditions.ts @@ -8,6 +8,7 @@ export interface SearchCondition { export interface SearchConditions { machine?: SearchCondition; + year?: SearchCondition; codename?: SearchCondition; series?: SearchCondition; broadcast?: SearchCondition; @@ -25,7 +26,7 @@ export function getConditionsIndices(conditions?: SearchConditions): number[] | } export function applyToUrlParams(conditions: SearchConditions | undefined, params: URLSearchParams) { - const keys: (keyof SearchConditions)[] = ['machine', 'codename', 'series', 'broadcast', 'region', 'otaId']; + const keys: (keyof SearchConditions)[] = ['machine', 'codename', 'series', 'broadcast', 'region', 'otaId', 'year']; for (let k of keys) { const options = conditions?.[k as keyof SearchConditions]?.options; if (options?.length) { diff --git a/src/views/toh/search/index.ts b/src/views/toh/search/index.ts index 8dd4f21..64b63ee 100644 --- a/src/views/toh/search/index.ts +++ b/src/views/toh/search/index.ts @@ -27,6 +27,10 @@ export class SideSearch extends Component { conditions=${props.conditions} changed=${(v: SearchCondition) => this.searchConditionChanged("machine", v)}> + <${SearchSection} name="year" title="Year" models=${props.models} entries=${props.indices.year} + conditions=${props.conditions} + changed=${(v: SearchCondition) => this.searchConditionChanged("year", v)}> + <${SearchSection} name="codename" title="Codename" models=${props.models} entries=${props.indices.codename} conditions=${props.conditions} changed=${(v: SearchCondition) => this.searchConditionChanged("codename", v)}> diff --git a/src/views/toh/table.ts b/src/views/toh/table.ts index 9efd66a..d502ee5 100644 --- a/src/views/toh/table.ts +++ b/src/views/toh/table.ts @@ -65,13 +65,13 @@ export class DevicesTable extends Component - No devices found + No devices found `} - ${filtered.length && html` + ${filtered.length > 0 && html` <${Pagination} count=${filtered.length} offset=${offset} limit=${limit} onChange=${this.offsetChange}> `} diff --git a/src/views/toh/toh-data.d.ts b/src/views/toh/toh-data.d.ts index 4d5cd29..b0f61c0 100644 --- a/src/views/toh/toh-data.d.ts +++ b/src/views/toh/toh-data.d.ts @@ -6,6 +6,7 @@ export type DeviceModelIndexEntry = { value: string, indices: number[] }; export type DeviceModelIndices = { machine: DeviceModelIndexEntry[], + year: DeviceModelIndexEntry[], series: DeviceModelIndexEntry[], codename: DeviceModelIndexEntry[], broadcast: DeviceModelIndexEntry[], diff --git a/src/views/toh/toh-data.js b/src/views/toh/toh-data.js index 5c9f2b5..f719997 100644 --- a/src/views/toh/toh-data.js +++ b/src/views/toh/toh-data.js @@ -10,4 +10,5 @@ export const indices = { region: [/*indices.region*/], otaId: [/*indices.otaId*/], screenSize: [/*indices.screenSize*/], + year: [/*indices.year*/], }; \ No newline at end of file diff --git a/src/views/toh/toh.scss b/src/views/toh/toh.scss index 74e44f6..796cc2e 100644 --- a/src/views/toh/toh.scss +++ b/src/views/toh/toh.scss @@ -1,3 +1,33 @@ +@import "../../scss/styles"; + + +.toh-app { + grid-template-areas: "table search" "table empty" "pagination empty"; + grid-template-rows: auto auto auto; + grid-template-columns: 3fr 1fr; + + > .table-responsive { + grid-area: table; + } + + > aside { + grid-area: search; + max-height: min-content; + + @extend .border; + @extend .rounded; + + @include media-breakpoint-up(md) { + border-radius: 0 !important; + border: none !important; + } + } + + > nav { + grid-area: pagination; + } +} + .search-section { [data-bs-toggle] { //noinspection CssNoGenericFontName diff --git a/src/views/toh/toh.ts b/src/views/toh/toh.ts index 491fc60..09fb206 100644 --- a/src/views/toh/toh.ts +++ b/src/views/toh/toh.ts @@ -43,16 +43,17 @@ class App extends Component<{}, AppState> { render(_props: {}, state: AppState) { return html` -
-
- <${DevicesTable} models=${models} conditions=${state.conditions}> -
-