Giter VIP home page Giter VIP logo

js-webpacker-workshop's Introduction

ASTRO Camp JavaScript webpacker workshop

JS workshop 將會練習在 Rails 裡面用 Webpack 來安裝、使用前端套件

這裡有一個簡單的 Rails 6 專案,基本上所有內容是 scaffold 一鍵做出來的,然後有搭配 acts-as-taggable-on 這個 gem 做了標籤功能。

由於 Rails 內建表單不太好用,我們可以透過 Webpack 裝一些前端套件來優化,目標將網站的表單從原本的樣子改成這樣,以下有多個 Task 分別要用不同的套件來優化表單。

提示

任務清單

Task0:用 Bootstrap 美化頁面

  • 每次新增商品、編輯商品後,畫面是方會有漂亮的通知視窗

    • 顏色不限,有美化就好
    • 可以按右上角x關掉它
  • index 頁面美化

    • 風格不限,有美化就好
  • new/edit 頁面美化

    • 風格不限,有美化就好

Task1:用 datetimepicker 美化頁面

  • 將 datetimepicker 套用在表單的 Start at、End at 欄位上
    • Start at 必須早於 End at
    • End at 必須晚於 Start at

Task2:用 select2 美化頁面

  • 美化下拉選單,套用在表單的 Currency 欄位

    • 顏色不限,有美化就好
  • 優化表單的 Tag list

    • 可以自訂、新增、刪除標籤
    • 進入編輯頁面可以看到原本的標籤

Task3:用 sweetalert2 美化頁面

  • 送出表單後跳出提示視窗
    • 按 Cancel 關閉提示視窗
    • 按 OK 進入 Loading 提示視窗,並送出表單

Task4:將專案部署到 Heroku

  • 恭喜完成 JS workshop

js-webpacker-workshop's People

Contributors

shes50103 avatar gn2481 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.