Skip to content

Commit 20ba274

Browse files
Merge pull request #1464 from clpetersonucf/simon/css-rework
Simon's CSS rework
2 parents f5771c3 + a212399 commit 20ba274

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1220
-5029
lines changed

fuel/app/classes/controller/admin.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ public function before()
1414
{
1515
$this->common_before();
1616
if ( ! (\Materia\Perm_Manager::is_super_user() || \Materia\Perm_Manager::is_support_user()) ) throw new \HttpNotFoundException;
17-
Css::push_group('admin');
18-
Js::push_group(['materia', 'admin']);
1917
parent::before();
2018
}
2119

@@ -32,7 +30,7 @@ public function get_widget()
3230
$this->theme->set_template('layouts/react');
3331
$this->theme->get_template()->set('title', 'Widget Admin');
3432

35-
// Css::push_group(['widget-admin']);
33+
Css::push_group(['support']);
3634
Js::push_group(['react', 'widget_admin']);
3735
}
3836

fuel/app/classes/controller/qsets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function action_import()
2222
Js::push_inline('var WIDGET_URL = "'.Config::get('materia.urls.engines').'";');
2323
Js::push_inline('var STATIC_CROSSDOMAIN = "'.Config::get('materia.urls.static').'";');
2424

25-
Css::push_group(['core', 'qset_history']);
25+
Css::push_group(['qset_history']);
2626
Js::push_group(['react', 'qset_history']);
2727

2828
return Response::forge($theme->render());

fuel/app/classes/controller/scores.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function get_show(string $inst_id, bool $is_embedded = false)
7777
->set('title', 'Score Results')
7878
->set('page_type', 'scores');
7979

80-
Css::push_group(['core', 'scores']);
80+
Css::push_group(['scores']);
8181

8282
Js::push_group(['react', 'scores', 'labjs', 'jquery', 'jqplot']);
8383

fuel/app/classes/controller/site.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,14 @@ public function action_403()
8282
*/
8383
public function action_404()
8484
{
85-
Css::push_group('errors');
86-
8785
$this->theme = Theme::instance();
8886
$this->theme->set_template('layouts/react');
8987
$this->theme->get_template()
9088
->set('title', '404 Page Not Found')
9189
->set('page_type', '404');
9290

9391
Js::push_group(['react', '404']);
92+
Css::push_group('404');
9493

9594
Log::warning('404 URL: '.Uri::main());
9695

@@ -115,7 +114,7 @@ public function action_500()
115114
Log::warning('500 URL: '.Uri::main());
116115

117116
$this->add_inline_info();
118-
Css::push_group(['errors','500']);
117+
Css::push_group(['500']);
119118

120119
$response = \Response::forge(\Theme::instance()->render(), 500);
121120

fuel/app/config/css.php

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,21 @@
1414
],
1515

