parent
447cfef62d
commit
aab9f57e36
@ -0,0 +1,130 @@
|
||||
.dashboard-wrapper {
|
||||
background: #282c37;
|
||||
border-radius: 4px;
|
||||
margin: 20px auto;
|
||||
width: 940px;
|
||||
display: flex;
|
||||
|
||||
.dashboard__sidebar {
|
||||
width: 240px;
|
||||
border-radius: 4px 0 0 4px;
|
||||
|
||||
.dashboard__top-bar {
|
||||
border-radius: 4px 0 0 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding: 20px 0;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
padding: 7px 20px;
|
||||
color: #d9e1e8;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
|
||||
.fa {
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
text-align: center;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
a {
|
||||
background: darken(#282c37, 5%);
|
||||
border-left: 2px solid #2b90d9;
|
||||
padding-left: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dashboard__current-user {
|
||||
padding: 20px;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.dashboard__current-user__avatar {
|
||||
display: block;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50px;
|
||||
float: left;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.dashboard__current-user__display-name {
|
||||
font-weight: 500;
|
||||
font-size: 13px;
|
||||
color: #d9e1e8;
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.dashboard__current-user__username {
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
color: #2b90d9;
|
||||
}
|
||||
}
|
||||
|
||||
.dashboard__logo {
|
||||
color: #2b90d9;
|
||||
|
||||
span {
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.dashboard__top-bar {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
||||
border-bottom: 1px solid #d9e1e8;
|
||||
color: #282c37;
|
||||
font-size: 16px;
|
||||
overflow: hidden;
|
||||
|
||||
&.alternate {
|
||||
background: lighten(#282c37, 10%);
|
||||
border-bottom: 1px solid lighten(#282c37, 10%);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
ul {
|
||||
float: right;
|
||||
list-style: none;
|
||||
display: block;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: #9baec8;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.dashboard__content {
|
||||
flex: 1;
|
||||
background: #d9e1e8;
|
||||
border-radius: 0 4px 4px 0;
|
||||
|
||||
.dashboard__content__content {
|
||||
//padding: 20px;
|
||||
}
|
||||
|
||||
.dashboard__top-bar {
|
||||
border-radius: 0 4px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,8 +1,16 @@
|
||||
class HomeController < ApplicationController
|
||||
layout 'dashboard'
|
||||
|
||||
before_action :authenticate_user!
|
||||
|
||||
def index
|
||||
feed = Feed.new(:home, current_user.account)
|
||||
@statuses = feed.get(20, (params[:offset] || 0).to_i)
|
||||
end
|
||||
|
||||
def mentions
|
||||
feed = Feed.new(:mentions, current_user.account)
|
||||
@statuses = feed.get(20, (params[:offset] || 0).to_i)
|
||||
render action: :index
|
||||
end
|
||||
end
|
||||
|
@ -1,3 +1,3 @@
|
||||
.activity-stream.activity-stream-headless
|
||||
.activity-stream.activity-stream-embedded
|
||||
- @statuses.each do |status|
|
||||
= render partial: 'stream_entries/status', locals: { status: status, include_threads: false, is_successor: false, is_predecessor: false }
|
||||
|
@ -1,11 +1,12 @@
|
||||
- content_for :content do
|
||||
.logo-container
|
||||
%h1
|
||||
= link_to root_path do
|
||||
= render partial: 'application/logo', locals: { dim: 200 }
|
||||
%small= Rails.configuration.x.local_domain
|
||||
.container
|
||||
.logo-container
|
||||
%h1
|
||||
= link_to root_path do
|
||||
= render partial: 'application/logo', locals: { dim: 200 }
|
||||
%small= Rails.configuration.x.local_domain
|
||||
|
||||
.form-container
|
||||
= yield
|
||||
.form-container
|
||||
= yield
|
||||
|
||||
= render template: "layouts/application"
|
||||
|
@ -0,0 +1,45 @@
|
||||
- content_for :content do
|
||||
.dashboard-wrapper
|
||||
.dashboard__sidebar
|
||||
.dashboard__top-bar.alternate
|
||||
|
||||
.dashboard__current-user
|
||||
= link_to account_path(current_user.account) do
|
||||
= image_tag current_user.account.avatar.url(:medium), class: 'dashboard__current-user__avatar'
|
||||
%strong.dashboard__current-user__display-name= current_user.account.display_name
|
||||
%span.dashboard__current-user__username= "@#{current_user.account.username}"
|
||||
%ul
|
||||
%li.active
|
||||
= link_to root_path do
|
||||
= fa_icon 'home'
|
||||
Home
|
||||
%li
|
||||
= link_to mentions_path do
|
||||
= fa_icon 'at'
|
||||
Mentions
|
||||
%li
|
||||
= link_to root_path do
|
||||
= fa_icon 'group'
|
||||
Subscriptions
|
||||
%li
|
||||
= link_to oauth_authorized_applications_path do
|
||||
= fa_icon 'shield'
|
||||
Authorized apps
|
||||
%li
|
||||
= link_to root_path do
|
||||
= fa_icon 'user'
|
||||
Edit profile
|
||||
%li
|
||||
= link_to edit_registration_path(current_user) do
|
||||
= fa_icon 'wrench'
|
||||
Change password
|
||||
.dashboard__content
|
||||
.dashboard__top-bar
|
||||
Home
|
||||
%ul
|
||||
%li= link_to fa_icon('sign-out'), destroy_user_session_path, method: :delete
|
||||
.dashboard__content__content= yield
|
||||
.footer
|
||||
.domain= Rails.configuration.x.local_domain
|
||||
|
||||
= render template: "layouts/application"
|
@ -1,37 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Doorkeeper</title>
|
||||
<%= stylesheet_link_tag "doorkeeper/admin/application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-static-top" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<%= link_to t('doorkeeper.layouts.admin.nav.oauth2_provider'), oauth_applications_path, class: 'navbar-brand' %>
|
||||
</div>
|
||||
<ul class="nav navbar-nav">
|
||||
<%= content_tag :li, class: "#{'active' if request.path == oauth_applications_path}" do %>
|
||||
<%= link_to t('doorkeeper.layouts.admin.nav.applications'), oauth_applications_path %>
|
||||
<% end %>
|
||||
<%= content_tag :li do %>
|
||||
<%= link_to 'Home', root_path %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<%- if flash[:notice].present? %>
|
||||
<div class="alert alert-info">
|
||||
<%= flash[:notice] %>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
<%= yield %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,23 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%= t('doorkeeper.layouts.application.title') %></title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<%= stylesheet_link_tag "doorkeeper/application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<%- if flash[:notice].present? %>
|
||||
<div class="alert alert-info">
|
||||
<%= flash[:notice] %>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
<%= yield %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,9 +1,4 @@
|
||||
#!/usr/bin/env ruby
|
||||
begin
|
||||
load File.expand_path('../spring', __FILE__)
|
||||
rescue LoadError => e
|
||||
raise unless e.message.include?('spring')
|
||||
end
|
||||
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
||||
require_relative '../config/boot'
|
||||
require 'rails/commands'
|
||||
|
@ -1,9 +1,4 @@
|
||||
#!/usr/bin/env ruby
|
||||
begin
|
||||
load File.expand_path('../spring', __FILE__)
|
||||
rescue LoadError => e
|
||||
raise unless e.message.include?('spring')
|
||||
end
|
||||
require_relative '../config/boot'
|
||||
require 'rake'
|
||||
Rake.application.run
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# This file loads spring without using Bundler, in order to be fast.
|
||||
# It gets overwritten when you run the `spring binstub` command.
|
||||
|
||||
unless defined?(Spring)
|
||||
require 'rubygems'
|
||||
require 'bundler'
|
||||
|
||||
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
|
||||
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
||||
gem 'spring', match[1]
|
||||
require 'spring/binstub'
|
||||
end
|
||||
end
|
@ -1 +1 @@
|
||||
$redis = Redis.new(host: ENV['REDIS_HOST'] || 'localhost', port: ENV['REDIS_PORT'] || 6379)
|
||||
$redis = Redis.new(host: ENV['REDIS_HOST'] || 'localhost', port: ENV['REDIS_PORT'] || 6379, driver: :hiredis)
|
||||
|
@ -0,0 +1,13 @@
|
||||
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
|
||||
threads_count = Integer(ENV['MAX_THREADS'] || 5)
|
||||
threads threads_count, threads_count
|
||||
|
||||
preload_app!
|
||||
|
||||
rackup DefaultRackup
|
||||
port ENV['PORT'] || 3000
|
||||
environment ENV['RACK_ENV'] || 'development'
|
||||
|
||||
on_worker_boot do
|
||||
ActiveRecord::Base.establish_connection
|
||||
end
|
Loading…
Reference in new issue