Frontend: Notee
Note lại một số phần đã làm với Front-end ^^
Căn chỉnh vị trí text và content
- Content: https://getbootstrap.com/docs/4.0/utilities/flex/
1
2
3
4
5<div class="d-flex justify-content-start">...</div>
<div class="d-flex justify-content-end">...</div>
<div class="d-flex justify-content-center">...</div>
<div class="d-flex justify-content-between">...</div>
<div class="d-flex justify-content-around">...</div> - Text: https://getbootstrap.com/docs/4.0/utilities/text/
1
2
3
4
5
6
7
8<p class="text-left">Left aligned text on all viewport sizes.</p>
<p class="text-center">Center aligned text on all viewport sizes.</p>
<p class="text-right">Right aligned text on all viewport sizes.</p>
<p class="text-sm-left">Left aligned text on viewports sized SM (small) or wider.</p>
<p class="text-md-left">Left aligned text on viewports sized MD (medium) or wider.</p>
<p class="text-lg-left">Left aligned text on viewports sized LG (large) or wider.</p>
<p class="text-xl-left">Left aligned text on viewports sized XL (extra-large) or wider.</p>
Tab list
https://getbootstrap.com/docs/4.0/components/navs/#javascript-behavior
Drawer
- Cái này bootstrap chưa thấy hỗ trợ mạnh, thử dùng http://carolineamaba.com/bootstrap-drawer/
- Với React hay Material thì hỗ trợ rồi: https://material-ui.com/components/drawers/
- Demo: https://material-ui.com/components/drawers/
Wow js + animatie css
Slick Slide
Đọc kĩ các mode, bạn sẽ ít khi phải custom thứ gì :D
Slick Nav
Google Font Family
- Varela Round: https://fonts.googleapis.com/css?family=Varela+Round
- Nunito: https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i
- Montserrat: https://fonts.googleapis.com/css2?family=Nunito:wght@400%3b600%3b700%3b800&family=Montserrat:wght@400%3b500%3b600%3b700%3b800&display=swap
1 | <!-- Google fonts--> |
1 | /*Import google fonts */ |
HTML Symbols
Order
- Thứ tự hiển thị trên view: https://www.w3schools.com/cssref/css3_pr_order.asp
em, rem, px…
Chia giao diện làm n phần mà không dùng col
1 | -webkit-column-count: 2; |
Thống kê
- CharJS: https://www.chartjs.org/docs/latest/
- Highcharts: https://www.highcharts.com/demo/line-basic
typeahead
Class name
- bg-white, pt-10, d-none
- mb-30 bg-white border-radius-10 mt-20 justify-content-center
font-size-small, text-pink
BEM
Limit text 3 line
1 | .text-limit-3-row { |
Font awesome
Preview img
1 | $('#avatar').change(function(e) { |
Transitions
https://www.w3schools.com/css/css3_transitions.asp
Custom video
https://codepen.io/jamespeilow/pen/xJEaOZ
Chỉnh nội dung theo chiều dọc
vertical-align
Loading, Spin.js
- https://spin.js.org/
- keyword: spiner
- Example: Spinner Front Awesome
Js Noteee :D
Làm việc với query string
- URLSearchParams
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18const paramsString = 'q=URLUtils.searchParams&topic=api';
let searchParams = new URLSearchParams(paramsString);
//Iterate the search parameters.
for (let p of searchParams) {
console.log(p);
}
searchParams.has('topic') === true; // true
searchParams.get('topic') === "api"; // true
searchParams.getAll('topic'); // ["api"]
searchParams.get('foo') === null; // true
searchParams.append('topic', 'webdev');
searchParams.toString(); // "q=URLUtils.searchParams&topic=api&topic=webdev"
searchParams.set('topic', 'More webdev');
searchParams.toString(); // "q=URLUtils.searchParams&topic=More+webdev"
searchParams.delete('topic');
searchParams.toString(); // "q=URLUtils.searchParams"
Web API
Date format: Bootstrap vs JQuery UI
Frontend: Notee