1616
'groups' => [
17-
'core' => [$webpack.'css/core.css'],
1817
'homepage' => [$webpack.'css/homepage.css'],
19-
'admin' => [$webpack.'css/admin.css'],
2018
'user-admin' => [$webpack.'css/user-admin.css'],
2119
'support' => [$webpack.'css/support.css'],
2220
'catalog' => [$webpack.'css/catalog.css'],
2321
'detail' => [$webpack.'css/detail.css'],
24-
'playpage' => [
25-
$webpack.'css/widget-player-page.css',
26-
$webpack.'css/loading-icon.css'
27-
],
28-
'widget_play' => [
29-
$webpack.'css/widget-play.css',
30-
],
22+
'playpage' => [$webpack.'css/player-page.css'],
3123
'lti' => [$webpack.'css/util-lti-picker.css'],
3224
'my_widgets' => [$webpack.'css/my-widgets.css'],
3325
'widget_create' => [
3426
$webpack.'css/loading-icon.css',
3527
$webpack.'css/creator-page.css',
3628
],
37-
'widget_detail' => [
38-
$webpack.'css/widget-detail.css',
39-
],
40-
'widget_catalog' => [$webpack.'css/widget-catalog.css'],
4129
'profile' => [$webpack.'css/profile.css'],
4230
'login' => [$webpack.'css/login.css'],
43-
'scores' => [
44-
$cdnjs.'jqPlot/1.0.9/jquery.jqplot.min.css',
45-
$webpack.'css/scores.css',
46-
],
31+
'scores' => [$webpack.'css/scores.css'],
4732
'pre_embed_placeholder' => [$webpack.'css/pre-embed-common-styles.css'],
4833
'embed_scores' => [$webpack.'css/scores.css'],
4934
'question_import' => [
@@ -52,24 +37,18 @@
5237
$webpack.'css/question-importer.css',
5338
],
5439
'questionimport' => [$webpack.'css/question-importer.css'],
55-
'qset_history' => [
56-
$webpack.'css/util-qset-history.css',
57-
],
58-
'rollback_dialog' => [
59-
$webpack.'css/util-rollback-confirm.css'
60-
],
40+
'qset_history' => [$webpack.'css/qset-history.css'],
41+
'rollback_dialog' => [$webpack.'css/util-rollback-confirm.css'],
6142
'media_import' => [$webpack.'css/media.css'],
6243
'help' => [$webpack.'css/help.css'],
63-
'errors' => [$webpack.'css/errors.css'],
6444
'fonts' => [
65-
$g_fonts.'css?family=Kameron:700&text=0123456789%25',
66-
$g_fonts.'css?family=Lato:300,400,700,700italic,900&v2',
45+
$g_fonts.'css2?family=Kameron:wght@700&display=block',
46+
$g_fonts.'css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,700&display=block',
6747
],
68-
'guide' => [$webpack.'css/widget-guide.css'],
69-
// the following are required for the support-info styles to be embedded
70-
// TODO probably consolidate the support_info styles in a common stylesheet
48+
'guide' => [$webpack.'css/guide-page.css'],
7149
'draft-not-playable' => [$webpack.'css/draft-not-playable.css'],
50+
'404' => [$webpack.'css/404.css'],
7251
'500' => [$webpack.'css/500.css'],
7352
'no_permission' => [$webpack.'css/no-permission.css']
7453
],
75-
];
54+
];

fuel/app/config/development/routes.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22
return [
3+
4+
// Direct access to error states
5+
'404' => 'site/404',
6+
'500' => 'site/500',
7+
38
// Route for testing what Materia looks like using the embed code
49
'test/external/(:alnum)(/.*)?' => 'widgets/test/external/$1',
510

fuel/app/themes/default/layouts/react.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<meta name="viewport" content="width=device-width,initial-scale=1.0">
66
<?= $partials['meta'] ?? '' ?>
77
<title><?= $title ?? '' ?> | Materia</title>
8+
<link rel="preconnect" href="https://fonts.googleapis.com">
9+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
810
<?= Css::render() ?>
911
<?= $partials['google_analytics'] ?? '' ?>
1012
</head>
3.2 KB
Loading

src/components/404.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import Header from './header'
3+
import './404.scss'
34

45
const Action404 = () => (
56
<>

src/components/404.scss

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
@import './include.scss';
2+
3+
#notfound {
4+
background: #fff;
5+
width: 100vw;
6+
max-width: 1200px;
7+
min-width: 600px;
8+
9+
margin: 0 auto;
10+
11+
.page {
12+
position: relative;
13+
display: block;
14+
15+
width: 80%;
16+
height: 285px;
17+
padding-top: 200px;
18+
margin: 50px auto;
19+
20+
background: url('/img/kogneato_metal_detecting.png') 66% no-repeat,
21+
url('/img/404_logo_balls.png') 80% no-repeat,
22+
url('/img/404_beachandocean.png') 0 255px no-repeat;
23+
background-position: right center;
24+
25+
h1 {
26+
width: 50%;
27+
height: 50%;
28+
background: url('/img/404_insand.png') top center no-repeat;
29+
background-size: contain;
30+
text-indent: -9000px;
31+
position: absolute;
32+
top: 30px;
33+
left: 10px;
34+
}
35+
36+
p {
37+
position: relative;
38+
top: 100px;
39+
padding-left: 5%;
40+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
41+
font-size: 18px;
42+
font-weight: 700;
43+
text-align: left;
44+
}
45+
46+
@media (max-width: 625px) {
47+
h1 {
48+
left: 5px;
49+
50+
width: 33%;
51+
height: 33%;
52+
}
53+
54+
p {
55+
position: relative;
56+
top: 40px;
57+
background: rgba(255,255,255,0.85);
58+
padding: 15px 5px;
59+
text-align: center;
60+
}
61+
}
62+
}
63+
}

0 commit comments

Comments
 (0)