HackMD
    • Sharing Link copied
    • /edit
    • View mode
      • Edit mode
      • View mode
      • Book mode
      • Slide mode
      Edit mode View mode Book mode Slide mode
    • Note Permission
    • Read
      • Only me
      • Signed-in users
      • Everyone
      Only me Signed-in users Everyone
    • Write
      • Only me
      • Signed-in users
      • Everyone
      Only me Signed-in users Everyone
    • More (Comment, Invitee)
    • Publishing
    • Commenting Enable
      Disabled Forbidden Owners Signed-in users Everyone
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Invitee
    • No invitee
    • Options
    • Versions
    • Transfer ownership
    • Delete this note
    • Template
    • Save as template
    • Insert from template
    • Export
    • Google Drive Export to Google Drive
    • Gist
    • Import
    • Google Drive Import from Google Drive
    • Gist
    • Clipboard
    • Download
    • Markdown
    • HTML
    • Raw HTML
Menu Sharing Help
Menu
Options
Versions Transfer ownership Delete this note
Export
Google Drive Export to Google Drive Gist
Import
Google Drive Import from Google Drive Gist Clipboard
Download
Markdown HTML Raw HTML
Back
Sharing
Sharing Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
More (Comment, Invitee)
Publishing
More (Comment, Invitee)
Commenting Enable
Disabled Forbidden Owners Signed-in users Everyone
Permission
Owners
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Invitee
No invitee
   owned this note    owned this note      
Published Linked with
Like BookmarkBookmarked
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
--- tags: g0v-summit, 2020 --- # 0609 前端交流 共筆: https://g0v.hackmd.io/@ddio/0609-summit-f2e ## 今天會聊: 1. 怎麼用 pug + tachyons + BEM 做出適合 vue component 的好維護的 html + css - [Pug](https://pugjs.org/api/getting-started.html) - HTML preprocessor, no closing tag, shorter class syntax - `.agenda` === `<div class="agenda"></div>` - [BEM](http://getbem.com/) - naming convention for CSS - ex: `agenda__item`, `agenda__item--active` - [Tachyon.io](http://tachyons.io/) - css tooltip for customized && responsive UI - `.agenda.flex.items-center.justify-between` === ```scss .agenda { display: flex; align-items: center; justify-content: center; } ``` - 一般用途: Pug + Tachyon - 細部調整或客製化元件: BEM 2. 未來待作 - shared scss using webpack loader - 議程試做 - 測試版、正式版發佈流程、宣傳流程 - 想要嘗試、改進的地方? ## 本日共筆 自我介紹 在美國的一家新創做前端 專注於用「非資本主義: 一手交錢一手交貨」的方式解決住的問題 平常很少講技術分享,這次做 g0v 的官網的經驗來分享 這次使用 vue、sass、HTML,因為有設計師的,所以 CSS 是自己寫的 也來分享自己習慣用的東西 尤其是在客制化網站的情境 ## Pug ### 簡介 - 是一個讓你少寫一點 HTML 的 pre processor(前置處理器) `.navber` === `<div class="navbar"></div>` - class寫起來像css選擇器 - 不用寫 close html tag - 省下找關閉 tag 的時間 - [補充:Pug 的介紹](https://pugjs.org/api/getting-started.html) --- ## BEM ### 簡介 - 一種 CSS 的命名邏輯。 - [命名原則](http://getbem.com/naming/) - 概念比較是用 component 架構來命名: - Block (區塊): 名詞 - Element (元素/元件): 名詞 - Modifier (狀態): 形容詞 - 優點,寫 CSS 的時候具備 Scope 可以清楚知道 程式碼的架構 --- ## Tachyon.io ### 簡介 - 類似 Boorstrap 的 CSS liberary - 但是在這一套的概念,並不是提供元件 ex: (上面的例子) `.agenda.flex.items-center.justify-between` === ```css .agenda { display: flex; align-items: center; justify-content: center; } ``` - 等級制,例如:pv4 ```css .pv4{ padding-top:2rem; padding-bottom:2rem; } ``` ``` /* FLEXBOX Media Query Extensions: -ns = not-small -m = medium -l = large */ ``` > 14:35 開始 Live Coding > {%hackmd jfvbUuzyQtOVjnWUOW1peQ %}

Import from clipboard

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lost their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.


Upgrade

All
  • All
  • Team
No template.

Create a template


Upgrade

Delete template

Do you really want to delete this template?

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

Sign in via GitHub

New to HackMD? Sign up

Help

  • English
  • 中文
  • 日本語

Documents

Tutorials

Book Mode Tutorial

Slide Example

YAML Metadata

Resources

Releases

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions

Versions

Upgrade now

Version named by    

More Less
  • Edit
  • Delete

Note content is identical to the latest version.
Compare with
    Choose a version
    No search result
    Version not found

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.