【发布时间】:2019-04-13 00:48:48
【问题描述】:
这里的菜鸟: 我有我想单独设置样式的身份验证方法图标,但是它们属于同一类,我不明白如何重写它以将两个不同的用于 fb 和 google。
HTML SLIM 代码:
- if devise_mapping.omniauthable?
.row
.col-sm-12
p.text-center.small-link= t('html.text.or_oauth_login')
.col-sm-12.d-flex.justify-content-center.oauth-box
- resource_class.omniauth_providers.each do |provider|
a.tooltiptext.left[style="position:absolute; left: -10px; top: 43px; color: #FFFFFF;"]= t('html.links.tooltiptext')
= link_to image_tag("#{provider}_logo.png", size: "40x40"), omniauth_authorize_path(resource_name, provider), class: "oauth-icon"
所以唯一的类是 "oauth-icon" 。我假设它需要来自 devise.rb 的#{provider}
config.omniauth :facebook, "xxxxxxxx",
config.omniauth :google_oauth2, "xxxxxxxxxxx", "xxxxxxxxxx" {}
应该如何重写有两个类?
【问题讨论】:
标签: css ruby-on-rails ruby sass