Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make layout responsive. #378

Closed
wants to merge 28 commits into from
Closed

Make layout responsive. #378

wants to merge 28 commits into from

Conversation

avine
Copy link

@avine avine commented Jan 9, 2017

i have done some work to make the layout responsive.
You can check the result at: http://esdoc.avine.fr/ https://avine.io/projects/esdoc/v1/
Just resize the window to see it in action...

@avine
Copy link
Author

avine commented Jan 11, 2017

screenshot of the responsive menu:

responsive-menu

and navigation:

responsive-navigation

@avine
Copy link
Author

avine commented Jan 11, 2017

Note that on large screen, the layout-container's width is fixed (but it's completely optional):

@media (min-width: 1024px) {
  .layout-container {
    margin: 0 auto;
    width: 1024px; /* Comment this line to disable the feature */
    box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
    box-sizing: border-box;
    border-width: 0 1px;
    border-style: solid;
    border-color: #ddd;
  }
}

large-screen

avine added 2 commits January 11, 2017 10:55
- Fix the .main:after position
- Add .responsive class
- wrap the table with .table-wrapper
@avine
Copy link
Author

avine commented Jan 11, 2017

.table-wrapper class usage:

<div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <div class="table-wrapper">
    <table class="params">
    ...

table-wrapper

@avine
Copy link
Author

avine commented Jan 11, 2017

Here is the new markup for the .search-box:

 <div class="search-box">
     <div><input class="search-input"/></div>
     <ul class="search-result"></ul>
 </div>

@avine
Copy link
Author

avine commented Jan 11, 2017

search-close

search-open

search-result

@avine
Copy link
Author

avine commented Jan 11, 2017

By the way, the free icons comes from:
https://www.iconfinder.com/iconsets/developer-set-3

@avine
Copy link
Author

avine commented Jan 11, 2017

Here's the new .search-box markup:

<div class="search-box">
    <div class="search-input"><input/></div>
    <div class="search-result"><ul></ul></div>
</div>

And in search.js:

  var input = document.querySelector('.search-input').firstChild;
  var resultWrapper = document.querySelector('.search-result');
  var result = resultWrapper.firstChild;

Then, simply replace result.style.display by resultWrapper.style.display.

Stéphane.francel added 2 commits January 12, 2017 02:04
- Close properly the search box in search.js
- Improve the search result render
- Make responsive the search result height
- Some code refactoring
@avine
Copy link
Author

avine commented Jan 12, 2017

Long list of results:
search-result-long

Short list of results:
search-result-short

No result:
search-no-result

@avine
Copy link
Author

avine commented Jan 13, 2017

Hi,

First, I really like the amazing job you have done and I will be very happy if you are interested in my contribution.
It would be nice if you could give me a feedback on my work just to know if you like it.
If so, I will be able to go even further in the development.

The roadmap might be to split the CSS into something like:

  • base.css (required - contains minimal styles)
  • theme.css (optional - contains advanced styles for responsive design and more...)

This way, it will be super easy for anyone to just disable the theme.css in order to completely customize the interface in a different way (using the styles and scripts feature).

The configcould be:

{
  "includeTheme": true, // Include `theme.css` in the `layout.html`
  "styles": ["./path/to/style.css"],
  "scripts": ["./path/to/script.js"]
}

Best regards,

@avine
Copy link
Author

avine commented Jan 13, 2017

Please check the result at: http://esdoc.avine.fr https://avine.io/projects/esdoc/v1/

@florianb
Copy link

👏 i ❤️ it! I hope it gets merged!

@avine
Copy link
Author

avine commented Jan 14, 2017 via email

@h13i32maru
Copy link
Member

h13i32maru commented Jan 15, 2017

Thank you ❤️
I will check this, please wait a little.

@avine
Copy link
Author

avine commented Jan 15, 2017

Thanks in advance. Feel free to ask me any question. I will be pleased to explain the code if needed.

@h13i32maru
Copy link
Member

Please check #379 (comment)

@h13i32maru
Copy link
Member

Please check #379 (comment)

@h13i32maru h13i32maru closed this Sep 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants