diff --git a/app/javascript/gabsocial/components/panel/panel.scss b/app/javascript/gabsocial/components/panel/panel.scss
deleted file mode 100644
index efdc3204..00000000
--- a/app/javascript/gabsocial/components/panel/panel.scss
+++ /dev/null
@@ -1,130 +0,0 @@
-.panel {
- display: flex;
- border-radius: 10px;
- flex-direction: column;
- box-sizing: border-box;
- background: $gab-background-container;
-
- @include size(100%, auto);
-
- body.theme-gabsocial-light & {
- // @include light-theme-shadow();
- background: $gab-background-container-light;
- }
-
- &:not(:last-of-type) {
- margin-bottom: 10px;
- }
-
- &__content {
- width: 100%;
- padding-top: 8px;
- }
-
- &__list {
- padding: 0 5px;
- }
-
- &__subtitle {
- display: block;
- padding: 0 15px;
- color: $secondary-text-color;
- }
-
- &__form {
- display: block;
- padding: 15px;
-
- &.button {
- width: 100%;
- }
- }
-
- .wtf-panel-list-item {
- display: block;
- padding-bottom: 10px;
-
- &:not(:first-of-type) {
- margin-top: 12px;
- }
-
- &:not(:last-of-type) {
- border-bottom: 1px solid lighten($ui-base-color, 8%);
- }
-
- &__content {
- display: flex;
- flex-direction: row;
- min-height: 46px;
- margin-left: 58px;
- }
-
- &__account-block {
- display: flex;
- position: relative;
- align-items: baseline;
- padding-right: 10px;
-
- &__avatar {
- background-color: red;
- left: -58px;
- position: absolute;
-
- @include size(46px);
- }
-
- &__name {
- display: flex;
- flex-wrap: wrap;
- flex-direction: column;
- margin-top: 6px;
-
- &__name {
- color: $primary-text-color;
- margin-bottom: 2px;
- max-height: 32px; //2 lines of text
- overflow: hidden;
-
- @include text-sizing(14px, 700, 16px);
- }
-
- &__username {
- color: $lighter-text-color;
-
- @include text-sizing(12px, 400, 14px);
- }
- }
- }
-
- &__follow-block {
- margin-left: auto;
- padding-top: 6px;
-
- &__button {
- display: flex;
- }
-
- &__icon {
- color: $primary-text-color;
- }
- }
- }
-}
-
-.panel-header {
- display: flex;
- align-items: baseline;
- margin-bottom: 10px;
- padding: 15px 15px 0 15px;
-
- &__icon {
- margin-right: 10px;
- }
-
- &__title {
- flex: 1 1;
- color: $primary-text-color;
-
- @include text-sizing(16px, 700, 19px);
- }
-}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/panel/panel_layout.js b/app/javascript/gabsocial/components/panel/panel_layout.js
index 3fcef739..c59808a8 100644
--- a/app/javascript/gabsocial/components/panel/panel_layout.js
+++ b/app/javascript/gabsocial/components/panel/panel_layout.js
@@ -1,26 +1,34 @@
-import './panel.scss';
+import classNames from 'classnames/bind'
+import Icon from '../icon'
export default class PanelLayout extends PureComponent {
static propTypes = {
title: PropTypes.string,
+ subtitle: PropTypes.string,
icon: PropTypes.string,
children: PropTypes.node,
- };
+ hasBackground: PropTypes.boolean,
+ }
render() {
- const {title, icon, children} = this.props;
+ const { title, subtitle, icon, hasBackground, children } = this.props
return (
-
-
- {icon && }
- {title}
-
-
+
- );
- };
-
-};
\ No newline at end of file
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/panel/progress_panel.js b/app/javascript/gabsocial/components/panel/progress_panel.js
new file mode 100644
index 00000000..8fb26c2f
--- /dev/null
+++ b/app/javascript/gabsocial/components/panel/progress_panel.js
@@ -0,0 +1,20 @@
+import { me, monthlyExpensesComplete } from '../../initial_state'
+import PanelLayout from './panel_layout';
+import ProgressBar from '../progress_bar'
+
+export default class ProgressPanel extends PureComponent {
+ render() {
+ if (!monthlyExpensesComplete || !me) return null
+
+ return (
+
+
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/panel/promo_panel.js b/app/javascript/gabsocial/components/panel/promo_panel.js
new file mode 100644
index 00000000..06176791
--- /dev/null
+++ b/app/javascript/gabsocial/components/panel/promo_panel.js
@@ -0,0 +1,85 @@
+import { injectIntl, defineMessages } from 'react-intl'
+import classNames from 'classnames/bind'
+import { me } from '../../initial_state';
+import Icon from '../icon'
+import PanelLayout from './panel_layout'
+
+const messages = defineMessages({
+ pro: { id: 'promo.gab_pro', defaultMessage: 'Upgrade to GabPRO' },
+ donation: { id: 'promo.donation', defaultMessage: 'Make a Donation' },
+ store: { id: 'promo.store', defaultMessage: 'Store - Buy Merch' },
+ apps: { id: 'promo.gab_apps', defaultMessage: 'Gab Apps' },
+})
+
+const mapStateToProps = state => {
+ return {
+ isPro: state.getIn(['accounts', me, 'is_pro']),
+ };
+};
+
+export default
+@injectIntl
+@connect(mapStateToProps)
+class PromoPanel extends PureComponent {
+
+ static propTypes = {
+ isPro: PropTypes.bool,
+ intl: PropTypes.object.isRequired,
+ }
+
+ render() {
+ const { isPro, intl } = this.props
+
+ const cx = classNames.bind(styles)
+
+ const items = [
+ {
+ text: intl.formatMessage(messages.pro),
+ href: 'https://pro.gab.com',
+ icon: 'arrow-up',
+ conditions: isPro,
+ highlighted: true,
+ },
+ {
+ text: intl.formatMessage(messages.donation),
+ href: 'https://shop.dissenter.com/category/donations',
+ icon: 'heart',
+ },
+ {
+ text: intl.formatMessage(messages.store),
+ href: 'https://shop.dissenter.com',
+ icon: 'shopping-cart',
+ },
+ {
+ text: intl.formatMessage(messages.apps),
+ href: 'https://apps.gab.com',
+ icon: 'th',
+ }
+ ]
+
+ return (
+
+ {
+ items.map((item, i) => {
+ if (item.conditions === false) return null
+
+ const classes = cx({
+ default: true,
+ borderColorSubtle: i !== items.length - 1,
+ borderBottom1PX: i !== items.length - 1,
+ })
+
+ return (
+
+ )
+ })
+ }
+
+ )
+ }
+}
diff --git a/app/javascript/gabsocial/components/panel/sign_up_panel.js b/app/javascript/gabsocial/components/panel/sign_up_panel.js
index f8aa2e73..119ce4cb 100644
--- a/app/javascript/gabsocial/components/panel/sign_up_panel.js
+++ b/app/javascript/gabsocial/components/panel/sign_up_panel.js
@@ -1,12 +1,13 @@
-import { injectIntl, defineMessages } from 'react-intl';
-import { me } from '../../initial_state';
-import PanelLayout from './panel_layout';
+import { injectIntl, defineMessages } from 'react-intl'
+import { me } from '../../initial_state'
+import Button from '../button'
+import PanelLayout from './panel_layout'
const messages = defineMessages({
title: { id: 'signup_panel.title', defaultMessage: 'New to Gab?' },
subtitle: { id: 'signup_panel.subtitle', defaultMessage: 'Sign up now to speak freely.' },
- register: { id: 'account.register', defaultMessage: 'Sign up?' },
-});
+ register: { id: 'account.register', defaultMessage: 'Sign up' },
+})
export default @injectIntl
class SignUpPanel extends PureComponent {
@@ -15,16 +16,17 @@ class SignUpPanel extends PureComponent {
}
render() {
- if (me) return null;
+ // : TESTING :
+ if (!me) return null
- const { intl } = this.props;
+ const { intl } = this.props
return (
-
- {intl.formatMessage(messages.subtitle)}
-
+
+
)
}
diff --git a/app/javascript/gabsocial/components/permalink/permalink.js b/app/javascript/gabsocial/components/permalink/permalink.js
index 84c992dd..e5f0b17c 100644
--- a/app/javascript/gabsocial/components/permalink/permalink.js
+++ b/app/javascript/gabsocial/components/permalink/permalink.js
@@ -1,4 +1,4 @@
-import classNames from 'classnames';
+import classNames from 'classnames';
export default class Permalink extends PureComponent {
@@ -9,30 +9,26 @@ export default class Permalink extends PureComponent {
static propTypes = {
className: PropTypes.string,
href: PropTypes.string.isRequired,
- to: PropTypes.string.isRequired,
children: PropTypes.node,
- onInterceptClick: PropTypes.func,
+ blank: PropTypes.boolean,
+ button: PropTypes.boolean,
};
handleClick = e => {
- if (this.props.onInterceptClick && this.props.onInterceptClick()) {
- e.preventDefault();
- return;
- }
-
if (this.context.router && e.button === 0 && !(e.ctrlKey || e.metaKey)) {
e.preventDefault();
- this.context.router.history.push(this.props.to);
+ this.context.router.history.push(this.props.href);
}
}
render () {
- const { href, children, className, onInterceptClick, ...other } = this.props;
+ const { href, children, className, blank, ...other } = this.props;
const classes = classNames('permalink', className);
+ const target = blank ? '_blank' : null;
return (
-
+
{children}
);
diff --git a/app/javascript/gabsocial/components/progress_bar/index.js b/app/javascript/gabsocial/components/progress_bar/index.js
new file mode 100644
index 00000000..4ebb9782
--- /dev/null
+++ b/app/javascript/gabsocial/components/progress_bar/index.js
@@ -0,0 +1 @@
+export { default } from './progress_bar';
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/progress_bar/progress_bar.js b/app/javascript/gabsocial/components/progress_bar/progress_bar.js
new file mode 100644
index 00000000..c71f3a3c
--- /dev/null
+++ b/app/javascript/gabsocial/components/progress_bar/progress_bar.js
@@ -0,0 +1,21 @@
+export default class ProgressBar extends PureComponent {
+ static propTypes = {
+ progress: PropTypes.number,
+ }
+
+ render() {
+ const { progress } = this.props
+
+ const completed = Math.min(parseFloat(progress), 100)
+ const style = {
+ width: `${completed}%`,
+ }
+
+ return (
+
+
+ {completed}% covered this month
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/progress_panel/index.js b/app/javascript/gabsocial/components/progress_panel/index.js
deleted file mode 100644
index 5a89a6d3..00000000
--- a/app/javascript/gabsocial/components/progress_panel/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './progress_panel';
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/progress_panel/progress_panel.js b/app/javascript/gabsocial/components/progress_panel/progress_panel.js
deleted file mode 100644
index 9a90ef48..00000000
--- a/app/javascript/gabsocial/components/progress_panel/progress_panel.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { monthlyExpensesComplete } from '../../initial_state';
-
-export default class ProgressPanel extends PureComponent {
- render() {
- if (!monthlyExpensesComplete) return null;
-
- const completed = Math.min(monthlyExpensesComplete, 100);
- const style = {
- width: `${completed}%`,
- };
-
- return (
-
-
-
Gab's Operational Expenses
-
-
-
We are 100% funded by you.
-
-
-
- )
- }
-}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/promo_panel/index.js b/app/javascript/gabsocial/components/promo_panel/index.js
deleted file mode 100644
index abc14f9a..00000000
--- a/app/javascript/gabsocial/components/promo_panel/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './promo_panel';
\ No newline at end of file
diff --git a/app/javascript/gabsocial/components/promo_panel/promo_panel.js b/app/javascript/gabsocial/components/promo_panel/promo_panel.js
deleted file mode 100644
index 4d7767d1..00000000
--- a/app/javascript/gabsocial/components/promo_panel/promo_panel.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import { FormattedMessage } from 'react-intl';
-import Icon from '../icon';
-
-import './promo_panel.scss';
-
-export default class PromoPanel extends PureComponent {
-
- render() {
- return (
-
- );
- }
-}
diff --git a/app/javascript/gabsocial/components/promo_panel/promo_panel.scss b/app/javascript/gabsocial/components/promo_panel/promo_panel.scss
deleted file mode 100644
index 5b07775f..00000000
--- a/app/javascript/gabsocial/components/promo_panel/promo_panel.scss
+++ /dev/null
@@ -1,29 +0,0 @@
-.promo-panel {
- margin-top: 10px;
- padding: 10px 10px 20px 10px;
- border-bottom: 1px solid lighten($ui-base-color, 4%);
-}
-
-.promo-panel-item {
- display: block;
-
- &:not(:first-of-type) {
- margin-top: 20px;
- }
-
- &__icon {
- margin-right: 12px;
- }
-
- &__message {
- display: block;
- margin-top: 6px;
- color: $primary-text-color;
-
- @include text-sizing(14px, 400, 16px);
-
- &--dark {
- color: $ui-secondary-color;
- }
- }
-}
\ No newline at end of file
diff --git a/app/javascript/gabsocial/pages/home_page.js b/app/javascript/gabsocial/pages/home_page.js
index 2f2e2c76..2470e6c9 100644
--- a/app/javascript/gabsocial/pages/home_page.js
+++ b/app/javascript/gabsocial/pages/home_page.js
@@ -1,7 +1,11 @@
import { Fragment } from 'react';
-// import GroupSidebarPanel from '../features/groups/sidebar_panel';
+import GroupSidebarPanel from '../features/groups/sidebar_panel';
import LinkFooter from '../components/link_footer';
-// import PromoPanel from '../components/promo_panel';
+import PromoPanel from '../components/panel/promo_panel';
+import SignUpPanel from '../components/panel/sign_up_panel';
+import WhoToFollowPanel from '../components/panel/who_to_follow_panel';
+import TrendsPanel from '../components/panel/trends_panel';
+import ProgressPanel from '../components/panel/progress_panel';
// import UserPanel from '../components/user_panel';
import PageLayout from '../components/page_layout';
// import TimelineComposeBlock from '../components/timeline_compose_block';
@@ -15,15 +19,20 @@ export default class HomePage extends PureComponent {
layout={{
RIGHT: (
- {/**/}
- {/**/}
+ { /* */ }
+ { /* */ }
+
+
+ { /* */ }
+ { /* */ }
+
),
}}
>
{/**/}
- {/*children*/}
+ { /* children */ }
)
}
diff --git a/app/javascript/styles/global.css b/app/javascript/styles/global.css
index 0d64c756..86531b32 100644
--- a/app/javascript/styles/global.css
+++ b/app/javascript/styles/global.css
@@ -30,6 +30,10 @@ body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
}
+.font {
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
+}
+
.wrap {
white-space: pre-wrap;
word-wrap: break-word;
@@ -77,12 +81,19 @@ body {
}
.circle { border-radius: 9999px; }
+.radiusSmall { border-radius: 4px; }
+
+.borderColorSubtle { border-color: #e4e4e4; }
+.borderRight1PX { border-right-width: 1px; }
+.borderBottom1PX { border-bottom-width: 1px; }
+.borderLeft1PX { border-left-width: 1px; }
.marginAuto { margin: auto; }
.displayNone { display: none; }
.displayBlock { display: block; }
.displayInline { display: inline; }
+.displayFlex { display: flex !important; }
.displayInlineBlock { display: inline-block; }
.cursorPointer { cursor: pointer }
@@ -90,10 +101,18 @@ body {
.pointerEventsAuto > * { pointer-events: auto;}
.pointerEventsNone { pointer-events: none !important; }
+.backgroundPanel { background-color: #aaa; }
+.backgroundSubtle { background-color: #F5F8FA; }
.backgroundWhite { background-color: #fff; }
+.backgroundColorBrandLightOpaque { background-color: rgba(54, 233, 145, 0.1); }
+.backgroundColorBrandLight { background-color: #36e991; }
+.backgroundColorBrand { background-color: #21cf7a; }
+.backgroundColorBrandDark { background-color: #38A16B; }
.colorBlack { color: #000; }
+.colorWhite { color: #fff; }
.colorSubtle { color: #666; }
-.colorBrand { color: rgb(29, 161, 242); }
+.colorBrand { color: #21cf7a }
+.fillColorBlack { fill: #000; }
.fillColorBrand { fill: #21cf7a; }
.bottom0 { bottom: 0; }
@@ -110,14 +129,16 @@ body {
.noSelect { user-select: none; }
+.height100VH { height: 100vh; }
.height100PC { height: 100%; }
.height50PX { height: 50px; }
.height72PX { height: 72px; }
+.height22PX { height: 22px; }
-.width990PX { width: 990px; }
-.width600PX { width: 600px; }
-.width350PX { width: 350px; }
-.width275PX { width: 275px; }
+.width1015PX { width: 1015px; }
+.width660PX { width: 660px; }
+.width325PX { width: 325px; }
+.width250PX { width: 250px; }
.width100PC { width: 100%; }
.width72PX { width: 72px; }
.maxWidth100PC { max-width: 100%; }
@@ -128,10 +149,12 @@ body {
.textAlignCenter { text-align: center; }
.fontSize19PX { font-size: 19px; }
+.fontSize15PX { font-size: 15px; }
.fontSize13PX { font-size: 13px; }
.fontWeightNormal { font-weight: 400; }
.fontWeightBold { font-weight: 600; }
+.fontWeightExtraBold { font-weight: 800; }
.noUnderline { text-decoration: none; }
.underline { text-decoration: underline; }
@@ -140,16 +163,38 @@ body {
.z2 { z-index: 2; }
.z3 { z-index: 3; }
+.marginRight10PX { margin-right: 10px; }
+
.marginVertical5PX {
margin-top: 5px;
margin-bottom: 5px;
}
+.marginVertical10PX {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+
+.marginBottom15PX { margin-bottom: 15px; }
+.marginTop10PX { margin-top: 10px; }
+.marginTop5PX { margin-top: 5px; }
+
+.paddingHorizontal15PX {
+ padding-left: 15px;
+ padding-right: 15px;
+}
+.paddingRight15PX { padding-right: 15px; }
+
.paddingVertical10PX {
padding-top: 10px;
padding-bottom: 10px;
}
+.paddingVertical15PX {
+ padding-top: 15px;
+ padding-bottom: 15px;
+}
+
.paddingHoizontal10PX {
padding-left: 10px;
padding-right: 10px;
@@ -159,7 +204,3 @@ body {
padding-left: 20px;
padding-right: 20px;
}
-
-.paddingRight15PX {
- padding-right: 15px;
-}
\ No newline at end of file
diff --git a/app/views/about/show.html.haml b/app/views/about/show.html.haml
index dee7054a..f95ab728 100644
--- a/app/views/about/show.html.haml
+++ b/app/views/about/show.html.haml
@@ -10,7 +10,7 @@
.landing-columns--left
.landing__brand
= link_to root_url, class: 'brand' do
- = image_pack_tag 'gab_logo.svg', alt: 'Gab Social'
+ -# = image_pack_tag 'gab_logo.svg', alt: 'Gab Social'
%span.brand__tagline=t 'about.tagline'
.landing-columns--right
diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml
index 55cdd889..e48bbcf7 100644
--- a/app/views/layouts/public.html.haml
+++ b/app/views/layouts/public.html.haml
@@ -9,7 +9,7 @@
.header-container
.nav-left
= link_to root_url, class: 'brand' do
- = image_pack_tag 'gab_logo.svg', alt: 'Gab Social'
+ -# = image_pack_tag 'gab_logo.svg', alt: 'Gab Social'
= link_to t('home'), root_url, class: 'nav-link optional'
= link_to t('about.about_this'), about_path, class: 'nav-link'
= link_to 'Apps', 'https://apps.gab.com', class: 'nav-link'