diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 23e4a899..7f62e658 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -29,11 +29,6 @@ $sizes: ( "70ch": 70ch, ); -.btn { - background-color: var(--foreground); - color: var(--background); -} - @import "bootstrap"; @import "editor"; @@ -195,7 +190,7 @@ fieldset { &[type=button] { @extend .btn; - @extend .btn-info; + @extend .btn-secondary; @extend .m-0; } } @@ -209,8 +204,6 @@ svg { } .btn { - border: none; - border-radius: 0; margin-right: 0.3rem; margin-bottom: 0.3rem; @@ -246,7 +239,7 @@ svg { color: $magenta; } - .btn { + .btn-secondary { background-color: $white; color: $black; border: none; diff --git a/app/assets/stylesheets/dark.scss b/app/assets/stylesheets/dark.scss index 9893c70b..59e15180 100644 --- a/app/assets/stylesheets/dark.scss +++ b/app/assets/stylesheets/dark.scss @@ -7,3 +7,22 @@ $cyan: #13fefe; --background: #{$black}; --color: #{$cyan}; } + +.btn-secondary { + background-color: $white; + color: $black; + border: none; + + &:hover { + color: $black; + background-color: $cyan; + } + + &:active { + background-color: $cyan; + } + + &:focus { + box-shadow: 0 0 0 0.2rem $cyan; + } +} diff --git a/app/views/collaborations/collaborate.haml b/app/views/collaborations/collaborate.haml index 4d43ad7e..cc951b0c 100644 --- a/app/views/collaborations/collaborate.haml +++ b/app/views/collaborations/collaborate.haml @@ -25,4 +25,4 @@ class: 'form-control' .form-group - = f.submit t('.submit'), class: 'btn btn-lg btn-block' + = f.submit t('.submit'), class: 'btn btn-secondary btn-lg btn-block' diff --git a/app/views/devise/confirmations/new.haml b/app/views/devise/confirmations/new.haml index bc2f77bb..c934edc5 100644 --- a/app/views/devise/confirmations/new.haml +++ b/app/views/devise/confirmations/new.haml @@ -30,5 +30,5 @@ placeholder: t('activerecord.attributes.usuarie.email') .actions = f.submit t('.resend_confirmation_instructions'), - class: 'btn btn-lg btn-block' + class: 'btn btn-secondary btn-lg btn-block' = render 'devise/shared/links' diff --git a/app/views/devise/invitations/edit.haml b/app/views/devise/invitations/edit.haml index ed4980ef..3d2f8d76 100644 --- a/app/views/devise/invitations/edit.haml +++ b/app/views/devise/invitations/edit.haml @@ -32,4 +32,4 @@ placeholder: t('activerecord.attributes.usuarie.password') .actions = f.submit t('devise.invitations.edit.submit_button'), - class: 'btn btn-lg btn-block' + class: 'btn btn-secondary btn-lg btn-block' diff --git a/app/views/devise/invitations/new.haml b/app/views/devise/invitations/new.haml index 4ebb8fa7..b8b097d0 100644 --- a/app/views/devise/invitations/new.haml +++ b/app/views/devise/invitations/new.haml @@ -16,4 +16,4 @@ = f.text_field field, class: 'form-control' .actions = f.submit t('devise.invitations.new.submit_button'), - class: 'btn btn-lg btn-block' + class: 'btn btn-secondary btn-lg btn-block' diff --git a/app/views/devise/passwords/edit.haml b/app/views/devise/passwords/edit.haml index 3a8843c0..cd8ab8ad 100644 --- a/app/views/devise/passwords/edit.haml +++ b/app/views/devise/passwords/edit.haml @@ -39,6 +39,6 @@ .actions = f.submit t('.change_my_password'), - class: 'btn btn-lg btn-block' + class: 'btn btn-secondary btn-lg btn-block' = render 'devise/shared/links' diff --git a/app/views/devise/passwords/new.haml b/app/views/devise/passwords/new.haml index 08dd8d2e..4bf7c990 100644 --- a/app/views/devise/passwords/new.haml +++ b/app/views/devise/passwords/new.haml @@ -20,5 +20,5 @@ placeholder: t('activerecord.attributes.usuarie.email') .actions = f.submit t('.send_me_reset_password_instructions'), - class: 'btn btn-lg btn-block' + class: 'btn btn-secondary btn-lg btn-block' = render 'devise/shared/links' diff --git a/app/views/devise/registrations/edit.haml b/app/views/devise/registrations/edit.haml index 92699ab8..8bdc55d9 100644 --- a/app/views/devise/registrations/edit.haml +++ b/app/views/devise/registrations/edit.haml @@ -55,7 +55,7 @@ = t('.we_need_your_current_password_to_confirm_your_changes') .actions = f.submit t('.update'), - class: 'btn btn-lg btn-block' + class: 'btn btn-secondary btn-lg btn-block' %hr/ .sr-only @@ -63,4 +63,4 @@ = button_to t('.cancel_my_account'), registration_path(resource_name), data: { confirm: t('.are_you_sure') }, - method: :delete, class: 'btn btn-block' + method: :delete, class: 'btn btn-secondary btn-block' diff --git a/app/views/devise/registrations/new.haml b/app/views/devise/registrations/new.haml index 26fc8e18..aabc0487 100644 --- a/app/views/devise/registrations/new.haml +++ b/app/views/devise/registrations/new.haml @@ -56,6 +56,6 @@ .actions = f.submit t('.sign_up'), - class: 'btn btn-lg btn-block' + class: 'btn btn-secondary btn-lg btn-block' = render 'devise/shared/links' diff --git a/app/views/devise/sessions/new.haml b/app/views/devise/sessions/new.haml index 9b396187..03c3974b 100644 --- a/app/views/devise/sessions/new.haml +++ b/app/views/devise/sessions/new.haml @@ -35,5 +35,5 @@ remember_for: distance_of_time_in_words(Usuarie.remember_for)) .actions = f.submit t('.sign_in'), - class: 'btn btn-lg btn-block' + class: 'btn btn-secondary btn-lg btn-block' = render 'devise/shared/links' diff --git a/app/views/devise/unlocks/new.haml b/app/views/devise/unlocks/new.haml index 09468a52..34253f44 100644 --- a/app/views/devise/unlocks/new.haml +++ b/app/views/devise/unlocks/new.haml @@ -20,5 +20,5 @@ placeholder: t('activerecord.attributes.usuarie.email') .actions = f.submit t('.resend_unlock_instructions'), - class: 'btn btn-lg btn-block' + class: 'btn btn-secondary btn-lg btn-block' = render 'devise/shared/links' diff --git a/app/views/i18n/_form.haml b/app/views/i18n/_form.haml index c88e8616..31b76932 100644 --- a/app/views/i18n/_form.haml +++ b/app/views/i18n/_form.haml @@ -11,7 +11,7 @@ = select_tag 'to', options_for_select(@options, @lang_to), class: 'form-control' - = submit_tag t('i18n.translate'), class: 'btn', name: nil + = submit_tag t('i18n.translate'), class: 'btn btn-secondary', name: nil - else = t('i18n.translating.from') = select_tag 'from', @@ -21,7 +21,7 @@ = select_tag 'to', options_for_select(@options, @lang_to), class: 'form-control' - = submit_tag t('i18n.change'), class: 'btn', name: nil + = submit_tag t('i18n.change'), class: 'btn btn-secondary', name: nil = render 'layouts/help', help: t('help.i18n.index') @@ -33,16 +33,16 @@ = hidden_field 'i18n', 'lang_to', value: @lang_to .form-group .dropdown.inline - %button.btn.dropdown-toggle{type: 'button', + %button.btn.btn-secondary.dropdown-toggle{type: 'button', data: { toggle: 'dropdown' }, aria: { haspopup: 'true', expanded: 'false' }} = t('i18n.jump') .dropdown-menu{aria: { labelledby: t('i18n.jump') }} - @site.data.dig(@lang_from).each_pair do |section, content| %a.dropdown-item{href: "##{section}"}= t("help.i18n.#{section}") - = submit_tag t('i18n.save'), class: 'btn' + = submit_tag t('i18n.save'), class: 'btn btn-secondary' = render 'i18n/recursive', data: @site.data.dig(@lang_from), superkeys: [] .form-group - = submit_tag t('i18n.save'), class: 'btn' + = submit_tag t('i18n.save'), class: 'btn btn-secondary' diff --git a/app/views/layouts/_breadcrumb.haml b/app/views/layouts/_breadcrumb.haml index 11f7f005..137f086e 100644 --- a/app/views/layouts/_breadcrumb.haml +++ b/app/views/layouts/_breadcrumb.haml @@ -17,15 +17,15 @@ - if @site&.tienda? %li.nav-item = link_to t('.tienda'), @site.tienda_url, - role: 'button', class: 'btn' + role: 'button', class: 'btn btn-secondary' %li.nav-item = link_to t('.contact_us'), t('.contact_us_href'), - class: 'btn', rel: 'me', target: '_blank' + class: 'btn btn-secondary', rel: 'me', target: '_blank' %li.nav-item = link_to t('.logout'), main_app.destroy_usuarie_session_path, - method: :delete, role: 'button', class: 'btn' + method: :delete, role: 'button', class: 'btn btn-secondary' - else - params.permit! - I18n.available_locales.each do |locale| diff --git a/app/views/layouts/_btn_with_tooltip.haml b/app/views/layouts/_btn_with_tooltip.haml index 27eda3c1..9651eae0 100644 --- a/app/views/layouts/_btn_with_tooltip.haml +++ b/app/views/layouts/_btn_with_tooltip.haml @@ -1,2 +1,2 @@ -= link_to text, link, class: 'btn', += link_to text, link, class: 'btn btn-secondary', data: { toggle: 'tooltip' }, 'aria-role': 'button', title: tooltip diff --git a/app/views/posts/_submit.haml b/app/views/posts/_submit.haml index 944694c1..c6c0a68a 100644 --- a/app/views/posts/_submit.haml +++ b/app/views/posts/_submit.haml @@ -1,7 +1,7 @@ - invalid_help = site.config.fetch('invalid_help', t('.invalid_help')) - sending_help = site.config.fetch('sending_help', t('.sending_help')) .form-group - = submit_tag t('.save'), class: 'btn submit-post' + = submit_tag t('.save'), class: 'btn btn-secondary submit-post' = render 'bootstrap/alert', class: 'invalid-help d-none' do = invalid_help = render 'bootstrap/alert', class: 'sending-help d-none' do diff --git a/app/views/posts/attributes/_content.haml b/app/views/posts/attributes/_content.haml index 03867941..872422af 100644 --- a/app/views/posts/attributes/_content.haml +++ b/app/views/posts/attributes/_content.haml @@ -20,82 +20,82 @@ TODO: Eliminar todo el espacio en blanco para minificar HTML .editor-toolbar{ style: 'z-index: 1' } .editor-primary-toolbar.scrollbar-black - %button.btn{ type: 'button', title: t('editor.multimedia'), data: { editor_button: 'multimedia' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.multimedia'), data: { editor_button: 'multimedia' } }> %i.fa.fa-fw.fa-upload> %span.sr-only>= t('editor.multimedia') - %button.btn{ type: 'button', title: t('editor.bold'), data: { editor_button: 'mark-bold' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.bold'), data: { editor_button: 'mark-bold' } }> %i.fa.fa-fw.fa-bold> %span.sr-only>= t('editor.bold') - %button.btn{ type: 'button', title: t('editor.italic'), data: { editor_button: 'mark-italic' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.italic'), data: { editor_button: 'mark-italic' } }> %i.fa.fa-fw.fa-italic> %span.sr-only>= t('editor.italic') - %button.btn{ type: 'button', title: t('editor.mark'), data: { editor_button: 'mark-mark' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.mark'), data: { editor_button: 'mark-mark' } }> %i.fa.fa-fw.fa-tint> %span.sr-only>= t('editor.mark') - %button.btn{ type: 'button', title: t('editor.link'), data: { editor_button: 'mark-link' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.link'), data: { editor_button: 'mark-link' } }> %i.fa.fa-fw.fa-link> %span.sr-only>= t('editor.link') - %button.btn{ type: 'button', title: t('editor.deleted'), data: { editor_button: 'mark-deleted' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.deleted'), data: { editor_button: 'mark-deleted' } }> %i.fa.fa-fw.fa-strikethrough> %span.sr-only>= t('editor.deleted') - %button.btn{ type: 'button', title: t('editor.underline'), data: { editor_button: 'mark-underline' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.underline'), data: { editor_button: 'mark-underline' } }> %i.fa.fa-fw.fa-underline> %span.sr-only>= t('editor.underline') - %button.btn{ type: 'button', title: t('editor.super'), data: { editor_button: 'mark-super' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.super'), data: { editor_button: 'mark-super' } }> %i.fa.fa-fw.fa-superscript> %span.sr-only>= t('editor.super') - %button.btn{ type: 'button', title: t('editor.sub'), data: { editor_button: 'mark-sub' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.sub'), data: { editor_button: 'mark-sub' } }> %i.fa.fa-fw.fa-subscript> %span.sr-only>= t('editor.sub') - %button.btn{ type: 'button', title: t('editor.small'), data: { editor_button: 'mark-small' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.small'), data: { editor_button: 'mark-small' } }> %i.fa.fa-fw.fa-subscript> %span.sr-only>= t('editor.small') - %button.btn.mr-0{ type: 'button', title: t('editor.h1'), data: { editor_button: 'block-h1' } }> + %button.btn.btn-secondary.mr-0{ type: 'button', title: t('editor.h1'), data: { editor_button: 'block-h1' } }> %i.fa.fa-fw.fa-heading> 1 %span.sr-only>= t('editor.h1') %details.d-inline> %summary.d-inline> - %span.btn.ml-0{ role: 'button', title: t('editor.more') }> + %span.btn.btn-secondary.ml-0{ role: 'button', title: t('editor.more') }> %i.fa.fa-caret-right> %span.sr-only= t('editor.more') .d-inline> - %button.btn{ type: 'button', title: t('editor.h2'), data: { editor_button: 'block-h2' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.h2'), data: { editor_button: 'block-h2' } }> %i.fa.fa-fw.fa-heading> 2 %span.sr-only>= t('editor.h2') - %button.btn{ type: 'button', title: t('editor.h3'), data: { editor_button: 'block-h3' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.h3'), data: { editor_button: 'block-h3' } }> %i.fa.fa-fw.fa-heading> 3 %span.sr-only>= t('editor.h3') - %button.btn{ type: 'button', title: t('editor.h4'), data: { editor_button: 'block-h4' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.h4'), data: { editor_button: 'block-h4' } }> %i.fa.fa-fw.fa-heading> 4 %span.sr-only>= t('editor.h4') - %button.btn{ type: 'button', title: t('editor.h5'), data: { editor_button: 'block-h5' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.h5'), data: { editor_button: 'block-h5' } }> %i.fa.fa-fw.fa-heading> 5 %span.sr-only>= t('editor.h5') - %button.btn{ type: 'button', title: t('editor.h6'), data: { editor_button: 'block-h6' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.h6'), data: { editor_button: 'block-h6' } }> %i.fa.fa-fw.fa-heading> 6 %span.sr-only>= t('editor.h6') - %button.btn{ type: 'button', title: t('editor.ul'), data: { editor_button: 'block-unordered_list' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.ul'), data: { editor_button: 'block-unordered_list' } }> %i.fa.fa-fw.fa-list-ul> %span.sr-only>= t('editor.ul') - %button.btn{ type: 'button', title: t('editor.ol'), data: { editor_button: 'block-ordered_list' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.ol'), data: { editor_button: 'block-ordered_list' } }> %i.fa.fa-fw.fa-list-ol> %span.sr-only>= t('editor.ol') - %button.btn{ type: 'button', title: t('editor.left'), data: { editor_button: 'parentBlock-left' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.left'), data: { editor_button: 'parentBlock-left' } }> %i.fa.fa-fw.fa-align-left> %span.sr-only>= t('editor.left') - %button.btn{ type: 'button', title: t('editor.center'), data: { editor_button: 'parentBlock-center' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.center'), data: { editor_button: 'parentBlock-center' } }> %i.fa.fa-fw.fa-align-center> %span.sr-only>= t('editor.center') - %button.btn{ type: 'button', title: t('editor.right'), data: { editor_button: 'parentBlock-right' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.right'), data: { editor_button: 'parentBlock-right' } }> %i.fa.fa-fw.fa-align-right> %span.sr-only>= t('editor.right') - %button.btn{ type: 'button', title: t('editor.blockquote'), data: { editor_button: 'block-blockquote' } }> + %button.btn.btn-secondary{ type: 'button', title: t('editor.blockquote'), data: { editor_button: 'block-blockquote' } }> %i.fa.fa-fw.fa-quote-left> %span.sr-only>= t('editor.blockquote') @@ -116,8 +116,8 @@ %label{ for: 'multimedia-alt' }= t('editor.description') %input.form-control{ type: 'text', id: 'multimedia-alt', name: 'multimedia-alt' }/ .form-group - %button.btn{ type: 'button', id: 'multimedia-file-upload', name: 'multimedia-file-upload' }= t('editor.multimedia-upload') - %button.btn{ type: 'button', id: 'multimedia-remove', name: 'multimedia-remove' }= t('editor.multimedia-remove') + %button.btn.btn-secondary{ type: 'button', id: 'multimedia-file-upload', name: 'multimedia-file-upload' }= t('editor.multimedia-upload') + %button.btn.btn-secondary{ type: 'button', id: 'multimedia-remove', name: 'multimedia-remove' }= t('editor.multimedia-remove') .form-group{ data: { editor_auxiliary: 'link' } } %label{ for: 'link-url' }= t('editor.url') diff --git a/app/views/posts/edit.haml b/app/views/posts/edit.haml index 6ec252fe..c792ac93 100644 --- a/app/views/posts/edit.haml +++ b/app/views/posts/edit.haml @@ -1,3 +1,6 @@ .row.justify-content-center .col-md-8 - = render 'posts/form', site: @site, post: @post + = render 'layouts/details', summary: "Post" do + = render 'posts/form', site: @site, post: @post + = render 'layouts/details', summary: t('.moderation_queue') do + = render 'posts/moderation_queue', site: @site, post: @post, moderation_queue: @moderation_queue diff --git a/app/views/posts/index.haml b/app/views/posts/index.haml index ae53aa7a..374f06ee 100644 --- a/app/views/posts/index.haml +++ b/app/views/posts/index.haml @@ -15,13 +15,13 @@ = render 'schemas/row', site: @site, schema: schema, filter: @filter_params - if policy(@site_stat).index? - = link_to t('stats.index.title'), site_stats_path(@site), class: 'btn' + = link_to t('stats.index.title'), site_stats_path(@site), class: 'btn btn-secondary' - if policy(@site).edit? - = link_to t('sites.edit.btn', site: @site.title), edit_site_path(@site), class: 'btn' + = link_to t('sites.edit.btn', site: @site.title), edit_site_path(@site), class: 'btn btn-secondary' - if policy(@site).private? - = link_to t('sites.private'), '../private/' + @site.name, class: 'btn', target: '_blank', rel: 'noopener' + = link_to t('sites.private'), '../private/' + @site.name, class: 'btn btn-secondary', target: '_blank', rel: 'noopener' - if policy(SiteUsuarie.new(@site, current_usuarie)).index? = render 'layouts/btn_with_tooltip', @@ -33,9 +33,9 @@ - if @site.design.credits = render 'bootstrap/alert' do = sanitize_markdown @site.design.credits - = link_to t('sites.donations.text'), t('sites.donations.url'), class: 'btn' + = link_to t('sites.donations.text'), t('sites.donations.url'), class: 'btn btn-secondary' - if @site.design.designer_url - = link_to t('sites.designer_url'), @site.design.designer_url, class: 'btn' + = link_to t('sites.designer_url'), @site.design.designer_url, class: 'btn btn-secondary' %section.col .d-flex.justify-content-between.align-items-center.pl-2-plus.pr-2-plus.mb-2 @@ -75,19 +75,19 @@ %th.border-0{ colspan: '4' } .d-flex.flex-row.justify-content-between %div - = submit_tag t('posts.reorder.submit'), class: 'btn' - %button.btn{ data: { action: 'reorder#unselect' } } + = submit_tag t('posts.reorder.submit'), class: 'btn btn-secondary' + %button.btn.btn-secondary{ data: { action: 'reorder#unselect' } } = t('posts.reorder.unselect') %span.badge{ data: { target: 'reorder.counter' } } 0 - %button.btn{ data: { action: 'reorder#up' } }= t('posts.reorder.up') - %button.btn{ data: { action: 'reorder#down' } }= t('posts.reorder.down') - %button.btn{ data: { action: 'reorder#top' } }= t('posts.reorder.top') - %button.btn{ data: { action: 'reorder#bottom' } }= t('posts.reorder.bottom') + %button.btn.btn-secondary{ data: { action: 'reorder#up' } }= t('posts.reorder.up') + %button.btn.btn-secondary{ data: { action: 'reorder#down' } }= t('posts.reorder.down') + %button.btn.btn-secondary{ data: { action: 'reorder#top' } }= t('posts.reorder.top') + %button.btn.btn-secondary{ data: { action: 'reorder#bottom' } }= t('posts.reorder.bottom') - if @site.pagination %div - = link_to_prev_page @posts, t('posts.prev'), class: 'btn' - = link_to_next_page @posts, t('posts.next'), class: 'btn' + = link_to_prev_page @posts, t('posts.prev'), class: 'btn btn-secondary' + = link_to_next_page @posts, t('posts.next'), class: 'btn btn-secondary' %tbody - dir = @site.data.dig(params[:locale], 'dir') - size = @posts.size @@ -126,9 +126,9 @@ = post.order %td.text-nowrap - if @usuarie || policy(post).edit? - = link_to t('posts.edit'), edit_site_post_path(@site, post.path), class: 'btn btn-block' + = link_to t('posts.edit'), edit_site_post_path(@site, post.path), class: 'btn btn-secondary btn-block' - if @usuarie || policy(post).destroy? - = link_to t('posts.destroy'), site_post_path(@site, post.path), class: 'btn btn-block', method: :delete, data: { confirm: t('posts.confirm_destroy') } + = link_to t('posts.destroy'), site_post_path(@site, post.path), class: 'btn btn-secondary btn-block', method: :delete, data: { confirm: t('posts.confirm_destroy') } #footnotes{ hidden: true } - @filter_params.each do |param, value| diff --git a/app/views/posts/show.haml b/app/views/posts/show.haml index 068a6adf..10900d67 100644 --- a/app/views/posts/show.haml +++ b/app/views/posts/show.haml @@ -4,7 +4,7 @@ %article.content.table-responsive-md = link_to t('posts.edit'), edit_site_post_path(@site, @post.id), - class: 'btn btn-block' + class: 'btn btn-secondary btn-block' %table.table.table-condensed %thead diff --git a/app/views/sites/_build.haml b/app/views/sites/_build.haml index 5911e908..b0961e31 100644 --- a/app/views/sites/_build.haml +++ b/app/views/sites/_build.haml @@ -3,7 +3,7 @@ method: :post, class: 'form-inline inline' do = submit_tag site.enqueued? ? t('sites.enqueued') : t('sites.enqueue'), - class: "btn no-border-radius #{local_assigns[:class]}", + class: "btn btn-secondary #{local_assigns[:class]}", title: site.enqueued? ? t('help.sites.enqueued') : t('help.sites.enqueue'), data: { disable_with: t('sites.enqueued') }, disabled: site.enqueued? diff --git a/app/views/sites/_form.haml b/app/views/sites/_form.haml index 0dcccbe3..ec2712bf 100644 --- a/app/views/sites/_form.haml +++ b/app/views/sites/_form.haml @@ -72,10 +72,10 @@ .btn-group{ role: 'group', 'aria-label': t('.design.actions') } - if design.url = link_to t('.design.url'), design.url, - target: '_blank', class: 'btn' + target: '_blank', class: 'btn btn-secondary' - if design.license = link_to t('.design.license'), design.license, - target: '_blank', class: 'btn' + target: '_blank', class: 'btn btn-secondary' %hr/ .form-group.licenses#license_id @@ -99,7 +99,7 @@ tags: %w[p a strong em ul ol li h1 h2 h3 h4 h5 h6] - unless licencia.custom? - = link_to t('.licencia.url'), licencia.url, target: '_blank', class: 'btn', rel: 'noopener' + = link_to t('.licencia.url'), licencia.url, target: '_blank', class: 'btn btn-secondary', rel: 'noopener' %hr/ @@ -163,4 +163,4 @@ deploy: deploy, site: site .form-group - = f.submit submit, class: 'btn btn-lg btn-block' + = f.submit submit, class: 'btn btn-secondary btn-lg btn-block' diff --git a/app/views/sites/fetch.haml b/app/views/sites/fetch.haml index f5d049c8..6d670d6f 100644 --- a/app/views/sites/fetch.haml +++ b/app/views/sites/fetch.haml @@ -27,4 +27,4 @@ .row.justify-content-center .col-md-8 = link_to t('.merge.request'), site_pull_path(@site), - method: 'post', class: 'btn btn-lg' + method: 'post', class: 'btn btn-secondary btn-lg' diff --git a/app/views/sites/index.haml b/app/views/sites/index.haml index b7231292..ed87180a 100644 --- a/app/views/sites/index.haml +++ b/app/views/sites/index.haml @@ -4,7 +4,7 @@ %p.lead= t('.help') - if policy(Site).new? = link_to t('sites.new.title'), new_site_path, - class: 'btn' + class: 'btn btn-secondary' %section.col - if @sites.empty? @@ -29,18 +29,18 @@ = site.title %p.lead= site.description %br - = link_to t('.visit'), site.url, class: 'btn' + = link_to t('.visit'), site.url, class: 'btn btn-secondary' - if rol.temporal = button_to t('sites.invitations.accept'), site_usuaries_accept_invitation_path(site), method: :patch, title: t('help.sites.invitations.accept'), - class: 'btn' + class: 'btn btn-secondary' = button_to t('sites.invitations.reject'), site_usuaries_reject_invitation_path(site), method: :patch, title: t('help.sites.invitations.reject'), - class: 'btn' + class: 'btn btn-secondary' - else - if policy(site).show? = render 'layouts/btn_with_tooltip', diff --git a/app/views/stats/index.haml b/app/views/stats/index.haml index 88e86aa3..1c1a31f1 100644 --- a/app/views/stats/index.haml +++ b/app/views/stats/index.haml @@ -11,11 +11,11 @@ %form.mb-5.form-inline{ method: 'get' } - Stat::INTERVALS.each do |interval| - = link_to t(".#{interval}"), site_stats_path(interval: interval, urls: params[:urls], period_start: params[:period_start].to_date.try(:"beginning_of_#{interval}").to_date, period_end: params[:period_end]), class: "mb-0 btn #{'btn-primary active' if @interval == interval}" + = link_to t(".#{interval}"), site_stats_path(interval: interval, urls: params[:urls], period_start: params[:period_start].to_date.try(:"beginning_of_#{interval}").to_date, period_end: params[:period_end]), class: "mb-0 btn #{@interval == interval ? 'btn-primary active' : 'btn-secondary' }" %input.form-control{ type: 'date', name: :period_start, value: params[:period_start] } %input.form-control{ type: 'date', name: :period_end, value: params[:period_end] } - %button.btn.mb-0{ type: 'submit' }= t('.filter') + %button.btn.btn-secondary.mb-0{ type: 'submit' }= t('.filter') .mb-5 %h2= t('.host.title', count: @hostnames.size) @@ -34,7 +34,7 @@ %textarea#urls.form-control{ name: 'urls', autocomplete: 'on', required: true, rows: @normalized_urls.size + 1, aria_describedby: 'help-urls' }= @normalized_urls.join("\n") %small#help-urls.feedback.form-text.text-muted= t('.urls.help') .form-group - %button.btn{ type: 'submit' }= t('.urls.submit') + %button.btn.btn-secondary{ type: 'submit' }= t('.urls.submit') - if @normalized_urls.present? = line_chart site_stats_uris_path(urls: @normalized_urls, **@chart_params), **@chart_options diff --git a/app/views/usuaries/index.haml b/app/views/usuaries/index.haml index 124fb04b..f972a91f 100644 --- a/app/views/usuaries/index.haml +++ b/app/views/usuaries/index.haml @@ -9,13 +9,13 @@ - if @policy.invite? = link_to t('.invite'), site_usuaries_invite_path(@site, invite_as: u.to_s), - class: 'btn', + class: 'btn btn-secondary', data: { toggle: 'tooltip' }, title: t('.help.invite', invite_as: u.to_s) - if policy(Collaboration.new(@site)).collaborate? = link_to t('.public_invite'), site_collaborate_path(@site), - class: 'btn', + class: 'btn btn-secondary', data: { toggle: 'tooltip' }, title: t('.help.public_invite') %p.lead= t(".help.#{u}") @@ -38,7 +38,7 @@ - if @policy.demote? && @site.usuarie?(cuenta) = link_to t('.demote.text'), site_usuarie_demote_path(@site, cuenta), - class: 'btn', + class: 'btn btn-secondary', data: { toggle: 'tooltip', confirm: t('.demote.confirm') }, title: t('.help.demote'), @@ -46,7 +46,7 @@ - if @policy.promote? && @site.invitade?(cuenta) = link_to t('.promote.text'), site_usuarie_promote_path(@site, cuenta), - class: 'btn', + class: 'btn btn-secondary', data: { toggle: 'tooltip', confirm: t('.promote.confirm') }, title: t('.help.promote'), @@ -54,7 +54,7 @@ - if @policy.destroy? = link_to t('.destroy.text'), site_usuarie_path(@site, cuenta), - class: 'btn', + class: 'btn btn-secondary', data: { toggle: 'tooltip', confirm: t('.destroy.confirm') }, title: t('.help.destroy'), diff --git a/app/views/usuaries/invite.haml b/app/views/usuaries/invite.haml index 26eb5039..2698fb8f 100644 --- a/app/views/usuaries/invite.haml +++ b/app/views/usuaries/invite.haml @@ -13,4 +13,4 @@ invite_as: invite_as) = f.text_area :invitaciones, class: 'form-control' .form-group - = f.submit t('.submit'), class: 'btn' + = f.submit t('.submit'), class: 'btn btn-secondary'