mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-31 14:29:08 +01:00
Merge branch 'feature-redesign'
This commit is contained in:
commit
4fcc86531b
12 changed files with 104 additions and 60 deletions
2
Gemfile
2
Gemfile
|
@ -29,7 +29,7 @@ gem 'devise-async'
|
|||
gem 'bootstrap_form'
|
||||
gem 'font-kit-rails'
|
||||
gem 'nprogress-rails'
|
||||
gem 'font-awesome-rails', '~> 4.2.0.0'
|
||||
gem 'font-awesome-rails', '~> 4.3.0.0'
|
||||
gem 'rails-assets-growl'
|
||||
gem "paperclip", "~> 4.2"
|
||||
gem 'delayed_paperclip'
|
||||
|
|
|
@ -105,7 +105,7 @@ GEM
|
|||
multipart-post (>= 1.2, < 3)
|
||||
faraday_middleware (0.9.1)
|
||||
faraday (>= 0.7.4, < 0.10)
|
||||
font-awesome-rails (4.2.0.0)
|
||||
font-awesome-rails (4.3.0.0)
|
||||
railties (>= 3.2, < 5.0)
|
||||
font-kit-rails (1.1.0)
|
||||
rails
|
||||
|
@ -372,7 +372,7 @@ DEPENDENCIES
|
|||
devise-async
|
||||
factory_girl_rails
|
||||
faker
|
||||
font-awesome-rails (~> 4.2.0.0)
|
||||
font-awesome-rails (~> 4.3.0.0)
|
||||
font-kit-rails
|
||||
foreman
|
||||
haml
|
||||
|
|
|
@ -41,11 +41,11 @@ $navbar-inverse-toggle-hover-bg: #512da8;
|
|||
$navbar-inverse-toggle-icon-bar-bg: #7e57c2;
|
||||
$navbar-inverse-toggle-border-color: #512da8;
|
||||
|
||||
@import "bootswatch/paper/variables";
|
||||
@import "bootswatch/cosmo/variables";
|
||||
|
||||
@import "bootstrap";
|
||||
body { padding-top: $navbar-height; }
|
||||
@import "bootswatch/paper/bootswatch";
|
||||
@import "bootswatch/cosmo/bootswatch";
|
||||
|
||||
@import "base";
|
||||
|
||||
|
|
|
@ -124,4 +124,15 @@ body {
|
|||
|
||||
.links {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.panel {
|
||||
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.25);
|
||||
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.25);
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.panel-default {
|
||||
border-color: transparent;
|
||||
}
|
|
@ -1,11 +1,13 @@
|
|||
.navbar .nav .badge {
|
||||
padding: 3px 6px 3px;
|
||||
background-color: $navbar-inverse-link-active-bg;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.navbar .nav .active .badge, li.dropdown.open a.dropdown-toggle span.badge {
|
||||
padding: 3px 6px 3px;
|
||||
background-color: $navbar-inverse-bg;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.navbar--inbox-animation {
|
||||
|
@ -117,6 +119,16 @@
|
|||
}
|
||||
|
||||
.profile--image-dropdown > a {
|
||||
padding-top: 16px !important;
|
||||
padding-bottom: 16px !important;
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.profile--image-avatar {
|
||||
min-height: 50px;
|
||||
min-width: 50px;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.navbar-inverse {
|
||||
border: none;
|
||||
}
|
|
@ -67,8 +67,6 @@
|
|||
}
|
||||
|
||||
.profile--avatar {
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 2px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border: medium none;
|
||||
|
@ -77,8 +75,8 @@
|
|||
.profile--panel-badge {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding-top: 0.05em;
|
||||
padding-bottom: 0.05em;
|
||||
padding-top: 0.15em;
|
||||
padding-bottom: 0.15em;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
|
|
|
@ -20,6 +20,24 @@ module ApplicationHelper
|
|||
|
||||
content_tag(:li, link_to(body.html_safe, path), class: ("#{'active ' if current_page? path}#{options[:class]}"))
|
||||
end
|
||||
|
||||
def list_group_item(body, path, options = {})
|
||||
options = {
|
||||
badge: nil,
|
||||
badge_color: nil,
|
||||
class: ''
|
||||
}.merge(options)
|
||||
|
||||
unless options[:badge].nil? or options[:badge] == 0
|
||||
# TODO: make this prettier?
|
||||
body << " #{
|
||||
content_tag(:span, options[:badge], class: ("badge#{
|
||||
" badge-#{options[:badge_color]}" unless options[:badge_color].nil?
|
||||
}"))}"
|
||||
end
|
||||
|
||||
content_tag(:a, body.html_safe, href: path, class: ("list-group-item #{'active ' if current_page? path}#{options[:class]}"))
|
||||
end
|
||||
|
||||
##
|
||||
#
|
||||
|
|
|
@ -1,33 +1,36 @@
|
|||
%li.dropdown.profile--image-dropdown
|
||||
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
|
||||
%img.img-rounded.answerbox--img.hidden-xs{src: current_user.profile_picture.url(:small)}
|
||||
%img.profile--image-avatar.hidden-xs{src: current_user.profile_picture.url(:small)}
|
||||
%span.visible-xs
|
||||
= current_user.screen_name
|
||||
%b.caret
|
||||
%ul.dropdown-menu.profile--dropdown
|
||||
%li.hidden-xs
|
||||
.media.profile--dropdown-media
|
||||
.pull-left
|
||||
%img.img-rounded.profile--dropdown-img{src: current_user.profile_picture.url(:medium)}
|
||||
.media-body
|
||||
- if current_user.display_name.blank?
|
||||
.profile--dropdown-username
|
||||
%a{href: show_user_profile_path(current_user.screen_name)}
|
||||
= current_user.screen_name
|
||||
- else
|
||||
.profile--dropdown-displayname
|
||||
%a{href: show_user_profile_path(current_user.screen_name)}
|
||||
= current_user.display_name
|
||||
.profile--username
|
||||
= current_user.screen_name
|
||||
%li.divider.hidden-xs
|
||||
%li.visible-xs= link_to "View profile", show_user_profile_path(current_user.screen_name)
|
||||
%li= link_to "Settings", edit_user_registration_path
|
||||
%ul.dropdown-menu
|
||||
%li.dropdown-header.hidden-xs= current_user.screen_name
|
||||
%li
|
||||
%a{href: show_user_profile_path(current_user.screen_name)}
|
||||
%i.fa.fa-fw.fa-user
|
||||
View profile
|
||||
%li
|
||||
%a{href: edit_user_registration_path}
|
||||
%i.fa.fa-fw.fa-cog
|
||||
Settings
|
||||
%li.divider
|
||||
- if current_user.admin?
|
||||
%li= link_to "Kontrollzentrum", rails_admin_path
|
||||
%li= link_to "Sidekiq", sidekiq_web_path
|
||||
%li
|
||||
%a{href: rails_admin_path}
|
||||
%i.fa.fa-fw.fa-cogs
|
||||
Kontrollzentrum
|
||||
%li
|
||||
%a{href: sidekiq_web_path}
|
||||
%i.fa.fa-fw.fa-bar-chart
|
||||
Sidekiq
|
||||
- if current_user.mod?
|
||||
%li= link_to "Moderation panel", moderation_path
|
||||
%li
|
||||
%a{href: moderation_path}
|
||||
%i.fa.fa-fw.fa-gavel
|
||||
Moderation Panel
|
||||
%li.divider
|
||||
%li= link_to "Logout", destroy_user_session_path, method: :delete
|
||||
%li
|
||||
%a{href: destroy_user_session_path, data: {method: :delete} }
|
||||
%i.fa.fa-fw.fa-sign-out
|
||||
Logout
|
|
@ -1,9 +1,8 @@
|
|||
.col-md-3.col-xs-12.col-sm-3
|
||||
.panel.panel-default.hidden-xs
|
||||
.panel-body
|
||||
%ul.nav.nav-pills.nav-stacked
|
||||
= nav_entry "All notifications", notifications_path
|
||||
= nav_entry "Answers", notifications_path('answer')
|
||||
= nav_entry "Smiles", notifications_path('smile')
|
||||
= nav_entry "Comments", notifications_path('comment')
|
||||
= nav_entry "Followers", notifications_path('relationship')
|
||||
.list-group
|
||||
= list_group_item "All notifications", notifications_path, badge: Notification.where(new: true).count
|
||||
= list_group_item "Answers", notifications_path('answer'), badge: Notification.where(target_type: "Answer", new: true).count
|
||||
= list_group_item "Smiles", notifications_path('smile'), badge: Notification.where(target_type: "Smile", new: true).count
|
||||
= list_group_item "Comments", notifications_path('comment'), badge: Notification.where(target_type: "Comment", new: true).count
|
||||
= list_group_item "Followers", notifications_path('relationship'), badge: Notification.where(target_type: "Relationship", new: true).count
|
|
@ -23,12 +23,11 @@
|
|||
%h4.entry-text#friend-count= current_user.friend_count
|
||||
%h6.entry-subtext Following
|
||||
.panel.panel-default.hidden-xs
|
||||
.panel-body
|
||||
%ul.nav.nav-pills.nav-stacked
|
||||
= nav_entry "Timeline", root_path
|
||||
= nav_entry "Public", public_timeline_path
|
||||
- current_user.groups.each do |group|
|
||||
= nav_entry group.display_name, group_timeline_path(group.name)
|
||||
%ul.nav.nav-pills.nav-stacked
|
||||
= list_group_item "Timeline", root_path
|
||||
= list_group_item "Public", public_timeline_path
|
||||
- current_user.groups.each do |group|
|
||||
= list_group_item group.display_name, group_timeline_path(group.name)
|
||||
- unless @group.nil?
|
||||
.panel.panel-default.profile--panel.hidden-xs
|
||||
.panel-heading
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
.row
|
||||
.col-sm-4
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title The Team
|
||||
.panel-body
|
||||
%h3 The Team
|
||||
The people behind
|
||||
= succeed '!' do
|
||||
= APP_CONFIG['site_name']
|
||||
|
@ -22,8 +23,9 @@
|
|||
%h4.entry-text.entry-about= adm['about_text']
|
||||
%h6.entry-subtext= adm['subtext']
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title Moderators
|
||||
.panel-body
|
||||
%h3 Moderators
|
||||
The people on
|
||||
= APP_CONFIG['site_name']
|
||||
that look after you!
|
||||
|
@ -33,8 +35,9 @@
|
|||
%img.img-rounded.answerbox--img-small{src: mod.profile_picture.url(:small)}
|
||||
.col-sm-4
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title Unfinished Project
|
||||
.panel-body
|
||||
%h3 Unfinished
|
||||
%p
|
||||
= APP_CONFIG['site_name']
|
||||
is running on unfinished code, full of bugs. Caveat emptor.
|
||||
|
@ -48,9 +51,10 @@
|
|||
Still have some questions? Check our
|
||||
= link_to "FAQ!", help_faq_path
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title Statistics
|
||||
.panel-body
|
||||
There are lies, damned lies, and then there are...
|
||||
%h3 Statistics
|
||||
%p All-time statistics for #{APP_CONFIG['site_name']}
|
||||
.row
|
||||
.col-xs-6
|
||||
%h4.entry-text#asked-count= Question.count
|
||||
|
@ -71,8 +75,9 @@
|
|||
%h6.entry-subtext Users
|
||||
.col-sm-4
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title Funding
|
||||
.panel-body
|
||||
%h3 Funding
|
||||
Currently Retrospring is running of the developers funds and will be able to sustain at the current needs of servers. Hereby we want to thank the people who previously donated to our project and helped it grow. Everyone shown at the bottom of this panel has contributed to the project with donations or great input.
|
||||
%ul.about--moderator
|
||||
- User.where(supporter: true).each do |sup|
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
.col-md-3.col-xs-12.col-sm-3
|
||||
.panel.panel-default
|
||||
.panel-body
|
||||
%ul.nav.nav-pills.nav-stacked
|
||||
= nav_entry "Account", edit_user_registration_path
|
||||
= nav_entry "Profile", edit_user_profile_path
|
||||
= nav_entry "Privacy", edit_user_privacy_path
|
||||
= nav_entry "Sharing", services_path
|
||||
.list-group
|
||||
= list_group_item "Account", edit_user_registration_path
|
||||
= list_group_item "Profile", edit_user_profile_path
|
||||
= list_group_item "Privacy", edit_user_privacy_path
|
||||
= list_group_item "Sharing", services_path
|
||||
|
||||
|
||||
.hidden-xs= render "shared/links"
|
Loading…
Reference in a new issue