我正在创建一个名为NoteIt的网站(使用HAML
),用户可以创建笔记,只查看他们创建的笔记。你如何选择一个link_to
部分来设计它?
这是我的application.html.haml
文件:
!!!
%html
%head
%title NoteIt | Your online Notebook
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags
%body
%header
.header_inner
%h3 NoteIt << Here is where the NoteIt sign is placed
%nav
-if model_signed_in?
= link_to "New Note", new_note_path
= link_to "Sign Out", destroy_model_session_path, method: :delete
- else
= link_to "Log In", new_model_session_path
%p.notice= notice
%p.alert= alert
= yield
我解决了您需要做的就是更改margin-top
和margin-bottom
,并将其设置为所需的px
量。对于徽标,我用一个h1
标签写了NoteIt。