导航栏徽标不合适HAML

问题描述 投票:0回答:1

我正在创建一个名为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
html haml
1个回答
0
投票

我解决了您需要做的就是更改margin-topmargin-bottom,并将其设置为所需的px量。对于徽标,我用一个h1标签写了NoteIt。

© www.soinside.com 2019 - 2024. All rights reserved.