Temp. layout for testing
This commit is contained in:
parent
6ea04faf4f
commit
54b051a7e7
|
@ -91,4 +91,8 @@ class UserController < ApplicationController
|
|||
|
||||
def data
|
||||
end
|
||||
|
||||
def theme
|
||||
render 'user/theme', formats: [:css], handlers: [:scss, :erb]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,12 +19,14 @@
|
|||
- if user_signed_in?
|
||||
- if current_user.mod?
|
||||
= javascript_include_tag 'moderation', 'data-turbolinks-track' => true
|
||||
%link{rel: 'stylesheet', href: '/yuki/theme.css', media: :all, 'data-turbolinks-track' => true}
|
||||
= csrf_meta_tags
|
||||
%body
|
||||
%body#version1
|
||||
= render 'layouts/header'
|
||||
= yield
|
||||
= render 'shared/locales'
|
||||
- if Rails.env.development?
|
||||
#debug
|
||||
%hr
|
||||
.container
|
||||
%p
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
- header_class = if user.profile_header.exists? then "userbox--header-container" else "userbox--no-header" end
|
||||
.panel.panel-default
|
||||
%div{class: header_class}
|
||||
%img.userbox--header{src: user.profile_header.url(:mobile)}
|
||||
.panel-body
|
||||
%img.userbox--avatar{src: user.profile_picture.url(:small)}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
- header_class = if current_user.profile_header.exists? then "userbox--header-container" else "userbox--no-header" end
|
||||
.panel.panel-default.hidden-xs
|
||||
%div{class: header_class}
|
||||
%img.userbox--header{src: current_user.profile_header.url(:mobile)}
|
||||
.panel-body
|
||||
%img.userbox--avatar{src: current_user.profile_picture.url(:small)}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
- type ||= @type || :nil
|
||||
- header_class = if user.profile_header.exists? then "userbox--header-container" else "userbox--no-header" end
|
||||
.panel.panel-default
|
||||
%div{class: header_class}
|
||||
%img.userbox--header{src: user.profile_header.url(:mobile)}
|
||||
.panel-body
|
||||
%img.userbox--avatar{src: user.profile_picture.url(:small)}
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
<% @primary_color ||= "#222" %>
|
||||
<% @primary_border ||= "#151515" %>
|
||||
<% @primary_text ||= "#eee" %>
|
||||
<% @primary_link ||= "#666" %>
|
||||
<% @primary_hover ||= "#222" %>
|
||||
<% @secondary_color ||= "#333" %>
|
||||
<% @secondary_border ||= "#111" %>
|
||||
<% @secondary_text ||= "#eee" %>
|
||||
<% @secondary_link ||= "#fff" %>
|
||||
<% @background_color ||= "#555" %>
|
||||
body#version1 {
|
||||
background-color: <%= @background_color %>;
|
||||
}
|
||||
|
||||
body#version1 nav.navbar, body#version1 nav.navbar .dropdown-menu {
|
||||
background-color: <%= @primary_color %>;
|
||||
border-color: <%= @primary_border %>;
|
||||
}
|
||||
|
||||
body#version1 nav.navbar * {
|
||||
color: <%= @primary_text %>;
|
||||
}
|
||||
|
||||
body#version1 .nav > li:not(.profile--image-dropdown):before {
|
||||
background-color: <%= @primary_text %>;
|
||||
}
|
||||
|
||||
body#version1 a, body#version1 .dropdown-menu a {
|
||||
color: <%= @primary_link %>;
|
||||
}
|
||||
|
||||
body#version1 .dropdown-menu .list-group-item-warning {
|
||||
background-color: <%= @primary_border %>;
|
||||
}
|
||||
|
||||
body#version1 .dropdown-menu > li > a:hover,
|
||||
body#version1 .dropdown-menu > li > a:focus,
|
||||
body#version1 .list-group > a:hover,
|
||||
body#version1 .list-group > a:focus,
|
||||
body#version1 .list-group > a.active {
|
||||
background-color: <%= @primary_border %>;
|
||||
border-color: <%= @primary_border %>;
|
||||
color: <%= @primary_text %>;
|
||||
}
|
||||
|
||||
body#version1 .btn {
|
||||
color: <%= @primary_text %>;
|
||||
}
|
||||
|
||||
body#version1 .panel {
|
||||
border-color: <%= @primary_border %>;
|
||||
background-color: <%= @secondary_color %>;
|
||||
color: <%= @primary_text %>;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
body#version1 .list-group > a {
|
||||
background-color: <%= @secondary_color %>;
|
||||
border-color: <%= @secondary_border %>;
|
||||
}
|
||||
|
||||
body#version1 .locales, body .locales a {
|
||||
color: <%= @primary_text %> !important;
|
||||
}
|
||||
|
||||
body#version1 .text-muted {
|
||||
color: <%= @secondary_text %>;
|
||||
}
|
||||
|
||||
body#version1 .text-muted a {
|
||||
color: <%= @secondary_link %>;
|
||||
}
|
||||
|
||||
body#version1 #profile--header.profile--no-header::before, body#version1 .userbox--no-header::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: <%= @primary_border %>;
|
||||
}
|
||||
|
||||
body#version1 .userbox--no-header, body#version1 .panel-body {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
body#version1 #profile--header.profile--no-header img, body#version1 .userbox--no-header img {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
body#version1 #debug {
|
||||
background: white;
|
||||
color: black;
|
||||
}
|
|
@ -113,6 +113,7 @@ Rails.application.routes.draw do
|
|||
match '/:username(/p/:page)', to: 'user#show', via: 'get', as: :show_user_profile, defaults: {page: 1}
|
||||
match '/:username/a/:id', to: 'answer#show', via: 'get', as: :show_user_answer
|
||||
match '/:username/q/:id', to: 'question#show', via: 'get', as: :show_user_question
|
||||
match '/:username/theme.css', to: 'user#theme', via: 'get', as: :show_user_theme
|
||||
match '/:username/followers(/p/:page)', to: 'user#followers', via: 'get', as: :show_user_followers, defaults: {page: 1}
|
||||
match '/:username/friends(/p/:page)', to: 'user#friends', via: 'get', as: :show_user_friends, defaults: {page: 1}
|
||||
match '/:username/groups(/p/:page)', to: 'user#groups', via: 'get', as: :show_user_groups, defaults: {page: 1}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
class CreateThemesTable < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :themes do |t|
|
||||
end
|
||||
end
|
||||
end
|
63
db/schema.rb
63
db/schema.rb
|
@ -24,7 +24,6 @@ ActiveRecord::Schema.define(version: 20150721154255) do
|
|||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "smile_count", default: 0, null: false
|
||||
t.boolean "nsfw", default: false
|
||||
end
|
||||
|
||||
add_index "answers", ["user_id", "created_at"], name: "index_answers_on_user_id_and_created_at", using: :btree
|
||||
|
@ -114,60 +113,6 @@ ActiveRecord::Schema.define(version: 20150721154255) do
|
|||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "oauth_access_grants", force: :cascade do |t|
|
||||
t.integer "resource_owner_id", null: false
|
||||
t.integer "application_id", null: false
|
||||
t.string "token", null: false
|
||||
t.integer "expires_in", null: false
|
||||
t.text "redirect_uri", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "revoked_at"
|
||||
t.string "scopes"
|
||||
end
|
||||
|
||||
add_index "oauth_access_grants", ["token"], name: "index_oauth_access_grants_on_token", unique: true, using: :btree
|
||||
|
||||
create_table "oauth_access_tokens", force: :cascade do |t|
|
||||
t.integer "resource_owner_id"
|
||||
t.integer "application_id"
|
||||
t.string "token", null: false
|
||||
t.string "refresh_token"
|
||||
t.integer "expires_in"
|
||||
t.datetime "revoked_at"
|
||||
t.datetime "created_at", null: false
|
||||
t.string "scopes"
|
||||
end
|
||||
|
||||
add_index "oauth_access_tokens", ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true, using: :btree
|
||||
add_index "oauth_access_tokens", ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id", using: :btree
|
||||
add_index "oauth_access_tokens", ["token"], name: "index_oauth_access_tokens_on_token", unique: true, using: :btree
|
||||
|
||||
create_table "oauth_applications", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "uid", null: false
|
||||
t.string "secret", null: false
|
||||
t.text "redirect_uri", null: false
|
||||
t.string "scopes", default: "", null: false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "owner_id"
|
||||
t.string "owner_type"
|
||||
t.string "description"
|
||||
t.string "icon_file_name"
|
||||
t.string "icon_content_type"
|
||||
t.integer "icon_file_size"
|
||||
t.datetime "icon_updated_at"
|
||||
t.integer "crop_x"
|
||||
t.integer "crop_y"
|
||||
t.integer "crop_w"
|
||||
t.integer "crop_h"
|
||||
t.boolean "icon_processing"
|
||||
end
|
||||
|
||||
add_index "oauth_applications", ["name"], name: "index_oauth_applications_on_name", unique: true, using: :btree
|
||||
add_index "oauth_applications", ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type", using: :btree
|
||||
add_index "oauth_applications", ["uid"], name: "index_oauth_applications_on_uid", unique: true, using: :btree
|
||||
|
||||
create_table "questions", force: :cascade do |t|
|
||||
t.string "content"
|
||||
t.boolean "author_is_anonymous"
|
||||
|
@ -177,7 +122,6 @@ ActiveRecord::Schema.define(version: 20150721154255) do
|
|||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "answer_count", default: 0, null: false
|
||||
t.boolean "nsfw", default: false
|
||||
end
|
||||
|
||||
add_index "questions", ["user_id", "created_at"], name: "index_questions_on_user_id_and_created_at", using: :btree
|
||||
|
@ -276,9 +220,6 @@ ActiveRecord::Schema.define(version: 20150721154255) do
|
|||
t.boolean "privacy_show_in_search", default: true
|
||||
t.boolean "permanently_banned", default: false
|
||||
t.boolean "blogger", default: false
|
||||
t.boolean "nsfw", default: false
|
||||
t.boolean "show_nsfw", default: false
|
||||
t.boolean "privacy_allow_nsfw_questions", default: true
|
||||
t.boolean "contributor", default: false
|
||||
t.string "ban_reason"
|
||||
t.datetime "banned_until"
|
||||
|
@ -292,10 +233,8 @@ ActiveRecord::Schema.define(version: 20150721154255) do
|
|||
t.integer "crop_h_y"
|
||||
t.integer "crop_h_w"
|
||||
t.integer "crop_h_h"
|
||||
t.string "socket_key", default: ""
|
||||
t.datetime "socket_key_expiry", default: '0001-01-01 00:00:00'
|
||||
t.string "locale", default: "en"
|
||||
t.boolean "translator"
|
||||
t.boolean "translator", default: false
|
||||
t.string "confirmation_token"
|
||||
t.datetime "confirmed_at"
|
||||
t.datetime "confirmation_sent_at"
|
||||
|
|
Loading…
Reference in New Issue