Code Monkey home page Code Monkey logo

guides's Issues

Add search with autocomplete

image

Example data

[
  {
    "section": "Section name"
    "section_id": "section-name-1",
    "items": [
        {
            "page": "Page name 1",
            "page_id": "page-name-1",
            "text": "<b>Lorem Ipsum</b> is simply dummy text of the printing and typesetting industry"
        },
        {
            "page": "Page name 1",
            "page_id": "page-name-2",
            "text": "containing <b>Lorem Ipsum</b> passages, and more recently with desktop publishing software"
        }
    ]
  }
]
  • Search input
    • Search ≥ 2 symbols
    • Search all keys
  • Search items
    • Section link. Show section title if more than 1 page
    • Page link
    • Output content
    • Highlight
    • Link to anchor (need block id and #anchor from back-end)

Design
https://www.figma.com/file/VpUQ8aZanmAIbwlSt5UTKH/%F0%9F%9A%B2-Ekaterinburg.design?node-id=3405%3A3302

Refactor Notion component detection

TODO
Allow write content inside columns (now all tags in col)

3 component variants library
<>
  {/* Вариант 1. Комопненты имплементирующие элементы

Плюсы
- Настройка любых props
- Интуитивно

Минусы
- Сложно поддерживать обртаную совместимость с HTML (W3C). Пример табилцы
- А не проще использовать HTML + CSS?
*/}
  <H1>Заголовок 1</H1>
  <H2>Заголовок 2</H2>
  <H3>Заголовок 3</H3>
  <H4>Заголовок 4</H4>
  <H5>Заголовок 5</H5>

  <Ul size="xl">
    <Li></Li>
    <Li></Li>
    <Li></Li>
    <Li></Li>
  </Ul>

  <Hr />

  <Ol>
    <Li></Li>
    <Li></Li>
    <Li></Li>
    <Li></Li>
  </Ol>

  <P></P>

  <Table>
    <Thead></Thead>
    <Tbody>
      <Tr>
        <Td></Td>
        <Td></Td>
      </Tr>
    </Tbody>
  </Table>
</>;


<>
  {/* Вариант 2. Комопненты имплементирующие элементы

Плюсы
- Подсказка тегов при наборе Typography (можно `<T />`)
- Удобный доступ render(Typography[componentName])

Минусы
- Громоздко
- Должен быть унифицированный набор props. Скорее всего, многие должны быть перегруженными.
  То есть `size` может обозначать что-угодно для элементов Table и H1
*/}
  <Typography.H1>Заголовок 1</Typography.H1>
  <Typography.H2>Заголовок 2</Typography.H2>
  <Typography.H3>Заголовок 3</Typography.H3>
  <Typography.H4>Заголовок 4</Typography.H4>
  <Typography.H5>Заголовок 5</Typography.H5>

  <Typography.Ul size="xl">
    <Typography.Li></Typography.Li>
    <Typography.Li></Typography.Li>
    <Typography.Li></Typography.Li>
    <Typography.Li></Typography.Li>
    <Typography.Li></Typography.Li>
    <Typography.Li></Typography.Li>
    <Typography.Li></Typography.Li>
  </Typography.Ul>

  <Typography.Hr />

  <Typography.Ol>
    <Typography.Li></Typography.Li>
    <Typography.Li></Typography.Li>
    <Typography.Li></Typography.Li>
    <Typography.Li></Typography.Li>
  </Typography.Ol>

  <Typography.P></Typography.P>

  <Typography.Table>
    <Typography.Thead></Typography.Thead>
    <Typography.Tbody>
      <Typography.Tr>
        <Typography.Td></Typography.Td>
        <Typography.Td></Typography.Td>
      </Typography.Tr>
    </Typography.Tbody>
  </Typography.Table>
</>;


<>
  {/* Вариант 3. Комопненты имплементирующие элементы

Плюсы
- Подсказка тегов при наборе пропа type
- Удобный доступ <Typography type={componentType} />
- Есть возможность отделять внешний вид от тега, когда они совпадают. 

Минусы
- Громоздко
*/}
  <Typography type="h1">Заголовок 1</Typography>
  <Typography type="h2">Заголовок 2</Typography>
  <Typography type="h3">Заголовок 3</Typography>
  <Typography type="h4">Заголовок 4</Typography>
  <Typography type="h5">Заголовок 5</Typography>

  <Typography type="ul">
    <Typography type="li"></Typography>
    <Typography type="li"></Typography>
    <Typography type="li"></Typography>
    <Typography type="li"></Typography>
    <Typography type="li"></Typography>
    <Typography type="li"></Typography>
    <Typography type="li"></Typography>
  </Typography>

  <Typography type="hr" />

  <Typography type="ol">
    <Typography type="li"></Typography>
    <Typography type="li"></Typography>
    <Typography type="li"></Typography>
    <Typography type="li"></Typography>
  </Typography>

  <Typography type="p"></Typography>

  <Typography type="table">
    <Typography type="thead"></Typography>
    <Typography type="tbody">
      <Typography type="tr">
        <Typography type="td"></Typography>
        <Typography type="td"></Typography>
      </Typography>
    </Typography>
  </Typography>
</>

Generate PDF for guide page

  • Generate PDF with browser Puppertier (node.js)
    • In browser with evaluate() function create image by jspdf and htmltocanvas
    • Add custom fonts to jsPDF
    • Remove left menu from pdf
    • Save image as .pdf
  • Download direct link to download
  • Create download pdf button
    • Output filesize (19.6 mb)
    • Add to top of guide page
    • Add to bottom of guide

Design

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.