Skip to content

Commit 1df0caa

Browse files
committed
Merge branch 'maintenance/StyleSheet-cleanup-extended' into develop
Finalized this round of optimizations and cleanup for the stylesheets This includes a number of bug fixes introduced by the initial round, as well as a few final optimizations which had initially been either missed or deferred. Performance - Implemented `preconnect` and `dns-prefetch` hints for expected external web requests (8c6b228) - Optimized splash screen image on home page by delivering multiples sizes and formats (16eb537) Bug Fixes - Fixed handling for the calls to action navigation, which should "stick" to the bottom () - Fixed implementation of Awesome Foundation Checkboxes, which had broke as part of the ASP.NET Core update (98d5e9f) - Fixed width of application cards on homepage so that hover correctly bleeds to edge of card (9af0647) - Fixed Owl Carousel navigation icons on homepage, which were reliant on the Font Awesome CSS classes (2e70ea5) Refactoring - Improved positioning of icons on new GoldSim styles (`blockquote.note`, `aside.help`) (aef4539) - Implemented @ktrunkey's optimization for handling the Lesson navigation list wrapping (430bc79)
2 parents 2bace01 + 16eb537 commit 1df0caa

File tree

8 files changed

+78
-17
lines changed

8 files changed

+78
-17
lines changed

Shared/Scripts/Views/Home.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@
116116
autoHeight : true,
117117
nav : true,
118118
navText : [
119-
'<i class="fa fa-caret-left"></i>',
120-
'<i class="fa fa-caret-right"></i>'
119+
'<span class="previous"></span>',
120+
'<span class="next"></span>'
121121
],
122122
loop : false
123123
});
@@ -127,8 +127,8 @@
127127
autoHeight : false,
128128
nav : true,
129129
navText : [
130-
'<i class="fa fa-caret-left"></i>',
131-
'<i class="fa fa-caret-right"></i>'
130+
'<span class="previous"></span>',
131+
'<span class="next"></span>'
132132
],
133133
loop : false
134134
});

