Commit ec203119 authored by Jean du Plessis's avatar Jean du Plessis

Remove .project-home-panel style properties

Switches out some stylesheet rule properties in favor of
using utility classes. Also decouples the .group-home-panel
styles from the projects.scss file by moving it to group.scss.
parent 93b1c868
......@@ -95,6 +95,78 @@
}
}
.group-home-panel {
margin-top: $gl-padding;
margin-bottom: $gl-padding;
.home-panel-avatar {
width: $home-panel-title-row-height;
height: $home-panel-title-row-height;
flex-shrink: 0;
flex-basis: $home-panel-title-row-height;
}
.home-panel-title {
font-size: 20px;
line-height: $gl-line-height-24;
font-weight: bold;
.icon {
vertical-align: -1px;
}
.home-panel-topic-list {
font-size: $gl-font-size;
font-weight: $gl-font-weight-normal;
.icon {
position: relative;
top: 3px;
margin-right: $gl-padding-4;
}
}
}
.home-panel-title-row {
@include media-breakpoint-down(sm) {
.home-panel-avatar {
width: $home-panel-avatar-mobile-size;
height: $home-panel-avatar-mobile-size;
flex-basis: $home-panel-avatar-mobile-size;
.avatar {
font-size: 20px;
line-height: 46px;
}
}
.home-panel-title {
margin-top: 4px;
margin-bottom: 2px;
font-size: $gl-font-size;
line-height: $gl-font-size-large;
}
.home-panel-topic-list,
.home-panel-metadata {
font-size: $gl-font-size-small;
}
}
}
.home-panel-metadata {
font-weight: normal;
font-size: 14px;
line-height: $gl-btn-line-height;
}
.home-panel-description {
@include media-breakpoint-up(md) {
font-size: $gl-font-size-large;
}
}
}
.home-panel-buttons {
.home-panel-action-button {
vertical-align: top;
......
......@@ -86,35 +86,19 @@
}
}
.group-home-panel,
.project-home-panel {
margin-top: $gl-padding;
margin-bottom: $gl-padding;
.home-panel-avatar {
width: $home-panel-title-row-height;
height: $home-panel-title-row-height;
flex-shrink: 0;
flex-basis: $home-panel-title-row-height;
}
.home-panel-title {
font-size: 20px;
line-height: $gl-line-height-24;
font-weight: bold;
.icon {
vertical-align: -1px;
}
.home-panel-topic-list {
font-size: $gl-font-size;
font-weight: $gl-font-weight-normal;
.icon {
position: relative;
top: 3px;
margin-right: $gl-padding-4;
}
}
}
......@@ -146,24 +130,6 @@
}
}
.home-panel-metadata {
font-weight: normal;
font-size: 14px;
line-height: $gl-btn-line-height;
.home-panel-license {
.btn {
line-height: 0;
border-width: 0;
}
}
.access-request-link {
padding-left: $gl-padding-8;
border-left: 1px solid $gl-text-color-secondary;
}
}
.home-panel-description {
@include media-breakpoint-up(md) {
font-size: $gl-font-size-large;
......
......@@ -3,19 +3,19 @@
- max_project_topic_length = 15
- emails_disabled = @project.emails_disabled?
.project-home-panel.js-show-on-project-root{ class: [("empty-project" if empty_repo)] }
.project-home-panel.js-show-on-project-root.gl-mt-5.gl-mb-5{ class: [("empty-project" if empty_repo)] }
.row.gl-mb-3
.home-panel-title-row.col-md-12.col-lg-6.d-flex
.avatar-container.rect-avatar.s64.home-panel-avatar.gl-mr-3.float-none
.avatar-container.rect-avatar.s64.home-panel-avatar.gl-flex-shrink-0.gl-w-11.gl-h-11.gl-mr-3.float-none
= project_icon(@project, alt: @project.name, class: 'avatar avatar-tile s64', width: 64, height: 64)
.d-flex.flex-column.flex-wrap.align-items-baseline
.d-inline-flex.align-items-baseline
%h1.home-panel-title.gl-mt-3.gl-mb-2{ data: { qa_selector: 'project_name_content' } }
%h1.home-panel-title.gl-mt-3.gl-mb-2.gl-font-size-h1.gl-line-height-24.gl-font-weight-bold{ data: { qa_selector: 'project_name_content' } }
= @project.name
%span.visibility-icon.text-secondary.gl-ml-2.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@project) }
= visibility_level_icon(@project.visibility_level, options: { class: 'icon' })
= render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: @project
.home-panel-metadata.d-flex.flex-wrap.text-secondary
.home-panel-metadata.d-flex.flex-wrap.text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal
- if can?(current_user, :read_project, @project)
%span.text-secondary
= s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id }
......@@ -23,8 +23,8 @@
%span.access-request-links.gl-ml-3
= render 'shared/members/access_request_links', source: @project
- if @project.tag_list.present?
%span.home-panel-topic-list.mt-2.w-100.d-inline-flex
= sprite_icon('tag', css_class: 'icon gl-mr-2')
%span.home-panel-topic-list.mt-2.w-100.d-inline-flex.gl-font-base.gl-font-weight-normal
= sprite_icon('tag', css_class: 'icon gl-relative gl-mr-2')
- @project.topics_to_show.each do |topic|
- project_topics_classes = "badge badge-pill badge-secondary gl-mr-2"
......
......@@ -5,13 +5,13 @@
= link_to link_text, polymorphic_path([:leave, source, :members]),
method: :delete,
data: { confirm: leave_confirmation_message(source), qa_selector: 'leave_group_link' },
class: 'access-request-link js-leave-link'
class: '.gl-pl-3.gl-border-l-1.gl-border-l-solid.gl-border-l-gray-500 js-leave-link'
- elsif requester = source.requesters.find_by(user_id: current_user.id) # rubocop: disable CodeReuse/ActiveRecord
= link_to _('Withdraw Access Request'), polymorphic_path([:leave, source, :members]),
method: :delete,
data: { confirm: remove_member_message(requester) },
class: 'access-request-link'
class: '.gl-pl-3.gl-border-l-1.gl-border-l-solid.gl-border-l-gray-500'
- elsif source.request_access_enabled && can?(current_user, :request_access, source)
= link_to _('Request Access'), polymorphic_path([:request_access, source, :members]),
method: :post,
class: 'access-request-link'
class: '.gl-pl-3.gl-border-l-1.gl-border-l-solid.gl-border-l-gray-500'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment