Renamed components

This commit is contained in:
squidfunk 2019-12-22 17:18:20 +01:00
parent e04387902c
commit 37b3870133
8 changed files with 20 additions and 20 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,7 @@
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="header-title">
{% if config.site_name == page.title %}
{{ config.site_name }}
{% else %}

View File

@ -6,15 +6,15 @@
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="{{ lang.t('search.placeholder') }}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
<input type="text" class="md-search__input" name="query" placeholder="{{ lang.t('search.placeholder') }}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
<button type="reset" class="md-icon md-search__icon" data-md-component="search-reset" tabindex="-1">
&#xE5CD;
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
{{ lang.t("search.result.placeholder") }}
</div>

View File

@ -34,17 +34,17 @@ import { getElement } from "utilities"
* Component names
*/
export type Component =
| "header" /* Header */
| "title" /* Header title */
| "search" /* Search */
| "query" /* Search input */
| "reset" /* Search reset */
| "result" /* Search results */
| "container" /* Container */
| "main" /* Main area */
| "header" /* Header */
| "header-title" /* Header title */
| "hero" /* Hero */
| "tabs" /* Tabs */
| "main" /* Main area */
| "navigation" /* Navigation */
| "search" /* Search */
| "search-query" /* Search input */
| "search-reset" /* Search reset */
| "search-result" /* Search results */
| "tabs" /* Tabs */
| "toc" /* Table of contents */
/**

View File

@ -445,8 +445,8 @@
app = initialize({
base: "{{ base_url }}",
worker: {
search: "{{ 'assets/javascripts/search.js' | url }}",
packer: "{{ 'assets/javascripts/packer.js' | url }}"
search: "{{ 'assets/javascripts/worker/search.js' | url }}",
packer: "{{ 'assets/javascripts/worker/packer.js' | url }}"
}
});
</script>

View File

@ -54,7 +54,7 @@
<div class="md-flex__cell md-flex__cell--stretch">
<div
class="md-flex__ellipsis md-header-nav__title"
data-md-component="title"
data-md-component="header-title"
>
{% if config.site_name == page.title %}
{{ config.site_name }}

View File

@ -36,14 +36,14 @@
autocorrect="off"
autocomplete="off"
spellcheck="false"
data-md-component="query"
data-md-component="search-query"
data-md-state="active"
/>
<label class="md-icon md-search__icon" for="__search"></label>
<button
type="reset"
class="md-icon md-search__icon"
data-md-component="reset"
data-md-component="search-reset"
tabindex="-1"
>
&#xE5CD;<!-- close -->
@ -51,7 +51,7 @@
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
{{ lang.t("search.result.placeholder") }}
</div>