File tree Expand file tree Collapse file tree 7 files changed +199
-1
lines changed
Expand file tree Collapse file tree 7 files changed +199
-1
lines changed Original file line number Diff line number Diff line change 1+ @import " variables" ;
2+
3+ @import " bootstrap" ;
4+
5+ .colors-section div {
6+ border : #000000 solid 1px ;
7+ margin : 10px ;
8+ padding-top : 30px ;
9+ padding-left : 10px ;
10+ font-size : 16px ;
11+ }
12+
13+ .princeton-orange {
14+ background-color : $princeton-orange ;
15+ color : #000000 ;
16+ }
17+
18+ .princeton-orange-80 {
19+ background-color : $princeton-orange-80 ;
20+ color : #000000 ;
21+ }
22+
23+ .princeton-orange-20 {
24+ background-color : $princeton-orange-20 ;
25+ color : #000000 ;
26+ }
27+
28+ .cool-gray {
29+ background-color : $cool-gray ;
30+ color : #FFFFFF ;
31+ }
32+
33+ .cool-gray-80 {
34+ background-color : $cool-gray-80 ;
35+ color : #FFFFFF ;
36+ }
37+
38+ .cool-gray-60 {
39+ background-color : $cool-gray-60 ;
40+ color : #000000 ;
41+ }
42+
43+ .gray-100 {
44+ background-color : $gray-100 ;
45+ color : #FFFFFF ;
46+ }
47+
48+ .gray-60 {
49+ background-color : $gray-60 ;
50+ color : #FFFFFF ;
51+ }
52+
53+ .gray-20 {
54+ background-color : $gray-20 ;
55+ color : #000000 ;
56+ }
57+
58+ .gray-10 {
59+ background-color : $gray-10 ;
60+ color : #000000 ;
61+ }
62+
63+ .white {
64+ background-color : $white ;
65+ color : #000000 ;
66+ }
67+
68+ .green-dark {
69+ background-color : $green-dark ;
70+ color : #000000 ;
71+ }
72+
73+ .red-dark {
74+ background-color : $red-dark ;
75+ color : #000000 ;
76+ }
77+
78+ .yellow {
79+ background-color : $yellow ;
80+ color : #000000 ;
81+ }
82+
83+ .blue {
84+ background-color : $blue ;
85+ color : #000000 ;
86+ }
87+
88+ .light-blue {
89+ background-color : $light-blue ;
90+ color : #000000 ;
91+ }
92+
93+ .status-success {
94+ background-color : $status-success ;
95+ color : #000000 ;
96+ }
97+
98+ .status-error {
99+ background-color : $status-warning ;
100+ color : #000000 ;
101+ }
102+
103+ .status-warning {
104+ background-color : $status-warning ;
105+ color : #000000 ;
106+ }
107+
108+ .status-info {
109+ background-color : $status-info ;
110+ color : #000000 ;
111+ }
Original file line number Diff line number Diff line change 1+ $princeton-orange : #E77500 ;
2+ $princeton-orange-80 : #EC9133 ;
3+ $princeton-orange-20 : #FAE3CC ;
4+
5+ $cool-gray : #091F30 ;
6+ $cool-gray-80 : #3A4C59 ;
7+ $cool-gray-60 : #6B7983 ;
8+
9+ $gray-100 : #121212 ;
10+ $gray-60 : #717171 ;
11+ $gray-20 : #D0D0D0 ;
12+ $gray-10 : #EEEEEE ;
13+ $white : #FFFFFF ;
14+
15+ $green-dark : #006450 ;
16+ $red-dark : #B00002 ;
17+ $yellow : #FBC129 ;
18+ $blue : #0B7097 ;
19+ $light-blue : #BED8E2 ;
20+
21+ $status-success : #DDEDE6 ;
22+ $status-error : #F3D9D9 ;
23+ $status-warning : #FFF6DF ;
24+ $status-info : #E6EEF8 ;
Original file line number Diff line number Diff line change 1818@import " header" ;
1919@import " footer" ;
2020@import " components/mediaflux_status" ;
21+ @import " variables" ;
22+ @import " styles_preview" ;
2123
2224@import " bootstrap" ;
25+
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22class WelcomeController < ApplicationController
3- skip_before_action :authenticate_user!
3+ skip_before_action :authenticate_user! , except : [ :styles_preview ]
44 def index
55 return if current_user . nil?
66 @sponsored_projects = Project . sponsored_projects ( @current_user . uid )
Original file line number Diff line number Diff line change 1+ < h1 > Styles Preview</ h1 >
2+
3+ < p > This page shows the styles that have been implemented for this site's look and feel.</ p >
4+
5+ < h2 > Colors</ h2 >
6+
7+ < div class ="colors-section ">
8+ < div class ="princeton-orange "> Princeton Orange</ div >
9+ < div class ="princeton-orange-80 "> Princeton Orange 80</ div >
10+ < div class ="princeton-orange-20 "> Princeton Orange 20</ div >
11+
12+ < div class ="cool-gray "> Cool Gray</ div >
13+ < div class ="cool-gray-80 "> Cool Gray 80</ div >
14+ < div class ="cool-gray-60 "> Cool Gray 60</ div >
15+
16+ < div class ="gray-100 "> Gray 100</ div >
17+ < div class ="gray-60 "> Gray 60</ div >
18+ < div class ="gray-20 "> Gray 20</ div >
19+ < div class ="gray-10 "> Gray 10</ div >
20+
21+ < div class ="white "> White</ div >
22+
23+ < div class ="green-dark "> Green Dark</ div >
24+ < div class ="red-dark "> Red Dark</ div >
25+ < div class ="yellow "> Yello</ div >
26+ < div class ="blue "> Blue</ div >
27+ < div class ="light-blue "> Light Blue</ div >
28+
29+ < div class ="status-success "> Status Success</ div >
30+ < div class ="status-error "> Status Error</ div >
31+ < div class ="status-warning "> Status Warning</ div >
32+ < div class ="status-info "> Status Info</ div >
33+ </ div >
34+
35+
36+
37+
38+
39+
40+
41+
42+
Original file line number Diff line number Diff line change 2020 root to : "welcome#index"
2121 get "help" , to : "welcome#help" , as : :help
2222 post "emulate" , to : "welcome#emulate" , as : :emulate
23+ get "styles_preview" , to : "welcome#styles_preview" , as : :styles_preview
2324
2425 resources :organizations
2526 resources :projects
Original file line number Diff line number Diff line change 7777 end
7878 end
7979 end
80+
81+ it "does not render the styles preview page for a non-logged-in user" do
82+ get :styles_preview
83+ expect ( response ) . to redirect_to ( "/sign_in" )
84+ end
85+
86+ context "when a user is logged in" , connect_to_mediaflux : true do
87+ let ( :user ) { FactoryBot . create :user }
88+ before do
89+ sign_in user
90+ end
91+
92+ it "renders the styles preview page" do
93+ get :styles_preview
94+ expect ( response ) . to render_template ( "styles_preview" )
95+ end
96+ end
8097end
You can’t perform that action at this time.
0 commit comments