89 lines
3.7 KiB
Markdown
89 lines
3.7 KiB
Markdown
<h1>Hướng dẫn</h1>
|
|
|
|
<p>Link thiết kế: <a href="https://www.figma.com/file/5Km584w3tlnwxOltV5KAjh/281123_HURA8?node-id=328%3A1204&mode=dev" target="_blank"> <strong>Giao diện Admin</strong> </a></p>
|
|
|
|
<h2>Cài đặt hệ thống</h2>
|
|
|
|
<p>Test và làm việc chính tại web: <a href="http://local.hura8_admin/"> http://local.hura8_admin/</a> </p>
|
|
|
|
<ul>
|
|
<li>Tải phần mềm XAMPP tại https://www.apachefriends.org/download.html để chạy PHP</li>
|
|
<li>Chỉnh file hosts trong máy tính: 127.0.0.1 local.hura8_admin</li>
|
|
<li>Cài đặt httpd-vhosts.conf của XAMPP</li>
|
|
</ul>
|
|
|
|
<pre><code>
|
|
<VirtualHost *:80>
|
|
DocumentRoot "/thuc-muc-check-out/admin_hura_8"
|
|
ServerName local.hura8_admin
|
|
<Directory "/thuc-muc-check-out/admin_hura_8/">
|
|
Require all granted
|
|
</Directory>
|
|
</VirtualHost>
|
|
</code></pre>
|
|
|
|
<h2>Cấu trúc thư mục</h2>
|
|
|
|
<ul>
|
|
<li>/template: các file template html chia theo module/view</li>
|
|
<li>/data: cung cấp dữ liệu cho template và hiển thị dữ liệu trên template qua code Liquid <a href="https://shopify.github.io/liquid/" target="_blank">https://shopify.github.io/liquid/</a></li>
|
|
<li>/assets: lưu các file ảnh/css/js dùng cho giao diện</li>
|
|
<li>/package: thư viện code PHP hỗ trợ</li>
|
|
<li>/inc: các code PHP hỗ trợ</li>
|
|
<li>index.php: file gốc để truy cập nội dung</li>
|
|
<li>ajax.php: file gốc để gọi ajax</li>
|
|
</ul>
|
|
|
|
<h2>Cài đặt Composer (dùng tải package của PHP)</h2>
|
|
|
|
<p>Xem hướng dẫn: <a href="https://getcomposer.org/doc/00-intro.md#installation-windows" target="_blank">https://getcomposer.org/doc/00-intro.md#installation-windows</a> </p>
|
|
|
|
<p>Sau khi cài đặt xong. Mở cmd của Windows và thao tác lệnh sau để cài các thư viện code PHP cần cho dự án này.</p>
|
|
|
|
<pre><code>
|
|
> cd /thuc-muc-check-out/admin_hura_8/package
|
|
> composer i
|
|
</code></pre>
|
|
|
|
|
|
|
|
<h2> Sử dụng <u>Tailwind</u> để style giao diện.</h2>
|
|
|
|
<ul>
|
|
<li>[Dùng chính] <a href="https://daisyui.com/components/" target="_blank">https://daisyui.com/components/</a></li>
|
|
<li><a href="https://tailwindui.com/" target="_blank"> https://tailwindui.com/ </a></li>
|
|
<li><a href="https://tailblocks.cc/" target="_blank"> https://tailblocks.cc/ </a></li>
|
|
<li><a href="https://www.hyperui.dev/" target="_blank"> https://www.hyperui.dev/ </a></li>
|
|
<li><a href="https://flowbite.com/docs/plugins/charts/" target="_blank"> Biểu đồ </a></li>
|
|
</ul>
|
|
|
|
<h2 id="huong-dan-su-dung-git">Hướng dẫn up code sử dụng git</h2>
|
|
<p> Các bước up code:
|
|
<ol>
|
|
<li>Lấy tất cả code từ git url về máy</li>
|
|
<li>Kiểm tra trạng thái</li>
|
|
<li>Nếu có sự thay đổi, sẽ thêm file có sự thay đổi (Sẽ được thông báo ở bước 2)</li>
|
|
<li>Tạo ghi chú (Không viết tiếng việt có dấu)</li>
|
|
<li>Upload code</li>
|
|
</ol>
|
|
</p>
|
|
|
|
<p></p>
|
|
|
|
<ol>
|
|
<li><strong>git pull (git URL) master:</strong> Lấy code về máy</li>
|
|
<li><strong>git status:</strong> Kiểm tra file nào có sự thay đổi</li>
|
|
<li><strong>git add 'tên file có sự thay đổi':</strong> Là file được báo đỏ ở git status</li>
|
|
<li><strong>git commit -m 'nội dung mô tả' :</strong> Comment nội dung </li>
|
|
<li><strong>git push origin master :</strong> Upload code</li>
|
|
</ol>
|
|
|
|
<p>VD: Upload code từ url 'https://repo.hurasoft.com/ducdt/admin_hura.git', Thêm/Sửa file README.md</p>
|
|
<ol>
|
|
<li>git pull https://repo.hurasoft.com/ducdt/admin_hura.git master</li>
|
|
<li>git status</li>
|
|
<li>git add 'README.md'</li>
|
|
<li>git commit -m 'Huong dan, quy dinh'</li>
|
|
<li>git push origin master</li>
|
|
</ol>
|