diff --git a/.eleventy.js b/.eleventy.js index 89c9245..521207a 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -41,6 +41,7 @@ module.exports = (eleventyConfig) => { input: 'src', output: 'dist', layouts: 'layouts', + includes: 'includes', data: 'data' } } diff --git a/.stylelintrc.json b/.stylelintrc.json index ee85d9b..f0e1cae 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,3 +1,6 @@ { - "extends": "stylelint-config-standard" + "extends": "stylelint-config-standard", + "rules": { + "selector-class-pattern": null + } } \ No newline at end of file diff --git a/src/css/components/index.css b/src/css/components/index.css index 2df9bc5..62b7758 100644 --- a/src/css/components/index.css +++ b/src/css/components/index.css @@ -1 +1,2 @@ @import "article-content.css"; +@import "search.css"; diff --git a/src/css/components/search.css b/src/css/components/search.css new file mode 100644 index 0000000..8a5a478 --- /dev/null +++ b/src/css/components/search.css @@ -0,0 +1,29 @@ +.search { + @apply relative w-full md:w-[70vw] xl:w-[60vw]; +} + +.search__input { + @apply w-full px-6 py-2 text-4xl border-2 rounded-3xl focus:outline-none; +} + +.search__input_opened { + @apply rounded-b-none; +} + +.search__sugestions-list { + @apply absolute w-full py-2 text-2xl bg-white border-2 border-t-0 rounded-b-3xl; +} + +.search__sugestion-item { + @apply relative px-6 py-2 hover:bg-slate-100; +} + +.search__sugestion-item-link::after { + @apply absolute top-0 bottom-0 left-0 right-0; + + content: ""; +} + +.search__sugestion-empty { + @apply px-6 py-2; +} diff --git a/src/includes/blocks/search.njk b/src/includes/blocks/search.njk new file mode 100644 index 0000000..656e6b9 --- /dev/null +++ b/src/includes/blocks/search.njk @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/src/pages/index.njk b/src/pages/index.njk index 6034906..27ff8d1 100644 --- a/src/pages/index.njk +++ b/src/pages/index.njk @@ -1,56 +1,10 @@
- + {{ '/src/images/logo.svg' | svgContents("max-h-24 block w-[50vw]") | safe }}
-
- -
-
    - - -
-
-
+ {% include "blocks/search.njk" %}
\ No newline at end of file