uox3/docs/assets/css/style.scss
Xoduz 166d3b0119 Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
	cont		// Targeted item will be made a container, set to nondecay and movable 2
	endfight	// Targeted character (and character being fought) will stop fighting
	getmulti	// Get multiObject for targeted item
	finditem	// Find item at layer X
	movespeed	// Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)

Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00

389 lines
No EOL
7.5 KiB
SCSS

@import '../../../../codyhouse-framework/main/assets/css/style.scss'; // ⚠️ make sure to import the CodyHouse framework
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700'); // custom font
// --------------------------------
// FAQ Template - by CodyHouse.co
// --------------------------------
:root {
// colors
@include defineColorHSL(--cd-color-1, 213, 7%, 33%); // Blue Dark
@include defineColorHSL(--cd-color-2, 255, 100%, 100%); // Green
@include defineColorHSL(--cd-color-3, 210, 14%, 49%); // Blue Light
@include defineColorHSL(--cd-color-4, 0, 0%, 100%); // White
// font
--font-primary: 'Open Sans', sans-serif;
}
.cd-faq {
box-shadow: var(--shadow-sm);
&::before { // never visible - this is used in JavaScript to check the current MQ
content: 'mobile';
display: none;
}
a {
text-decoration: none;
}
@include breakpoint(md) {
position: relative;
box-shadow: none;
display: flex;
&::before {
content: 'desktop';
}
}
}
.cd-faq__categories {
@include breakpoint(md) {
position: sticky; // fix element on scrolling
align-self: flex-start;
flex-shrink: 0;
top: 20px;
width: 20%;
box-shadow: var(--shadow-sm);
margin-top: var(--space-md);
}
@include breakpoint(lg) {
width: 200px;
}
}
.cd-faq__category {
position: relative;
display: block;
height: 50px;
line-height: 50px;
padding: 0 var(--space-lg) 0 calc(var(--space-sm)*1.4);
color: var(--cd-color-4);
background-color: var(--cd-color-1);
@include fontSmooth;
--border-color: hsl(var(--cd-color-1-h), var(--cd-color-1-s), calc(var(--cd-color-1-l)*1.1));
border-bottom: 1px solid var(--border-color);
&::before, &::after { // plus icon on the right
content: '';
position: absolute;
top: 50%;
right: 16px;
display: inline-block;
height: 1px;
width: 10px;
background-color: lightness(var(--cd-color-1), 1.6);
}
&::after {
transform: rotate(90deg);
}
li:last-child & {
border-bottom: none;
}
@include breakpoint(md) {
font-size: var(--text-xs);
font-weight: 600;
padding: 0 var(--space-md);
transition: background .2s;
&::before, &::after {
display: none;
}
&:hover {
background: lightness(var(--cd-color-1), 1.1);
}
}
@include breakpoint(lg) {
&::before { // decorative rectangle on the left visible for the selected item
display: block;
top: 0;
right: auto;
left: 0;
height: 100%;
width: 3px;
background-color: var(--cd-color-2);
opacity: 0;
transition: opacity .2s;
}
}
}
@include breakpoint(lg) {
.cd-faq__category-selected {
background: lightness(var(--cd-color-1), 0.8);
&:hover {
background: lightness(var(--cd-color-1), 0.8);
}
&::before {
opacity: 1;
}
}
}
.cd-faq__items { // on mibile, faq contents slides in from the right
position: fixed;
z-index: 1;
height: 100%;
width: 90%;
top: 0;
right: 0;
background: var(--cd-color-4);
padding: 0 var(--component-padding) var(--space-md);
overflow: auto;
-webkit-overflow-scrolling: touch;
backface-visibility: hidden;
transform: translateZ(0) translateX(100%);
transition: transform .3s;
@include breakpoint(md) {
position: static;
height: auto;
width: auto;
flex-grow: 1;
overflow: visible;
transform: translateX(0);
padding: 0 0 0 var(--space-sm);
background: transparent;
}
}
.cd-faq__items--slide-in {
transform: translateX(0);
}
html:not(.js) .cd-faq__items {
position: static;
height: auto;
width: 100%;
transform: translateX(0);
}
.cd-faq__group {
display: none; // hide group not selected
@include breakpoint(md) { // all groups visible
display: block;
padding-top: 1px; // fix issue with collapsing margin
}
}
html:not(.js) .cd-faq__group,
.cd-faq__group--selected {
display: block;
}
.cd-faq__title {
margin: var(--space-md) 0;
h2 {
text-transform: uppercase;
font-size: var(--text-sm);
font-weight: 700;
color: lightness(var(--color-contrast-low), 0.9);
}
@include breakpoint(md) {
margin-bottom: var(--space-sm);
h2 {
font-size: var(--text-xs);
}
}
}
.cd-faq__item {
@include breakpoint(md) {
background: var(--cd-color-4);
margin-bottom: var(--space-xxxs);
box-shadow: 0 1px 2px rgba(#000, .08);
transition: box-shadow .2s;
&:hover {
--box-shadow: hsla(var(--cd-color-3-h), var(--cd-color-3-s), var(--cd-color-3-l), 0.3);
box-shadow: 0 1px 10px var(--box-shadow);
}
&:last-of-type {
margin-bottom: 0;
}
}
}
.cd-faq__trigger {
display: block;
position: relative;
margin: var(--space-md) 0 var(--space-xs);
color: var(--cd-color-2);
@include breakpoint(md) {
font-weight: 300;
margin: 0;
padding: var(--space-sm) var(--space-lg) var(--space-sm) var(--space-sm);
span {
font-size: var(--text-md);
}
&::before, &::after { // arrow icon on the right
content: '';
position: absolute;
right: 24px;
top: 50%;
height: 2px;
width: 13px;
background: lightness(var(--cd-color-2), 1.3);
backface-visibility: hidden;
transition: transform .2s;
}
&::before {
transform: rotate(45deg);
right: 32px;
}
&::after {
transform: rotate(-45deg);
}
.cd-faq__item-visible &::before {
transform: rotate(-45deg);
}
.cd-faq__item-visible &::after {
transform: rotate(45deg);
}
}
}
.cd-faq__content {
.text-component {
font-size: 0.95em;
}
p {
color: var(--cd-color-3);
}
@include breakpoint(md) {
display: none;
padding: 0 var(--space-sm);
overflow: hidden;
.text-component {
font-size: 0.75em;
padding-bottom: var(--space-md);
}
}
}
.cd-faq__content--visible {
display: block;
}
html:not(.js) .cd-faq__content {
@include breakpoint(md) {
display: block; // always display faq content
}
}
.cd-faq__close-panel { // on small device -> x icon to close faqs panel
position: fixed;
z-index: 2;
display: block;
top: 5px;
right: -40px;
height: 40px;
width: 40px;
// Force Hardware Acceleration in WebKit
transform: translateZ(0);
backface-visibility: hidden;
transition: right .3s;
&::before, &::after { // close icon in CSS
content: '';
position: absolute;
top: 16px;
left: 12px;
display: inline-block;
height: 3px;
width: 18px;
background: var(--cd-color-3);
}
&::before {
transform: rotate(45deg);
}
&::after {
transform: rotate(-45deg);
}
@include breakpoint(md) {
display: none;
}
}
.cd-faq__close-panel--move-left {
right: var(--component-padding);
transition-delay: 0.3s;
}
.cd-faq__overlay { // overlay visible on small devices when the right panel slides in
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: alpha(var(--cd-color-1), 0.8);
visibility: hidden;
opacity: 0;
transition: opacity .3s, visibility .3s;
@include breakpoint(md) {
display: none;
}
}
.cd-faq__overlay--is-visible {
visibility: visible;
opacity: 1;
}
// demo style
body {
background-color: var(--color-contrast-lower);
}
.cd-header {
--header-height: 180px;
height: var(--header-height);
background-color: var(--cd-color-2);
h1 {
font-size: var(--text-xl);
font-weight: 300;
color: var(--cd-color-4);
@include fontSmooth;
}
@include breakpoint(lg) {
--header-height: 240px;
}
}
.cd-article-link {
color: lightness(var(--cd-color-2), 0.5);
font-size: var(--text-sm);
}