Shared/Styles/Base/_contentBoxes.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ aside.help {
196196
font-weight : bold;
197197
display : block;
198198
margin : rem-calc(16 44);
199+
min-height : rem-calc(32);
199200
&:before {
200201
@include fa-icon;
201202
font-family : 'Font Awesome 5 Free';
@@ -204,13 +205,17 @@ aside.help {
204205
content : fa-content($fa-var-question-circle);
205206
padding-right : rem-calc(12);
206207
margin-left : rem-calc(-44);
208+
vertical-align : middle;
207209
}
208210
}
209211

210212
blockquote.note {
211213
display : block;
212-
margin : rem-calc(16 44);
214+
margin : rem-calc(0 44);
213215
border-left : none;
216+
min-height : rem-calc(32);
217+
margin-inline-start : rem-calc(0);
218+
padding-left : rem-calc(44);
214219
&:before {
215220
@include fa-icon;
216221
font-family : 'Font Awesome 5 Free';
@@ -219,5 +224,7 @@ blockquote.note {
219224
content : fa-content($fa-var-comment-alt);
220225
padding-right : rem-calc(12);
221226
margin-left : rem-calc(-44);
227+
position : relative;
228+
top : rem-calc(14);
222229
}
223230
}

Shared/Styles/Style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
// @include foundation-pagination;
5353
// @include foundation-progress-bar;
5454
// @include foundation-slider;
55-
// @include foundation-sticky;
55+
@include foundation-sticky;
5656
// @include foundation-reveal;
5757
// @include foundation-switch;
5858
@include foundation-table;

Shared/Styles/Views/Courses.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ section.panel {
4646
margin-right : rem-calc(24);
4747
font-size : rem-calc(16);
4848
li {
49-
padding-left : rem-calc(22);
50-
text-indent : rem-calc(-16);
49+
padding-left : rem-calc(20);
50+
position : relative;
5151
}
5252
@include breakpoint(medium down) {
5353
padding-left : rem-calc(8);
@@ -63,7 +63,9 @@ section.panel {
6363
}
6464
}
6565
a:before {
66-
margin-left : rem-calc(12);
66+
position : absolute;
67+
top : rem-calc(7);
68+
left : rem-calc(1);
6769
}
6870
li.selected a {
6971
font-weight : 600;

Shared/Styles/Views/Form.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
@import "variables";
1616
@import "foundation";
1717
@import "Helpers/helpers";
18+
@import "awesome-foundation6-checkbox/src/awesome-foundation6-checkbox";
1819

1920
//----------------------------------------------------------------------------------------------
2021
// FOUNDATION DEPENDENCIES
@@ -117,6 +118,7 @@ textarea {
117118
left : 2px !important;
118119
width : 17px !important;
119120
height : 17px !important;
121+
font-weight : 700;
120122
}
121123
}
122124
input[type="radio"] {
@@ -142,6 +144,7 @@ span.radio {
142144
&:after {
143145
line-height : 1.8 !important;
144146
color : $palette-black !important;
147+
font-weight : 700;
145148
}
146149
}
147150
input[type="checkbox"] {

Shared/Styles/Views/Home.scss

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
@import "foundationSettings";
1616
@import "foundation";
1717
@import "Helpers/mixins";
18+
@import "fontawesome-free/scss/_mixins.scss";
19+
@import "fontawesome-free/scss/_variables.scss";
1820

1921
//----------------------------------------------------------------------------------------------
2022
// FOUNDATION DEPENDENCIES
@@ -35,10 +37,40 @@ main {
3537
position : relative;
3638
padding : rem-calc(48 36);
3739
box-shadow : inset 0 0 9px 2px rgba(32, 32, 32, 0.75);
38-
background : $palette-black url('/Images/Home/Splash.Background.png') no-repeat center center;
40+
background-position : center center;
41+
background-repeat : no-repeat;
42+
background-color : $palette-black;
3943
background-size : cover;
44+
@include breakpoint(small) {
45+
background-image : url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.640w.png');
46+
@supports (background-image: url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.640w.webp')) {
47+
background-image : url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.640w.webp')
48+
}
49+
}
50+
@include breakpoint(medium) {
51+
background-image : url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.1024w.png');
52+
@supports (background-image: url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.1024w.webp')) {
53+
background-image : url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.1024w.webp')
54+
}
55+
}
4056
@include breakpoint(large) {
4157
padding : rem-calc(48 0 0); // WAS rem-calc(80 0 0)
58+
background-image : url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.1366w.png');
59+
@supports (background-image: url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.1366w.webp')) {
60+
background-image : url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.1366w.webp')
61+
}
62+
}
63+
@include breakpoint(1400px) {
64+
background-image : url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.1920w.png');
65+
@supports (background-image: url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.1920w.webp')) {
66+
background-image : url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.1920w.webp')
67+
}
68+
}
69+
@include breakpoint(2000px) {
70+
background-image : url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.2500w.png');
71+
@supports (background-image: url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.2500w.webp')) {
72+
background-image : url('https://media.GoldSim.com/Images/Home/Splash/Splash.Background.2500w.webp')
73+
}
4274
}
4375
@include media-screen-wide-short() {
4476
padding : rem-calc(48 0 0);
@@ -187,7 +219,7 @@ main {
187219
// Applications
188220
&.applications {
189221
h2 {
190-
margin : rem-calc(28) auto rem-calc(20);
222+
margin : rem-calc(28) rem-calc(28) rem-calc(20);
191223
font-size : rem-calc(20);
192224
font-weight : normal;
193225
text-align : center;
@@ -317,29 +349,40 @@ main {
317349
width : rem-calc(80);
318350
}
319351
&.disabled {
320-
i.fa {
352+
span {
321353
display : none;
322354
}
323355
}
324-
i.fa {
356+
span {
325357
position : absolute;
326358
top : 40%;
327359
font-size : rem-calc(32);
328360
color : lighten($palette-black, 44.5%); // #959595
329361
}
330362
}
363+
button span:before {
364+
@include fa-icon;
365+
font-family : 'Font Awesome 5 Free';
366+
font-weight : 900;
367+
}
331368
.owl-prev {
332369
left : 0;
333-
i.fa {
370+
span.previous {
334371
left : rem-calc(4);
372+
&:before {
373+
content : fa-content($fa-var-caret-left);
374+
}
335375
@include breakpoint(medium) {
336376
left : rem-calc(42);
337377
}
338378
}
339379
}
340380
.owl-next {
341381
right : 0;
342-
i.fa {
382+
span.next {
383+
&:before {
384+
content : fa-content($fa-var-caret-right);
385+
}
343386
right : rem-calc(4);
344387
@include breakpoint(medium) {
345388
right : rem-calc(42);
@@ -447,7 +490,7 @@ main {
447490
}
448491
}
449492
.card-section {
450-
padding : rem-calc(0 28);
493+
padding : rem-calc(0);
451494
}
452495
picture {
453496
overflow : hidden;
@@ -469,7 +512,7 @@ main {
469512
line-height : 1.4;
470513
a {
471514
display : block;
472-
padding : rem-calc(16 0);
515+
padding : rem-calc(16 28);
473516
font-weight : normal;
474517
border : 0 none transparent;
475518
&:hover,

Views/Layout/_Layout.cshtml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
<title>@(Model.MetaTitle?? Model.Title?? Model.Key) - GoldSim</title>
1010
<meta name="keywords" content="@Model.MetaKeywords" />
1111
<meta name="description" content="@Model.MetaDescription" />
12+
<link rel="preconnect" href="https://www.google-analytics.com">
13+
<link rel="preconnect" href="https://stats.g.doubleclick.net">
14+
<link rel="preconnect" href="https://dc.services.visualstudio.com">
15+
<link rel="preconnect" href="https://fonts.gstatic.com">
16+
<link rel="dns-prefetch" href="https://media.GoldSim.com">
1217
<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Oxygen:wght@300;400&family=Source+Sans+Pro:ital,wght@0,400;0,600;0,700;1,400;1,700&display=swap">
1318
<link rel="preload" as="font" type="font/woff2" crossorigin href="/Shared/Fonts/Vendor/FontAwesome/fa-solid-900.woff2">
1419
<link rel="preload" as="font" type="font/woff2" crossorigin href="/Shared/Fonts/Vendor/FontAwesome/fa-regular-400.woff2">

gulpFile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ function scssTask() {
104104
.pipe(sass({
105105
includePaths: [
106106
'./Shared/Styles',
107+
'./node_modules',
107108
'./node_modules/foundation-sites/scss',
108109
'./node_modules/@fortawesome'
109110
]

0 commit comments

Comments
 (0)