Code Monkey home page Code Monkey logo

news's Introduction

sử dụng ckediter

giới thiệu:

CKEditor là một trình soạn thảo văn bản HTML.được thiết kế để đơn giản hóa việc tạo ra nội dung trang web. Đó là một trình soạn thảo WYSIWYG mang lại các tính năng xử lý văn bản phổ biến trực tiếp cho website.

install trong cakephp

-- download source tại: http://ckeditor.com/download copy source vào thư mục js trong webroot

install trong cakephp

-- khi sử dụng ckediter ta cần khai báo load js của nó trong layout tương ứng vd bạn sử dụng bài viết trong việc add post của blog. trang add đang sử dụng layout post.ctp. ta khai báo trong layout post.ctp như sau: echo $this->Html->script('ckeditor/ckeditor.js');

sử dụng:

trong view add.ctp ta gọi: Ck->input('field_name');?>

Responsive web design

lý do

  • trong thời đại các thiết bị di động lên ngôi. việc hiển thị trang web cũng cần thích ứng tốt với nhiều loại màn hình khác nhau của các thiết bị. Việc ra đời của Responsive nhằm hiển thị trang web trên nhiều thiết bị khác nhua mà ko bị vỡ cấu trúc website mà ta mong muốn.

khái niệm:

  • responsive kế thừa và tương tự như responsive architecture, trang web khi được thiết kế phải có khả năng tự động điều chỉnh để thích nghi với nhiều nhóm người sử dụng khác nhau.

Cách thiết kế website Responsive:

*CSS-Media Queries:

  • sử dụng media queries để nhận biết các độ phân giải màn hình khách nhau nhằm load css cho trang web cho phù hợp với màn hình client.
//980px hoặc nhỏ hơn
                @media screen and (max-width: 980px) {
                    #pagewrap {
                        width: 94%;
                    }
                    #content {
                        width: 65%;
                    }
                    #sidebar {
                        width: 30%;
                    }
                }
  • ta có thể sử dụng đồng thời nhiều thẻ @media screen để tạo ra css phù hợp với website cần hiển thị

demo: haianhxinh.com

  • chức năng add post sử dụng ckediter
  • tổng thể trang web được thiết kế theo Responsive

news's People

Contributors

kynm avatar

Watchers

James Cloos avatar  avatar

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.