ក្រោយពីការបែងចែក template នៃកម្មវិធី Rental Bicycle App ជាផ្នែកតូចៗរួចមក យើងអាចធ្វើការរចនាទំព័រមុខឬទំព័រ index ដូចខាងក្រោមនេះ៖
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <!--\views\index.tpl--> %include("./partials/header.tpl") < div class = "main" id = "main" > < div class = "content" id = "content" > < div class = "top-widget" > < span >BICYCLES</ span >< input type = "button" value = "Add Bicycle" /> </ div > < div class = "bottom-widget" > < span > < select > < option value = "Brand" >Brand</ option > </ select > < input type = "button" value = "Sort" /> </ span > < span class = "search" > < input type = "text" />< button >Search</ button > </ span > </ div > <!--bottom-widget--> </ div > <!--content--> %include("./partials/sidebar.tpl") </ div > <!--main--> %include("./partials/footer") |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | body{ margin : 0 ; padding : 0 ; background : rgb ( 175 , 172 , 172 ); } .site{ width : 900px ; margin : 30px auto ; background : white ; padding : 20px ; border-radius: 4px ; } .site-header{ font-size : 40px ; font-weight : bold ; padding : 40px 20px ; background : rgb ( 54 , 135 , 240 ); color : white ; border-radius: 4px 4px 0 0 ; text-align : center ; } ul.menu{ list-style : none ; background : lavender; margin : 0 ; padding : 0 ; } .menu li{ display : inline- block ; padding : 10px ; } .menu li:hover{ background : rgb ( 204 , 204 , 207 ); cursor : pointer ; } .main .content{ background : rgb ( 243 , 245 , 245 ); margin-top : 20px ; padding : 10px ; min-height : 400px ; } .main .top-widget input{ float : right ; } .main .bottom-widget{ margin-top : 50px ; } .main .bottom-widget select{ min-width : 150px ; padding : 1px 0 ; } .main .bottom-widget input{ min-width : 70px ; } .main .bottom-widget .search{ float : right ; } footer{ background : lightgrey; margin-top : 20px ; padding : 50px 0 ; text-align : center ; border-radius: 4px ; } |
GitHub: https://github.com/Sokhavuth/Rental-Bicycle-App
Heroku: https://khmerweb-rba.herokuapp.com/