Adding about/more page with extended information that can be set up by an admin
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 874 KiB |
@ -26,15 +26,19 @@
|
||||
}
|
||||
|
||||
h2 {
|
||||
font: 24px/28px 'Judson', sans-serif;
|
||||
font-weight: 300;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-size: 24px;
|
||||
line-height: 28px;// 'Judson', sans-serif;
|
||||
font-weight: 400;
|
||||
margin-bottom: 20px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font: 20px/28px 'Judson', sans-serif;
|
||||
font-weight: 300;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-size: 20px;
|
||||
line-height: 28px;// 'Judson', sans-serif;
|
||||
font-weight: 400;
|
||||
margin-bottom: 20px;
|
||||
color: #d9e1e8;
|
||||
}
|
||||
@ -57,8 +61,10 @@
|
||||
}
|
||||
|
||||
p, li {
|
||||
font: 20px/28px 'Judson', sans-serif;
|
||||
font-weight: 300;
|
||||
font: 16px/28px 'Montserrat', sans-serif;
|
||||
//font-size: 19px;
|
||||
//line-height: 28px;// 'Judson', sans-serif;
|
||||
font-weight: 400;
|
||||
margin-bottom: 26px;
|
||||
|
||||
a {
|
||||
@ -70,6 +76,7 @@
|
||||
em {
|
||||
display: inline-block;
|
||||
padding: 7px 7px 5px 7px;
|
||||
margin: 0 2px;
|
||||
background: #9baec8;
|
||||
color: #282c37;
|
||||
font: 16px/16px 'Montserrat', sans-serif;
|
||||
@ -108,3 +115,161 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.information-board {
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-top: 1px solid lighten(#282c37, 10%);
|
||||
border-bottom: 1px solid lighten(#282c37, 10%);
|
||||
padding-right: 14px;
|
||||
|
||||
.section {
|
||||
flex: 1 0 0;
|
||||
padding: 14px;
|
||||
text-align: right;
|
||||
font: 16px/28px 'Montserrat', sans-serif;
|
||||
|
||||
span, strong {
|
||||
display: block;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
|
||||
&:last-child {
|
||||
color: #d9e1e8;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 500;
|
||||
font-size: 48px;
|
||||
line-height: 48px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.owner {
|
||||
text-align: center;
|
||||
|
||||
.avatar {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 15px;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 14px;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
.display_name {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.username {
|
||||
display: block;
|
||||
color: #9baec8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contact-email {
|
||||
text-align: center;
|
||||
margin: 40px 0;
|
||||
|
||||
strong {
|
||||
display: block;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-layout {
|
||||
display: flex;
|
||||
|
||||
.main {
|
||||
flex: 1 1 auto;
|
||||
padding: 14px 0;
|
||||
|
||||
.panel {
|
||||
padding-right: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
border-left: 1px solid lighten(#282c37, 10%);
|
||||
width: 140px;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.panel {
|
||||
.panel-header {
|
||||
background: lighten(#282c37, 10%);
|
||||
padding: 7px 14px;
|
||||
text-transform: uppercase;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.panel-body {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.panel-list {
|
||||
ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
|
||||
li {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: 13px;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
padding: 7px 14px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
text-decoration: none;
|
||||
transition: all 200ms linear;
|
||||
|
||||
i.fa {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
background-color: darken(#282c37, 5%);
|
||||
transition: all 100ms linear;
|
||||
}
|
||||
|
||||
&.selected {
|
||||
color: #fff;
|
||||
background-color: #2b90d9;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten(#2b90d9, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,9 +8,13 @@ class AboutController < ApplicationController
|
||||
end
|
||||
|
||||
def more
|
||||
@description = Setting.site_description
|
||||
@extended_description = Setting.site_extended_description
|
||||
@contact_account = Account.find_local(Setting.site_contact_username)
|
||||
@contact_email = Setting.site_contact_email
|
||||
@user_count = Rails.cache.fetch('user_count') { User.count }
|
||||
@status_count = Rails.cache.fetch('local_status_count') { Status.local.count }
|
||||
@domain_count = Rails.cache.fetch('distinct_domain_count') { Account.distinct.count(:domain) }
|
||||
end
|
||||
|
||||
def terms; end
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
.actions
|
||||
.info
|
||||
= link_to t('about.learn_more'), about_more_path
|
||||
= link_to t('about.terms'), terms_path
|
||||
= link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon'
|
||||
|
||||
|
@ -2,7 +2,50 @@
|
||||
#{Rails.configuration.x.local_domain}
|
||||
|
||||
.wrapper
|
||||
= @extended_description.html_safe
|
||||
.sidebar-layout
|
||||
.main
|
||||
.panel
|
||||
%h2= Rails.configuration.x.local_domain
|
||||
|
||||
- if @contact_account
|
||||
= render partial: 'authorize_follow/card', locals: { account: @contact_account }
|
||||
- unless @description.blank?
|
||||
%p= @description.html_safe
|
||||
|
||||
.information-board
|
||||
.section
|
||||
%span= t 'about.user_count_before'
|
||||
%strong= number_with_delimiter @user_count
|
||||
%span= t 'about.user_count_after'
|
||||
.section
|
||||
%span= t 'about.status_count_before'
|
||||
%strong= number_with_delimiter @status_count
|
||||
%span= t 'about.status_count_after'
|
||||
.section
|
||||
%span= t 'about.domain_count_before'
|
||||
%strong= number_with_delimiter @domain_count
|
||||
%span= t 'about.domain_count_after'
|
||||
|
||||
- unless @extended_description.blank?
|
||||
.panel= @extended_description.html_safe
|
||||
|
||||
.sidebar
|
||||
.panel
|
||||
.panel-header= t 'about.contact'
|
||||
.panel-body
|
||||
.owner
|
||||
.avatar= image_tag @contact_account.avatar.url
|
||||
.name
|
||||
= link_to TagManager.instance.url_for(@contact_account) do
|
||||
%span.display_name.emojify= display_name(@contact_account)
|
||||
%span.username= "@#{@contact_account.acct}"
|
||||
|
||||
.contact-email
|
||||
= t 'about.business_email'
|
||||
%strong= @contact_email
|
||||
.panel
|
||||
.panel-header= t 'about.links'
|
||||
.panel-list
|
||||
%ul
|
||||
%li= link_to t('about.get_started'), new_user_registration_path
|
||||
%li= link_to t('auth.login'), new_user_session_path
|
||||
%li= link_to t('about.terms'), terms_path
|
||||
%li= link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon'
|
||||
|
Reference in New Issue
Block a user