Ionic: เปลี่ยน Theme และ Font

การกำหนดค่า CSS เพื่อใช้ร่วมกันทั้งแอพ
กำหนดไว้ในไฟล์ src/theme/variables.scss

theme

การเปลี่ยนสี navbar

แก้ไขไฟล์ src/pages/home/home.html

บรรทัดที่ 2: เพิ่ม color="danger"

การเปลี่ยน Font

เลือก Google Fonts ที่ https://fonts.google.com
โดยคลิกที่ฟอน์ตที่ต้องการ จากนั้นเลือก Select – Embed – @import แล้ว copy ค่ามาใส่ที่ ไฟล์ src/theme/variables.scss

แก้ไขไฟล์ src/theme/variables.scss ในส่วนของฟอน์ต

[code]
// Fonts
// ————————————————–

@import "roboto";
@import "noto-sans";

@import url(‘https://fonts.googleapis.com/css?family=Itim’);
*{
font-family: ‘Itim’, cursive;
}
[/code]

Note: การใส่ * เป็นการบอกว่าให้ใช้ฟอน์ตนี้กับทั้งแอพเลย

[BOXMOBILEDEV] Ionic 3 EP5 : ตกแต่ง scss และ Font ที่ต้องการ