├── .gitignore ├── GLSL ├── Constant-Color │ ├── README.md │ ├── constant_color.frag │ ├── constant_color.vert │ └── constant_color_sample.png ├── Constant-Texture │ ├── README.md │ ├── constant_texture.frag │ ├── constant_texture.vert │ └── constant_texture_sample.png ├── Iridescence-Simple │ ├── README.md │ ├── iridescence_simple.frag │ ├── iridescence_simple.vert │ └── iridescence_simple_sample.png └── README.md ├── OSL ├── Constant-Shader │ ├── README.md │ ├── constant.osl │ └── constant_sample.png ├── Iridescence-Simple │ ├── README.md │ ├── iridescence_simple.osl │ └── iridescence_simple_sample.png └── README.md ├── README.md ├── VEX ├── Constant-Color │ ├── README.md │ ├── constant_color.hdanc │ ├── constant_color.vfl │ └── constant_color_sample.png ├── Constant-Texture │ ├── README.md │ ├── constant_texture.hdanc │ ├── constant_texture.vfl │ └── constant_texture_sample.png ├── Iridescence-Simple │ ├── README.md │ ├── iridescence_simple.hdanc │ ├── iridescence_simple.vfl │ └── iridescence_simple_sample.png ├── README.md └── Reading-Data-Points │ ├── README.md │ ├── _datapoints.bgeo.sc │ ├── _datapoints_sample.png │ ├── color_transfer.hdanc │ ├── color_transfer.vfl │ ├── color_transfer_sample.png │ ├── cristalize_normals.hdanc │ ├── cristalize_normals.vfl │ ├── cristalize_sample.png │ ├── qrotation_field.hdanc │ ├── qrotation_field.vfl │ └── qrotation_field_sample.png ├── _data ├── OSL_examples.blend ├── VEX_examples.hipnc └── bear.obj └── docs ├── .vscode └── settings.json ├── README.md ├── assets ├── css │ ├── fontawesome-all.min.css │ ├── images │ │ └── close.svg │ ├── main.css │ └── noscript.css ├── js │ ├── breakpoints.min.js │ ├── browser.min.js │ ├── jquery.min.js │ ├── jquery.scrollex.min.js │ ├── main.js │ ├── prism.js │ └── util.js ├── sass │ ├── base │ │ ├── _page.scss │ │ ├── _reset.scss │ │ └── _typography.scss │ ├── components │ │ ├── _actions.scss │ │ ├── _box.scss │ │ ├── _button.scss │ │ ├── _contact.scss │ │ ├── _features.scss │ │ ├── _form.scss │ │ ├── _icon.scss │ │ ├── _icons.scss │ │ ├── _image.scss │ │ ├── _list.scss │ │ ├── _pagination.scss │ │ ├── _row.scss │ │ ├── _section.scss │ │ └── _table.scss │ ├── layout │ │ ├── _banner.scss │ │ ├── _footer.scss │ │ ├── _header.scss │ │ ├── _menu.scss │ │ └── _wrapper.scss │ ├── libs │ │ ├── _breakpoints.scss │ │ ├── _functions.scss │ │ ├── _html-grid.scss │ │ ├── _mixins.scss │ │ ├── _prism.scss │ │ ├── _vars.scss │ │ └── _vendor.scss │ ├── main.scss │ └── noscript.scss ├── template │ ├── footer.js │ ├── header.js │ ├── menu.js │ └── setup.js └── webfonts │ ├── fa-brands-400.eot │ ├── fa-brands-400.svg │ ├── fa-brands-400.ttf │ ├── fa-brands-400.woff │ ├── fa-brands-400.woff2 │ ├── fa-regular-400.eot │ ├── fa-regular-400.svg │ ├── fa-regular-400.ttf │ ├── fa-regular-400.woff │ ├── fa-regular-400.woff2 │ ├── fa-solid-900.eot │ ├── fa-solid-900.svg │ ├── fa-solid-900.ttf │ ├── fa-solid-900.woff │ └── fa-solid-900.woff2 ├── elements.html ├── generic.html ├── glsl.html ├── images ├── _base │ ├── bg.jpg │ ├── pic01.jpg │ ├── pic02.jpg │ ├── pic03.jpg │ ├── pic04.jpg │ ├── pic05.jpg │ ├── pic06.jpg │ ├── pic07.jpg │ └── pic08.jpg ├── constant_color_glsl.jpg ├── constant_color_osl.jpg ├── constant_color_vex.jpg ├── constant_shader.jpg ├── constant_texture_glsl.jpg ├── constant_texture_vex.jpg ├── cristalize_normals_vex.jpg ├── data_points_shader.jpg ├── glsl.png ├── index.png ├── iridescence_shader.jpg ├── iridescence_simple_glsl.jpg ├── iridescence_simple_osl.jpg ├── iridescence_simple_vex.jpg ├── osl.png ├── qrotation_field_vex.jpg ├── transfer_color_vex.jpg └── vex.png ├── index.html ├── osl.html └── vex.html /.gitignore: -------------------------------------------------------------------------------- 1 | ### Python ### 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | ### Jupyter Notebook ### 7 | .ipynb_checkpoints 8 | 9 | ### Houdini ### 10 | backup/ 11 | 12 | ### Blender ### 13 | *.blend[0-9]* 14 | 15 | ### OSL ### 16 | *.oso 17 | 18 | ################### 19 | ### Page Assets ### 20 | ################### 21 | 22 | ### NodeJS ### 23 | node_modules/ 24 | package-lock.json 25 | 26 | # live sass compiler 27 | *.css.map 28 | -------------------------------------------------------------------------------- /GLSL/Constant-Color/README.md: -------------------------------------------------------------------------------- 1 | ![title](constant_color_sample.png) 2 | 3 | # Constant Color 4 | 5 | A simple pure shaded color. 6 | 7 | *created and tested in* **OpenGL Shader Designer** -------------------------------------------------------------------------------- /GLSL/Constant-Color/constant_color.frag: -------------------------------------------------------------------------------- 1 | const vec4 color = vec4(1.00, 0.00, 0.25, 1.00), 2 | opacity = vec4(1.00, 1.00, 1.00, 1.00); 3 | 4 | void main(void) { 5 | gl_FragColor = color*opacity; 6 | } 7 | -------------------------------------------------------------------------------- /GLSL/Constant-Color/constant_color.vert: -------------------------------------------------------------------------------- 1 | void main(void) { 2 | gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex; 3 | } 4 | -------------------------------------------------------------------------------- /GLSL/Constant-Color/constant_color_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/GLSL/Constant-Color/constant_color_sample.png -------------------------------------------------------------------------------- /GLSL/Constant-Texture/README.md: -------------------------------------------------------------------------------- 1 | ![title](constant_texture_sample.png) 2 | 3 | # Constant Texture 4 | 5 | A simple pure shaded color from texture. 6 | 7 | *created and tested in* **OpenGL Shader Designer** -------------------------------------------------------------------------------- /GLSL/Constant-Texture/constant_texture.frag: -------------------------------------------------------------------------------- 1 | uniform sampler2D text; 2 | 3 | const vec4 mult = vec4(1.0, 1.0, 1.0, 1.0), 4 | opac = vec4(1.0, 1.0, 1.0, 1.0); 5 | const vec2 repeat = vec2(1.0, 1.0), 6 | offset = vec2(0.0, 0.0); 7 | 8 | void main(void) { 9 | vec4 _texture, _color; 10 | vec2 _coord2d; 11 | _coord2d = gl_TexCoord[0].st*repeat + offset; 12 | _texture = texture2D(text, _coord2d); 13 | _color = _texture*mult; 14 | gl_FragColor = _color*opac; 15 | } 16 | -------------------------------------------------------------------------------- /GLSL/Constant-Texture/constant_texture.vert: -------------------------------------------------------------------------------- 1 | void main(void) { 2 | gl_TexCoord[0] = gl_TextureMatrix[0]*gl_MultiTexCoord0; 3 | gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex; 4 | } 5 | -------------------------------------------------------------------------------- /GLSL/Constant-Texture/constant_texture_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/GLSL/Constant-Texture/constant_texture_sample.png -------------------------------------------------------------------------------- /GLSL/Iridescence-Simple/README.md: -------------------------------------------------------------------------------- 1 | ![title](iridescence_simple_sample.png) 2 | 3 | # Iridescence Simple 4 | 5 | A simple iridescent shader. 6 | 7 | *created and tested in* **OpenGL Shader Designer** -------------------------------------------------------------------------------- /GLSL/Iridescence-Simple/iridescence_simple.frag: -------------------------------------------------------------------------------- 1 | /*................................................................................................... 2 | Author: Diego Inácio 3 | GitHub: github.com/diegoinacio 4 | Date: AUG/07/2017 5 | ..................................................................................................... 6 | Fragment part of a simple iridescent shader using OpenGL Shading Language. 7 | 8 | If you have any comment, sent it to me at: diegodci@gmail.com 9 | Thank you! :D 10 | ..................................................................................................... 11 | References: 12 | 13 | ROST et al. OpenGL Shading Language, 3rd edition. 14 | 15 | BAILEY; CUNNINGHAM. Graphics Shaders: Theory and Practice, 2nd Edition. 16 | 17 | EBERT et al. Texturing and Modeling: A Procedural Approach, 3rd edition. 18 | ..................................................................................................... 19 | Resources: 20 | 21 | 22 | http://www.opengl.org/ 23 | ...................................................................................................*/ 24 | #define PI 3.1415926535897931 25 | 26 | varying vec4 P; 27 | varying float fr; 28 | 29 | const vec3 ofreq = vec3(1.0, 1.0, 1.0), // Frequency of iridescent orientantion part. 30 | nfreq = vec3(1.0, 1.0, 1.0), // Frequency of iridescent noise part. 31 | ooset = vec3(0.0, 0.0, 0.0), // Offset of iridescent orientantion part. 32 | noset = vec3(0.0, 0.0, 0.0); // Offset of iridescent noise part. 33 | const float nmult = 1.0, // Controls the intensity of noise. 34 | gamma = 0.75, // Gamma correction applied to incidence value (fr). 35 | minvl = 0.0; // Incident distribution curve control, applied after gamma correction. 36 | 37 | float setRange(float value, float oMin, float oMax, float iMin, float iMax) { 38 | return iMin + ((value - oMin)/(oMax - oMin))*(iMax - iMin); 39 | } 40 | 41 | float NaiveNoise(vec3 freq, vec3 offset) { 42 | // Naive noise function to make irregularity 43 | return sin(2.0*PI*P.x*freq.x*2.0 + 12.0 + offset.x) + 44 | cos(2.0*PI*P.z*freq.x + 21.0 + offset.x) * 45 | sin(2.0*PI*P.y*freq.y*2.0 + 23.0 + offset.y) + 46 | cos(2.0*PI*P.y*freq.y + 32.0 + offset.y) * 47 | sin(2.0*PI*P.z*freq.z*2.0 + 34.0 + offset.z) + 48 | cos(2.0*PI*P.x*freq.z + 43.0 + offset.z); 49 | } 50 | 51 | vec3 iridescence( 52 | float orient, 53 | float noiseMult, 54 | vec3 freqA, 55 | vec3 offsetA, 56 | vec3 freqB, 57 | vec3 offsetB 58 | ) { 59 | // This function returns a iridescence value based on orientation 60 | vec3 irid; 61 | irid.x = abs(cos( 62 | 2.0*PI*orient*freqA.x + NaiveNoise(freqB, offsetB)*noiseMult + 1.0 + offsetA.x 63 | )); 64 | irid.y = abs(cos( 65 | 2.0*PI*orient*freqA.y + NaiveNoise(freqB, offsetB)*noiseMult + 2.0 + offsetA.y 66 | )); 67 | irid.z = abs(cos( 68 | 2.0*PI*orient*freqA.z + NaiveNoise(freqB, offsetB)*noiseMult + 3.0 + offsetA.z 69 | )); 70 | 71 | return irid; 72 | } 73 | 74 | void main(void) { 75 | vec3 _iridColor; 76 | float _space, _incidence; 77 | _space = pow(1.0 - fr, 1.0/gamma); 78 | _incidence = setRange(_space, 0.0, 1.0, minvl, 1.0); 79 | _iridColor = iridescence(fr, nmult, ofreq, ooset, nfreq, noset); 80 | gl_FragColor = vec4(_iridColor, 1.0)*_incidence; 81 | } 82 | -------------------------------------------------------------------------------- /GLSL/Iridescence-Simple/iridescence_simple.vert: -------------------------------------------------------------------------------- 1 | /*................................................................................................... 2 | Author: Diego Inácio 3 | GitHub: github.com/diegoinacio 4 | Date: AUG/07/2017 5 | ..................................................................................................... 6 | Vertex part of a simple iridescent shader using OpenGL Shading Language. 7 | 8 | If you have any comment, sent it to me at: diegodci@gmail.com 9 | Thank you! :D 10 | ..................................................................................................... 11 | References: 12 | 13 | ROST et al. OpenGL Shading Language, 3rd edition. 14 | 15 | BAILEY; CUNNINGHAM. Graphics Shaders: Theory and Practice, 2nd Edition. 16 | 17 | EBERT et al. Texturing and Modeling: A Procedural Approach, 3rd edition. 18 | ..................................................................................................... 19 | Resources: 20 | 21 | 22 | http://www.opengl.org/ 23 | ...................................................................................................*/ 24 | varying vec4 P; 25 | varying float fr; 26 | 27 | void main(void) { 28 | P = gl_Vertex; 29 | vec3 N = gl_NormalMatrix*gl_Normal; 30 | vec3 V = vec3(gl_ModelViewMatrix*gl_Vertex); 31 | vec3 E = normalize(-V); 32 | fr = dot(N, E); 33 | gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex; 34 | } 35 | -------------------------------------------------------------------------------- /GLSL/Iridescence-Simple/iridescence_simple_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/GLSL/Iridescence-Simple/iridescence_simple_sample.png -------------------------------------------------------------------------------- /GLSL/README.md: -------------------------------------------------------------------------------- 1 | # GLSL 2 | 3 | Experiments and Shaders written in [OpenGL Shading Language](https://www.khronos.org/opengl/wiki/OpenGL_Shading_Language). -------------------------------------------------------------------------------- /OSL/Constant-Shader/README.md: -------------------------------------------------------------------------------- 1 | ![title](constant_sample.png) 2 | 3 | # Iridescence Simple 4 | 5 | A simple pure shaded color. 6 | 7 | *rendered in Blender Cycles* -------------------------------------------------------------------------------- /OSL/Constant-Shader/constant.osl: -------------------------------------------------------------------------------- 1 | /* 2 | Created by Diego Inácio - (c) 2018 3 | */ 4 | 5 | shader constant ( 6 | color Cin = color(1, 0, 0.25), // input 7 | output color Cout = color(1, 1, 1) //output 8 | ) { 9 | Cout = Cin; 10 | } -------------------------------------------------------------------------------- /OSL/Constant-Shader/constant_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/OSL/Constant-Shader/constant_sample.png -------------------------------------------------------------------------------- /OSL/Iridescence-Simple/README.md: -------------------------------------------------------------------------------- 1 | ![title](iridescence_simple_sample.png) 2 | 3 | # Iridescence Simple 4 | 5 | A simple iridescent shader. 6 | 7 | *rendered in Blender Cycles* -------------------------------------------------------------------------------- /OSL/Iridescence-Simple/iridescence_simple.osl: -------------------------------------------------------------------------------- 1 | /* 2 | Author: Diego Inácio - (c) 2018 3 | GitHub: github.com/diegoinacio 4 | */ 5 | 6 | float NaiveNoise (vector freq, vector offset) { 7 | // Naive noise function to make irregularity 8 | return sin(2*M_PI*P[0]*freq[0]*2 + 12 + offset[0]) + 9 | cos(2*M_PI*P[2]*freq[0] + 21 + offset[0]) * 10 | sin(2*M_PI*P[1]*freq[1]*2 + 23 + offset[1]) + 11 | cos(2*M_PI*P[1]*freq[1] + 32 + offset[1]) * 12 | sin(2*M_PI*P[2]*freq[2]*2 + 34 + offset[2]) + 13 | cos(2*M_PI*P[0]*freq[2] + 43 + offset[2]); 14 | } 15 | 16 | color 17 | iridescence ( 18 | float orient, 19 | float noiseMult, 20 | vector freqA, 21 | vector offsetA, 22 | vector freqB, 23 | vector offsetB 24 | ) { 25 | // This function returns a iridescence value based on orientation 26 | color irid; 27 | irid[0] = abs(cos( 28 | 2*M_PI*orient*freqA[0] + NaiveNoise(freqB, offsetB)*noiseMult + 1 + offsetA[0] 29 | )); 30 | irid[1] = abs(cos( 31 | 2*M_PI*orient*freqA[1] + NaiveNoise(freqB, offsetB)*noiseMult + 2 + offsetA[1] 32 | )); 33 | irid[2] = abs(cos( 34 | 2*M_PI*orient*freqA[2] + NaiveNoise(freqB, offsetB)*noiseMult + 3 + offsetA[2] 35 | )); 36 | 37 | return irid; 38 | } 39 | 40 | shader 41 | iridescence_simple ( 42 | vector ofreq = 1, // Orientation frequency 43 | vector nfreq = 1, // Noise frequency 44 | vector ooset = 0, // Orientation offset 45 | vector noset = 0, // Noise offset 46 | float nmult = 1, // Noise multiplier 47 | float gamma = 0.455, // Incidence gamma 48 | 49 | output color Cout = 1 //output 50 | ) { 51 | color _iridColor; vector E; 52 | float fr, _space, _incidence; 53 | E = normalize(I); 54 | fr = dot(N, E); 55 | _space = pow(1 - fr, 1/gamma); 56 | _incidence = mix(0, 1, _space); 57 | _iridColor = iridescence(fr, nmult, ofreq, ooset, nfreq, noset); 58 | Cout = _iridColor*_incidence; 59 | } 60 | -------------------------------------------------------------------------------- /OSL/Iridescence-Simple/iridescence_simple_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/OSL/Iridescence-Simple/iridescence_simple_sample.png -------------------------------------------------------------------------------- /OSL/README.md: -------------------------------------------------------------------------------- 1 | # OSL 2 | 3 | Experiments and Shaders written in [Open Shading Language](https://github.com/imageworks/OpenShadingLanguage). -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Shading Lab 2 | 3 | Lab of _pixel colorization_ with code ❤️ 4 | 5 | Visit the repository [index page](http://dicgi.github.io/shading-lab/). 6 | -------------------------------------------------------------------------------- /VEX/Constant-Color/README.md: -------------------------------------------------------------------------------- 1 | ![title](constant_color_sample.png) 2 | 3 | # Constant Color 4 | 5 | A simple pure shaded color. 6 | 7 | ***Parameters*** 8 | - **Use point color (Cd)**: If true, overlaps color with geometry attribute *Cd*. 9 | - **Color**: Output color. 10 | - **Opacity**: Sets the opacity of the shader. 11 | - **Use point alpha (Alpha)**: If true, uses the geometry attribute *Alpha*. 12 | 13 | Installation: *File > Import > Houdini Digial Asset... > ../path/file.hdanc* -------------------------------------------------------------------------------- /VEX/Constant-Color/constant_color.hdanc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Constant-Color/constant_color.hdanc -------------------------------------------------------------------------------- /VEX/Constant-Color/constant_color.vfl: -------------------------------------------------------------------------------- 1 | #pragma info "Author: Diego Inácio - (c) 2017" 2 | 3 | #pragma label pcolor "Use point color (Cd)" 4 | #pragma hint pcolor toggle 5 | 6 | #pragma label color "Color" 7 | #pragma hint color color 8 | #pragma disablewhen color {pcolor == 1} 9 | 10 | #pragma label palpha "Use point alpha (Alpha)" 11 | #pragma hint palpha toggle 12 | 13 | #pragma label opacity "Opacity" 14 | #pragma hint opacity color 15 | 16 | #pragma label Cd "" 17 | #pragma hint Cd invisible 18 | 19 | #pragma label Alpha "" 20 | #pragma hint Alpha invisible 21 | 22 | surface 23 | constant_color ( 24 | int pcolor = 0; 25 | vector color = {1, 0, 0.25}, 26 | opacity = {1, 1, 1}; 27 | int palpha = 0; 28 | vector Cd = {1, 1, 1}; 29 | float Alpha = 1 30 | ) { 31 | vector _color = pcolor ? Cd : color; 32 | float _alpha = palpha ? Alpha : 1; 33 | vector _opacity = opacity*_alpha; 34 | 35 | Cf = _color*_opacity; 36 | Of = _opacity; 37 | } 38 | -------------------------------------------------------------------------------- /VEX/Constant-Color/constant_color_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Constant-Color/constant_color_sample.png -------------------------------------------------------------------------------- /VEX/Constant-Texture/README.md: -------------------------------------------------------------------------------- 1 | ![title](constant_texture_sample.png) 2 | 3 | # Constant Texture 4 | 5 | A simple pure shaded color from texture. 6 | 7 | ***Parameters*** 8 | - **Mode**: Selects the coordinate format. 9 | + **UV**: Geometry coordinates. 10 | + **ST**: Primitive coordinates. 11 | - **Texture map**: The image file to use as a texture map. 12 | - **Color multiplier**: Multiplies the color from texture. 13 | - **Opacity**: Sets the opacity of the shader. 14 | - **Repeat coordinates**: Controls how many times the basic texture is repeated (tiled) within the texture. 15 | - **Offset**: Controls the position of the texture tiles within the texture. 16 | 17 | Installation: *File > Import > Houdini Digial Asset... > ../path/file.hdanc* -------------------------------------------------------------------------------- /VEX/Constant-Texture/constant_texture.hdanc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Constant-Texture/constant_texture.hdanc -------------------------------------------------------------------------------- /VEX/Constant-Texture/constant_texture.vfl: -------------------------------------------------------------------------------- 1 | #pragma help "Created by Diego Inácio - (c) 2017" 2 | #pragma info "Created by Diego Inácio - (c) 2017" 3 | 4 | #pragma label mode "Mode" 5 | #pragma choice mode "uv" "UV :: Geometry coordinates" 6 | #pragma choice mode "st" "ST :: Primitive coordinates" 7 | 8 | #pragma label text "Texture map" 9 | #pragma hint text image 10 | 11 | #pragma label mult "Color multiplier" 12 | #pragma hint mult color 13 | 14 | #pragma label opac "Opacity" 15 | #pragma hint opac color 16 | 17 | #pragma label uv "" 18 | #pragma hint uv invisible 19 | 20 | #pragma label repeat "Repeat coordinates" 21 | #pragma hint repeat uv 22 | 23 | #pragma label offset "Offset" 24 | #pragma hint offset uv 25 | 26 | surface 27 | constant_texture ( 28 | string mode = "uv", 29 | text = "Mandril.pic"; 30 | vector mult = {1, 1, 1}, 31 | opac = {1, 1, 1}, 32 | uv = {0, 0, 0}; 33 | vector2 repeat = {1, 1}, 34 | offset = {0, 0} 35 | ) { 36 | vector _coord2d, _texture, _color, _repeat, _offset; 37 | if(mode == "st") { 38 | _coord2d = set(s, t, 0); 39 | } else { 40 | _coord2d = uv; 41 | } 42 | _repeat = repeat; 43 | setcomp(_repeat, 1, 2); 44 | _offset = offset; 45 | setcomp(_offset, 1, 2); 46 | _coord2d = _coord2d*_repeat + _offset; 47 | _texture = texture(text, _coord2d.x, _coord2d.y); 48 | _color = _texture*mult; 49 | Cf = _color*opac; 50 | Of = opac; 51 | } 52 | -------------------------------------------------------------------------------- /VEX/Constant-Texture/constant_texture_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Constant-Texture/constant_texture_sample.png -------------------------------------------------------------------------------- /VEX/Iridescence-Simple/README.md: -------------------------------------------------------------------------------- 1 | ![title](iridescence_simple_sample.png) 2 | 3 | # Iridescence Simple 4 | 5 | A simple iridescent shader. 6 | 7 | ***Parameters*** 8 | - **Orientation frequency**: Frequency of iridescent orientantion part. 9 | - **Noise frequency**: Frequency of iridescent noise part. 10 | - **Orientation offset**: Offset of iridescent orientantion part. 11 | - **Nose offset**: Offset of iridescent noise part. 12 | - **Noise multiplier**: Controls the intensity of noise. 13 | - **Incidence gamma**: Gamma correction applied to incidence value (fr). 14 | - **Incidence profile**: Incident distribution curve control, applied after gamma correction. 15 | 16 | Installation: *File > Import > Houdini Digial Asset... > ../path/file.hdanc* -------------------------------------------------------------------------------- /VEX/Iridescence-Simple/iridescence_simple.hdanc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Iridescence-Simple/iridescence_simple.hdanc -------------------------------------------------------------------------------- /VEX/Iridescence-Simple/iridescence_simple.vfl: -------------------------------------------------------------------------------- 1 | #define PI 3.1415926535897931 2 | 3 | #pragma help "Author: Diego Inácio - (c) 2017" 4 | #pragma info "Author: Diego Inácio - (c) 2017" 5 | 6 | #pragma label ofreq "Orientation frequency" 7 | #pragma label nfreq "Noise frequency" 8 | #pragma label ooset "Orientation offset" 9 | #pragma label noset "Noise offset" 10 | #pragma label nmult "Noise multiplier" 11 | #pragma label gamma "Incidence gamma" 12 | 13 | #pragma ramp_flt ramp rin rps rvl 14 | #pragma label ramp "Incidence profile" 15 | #pragma parmtag ramp rampbasisdefault linear 16 | #pragma parmtag ramp rampshowcontrolsdefault 1 17 | 18 | float NaiveNoise (vector freq, offset) { 19 | // Naive noise function to make irregularity 20 | return sin(2*PI*P.x*freq.x*2 + 12 + offset.x) + 21 | cos(2*PI*P.z*freq.x + 21 + offset.x) * 22 | sin(2*PI*P.y*freq.y*2 + 23 + offset.y) + 23 | cos(2*PI*P.y*freq.y + 32 + offset.y) * 24 | sin(2*PI*P.z*freq.z*2 + 34 + offset.z) + 25 | cos(2*PI*P.x*freq.z + 43 + offset.z); 26 | } 27 | 28 | vector iridescence ( 29 | float orient, 30 | noiseMult; 31 | vector freqA, 32 | offsetA, 33 | freqB, 34 | offsetB 35 | ) { 36 | // This function returns a iridescence value based on orientation 37 | vector irid; 38 | irid.x = abs(cos( 39 | 2*PI*orient*freqA.x + NaiveNoise(freqB, offsetB)*noiseMult + 1 + offsetA.x 40 | )); 41 | irid.y = abs(cos( 42 | 2*PI*orient*freqA.y + NaiveNoise(freqB, offsetB)*noiseMult + 2 + offsetA.y 43 | )); 44 | irid.z = abs(cos( 45 | 2*PI*orient*freqA.z + NaiveNoise(freqB, offsetB)*noiseMult + 3 + offsetA.z 46 | )); 47 | 48 | return irid; 49 | } 50 | 51 | surface 52 | iridescence_simple ( 53 | vector ofreq = {1, 1, 1}, 54 | nfreq = {1, 1, 1}, 55 | ooset = {0, 0, 0}, 56 | noset = {0, 0, 0}; 57 | float nmult = 1, 58 | gamma = 0.455; 59 | string rin[] = {"linear", "linear"}; 60 | float rps[] = {0, 1}, 61 | rvl[] = {0, 1} 62 | ) { 63 | vector _iridColor, E; 64 | float fr, _space, _incidence; 65 | E = normalize(-I); 66 | fr = dot(N, E); 67 | _space = pow(1 - fr, 1/gamma); 68 | _incidence = spline(rin, _space, rvl, rps); 69 | _iridColor = iridescence(fr, nmult, ofreq, ooset, nfreq, noset); 70 | Cf = _iridColor*_incidence; 71 | } 72 | -------------------------------------------------------------------------------- /VEX/Iridescence-Simple/iridescence_simple_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Iridescence-Simple/iridescence_simple_sample.png -------------------------------------------------------------------------------- /VEX/README.md: -------------------------------------------------------------------------------- 1 | # VEX 2 | 3 | Experiments and Shaders written in [VEX Language](http://www.sidefx.com/docs/houdini/vex/index.html). -------------------------------------------------------------------------------- /VEX/Reading-Data-Points/README.md: -------------------------------------------------------------------------------- 1 | ![title](qrotation_field_sample.png) 2 | 3 | # Reading Data Points 4 | 5 | Reading data points and attributes from *bgeo* files and bringing into shaders for whichever purpose. 6 | 7 | ![data points](_datapoints_sample.png) 8 | 9 | Transfer color from data points to shader context. 10 | 11 | ![color transfer](color_transfer_sample.png) 12 | 13 | Transfer normals from data points using voronoi diagram. 14 | 15 | ![cristalize normals](cristalize_sample.png) 16 | 17 | A rotation field using data points as centroids and respective normals as axes. 18 | 19 | ![quaternion rotation field](qrotation_field_sample.png) 20 | 21 | Installation: *File > Import > Houdini Digial Asset... > ../path/file.hdanc* -------------------------------------------------------------------------------- /VEX/Reading-Data-Points/_datapoints.bgeo.sc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Reading-Data-Points/_datapoints.bgeo.sc -------------------------------------------------------------------------------- /VEX/Reading-Data-Points/_datapoints_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Reading-Data-Points/_datapoints_sample.png -------------------------------------------------------------------------------- /VEX/Reading-Data-Points/color_transfer.hdanc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Reading-Data-Points/color_transfer.hdanc -------------------------------------------------------------------------------- /VEX/Reading-Data-Points/color_transfer.vfl: -------------------------------------------------------------------------------- 1 | #pragma help "Created by Diego Inácio - (c) 2019" 2 | #pragma info "Created by Diego Inácio - (c) 2019" 3 | 4 | #pragma label mult "Multiplier" 5 | #pragma label spread "Overall Spread" 6 | #pragma label DATA "Data Points" 7 | #pragma label group "Point Group" 8 | 9 | surface 10 | color_transfer ( 11 | float mult = 0.5, 12 | spread = 1; 13 | string DATA = "$HIP/../VEX/Reading-Data-Points/_datapoints.bgeo.sc", 14 | group = "group0"; 15 | ) { 16 | float d, Np, pFratt; 17 | vector _P, pP, pCd, pVratt, outColor; 18 | 19 | _P = ptransform("space:camera", "space:world", P); 20 | 21 | outColor = 0; 22 | 23 | int p[] = expandpointgroup(DATA, group); 24 | Np = len(p); 25 | for(int i = 0; i < Np; i++) { 26 | pP = point(DATA, "P", p[i]); 27 | pCd = point(DATA, "Cd", p[i]); 28 | pFratt = point(DATA, "fratt", p[i]); 29 | d = distance2(pP, _P); 30 | d = exp(-d*d/(pFratt*spread)); 31 | outColor += pCd*mult*d; 32 | } 33 | 34 | Cf = outColor; 35 | } 36 | -------------------------------------------------------------------------------- /VEX/Reading-Data-Points/color_transfer_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Reading-Data-Points/color_transfer_sample.png -------------------------------------------------------------------------------- /VEX/Reading-Data-Points/cristalize_normals.hdanc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Reading-Data-Points/cristalize_normals.hdanc -------------------------------------------------------------------------------- /VEX/Reading-Data-Points/cristalize_normals.vfl: -------------------------------------------------------------------------------- 1 | #pragma help "Created by Diego Inácio - (c) 2019" 2 | #pragma info "Created by Diego Inácio - (c) 2019" 3 | 4 | #pragma label kd "Diffuse" 5 | #pragma label ks "Specular" 6 | #pragma label DATA "Data Points" 7 | #pragma label group "Point Group" 8 | 9 | surface 10 | cristalize_normals ( 11 | float kd = 0.5, 12 | ks = 1; 13 | string DATA = "$HIP/../VEX/Reading-Data-Points/_datapoints.bgeo.sc", 14 | group = "group0"; 15 | ) { 16 | vector _P = ptransform("space:camera", "space:world", P); 17 | 18 | int i = nearpoint(DATA, group, _P); 19 | vector pN = point(DATA, "N", i)*{1, 1, -1}; 20 | 21 | vector diff = diffuse(pN); 22 | vector spec = specular(pN, normalize(-I), 0.25); 23 | 24 | Cf = diff*kd + spec*ks; 25 | } 26 | -------------------------------------------------------------------------------- /VEX/Reading-Data-Points/cristalize_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Reading-Data-Points/cristalize_sample.png -------------------------------------------------------------------------------- /VEX/Reading-Data-Points/qrotation_field.hdanc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Reading-Data-Points/qrotation_field.hdanc -------------------------------------------------------------------------------- /VEX/Reading-Data-Points/qrotation_field.vfl: -------------------------------------------------------------------------------- 1 | #define PI 3.1415926535897931 2 | 3 | #pragma help "Created by Diego Inácio - (c) 2019" 4 | #pragma info "Created by Diego Inácio - (c) 2019" 5 | 6 | #pragma label Theta "Maximum Theta" 7 | #pragma label spread "Overall Spread" 8 | #pragma label DATA "Data Points" 9 | #pragma label kd "Diffuse" 10 | #pragma label ks "Specular" 11 | #pragma label bump "Bump" 12 | 13 | surface 14 | qrotation_field ( 15 | float Theta = 0.5, 16 | spread = 1, 17 | kd = 1, 18 | ks = 0.5, 19 | bump = 0.1; 20 | string DATA = "$HIP/../VEX/Reading-Data-Points/_datapoints.bgeo.sc" 21 | ) { 22 | float d, Np, theta, pFratt, factor, pspread; 23 | vector _P, pP, axis, pVratt; 24 | vector4 Q; 25 | string group; 26 | 27 | _P = ptransform("space:camera", "space:world", P); 28 | 29 | theta = anoise(_P + 123, 8, 0.75, 1)*0.5; 30 | axis = anoise(_P + 234, 8, 0.75, 1); 31 | Q = quaternion(theta, axis); 32 | _P = qrotate(Q, _P); 33 | 34 | for(int g = 0; g < 8; g++) { 35 | group = concat("group", itoa(g)); 36 | int p[] = expandpointgroup(DATA, group); 37 | Np = len(p); 38 | factor = g + 1; 39 | for (int i = 0; i < Np; i++) { 40 | pP = point(DATA, "P", p[i]); 41 | axis = point(DATA, "N", p[i]); 42 | pFratt = point(DATA, "fratt", p[i]); 43 | pVratt = point(DATA, "vratt", p[i]); 44 | pspread = pFratt*spread/factor; 45 | d = distance2(pP, _P); 46 | d = exp(-d*d/pspread); 47 | theta = 2*PI*(pFratt*2 - 1)*d*Theta/factor; 48 | Q = quaternion(theta, axis); 49 | _P = qrotate(Q, _P - pP) + pP; 50 | } 51 | } 52 | 53 | vector outColor = anoise(_P*0.5, 8, 0.75, 1); 54 | 55 | vector Nn = normalize(computenormal(P + min(outColor)*bump, N, Ng)); 56 | 57 | vector diff = diffuse(Nn)*outColor*dot(normalize(-I), N); 58 | 59 | vector spec = specular(Nn, normalize(-I), fit01(min(outColor), 0.1, 0.5))*0.5; 60 | spec += specular(N, normalize(-I), 0.05); 61 | 62 | Cf = diff*kd + spec*ks; 63 | } 64 | -------------------------------------------------------------------------------- /VEX/Reading-Data-Points/qrotation_field_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/VEX/Reading-Data-Points/qrotation_field_sample.png -------------------------------------------------------------------------------- /_data/OSL_examples.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/_data/OSL_examples.blend -------------------------------------------------------------------------------- /_data/VEX_examples.hipnc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/_data/VEX_examples.hipnc -------------------------------------------------------------------------------- /docs/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "better-comments.tags": [ 3 | { 4 | "tag": "!", 5 | "color": "#FF0044", 6 | "strikethrough": false, 7 | "backgroundColor": "transparent" 8 | }, 9 | { 10 | "tag": "/!", 11 | "color": "#CC0044", 12 | "strikethrough": false, 13 | "backgroundColor": "transparent" 14 | }, 15 | { 16 | "tag": "*", 17 | "color": "#88FF00", 18 | "strikethrough": false, 19 | "backgroundColor": "transparent" 20 | }, 21 | { 22 | "tag": "/*", 23 | "color": "#44AA00", 24 | "strikethrough": false, 25 | "backgroundColor": "transparent" 26 | }, 27 | { 28 | "tag": "?", 29 | "color": "#AA44FF", 30 | "strikethrough": false, 31 | "backgroundColor": "transparent" 32 | }, 33 | { 34 | "tag": "//", 35 | "color": "#474747", 36 | "strikethrough": true, 37 | "backgroundColor": "transparent" 38 | }, 39 | { 40 | "tag": "todo", 41 | "color": "#FF8C00", 42 | "strikethrough": false, 43 | "backgroundColor": "transparent" 44 | } 45 | ], 46 | "liveSassCompile.settings.formats": [{ 47 | "format": "expanded", 48 | "extensionName": ".css", 49 | "savePath": "./assets/css" 50 | } 51 | ], 52 | "liveServer.settings.port": 5501 53 | } -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | _Shading Lab_ webpage directory. 2 | -------------------------------------------------------------------------------- /docs/assets/css/images/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/assets/css/noscript.css: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.23.0 2 | https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+python&plugins=normalize-whitespace */ 3 | /** 4 | * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML 5 | * Based on https://github.com/chriskempson/tomorrow-theme 6 | * @author Rose Pritchard 7 | */ 8 | code[class*="language-"], 9 | pre[class*="language-"] { 10 | color: #ccc; 11 | background: none; 12 | font-size: 1em; 13 | text-align: left; 14 | white-space: pre; 15 | word-spacing: normal; 16 | word-break: normal; 17 | word-wrap: normal; 18 | line-height: 1.5; 19 | -moz-tab-size: 4; 20 | -o-tab-size: 4; 21 | tab-size: 4; 22 | -webkit-hyphens: none; 23 | -ms-hyphens: none; 24 | hyphens: none; 25 | } 26 | 27 | /* Inline code */ 28 | :not(pre) > code[class*="language-"] { 29 | padding: 0.1em; 30 | border-radius: 0.3em; 31 | white-space: normal; 32 | } 33 | 34 | .token.comment, 35 | .token.block-comment, 36 | .token.prolog, 37 | .token.doctype, 38 | .token.cdata { 39 | color: #999; 40 | } 41 | 42 | .token.punctuation { 43 | color: #ccc; 44 | } 45 | 46 | .token.tag, 47 | .token.attr-name, 48 | .token.namespace, 49 | .token.deleted { 50 | color: #e2777a; 51 | } 52 | 53 | .token.function-name { 54 | color: #6196cc; 55 | } 56 | 57 | .token.boolean, 58 | .token.number, 59 | .token.function { 60 | color: #f08d49; 61 | } 62 | 63 | .token.property, 64 | .token.class-name, 65 | .token.constant, 66 | .token.symbol { 67 | color: #f8c555; 68 | } 69 | 70 | .token.selector, 71 | .token.important, 72 | .token.atrule, 73 | .token.keyword, 74 | .token.builtin { 75 | color: #cc99cd; 76 | } 77 | 78 | .token.string, 79 | .token.char, 80 | .token.attr-value, 81 | .token.regex, 82 | .token.variable { 83 | color: #7ec699; 84 | } 85 | 86 | .token.operator, 87 | .token.entity, 88 | .token.url { 89 | color: #67cdcc; 90 | } 91 | 92 | .token.important, 93 | .token.bold { 94 | font-weight: bold; 95 | } 96 | 97 | .token.italic { 98 | font-style: italic; 99 | } 100 | 101 | .token.entity { 102 | cursor: help; 103 | } 104 | 105 | .token.inserted { 106 | color: green; 107 | } 108 | 109 | /* Banner */ 110 | body.is-preload #banner .logo { 111 | -webkit-transform: none; 112 | transform: none; 113 | opacity: 1; 114 | } 115 | 116 | body.is-preload #banner h2 { 117 | opacity: 1; 118 | -webkit-transform: none; 119 | transform: none; 120 | -moz-filter: none; 121 | -webkit-filter: none; 122 | -ms-filter: none; 123 | filter: none; 124 | } 125 | 126 | body.is-preload #banner p { 127 | opacity: 01; 128 | -webkit-transform: none; 129 | transform: none; 130 | -moz-filter: none; 131 | -webkit-filter: none; 132 | -ms-filter: none; 133 | filter: none; 134 | } 135 | /*# sourceMappingURL=noscript.css.map */ -------------------------------------------------------------------------------- /docs/assets/js/breakpoints.min.js: -------------------------------------------------------------------------------- 1 | /* breakpoints.js v1.0 | @ajlkn | MIT licensed */ 2 | var breakpoints=function(){"use strict";function e(e){t.init(e)}var t={list:null,media:{},events:[],init:function(e){t.list=e,window.addEventListener("resize",t.poll),window.addEventListener("orientationchange",t.poll),window.addEventListener("load",t.poll),window.addEventListener("fullscreenchange",t.poll)},active:function(e){var n,a,s,i,r,d,c;if(!(e in t.media)){if(">="==e.substr(0,2)?(a="gte",n=e.substr(2)):"<="==e.substr(0,2)?(a="lte",n=e.substr(2)):">"==e.substr(0,1)?(a="gt",n=e.substr(1)):"<"==e.substr(0,1)?(a="lt",n=e.substr(1)):"!"==e.substr(0,1)?(a="not",n=e.substr(1)):(a="eq",n=e),n&&n in t.list)if(i=t.list[n],Array.isArray(i)){if(r=parseInt(i[0]),d=parseInt(i[1]),isNaN(r)){if(isNaN(d))return;c=i[1].substr(String(d).length)}else c=i[0].substr(String(r).length);if(isNaN(r))switch(a){case"gte":s="screen";break;case"lte":s="screen and (max-width: "+d+c+")";break;case"gt":s="screen and (min-width: "+(d+1)+c+")";break;case"lt":s="screen and (max-width: -1px)";break;case"not":s="screen and (min-width: "+(d+1)+c+")";break;default:s="screen and (max-width: "+d+c+")"}else if(isNaN(d))switch(a){case"gte":s="screen and (min-width: "+r+c+")";break;case"lte":s="screen";break;case"gt":s="screen and (max-width: -1px)";break;case"lt":s="screen and (max-width: "+(r-1)+c+")";break;case"not":s="screen and (max-width: "+(r-1)+c+")";break;default:s="screen and (min-width: "+r+c+")"}else switch(a){case"gte":s="screen and (min-width: "+r+c+")";break;case"lte":s="screen and (max-width: "+d+c+")";break;case"gt":s="screen and (min-width: "+(d+1)+c+")";break;case"lt":s="screen and (max-width: "+(r-1)+c+")";break;case"not":s="screen and (max-width: "+(r-1)+c+"), screen and (min-width: "+(d+1)+c+")";break;default:s="screen and (min-width: "+r+c+") and (max-width: "+d+c+")"}}else s="("==i.charAt(0)?"screen and "+i:i;t.media[e]=!!s&&s}return t.media[e]!==!1&&window.matchMedia(t.media[e]).matches},on:function(e,n){t.events.push({query:e,handler:n,state:!1}),t.active(e)&&n()},poll:function(){var e,n;for(e=0;e0:!!("ontouchstart"in window),e.mobile="wp"==e.os||"android"==e.os||"ios"==e.os||"bb"==e.os}};return e.init(),e}();!function(e,n){"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?module.exports=n():e.browser=n()}(this,function(){return browser}); 3 | -------------------------------------------------------------------------------- /docs/assets/js/jquery.scrollex.min.js: -------------------------------------------------------------------------------- 1 | /* jquery.scrollex v0.2.1 | (c) @ajlkn | github.com/ajlkn/jquery.scrollex | MIT licensed */ 2 | !function(t){function e(t,e,n){return"string"==typeof t&&("%"==t.slice(-1)?t=parseInt(t.substring(0,t.length-1))/100*e:"vh"==t.slice(-2)?t=parseInt(t.substring(0,t.length-2))/100*n:"px"==t.slice(-2)&&(t=parseInt(t.substring(0,t.length-2)))),t}var n=t(window),i=1,o={};n.on("scroll",function(){var e=n.scrollTop();t.map(o,function(t){window.clearTimeout(t.timeoutId),t.timeoutId=window.setTimeout(function(){t.handler(e)},t.options.delay)})}).on("load",function(){n.trigger("scroll")}),jQuery.fn.scrollex=function(l){var s=t(this);if(0==this.length)return s;if(this.length>1){for(var r=0;r=i&&o>=t};break;case"bottom":h=function(t,e,n,i,o){return n>=i&&o>=n};break;case"middle":h=function(t,e,n,i,o){return e>=i&&o>=e};break;case"top-only":h=function(t,e,n,i,o){return i>=t&&n>=i};break;case"bottom-only":h=function(t,e,n,i,o){return n>=o&&o>=t};break;default:case"default":h=function(t,e,n,i,o){return n>=i&&o>=t}}return c=function(t){var i,o,l,s,r,a,u=this.state,h=!1,c=this.$element.offset();i=n.height(),o=t+i/2,l=t+i,s=this.$element.outerHeight(),r=c.top+e(this.options.top,s,i),a=c.top+s-e(this.options.bottom,s,i),h=this.test(t,o,l,r,a),h!=u&&(this.state=h,h?this.options.enter&&this.options.enter.apply(this.element):this.options.leave&&this.options.leave.apply(this.element)),this.options.scroll&&this.options.scroll.apply(this.element,[(o-r)/(a-r)])},p={id:a,options:u,test:h,handler:c,state:null,element:this,$element:s,timeoutId:null},o[a]=p,s.data("_scrollexId",p.id),p.options.initialize&&p.options.initialize.apply(this),s},jQuery.fn.unscrollex=function(){var e=t(this);if(0==this.length)return e;if(this.length>1){for(var n=0;n 0 32 | && $header.hasClass('alt')) { 33 | 34 | $window.on('resize', function() { $window.trigger('scroll'); }); 35 | 36 | $banner.scrollex({ 37 | bottom: $header.outerHeight(), 38 | terminate: function() { $header.removeClass('alt'); }, 39 | enter: function() { $header.addClass('alt'); }, 40 | leave: function() { $header.removeClass('alt'); } 41 | }); 42 | 43 | } 44 | 45 | // Menu. 46 | var $menu = $('#menu'); 47 | 48 | $menu._locked = false; 49 | 50 | $menu._lock = function() { 51 | 52 | if ($menu._locked) 53 | return false; 54 | 55 | $menu._locked = true; 56 | 57 | window.setTimeout(function() { 58 | $menu._locked = false; 59 | }, 350); 60 | 61 | return true; 62 | 63 | }; 64 | 65 | $menu._show = function() { 66 | 67 | if ($menu._lock()) 68 | $body.addClass('is-menu-visible'); 69 | 70 | }; 71 | 72 | $menu._hide = function() { 73 | 74 | if ($menu._lock()) 75 | $body.removeClass('is-menu-visible'); 76 | 77 | }; 78 | 79 | $menu._toggle = function() { 80 | 81 | if ($menu._lock()) 82 | $body.toggleClass('is-menu-visible'); 83 | 84 | }; 85 | 86 | $menu 87 | .appendTo($body) 88 | .on('click', function(event) { 89 | 90 | event.stopPropagation(); 91 | 92 | // Hide. 93 | $menu._hide(); 94 | 95 | }) 96 | .find('.inner') 97 | .on('click', '.close', function(event) { 98 | 99 | event.preventDefault(); 100 | event.stopPropagation(); 101 | event.stopImmediatePropagation(); 102 | 103 | // Hide. 104 | $menu._hide(); 105 | 106 | }) 107 | .on('click', function(event) { 108 | event.stopPropagation(); 109 | }) 110 | .on('click', 'a', function(event) { 111 | 112 | var href = $(this).attr('href'); 113 | 114 | event.preventDefault(); 115 | event.stopPropagation(); 116 | 117 | // Hide. 118 | $menu._hide(); 119 | 120 | // Redirect. 121 | window.setTimeout(function() { 122 | window.location.href = href; 123 | }, 350); 124 | 125 | }); 126 | 127 | $body 128 | .on('click', 'a[href="#menu"]', function(event) { 129 | 130 | event.stopPropagation(); 131 | event.preventDefault(); 132 | 133 | // Toggle. 134 | $menu._toggle(); 135 | 136 | }) 137 | .on('keydown', function(event) { 138 | 139 | // Hide on escape. 140 | if (event.keyCode == 27) 141 | $menu._hide(); 142 | 143 | }); 144 | 145 | })(jQuery); -------------------------------------------------------------------------------- /docs/assets/js/util.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 3 | /** 4 | * Generate an indented list of links from a nav. Meant for use with panel(). 5 | * @return {jQuery} jQuery object. 6 | */ 7 | $.fn.navList = function() { 8 | 9 | var $this = $(this); 10 | $a = $this.find('a'), 11 | b = []; 12 | 13 | $a.each(function() { 14 | 15 | var $this = $(this), 16 | indent = Math.max(0, $this.parents('li').length - 1), 17 | href = $this.attr('href'), 18 | target = $this.attr('target'); 19 | 20 | b.push( 21 | '' + 26 | '' + 27 | $this.text() + 28 | '' 29 | ); 30 | 31 | }); 32 | 33 | return b.join(''); 34 | 35 | }; 36 | 37 | /** 38 | * Panel-ify an element. 39 | * @param {object} userConfig User config. 40 | * @return {jQuery} jQuery object. 41 | */ 42 | $.fn.panel = function(userConfig) { 43 | 44 | // No elements? 45 | if (this.length == 0) 46 | return $this; 47 | 48 | // Multiple elements? 49 | if (this.length > 1) { 50 | 51 | for (var i=0; i < this.length; i++) 52 | $(this[i]).panel(userConfig); 53 | 54 | return $this; 55 | 56 | } 57 | 58 | // Vars. 59 | var $this = $(this), 60 | $body = $('body'), 61 | $window = $(window), 62 | id = $this.attr('id'), 63 | config; 64 | 65 | // Config. 66 | config = $.extend({ 67 | 68 | // Delay. 69 | delay: 0, 70 | 71 | // Hide panel on link click. 72 | hideOnClick: false, 73 | 74 | // Hide panel on escape keypress. 75 | hideOnEscape: false, 76 | 77 | // Hide panel on swipe. 78 | hideOnSwipe: false, 79 | 80 | // Reset scroll position on hide. 81 | resetScroll: false, 82 | 83 | // Reset forms on hide. 84 | resetForms: false, 85 | 86 | // Side of viewport the panel will appear. 87 | side: null, 88 | 89 | // Target element for "class". 90 | target: $this, 91 | 92 | // Class to toggle. 93 | visibleClass: 'visible' 94 | 95 | }, userConfig); 96 | 97 | // Expand "target" if it's not a jQuery object already. 98 | if (typeof config.target != 'jQuery') 99 | config.target = $(config.target); 100 | 101 | // Panel. 102 | 103 | // Methods. 104 | $this._hide = function(event) { 105 | 106 | // Already hidden? Bail. 107 | if (!config.target.hasClass(config.visibleClass)) 108 | return; 109 | 110 | // If an event was provided, cancel it. 111 | if (event) { 112 | 113 | event.preventDefault(); 114 | event.stopPropagation(); 115 | 116 | } 117 | 118 | // Hide. 119 | config.target.removeClass(config.visibleClass); 120 | 121 | // Post-hide stuff. 122 | window.setTimeout(function() { 123 | 124 | // Reset scroll position. 125 | if (config.resetScroll) 126 | $this.scrollTop(0); 127 | 128 | // Reset forms. 129 | if (config.resetForms) 130 | $this.find('form').each(function() { 131 | this.reset(); 132 | }); 133 | 134 | }, config.delay); 135 | 136 | }; 137 | 138 | // Vendor fixes. 139 | $this 140 | .css('-ms-overflow-style', '-ms-autohiding-scrollbar') 141 | .css('-webkit-overflow-scrolling', 'touch'); 142 | 143 | // Hide on click. 144 | if (config.hideOnClick) { 145 | 146 | $this.find('a') 147 | .css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)'); 148 | 149 | $this 150 | .on('click', 'a', function(event) { 151 | 152 | var $a = $(this), 153 | href = $a.attr('href'), 154 | target = $a.attr('target'); 155 | 156 | if (!href || href == '#' || href == '' || href == '#' + id) 157 | return; 158 | 159 | // Cancel original event. 160 | event.preventDefault(); 161 | event.stopPropagation(); 162 | 163 | // Hide panel. 164 | $this._hide(); 165 | 166 | // Redirect to href. 167 | window.setTimeout(function() { 168 | 169 | if (target == '_blank') 170 | window.open(href); 171 | else 172 | window.location.href = href; 173 | 174 | }, config.delay + 10); 175 | 176 | }); 177 | 178 | } 179 | 180 | // Event: Touch stuff. 181 | $this.on('touchstart', function(event) { 182 | 183 | $this.touchPosX = event.originalEvent.touches[0].pageX; 184 | $this.touchPosY = event.originalEvent.touches[0].pageY; 185 | 186 | }) 187 | 188 | $this.on('touchmove', function(event) { 189 | 190 | if ($this.touchPosX === null 191 | || $this.touchPosY === null) 192 | return; 193 | 194 | var diffX = $this.touchPosX - event.originalEvent.touches[0].pageX, 195 | diffY = $this.touchPosY - event.originalEvent.touches[0].pageY, 196 | th = $this.outerHeight(), 197 | ts = ($this.get(0).scrollHeight - $this.scrollTop()); 198 | 199 | // Hide on swipe? 200 | if (config.hideOnSwipe) { 201 | 202 | var result = false, 203 | boundary = 20, 204 | delta = 50; 205 | 206 | switch (config.side) { 207 | 208 | case 'left': 209 | result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX > delta); 210 | break; 211 | 212 | case 'right': 213 | result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX < (-1 * delta)); 214 | break; 215 | 216 | case 'top': 217 | result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY > delta); 218 | break; 219 | 220 | case 'bottom': 221 | result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY < (-1 * delta)); 222 | break; 223 | 224 | default: 225 | break; 226 | 227 | } 228 | 229 | if (result) { 230 | 231 | $this.touchPosX = null; 232 | $this.touchPosY = null; 233 | $this._hide(); 234 | 235 | return false; 236 | 237 | } 238 | 239 | } 240 | 241 | // Prevent vertical scrolling past the top or bottom. 242 | if (($this.scrollTop() < 0 && diffY < 0) 243 | || (ts > (th - 2) && ts < (th + 2) && diffY > 0)) { 244 | 245 | event.preventDefault(); 246 | event.stopPropagation(); 247 | 248 | } 249 | 250 | }); 251 | 252 | // Event: Prevent certain events inside the panel from bubbling. 253 | $this.on('click touchend touchstart touchmove', function(event) { 254 | event.stopPropagation(); 255 | }); 256 | 257 | // Event: Hide panel if a child anchor tag pointing to its ID is clicked. 258 | $this.on('click', 'a[href="#' + id + '"]', function(event) { 259 | 260 | event.preventDefault(); 261 | event.stopPropagation(); 262 | 263 | config.target.removeClass(config.visibleClass); 264 | 265 | }); 266 | 267 | // Body. 268 | 269 | // Event: Hide panel on body click/tap. 270 | $body.on('click touchend', function(event) { 271 | $this._hide(event); 272 | }); 273 | 274 | // Event: Toggle. 275 | $body.on('click', 'a[href="#' + id + '"]', function(event) { 276 | 277 | event.preventDefault(); 278 | event.stopPropagation(); 279 | 280 | config.target.toggleClass(config.visibleClass); 281 | 282 | }); 283 | 284 | // Window. 285 | 286 | // Event: Hide on ESC. 287 | if (config.hideOnEscape) 288 | $window.on('keydown', function(event) { 289 | 290 | if (event.keyCode == 27) 291 | $this._hide(event); 292 | 293 | }); 294 | 295 | return $this; 296 | 297 | }; 298 | 299 | /** 300 | * Apply "placeholder" attribute polyfill to one or more forms. 301 | * @return {jQuery} jQuery object. 302 | */ 303 | $.fn.placeholder = function() { 304 | 305 | // Browser natively supports placeholders? Bail. 306 | if (typeof (document.createElement('input')).placeholder != 'undefined') 307 | return $(this); 308 | 309 | // No elements? 310 | if (this.length == 0) 311 | return $this; 312 | 313 | // Multiple elements? 314 | if (this.length > 1) { 315 | 316 | for (var i=0; i < this.length; i++) 317 | $(this[i]).placeholder(); 318 | 319 | return $this; 320 | 321 | } 322 | 323 | // Vars. 324 | var $this = $(this); 325 | 326 | // Text, TextArea. 327 | $this.find('input[type=text],textarea') 328 | .each(function() { 329 | 330 | var i = $(this); 331 | 332 | if (i.val() == '' 333 | || i.val() == i.attr('placeholder')) 334 | i 335 | .addClass('polyfill-placeholder') 336 | .val(i.attr('placeholder')); 337 | 338 | }) 339 | .on('blur', function() { 340 | 341 | var i = $(this); 342 | 343 | if (i.attr('name').match(/-polyfill-field$/)) 344 | return; 345 | 346 | if (i.val() == '') 347 | i 348 | .addClass('polyfill-placeholder') 349 | .val(i.attr('placeholder')); 350 | 351 | }) 352 | .on('focus', function() { 353 | 354 | var i = $(this); 355 | 356 | if (i.attr('name').match(/-polyfill-field$/)) 357 | return; 358 | 359 | if (i.val() == i.attr('placeholder')) 360 | i 361 | .removeClass('polyfill-placeholder') 362 | .val(''); 363 | 364 | }); 365 | 366 | // Password. 367 | $this.find('input[type=password]') 368 | .each(function() { 369 | 370 | var i = $(this); 371 | var x = $( 372 | $('
') 373 | .append(i.clone()) 374 | .remove() 375 | .html() 376 | .replace(/type="password"/i, 'type="text"') 377 | .replace(/type=password/i, 'type=text') 378 | ); 379 | 380 | if (i.attr('id') != '') 381 | x.attr('id', i.attr('id') + '-polyfill-field'); 382 | 383 | if (i.attr('name') != '') 384 | x.attr('name', i.attr('name') + '-polyfill-field'); 385 | 386 | x.addClass('polyfill-placeholder') 387 | .val(x.attr('placeholder')).insertAfter(i); 388 | 389 | if (i.val() == '') 390 | i.hide(); 391 | else 392 | x.hide(); 393 | 394 | i 395 | .on('blur', function(event) { 396 | 397 | event.preventDefault(); 398 | 399 | var x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); 400 | 401 | if (i.val() == '') { 402 | 403 | i.hide(); 404 | x.show(); 405 | 406 | } 407 | 408 | }); 409 | 410 | x 411 | .on('focus', function(event) { 412 | 413 | event.preventDefault(); 414 | 415 | var i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']'); 416 | 417 | x.hide(); 418 | 419 | i 420 | .show() 421 | .focus(); 422 | 423 | }) 424 | .on('keypress', function(event) { 425 | 426 | event.preventDefault(); 427 | x.val(''); 428 | 429 | }); 430 | 431 | }); 432 | 433 | // Events. 434 | $this 435 | .on('submit', function() { 436 | 437 | $this.find('input[type=text],input[type=password],textarea') 438 | .each(function(event) { 439 | 440 | var i = $(this); 441 | 442 | if (i.attr('name').match(/-polyfill-field$/)) 443 | i.attr('name', ''); 444 | 445 | if (i.val() == i.attr('placeholder')) { 446 | 447 | i.removeClass('polyfill-placeholder'); 448 | i.val(''); 449 | 450 | } 451 | 452 | }); 453 | 454 | }) 455 | .on('reset', function(event) { 456 | 457 | event.preventDefault(); 458 | 459 | $this.find('select') 460 | .val($('option:first').val()); 461 | 462 | $this.find('input,textarea') 463 | .each(function() { 464 | 465 | var i = $(this), 466 | x; 467 | 468 | i.removeClass('polyfill-placeholder'); 469 | 470 | switch (this.type) { 471 | 472 | case 'submit': 473 | case 'reset': 474 | break; 475 | 476 | case 'password': 477 | i.val(i.attr('defaultValue')); 478 | 479 | x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); 480 | 481 | if (i.val() == '') { 482 | i.hide(); 483 | x.show(); 484 | } 485 | else { 486 | i.show(); 487 | x.hide(); 488 | } 489 | 490 | break; 491 | 492 | case 'checkbox': 493 | case 'radio': 494 | i.attr('checked', i.attr('defaultValue')); 495 | break; 496 | 497 | case 'text': 498 | case 'textarea': 499 | i.val(i.attr('defaultValue')); 500 | 501 | if (i.val() == '') { 502 | i.addClass('polyfill-placeholder'); 503 | i.val(i.attr('placeholder')); 504 | } 505 | 506 | break; 507 | 508 | default: 509 | i.val(i.attr('defaultValue')); 510 | break; 511 | 512 | } 513 | }); 514 | 515 | }); 516 | 517 | return $this; 518 | 519 | }; 520 | 521 | /** 522 | * Moves elements to/from the first positions of their respective parents. 523 | * @param {jQuery} $elements Elements (or selector) to move. 524 | * @param {bool} condition If true, moves elements to the top. Otherwise, moves elements back to their original locations. 525 | */ 526 | $.prioritize = function($elements, condition) { 527 | 528 | var key = '__prioritize'; 529 | 530 | // Expand $elements if it's not already a jQuery object. 531 | if (typeof $elements != 'jQuery') 532 | $elements = $($elements); 533 | 534 | // Step through elements. 535 | $elements.each(function() { 536 | 537 | var $e = $(this), $p, 538 | $parent = $e.parent(); 539 | 540 | // No parent? Bail. 541 | if ($parent.length == 0) 542 | return; 543 | 544 | // Not moved? Move it. 545 | if (!$e.data(key)) { 546 | 547 | // Condition is false? Bail. 548 | if (!condition) 549 | return; 550 | 551 | // Get placeholder (which will serve as our point of reference for when this element needs to move back). 552 | $p = $e.prev(); 553 | 554 | // Couldn't find anything? Means this element's already at the top, so bail. 555 | if ($p.length == 0) 556 | return; 557 | 558 | // Move element to top of parent. 559 | $e.prependTo($parent); 560 | 561 | // Mark element as moved. 562 | $e.data(key, $p); 563 | 564 | } 565 | 566 | // Moved already? 567 | else { 568 | 569 | // Condition is true? Bail. 570 | if (condition) 571 | return; 572 | 573 | $p = $e.data(key); 574 | 575 | // Move element back to its original location (using our placeholder). 576 | $e.insertAfter($p); 577 | 578 | // Unmark element as moved. 579 | $e.removeData(key); 580 | 581 | } 582 | 583 | }); 584 | 585 | }; 586 | 587 | })(jQuery); -------------------------------------------------------------------------------- /docs/assets/sass/base/_page.scss: -------------------------------------------------------------------------------- 1 | /* Basic */ 2 | 3 | // MSIE: Required for IEMobile. 4 | @-ms-viewport { 5 | width: device-width; 6 | } 7 | 8 | // MSIE: Prevents scrollbar from overlapping content. 9 | body { 10 | -ms-overflow-style: scrollbar; 11 | } 12 | 13 | // Ensures page width is always >=320px. 14 | @include breakpoint("<=xsmall") { 15 | html, 16 | body { 17 | min-width: 320px; 18 | } 19 | } 20 | 21 | // Set box model to border-box. 22 | // Based on css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice 23 | html { 24 | box-sizing: border-box; 25 | } 26 | 27 | *, 28 | *:before, 29 | *:after { 30 | box-sizing: inherit; 31 | } 32 | 33 | body { 34 | @include dynamic-background-image; 35 | background-color: _palette(bg); 36 | 37 | background-size: auto, cover; 38 | 39 | background-attachment: fixed, fixed; 40 | 41 | background-position: center, center; 42 | 43 | // Stops initial animations until page loads. 44 | &.is-preload { 45 | *, 46 | *:before, 47 | *:after { 48 | @include vendor("animation", "none !important"); 49 | @include vendor("transition", "none !important"); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /docs/assets/sass/base/_reset.scss: -------------------------------------------------------------------------------- 1 | // Reset. 2 | // Based on meyerweb.com/eric/tools/css/reset (v2.0 | 20110126 | License: public domain) 3 | 4 | html, 5 | body, 6 | div, 7 | span, 8 | applet, 9 | object, 10 | iframe, 11 | h1, 12 | h2, 13 | h3, 14 | h4, 15 | h5, 16 | h6, 17 | p, 18 | blockquote, 19 | pre, 20 | a, 21 | abbr, 22 | acronym, 23 | address, 24 | big, 25 | cite, 26 | code, 27 | del, 28 | dfn, 29 | em, 30 | img, 31 | ins, 32 | kbd, 33 | q, 34 | s, 35 | samp, 36 | small, 37 | strike, 38 | strong, 39 | sub, 40 | sup, 41 | tt, 42 | var, 43 | b, 44 | u, 45 | i, 46 | center, 47 | dl, 48 | dt, 49 | dd, 50 | ol, 51 | ul, 52 | li, 53 | fieldset, 54 | form, 55 | label, 56 | legend, 57 | table, 58 | caption, 59 | tbody, 60 | tfoot, 61 | thead, 62 | tr, 63 | th, 64 | td, 65 | article, 66 | aside, 67 | canvas, 68 | details, 69 | embed, 70 | figure, 71 | figcaption, 72 | footer, 73 | header, 74 | hgroup, 75 | menu, 76 | nav, 77 | output, 78 | ruby, 79 | section, 80 | summary, 81 | time, 82 | mark, 83 | audio, 84 | video { 85 | margin: 0; 86 | padding: 0; 87 | border: 0; 88 | font-size: 100%; 89 | font: inherit; 90 | vertical-align: baseline; 91 | } 92 | 93 | article, 94 | aside, 95 | details, 96 | figcaption, 97 | figure, 98 | footer, 99 | header, 100 | hgroup, 101 | menu, 102 | nav, 103 | section { 104 | display: block; 105 | } 106 | 107 | body { 108 | line-height: 1; 109 | } 110 | 111 | ol, 112 | ul { 113 | list-style: none; 114 | } 115 | 116 | blockquote, 117 | q { 118 | quotes: none; 119 | 120 | &:before, 121 | &:after { 122 | content: ""; 123 | content: none; 124 | } 125 | } 126 | 127 | table { 128 | border-collapse: collapse; 129 | border-spacing: 0; 130 | } 131 | 132 | body { 133 | -webkit-text-size-adjust: none; 134 | } 135 | 136 | mark { 137 | background-color: transparent; 138 | color: inherit; 139 | } 140 | 141 | input::-moz-focus-inner { 142 | border: 0; 143 | padding: 0; 144 | } 145 | 146 | input, 147 | select, 148 | textarea { 149 | -moz-appearance: none; 150 | -webkit-appearance: none; 151 | -ms-appearance: none; 152 | appearance: none; 153 | } 154 | -------------------------------------------------------------------------------- /docs/assets/sass/base/_typography.scss: -------------------------------------------------------------------------------- 1 | /* Type */ 2 | 3 | body, 4 | input, 5 | select, 6 | textarea { 7 | color: _palette(fg); 8 | font-family: _font(family); 9 | font-size: 16.5pt; 10 | font-weight: _font(weight); 11 | line-height: 1.65; 12 | 13 | @include breakpoint("<=xlarge") { 14 | font-size: 13pt; 15 | } 16 | 17 | @include breakpoint("<=large") { 18 | font-size: 12pt; 19 | } 20 | 21 | @include breakpoint("<=medium") { 22 | font-size: 12pt; 23 | } 24 | 25 | @include breakpoint("<=small") { 26 | font-size: 12pt; 27 | } 28 | 29 | @include breakpoint("<=xsmall") { 30 | font-size: 12pt; 31 | } 32 | } 33 | 34 | a { 35 | @include vendor( 36 | "transition", 37 | "color #{_duration(transition)} ease-in-out, border-bottom-color #{_duration(transition)} ease-in-out" 38 | ); 39 | border-bottom: dotted 1px _palette(fg-light); 40 | color: _palette(fg-bold); 41 | text-decoration: none; 42 | 43 | &:hover { 44 | border-bottom-color: transparent; 45 | color: _palette(fg-bold) !important; 46 | } 47 | 48 | &.special:not(.button) { 49 | @include icon(false, solid); 50 | border-bottom: 0; 51 | display: block; 52 | font-family: _font(family-heading); 53 | font-size: 0.8em; 54 | font-weight: _font(weight-heading-bold); 55 | letter-spacing: _font(kern-heading); 56 | margin: 0 0 _size(element-margin) 0; 57 | text-transform: uppercase; 58 | 59 | &:before { 60 | @include vendor( 61 | "transition", 62 | "background-color #{_duration(transition)} ease-in-out" 63 | ); 64 | border-radius: 100%; 65 | border: solid 2px _palette(border); 66 | content: "\f105"; 67 | display: inline-block; 68 | font-size: 1.25em; 69 | height: 2em; 70 | line-height: 1.75em; 71 | margin-right: 0.85em; 72 | text-align: center; 73 | text-indent: 0.15em; 74 | vertical-align: middle; 75 | width: 2em; 76 | } 77 | 78 | &:hover { 79 | &:before { 80 | background-color: _palette(border-bg); 81 | } 82 | } 83 | 84 | &:active { 85 | &:before { 86 | background-color: _palette(border2-bg); 87 | } 88 | } 89 | } 90 | } 91 | 92 | strong, 93 | b { 94 | color: _palette(fg-bold); 95 | font-weight: _font(weight-bold); 96 | } 97 | 98 | em, 99 | i { 100 | font-style: italic; 101 | } 102 | 103 | p { 104 | margin: 0 0 _size(element-margin) 0; 105 | } 106 | 107 | h1, 108 | h2, 109 | h3, 110 | h4, 111 | h5, 112 | h6 { 113 | color: _palette(fg-bold); 114 | font-family: _font(family-heading); 115 | font-weight: _font(weight-heading-bold); 116 | letter-spacing: _font(kern-heading); 117 | margin: 0 0 (_size(element-margin) * 0.5) 0; 118 | text-transform: uppercase; 119 | 120 | a { 121 | color: inherit; 122 | text-decoration: none; 123 | border-bottom: 0; 124 | } 125 | 126 | span { 127 | font-weight: _font(weight-heading); 128 | } 129 | 130 | &.major { 131 | padding-bottom: 1em; 132 | border-bottom: solid 2px _palette(border); 133 | } 134 | } 135 | 136 | h2 { 137 | font-size: 1.2em; 138 | } 139 | 140 | h3 { 141 | font-size: 0.9em; 142 | } 143 | 144 | h4 { 145 | font-size: 0.7em; 146 | } 147 | 148 | h5 { 149 | font-size: 0.7em; 150 | } 151 | 152 | h6 { 153 | font-size: 0.7em; 154 | } 155 | 156 | @include breakpoint("<=small") { 157 | h2 { 158 | font-size: 1em; 159 | } 160 | 161 | h3 { 162 | font-size: 0.8em; 163 | } 164 | } 165 | 166 | sub { 167 | font-size: 0.8em; 168 | position: relative; 169 | top: 0.5em; 170 | } 171 | 172 | sup { 173 | font-size: 0.8em; 174 | position: relative; 175 | top: -0.5em; 176 | } 177 | 178 | blockquote { 179 | border-left: solid 4px _palette(border); 180 | font-style: italic; 181 | margin: 0 0 _size(element-margin) 0; 182 | padding: (_size(element-margin) / 4) 0 (_size(element-margin) / 4) 183 | _size(element-margin); 184 | } 185 | 186 | code { 187 | background: _palette(border-bg); 188 | border-radius: _size(border-radius); 189 | border: solid 2px _palette(border); 190 | font-family: _font(family-fixed); 191 | font-size: 0.9em; 192 | margin: 0 0.25em; 193 | padding: 0.25em 0.65em; 194 | } 195 | 196 | pre { 197 | -webkit-overflow-scrolling: touch; 198 | font-family: _font(family-fixed); 199 | font-size: 0.9em; 200 | margin: 0 0 _size(element-margin) 0; 201 | 202 | code { 203 | display: block; 204 | line-height: 1.75em; 205 | padding: 1em 1.5em; 206 | overflow-x: auto; 207 | } 208 | } 209 | 210 | hr { 211 | border: 0; 212 | border-bottom: solid 2px _palette(border); 213 | margin: (_size(element-margin) * 1.25) 0; 214 | 215 | &.major { 216 | margin: (_size(element-margin) * 2) 0; 217 | } 218 | } 219 | 220 | .align-left { 221 | text-align: left; 222 | } 223 | 224 | .align-center { 225 | text-align: center; 226 | } 227 | 228 | .align-right { 229 | text-align: right; 230 | } 231 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_actions.scss: -------------------------------------------------------------------------------- 1 | /* Actions */ 2 | 3 | ul.actions { 4 | @include vendor("display", "flex"); 5 | cursor: default; 6 | list-style: none; 7 | margin-left: (_size(element-margin) * -0.5); 8 | padding-left: 0; 9 | 10 | li { 11 | padding: 0 0 0 (_size(element-margin) * 0.5); 12 | vertical-align: middle; 13 | } 14 | 15 | &.special { 16 | @include vendor("justify-content", "center"); 17 | width: 100%; 18 | margin-left: 0; 19 | 20 | li { 21 | &:first-child { 22 | padding-left: 0; 23 | } 24 | } 25 | } 26 | 27 | &.stacked { 28 | @include vendor("flex-direction", "column"); 29 | margin-left: 0; 30 | 31 | li { 32 | padding: (_size(element-margin) * 0.65) 0 0 0; 33 | 34 | &:first-child { 35 | padding-top: 0; 36 | } 37 | } 38 | } 39 | 40 | &.fit { 41 | width: calc(100% + #{_size(element-margin) * 0.5}); 42 | 43 | li { 44 | @include vendor("flex-grow", "1"); 45 | @include vendor("flex-shrink", "1"); 46 | width: 100%; 47 | 48 | > * { 49 | width: 100%; 50 | } 51 | } 52 | 53 | &.stacked { 54 | width: 100%; 55 | } 56 | } 57 | 58 | @include breakpoint("<=xsmall") { 59 | &:not(.fixed) { 60 | @include vendor("flex-direction", "column"); 61 | margin-left: 0; 62 | width: 100% !important; 63 | 64 | li { 65 | @include vendor("flex-grow", "1"); 66 | @include vendor("flex-shrink", "1"); 67 | padding: (_size(element-margin) * 0.5) 0 0 0; 68 | text-align: center; 69 | width: 100%; 70 | 71 | > * { 72 | width: 100%; 73 | } 74 | 75 | &:first-child { 76 | padding-top: 0; 77 | } 78 | 79 | input[type="submit"], 80 | input[type="reset"], 81 | input[type="button"], 82 | button, 83 | .button { 84 | width: 100%; 85 | 86 | &.icon { 87 | &:before { 88 | margin-left: -0.5rem; 89 | } 90 | } 91 | } 92 | } 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_box.scss: -------------------------------------------------------------------------------- 1 | /* Box */ 2 | 3 | .box { 4 | border-radius: _size(border-radius); 5 | border: solid 2px _palette(border); 6 | margin-bottom: _size(element-margin); 7 | padding: 1.5em; 8 | 9 | > :last-child, 10 | > :last-child > :last-child, 11 | > :last-child > :last-child > :last-child { 12 | margin-bottom: 0; 13 | } 14 | 15 | &.alt { 16 | border: 0; 17 | border-radius: 0; 18 | padding: 0; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_button.scss: -------------------------------------------------------------------------------- 1 | /* Button */ 2 | 3 | input[type="submit"], 4 | input[type="reset"], 5 | input[type="button"], 6 | button, 7 | .button { 8 | @include vendor("appearance", "none"); 9 | @include vendor( 10 | "transition", 11 | "background-color #{_duration(transition)} ease-in-out" 12 | ); 13 | background-color: transparent; 14 | border-radius: _size(border-radius); 15 | border: 0; 16 | box-shadow: inset 0 0 0 2px _palette(border); 17 | color: _palette(fg-bold) !important; 18 | cursor: pointer; 19 | display: inline-block; 20 | font-family: _font(family-heading); 21 | font-size: 0.8em; 22 | font-weight: _font(weight-heading-bold); 23 | height: 3.75em; 24 | letter-spacing: _font(kern-heading); 25 | line-height: 3.75em; 26 | padding: 0 2.25em; 27 | text-align: center; 28 | text-decoration: none; 29 | text-transform: uppercase; 30 | white-space: nowrap; 31 | 32 | &:hover { 33 | background-color: _palette(border-bg); 34 | } 35 | 36 | &:active { 37 | background-color: _palette(border2-bg); 38 | } 39 | 40 | &.icon { 41 | &:before { 42 | margin-right: 0.5em; 43 | color: _palette(fg-light); 44 | } 45 | } 46 | 47 | &.primary { 48 | background-color: _palette(accent); 49 | box-shadow: none; 50 | 51 | &:hover { 52 | background-color: desaturate(lighten(_palette(accent), 3), 1.5); 53 | } 54 | 55 | &:active { 56 | background-color: saturate(darken(_palette(accent), 3), 1.5); 57 | } 58 | 59 | &.icon { 60 | &:before { 61 | color: mix(_palette(fg-bold), _palette(accent), 25%); 62 | } 63 | } 64 | } 65 | 66 | &.fit { 67 | width: 100%; 68 | } 69 | 70 | &.small { 71 | font-size: 0.6em; 72 | } 73 | 74 | &.large { 75 | font-size: 1em; 76 | } 77 | 78 | &.disabled, 79 | &:disabled { 80 | opacity: 0.25; 81 | } 82 | 83 | @include breakpoint("<=xsmall") { 84 | padding: 0; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_contact.scss: -------------------------------------------------------------------------------- 1 | /* Contact */ 2 | 3 | ul.contact { 4 | list-style: none; 5 | padding: 0; 6 | 7 | li { 8 | @include icon; 9 | margin: (_size(element-margin) * 1.25) 0 0 0; 10 | padding: 0 0 0 3.25em; 11 | position: relative; 12 | 13 | &:before { 14 | border-radius: 100%; 15 | border: solid 2px _palette(border); 16 | display: inline-block; 17 | font-size: 0.8em; 18 | height: 2.5em; 19 | left: 0; 20 | line-height: 2.35em; 21 | position: absolute; 22 | text-align: center; 23 | top: 0; 24 | width: 2.5em; 25 | } 26 | 27 | &:first-child { 28 | margin-top: 0; 29 | } 30 | } 31 | 32 | @include breakpoint("<=small") { 33 | li { 34 | margin: (_size(element-margin) * 0.75) 0 0 0; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_features.scss: -------------------------------------------------------------------------------- 1 | /* Features */ 2 | 3 | .features { 4 | @include vendor("display", "flex"); 5 | @include vendor("flex-wrap", "wrap"); 6 | margin: 0 0 _size(element-margin) 0; 7 | 8 | article { 9 | @include padding(1.75em, 1.75em); 10 | background-color: desaturate(lighten(_palette(bg), 3), 1.5); 11 | border-radius: _size(border-radius); 12 | margin: (_size(section-spacing, large) * 0.5) _size(section-spacing, large) 13 | (_size(section-spacing, large) * 0.5) 0; 14 | width: calc(50% - #{_size(section-spacing, large) * 0.5}); 15 | 16 | &:nth-child(2n) { 17 | margin-right: 0; 18 | } 19 | 20 | .image { 21 | border-radius: _size(border-radius) _size(border-radius) 0 0; 22 | display: block; 23 | margin-bottom: 1.75em; 24 | margin-left: -1.75em; 25 | margin-top: -1.75em; 26 | position: relative; 27 | width: calc(100% + #{3.5em}); 28 | 29 | img { 30 | border-radius: _size(border-radius) _size(border-radius) 0 0; 31 | width: 100%; 32 | } 33 | } 34 | } 35 | 36 | @include breakpoint("<=medium") { 37 | article { 38 | margin: (_size(section-spacing, medium) * 0.5) 39 | _size(section-spacing, medium) (_size(section-spacing, medium) * 0.5) 0; 40 | width: calc(50% - #{_size(section-spacing, medium) * 0.5}); 41 | } 42 | } 43 | 44 | @include breakpoint("<=small") { 45 | article { 46 | @include padding(1.5em, 1.5em); 47 | margin: (_size(section-spacing, small) * 0.5) 48 | _size(section-spacing, small) (_size(section-spacing, small) * 0.5) 0; 49 | width: calc(50% - #{_size(section-spacing, small) * 0.5} - 1px); 50 | 51 | .image { 52 | margin-bottom: 1.5em; 53 | margin-left: -1.5em; 54 | margin-top: -1.5em; 55 | width: calc(100% + #{3em}); 56 | } 57 | } 58 | } 59 | 60 | @include breakpoint("<=xsmall") { 61 | display: block; 62 | 63 | article { 64 | width: 100%; 65 | margin: 0 0 _size(element-margin) 0 !important; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_form.scss: -------------------------------------------------------------------------------- 1 | /* Form */ 2 | 3 | form { 4 | margin: 0 0 _size(element-margin) 0; 5 | 6 | > :last-child { 7 | margin-bottom: 0; 8 | } 9 | 10 | > .fields { 11 | $gutter: (_size(element-margin) * 0.75); 12 | 13 | @include vendor("display", "flex"); 14 | @include vendor("flex-wrap", "wrap"); 15 | width: calc(100% + #{$gutter * 2}); 16 | margin: ($gutter * -1) 0 _size(element-margin) ($gutter * -1); 17 | 18 | > .field { 19 | @include vendor("flex-grow", "0"); 20 | @include vendor("flex-shrink", "0"); 21 | padding: $gutter 0 0 $gutter; 22 | width: calc(100% - #{$gutter * 1}); 23 | 24 | &.half { 25 | width: calc(50% - #{$gutter * 0.5}); 26 | } 27 | 28 | &.third { 29 | width: calc(#{100% / 3} - #{$gutter * (1 / 3)}); 30 | } 31 | 32 | &.quarter { 33 | width: calc(25% - #{$gutter * 0.25}); 34 | } 35 | } 36 | } 37 | 38 | @include breakpoint("<=xsmall") { 39 | > .fields { 40 | $gutter: (_size(element-margin) * 0.75); 41 | 42 | width: calc(100% + #{$gutter * 2}); 43 | margin: ($gutter * -1) 0 _size(element-margin) ($gutter * -1); 44 | 45 | > .field { 46 | padding: $gutter 0 0 $gutter; 47 | width: calc(100% - #{$gutter * 1}); 48 | 49 | &.half { 50 | width: calc(100% - #{$gutter * 1}); 51 | } 52 | 53 | &.third { 54 | width: calc(100% - #{$gutter * 1}); 55 | } 56 | 57 | &.quarter { 58 | width: calc(100% - #{$gutter * 1}); 59 | } 60 | } 61 | } 62 | } 63 | } 64 | 65 | label { 66 | color: _palette(fg-bold); 67 | display: block; 68 | font-family: _font(family-heading); 69 | font-size: 0.8em; 70 | font-weight: _font(weight-heading-bold); 71 | letter-spacing: _font(kern-heading); 72 | margin: 0 0 (_size(element-margin) * 0.35) 0; 73 | text-transform: uppercase; 74 | } 75 | 76 | input[type="text"], 77 | input[type="password"], 78 | input[type="email"], 79 | input[type="tel"], 80 | select, 81 | textarea { 82 | @include vendor("appearance", "none"); 83 | background: _palette(border-bg); 84 | border-radius: _size(border-radius); 85 | border: none; 86 | border: solid 2px _palette(border); 87 | color: inherit; 88 | display: block; 89 | outline: 0; 90 | padding: 0 1em; 91 | text-decoration: none; 92 | width: 100%; 93 | 94 | &:invalid { 95 | box-shadow: none; 96 | } 97 | 98 | &:focus { 99 | border-color: desaturate(lighten(_palette(accent), 6), 3); 100 | } 101 | } 102 | 103 | select { 104 | background-image: svg-url( 105 | "" 106 | ); 107 | background-size: 1.25rem; 108 | background-repeat: no-repeat; 109 | background-position: calc(100% - 1rem) center; 110 | height: _size(element-height); 111 | padding-right: _size(element-height); 112 | text-overflow: ellipsis; 113 | 114 | option { 115 | color: _palette(fg-bold); 116 | background: _palette(bg); 117 | } 118 | 119 | &:focus { 120 | &::-ms-value { 121 | background-color: transparent; 122 | } 123 | } 124 | 125 | &::-ms-expand { 126 | display: none; 127 | } 128 | } 129 | 130 | input[type="text"], 131 | input[type="password"], 132 | input[type="email"], 133 | select { 134 | height: _size(element-height); 135 | } 136 | 137 | textarea { 138 | padding: 0.75em 1em; 139 | } 140 | 141 | input[type="checkbox"], 142 | input[type="radio"] { 143 | @include vendor("appearance", "none"); 144 | display: block; 145 | float: left; 146 | margin-right: -2em; 147 | opacity: 0; 148 | width: 1em; 149 | z-index: -1; 150 | 151 | & + label { 152 | @include icon(false, solid); 153 | color: _palette(fg); 154 | cursor: pointer; 155 | display: inline-block; 156 | font-size: 1em; 157 | font-family: _font(family); 158 | text-transform: none; 159 | letter-spacing: 0; 160 | font-weight: _font(weight); 161 | padding-left: (_size(element-height) * 0.6) + 0.75em; 162 | padding-right: 0.75em; 163 | position: relative; 164 | 165 | &:before { 166 | background: _palette(border-bg); 167 | border-radius: _size(border-radius); 168 | border: solid 2px _palette(border); 169 | content: ""; 170 | display: inline-block; 171 | font-size: 0.8em; 172 | height: (_size(element-height) * 0.75); 173 | left: 0; 174 | line-height: (_size(element-height) * 0.75); 175 | position: absolute; 176 | text-align: center; 177 | top: 0; 178 | width: (_size(element-height) * 0.75); 179 | } 180 | } 181 | 182 | &:checked + label { 183 | &:before { 184 | background: _palette(fg-bold); 185 | border-color: _palette(fg-bold); 186 | content: "\f00c"; 187 | color: _palette(bg); 188 | } 189 | } 190 | 191 | &:focus + label { 192 | &:before { 193 | border-color: _palette(accent); 194 | } 195 | } 196 | } 197 | 198 | input[type="checkbox"] { 199 | & + label { 200 | &:before { 201 | border-radius: _size(border-radius); 202 | } 203 | } 204 | } 205 | 206 | input[type="radio"] { 207 | & + label { 208 | &:before { 209 | border-radius: 100%; 210 | } 211 | } 212 | } 213 | 214 | ::-webkit-input-placeholder { 215 | color: _palette(fg-light) !important; 216 | opacity: 1; 217 | } 218 | 219 | :-moz-placeholder { 220 | color: _palette(fg-light) !important; 221 | opacity: 1; 222 | } 223 | 224 | ::-moz-placeholder { 225 | color: _palette(fg-light) !important; 226 | opacity: 1; 227 | } 228 | 229 | :-ms-input-placeholder { 230 | color: _palette(fg-light) !important; 231 | opacity: 1; 232 | } 233 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_icon.scss: -------------------------------------------------------------------------------- 1 | /* Icon */ 2 | 3 | .icon { 4 | @include icon; 5 | border-bottom: none; 6 | position: relative; 7 | 8 | > .label { 9 | display: none; 10 | } 11 | 12 | &:before { 13 | line-height: inherit; 14 | } 15 | 16 | &.solid { 17 | &:before { 18 | font-weight: 900; 19 | } 20 | } 21 | 22 | &.brands { 23 | &:before { 24 | font-family: "Font Awesome 5 Brands"; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_icons.scss: -------------------------------------------------------------------------------- 1 | /* Icons */ 2 | 3 | ul.icons { 4 | cursor: default; 5 | list-style: none; 6 | padding-left: 0; 7 | 8 | li { 9 | display: inline-block; 10 | padding: 0 1em 0 0; 11 | 12 | &:last-child { 13 | padding-right: 0; 14 | } 15 | 16 | .icon { 17 | &:before { 18 | font-size: 1.25em; 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_image.scss: -------------------------------------------------------------------------------- 1 | /* Image */ 2 | 3 | .image { 4 | border-radius: _size(border-radius); 5 | border: 0; 6 | display: inline-block; 7 | position: relative; 8 | 9 | img { 10 | border-radius: _size(border-radius); 11 | display: block; 12 | } 13 | 14 | &.left, 15 | &.right { 16 | max-width: 40%; 17 | 18 | img { 19 | width: 100%; 20 | } 21 | } 22 | 23 | &.left { 24 | float: left; 25 | padding: 0 1.5em 1em 0; 26 | top: 0.25em; 27 | } 28 | 29 | &.right { 30 | float: right; 31 | padding: 0 0 1em 1.5em; 32 | top: 0.25em; 33 | } 34 | 35 | &.fit { 36 | display: block; 37 | margin: 0 0 _size(element-margin) 0; 38 | width: 100%; 39 | 40 | img { 41 | width: 100%; 42 | } 43 | } 44 | 45 | &.main { 46 | display: block; 47 | margin: 0 0 (_size(element-margin) * 1.5) 0; 48 | width: 100%; 49 | 50 | img { 51 | width: 100%; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_list.scss: -------------------------------------------------------------------------------- 1 | /* List */ 2 | 3 | ol { 4 | list-style: decimal; 5 | margin: 0 0 _size(element-margin) 0; 6 | padding-left: 1.25em; 7 | 8 | li { 9 | padding-left: 0.25em; 10 | } 11 | } 12 | 13 | ul { 14 | list-style: disc; 15 | margin: 0 0 _size(element-margin) 0; 16 | padding-left: 1em; 17 | 18 | li { 19 | padding-left: 0.5em; 20 | } 21 | 22 | &.alt { 23 | list-style: none; 24 | padding-left: 0; 25 | 26 | li { 27 | border-top: solid 1px _palette(border); 28 | padding: 0.5em 0; 29 | 30 | &:first-child { 31 | border-top: 0; 32 | padding-top: 0; 33 | } 34 | } 35 | } 36 | } 37 | 38 | dl { 39 | margin: 0 0 _size(element-margin) 0; 40 | 41 | dt { 42 | display: block; 43 | font-weight: _font(weight-bold); 44 | margin: 0 0 (_size(element-margin) * 0.5) 0; 45 | } 46 | 47 | dd { 48 | margin-left: _size(element-margin); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_pagination.scss: -------------------------------------------------------------------------------- 1 | /* Pagination */ 2 | 3 | ul.pagination { 4 | cursor: default; 5 | list-style: none; 6 | padding-left: 0; 7 | 8 | li { 9 | display: inline-block; 10 | padding-left: 0; 11 | vertical-align: middle; 12 | 13 | > .page { 14 | @include vendor( 15 | "transition", 16 | ( 17 | "background-color #{_duration(transition)} ease-in-out", 18 | "color #{_duration(transition)} ease-in-out" 19 | ) 20 | ); 21 | border-bottom: 0; 22 | border-radius: _size(border-radius); 23 | display: inline-block; 24 | height: 1.5em; 25 | line-height: 1.5em; 26 | margin: 0 0.125em; 27 | min-width: 1.5em; 28 | padding: 0 0.5em; 29 | text-align: center; 30 | 31 | &:hover { 32 | background-color: _palette(border-bg); 33 | } 34 | 35 | &.active { 36 | background-color: _palette(accent); 37 | } 38 | } 39 | 40 | &:first-child { 41 | padding-right: 0.75em; 42 | } 43 | 44 | &:last-child { 45 | padding-left: 0.75em; 46 | } 47 | } 48 | 49 | @include breakpoint("<=xsmall") { 50 | li { 51 | &:nth-child(n + 2):nth-last-child(n + 2) { 52 | display: none; 53 | } 54 | 55 | .button { 56 | width: 100%; 57 | } 58 | 59 | &:first-child { 60 | width: calc(50% - 2px); 61 | text-align: left; 62 | padding-right: 0.325em; 63 | } 64 | 65 | &:last-child { 66 | width: calc(50% - 2px); 67 | text-align: right; 68 | padding-left: 0.325em; 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_row.scss: -------------------------------------------------------------------------------- 1 | /* Row */ 2 | 3 | .row { 4 | @include html-grid(1.75em); 5 | 6 | @include breakpoint("<=xlarge") { 7 | @include html-grid(1.75em, xlarge); 8 | } 9 | 10 | @include breakpoint("<=large") { 11 | @include html-grid(1.75em, large); 12 | } 13 | 14 | @include breakpoint("<=medium") { 15 | @include html-grid(1.75em, medium); 16 | } 17 | 18 | @include breakpoint("<=small") { 19 | @include html-grid(1.25em, small); 20 | } 21 | 22 | @include breakpoint("<=xsmall") { 23 | @include html-grid(1.25em, xsmall); 24 | } 25 | 26 | @include breakpoint("<=xxsmall") { 27 | @include html-grid(1.25em, xxsmall); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_section.scss: -------------------------------------------------------------------------------- 1 | /* Section/Article */ 2 | 3 | section, 4 | article { 5 | &.special { 6 | text-align: center; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /docs/assets/sass/components/_table.scss: -------------------------------------------------------------------------------- 1 | /* Table */ 2 | 3 | .table-wrapper { 4 | -webkit-overflow-scrolling: touch; 5 | overflow-x: auto; 6 | } 7 | 8 | table { 9 | margin: 0 0 _size(element-margin) 0; 10 | width: 100%; 11 | 12 | tbody { 13 | tr { 14 | border: solid 1px _palette(border); 15 | border-left: 0; 16 | border-right: 0; 17 | 18 | &:nth-child(2n + 1) { 19 | background-color: _palette(border-bg); 20 | } 21 | } 22 | } 23 | 24 | td { 25 | padding: 0.75em 0.75em; 26 | } 27 | 28 | th { 29 | color: _palette(fg-bold); 30 | font-size: 0.9em; 31 | font-weight: _font(weight-bold); 32 | padding: 0 0.75em 0.75em 0.75em; 33 | text-align: left; 34 | } 35 | 36 | thead { 37 | border-bottom: solid 2px _palette(border); 38 | } 39 | 40 | tfoot { 41 | border-top: solid 2px _palette(border); 42 | } 43 | 44 | &.alt { 45 | border-collapse: separate; 46 | 47 | tbody { 48 | tr { 49 | td { 50 | border: solid 1px _palette(border); 51 | border-left-width: 0; 52 | border-top-width: 0; 53 | 54 | &:first-child { 55 | border-left-width: 1px; 56 | } 57 | } 58 | 59 | &:first-child { 60 | td { 61 | border-top-width: 1px; 62 | } 63 | } 64 | } 65 | } 66 | 67 | thead { 68 | border-bottom: 0; 69 | } 70 | 71 | tfoot { 72 | border-top: 0; 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /docs/assets/sass/layout/_banner.scss: -------------------------------------------------------------------------------- 1 | /* Banner */ 2 | 3 | #banner { 4 | @include padding(10em, 0, (0, 0, _size(wrapper-edges, large) * -0.5, 0)); 5 | 6 | .inner { 7 | margin: 0 auto; 8 | width: _size(inner); 9 | } 10 | 11 | .logo { 12 | @include vendor("transition", ("opacity 2s ease", "transform 1s ease")); 13 | @include vendor("transform", "translateY(0)"); 14 | opacity: 1; 15 | margin: 0 0 (_size(element-margin) * 0.65) 0; 16 | 17 | .icon { 18 | border-radius: 100%; 19 | border: solid 2px _palette(border); 20 | cursor: default; 21 | display: inline-block; 22 | font-size: 2em; 23 | height: 2.25em; 24 | line-height: 2.25em; 25 | text-align: center; 26 | width: 2.25em; 27 | } 28 | } 29 | 30 | h2 { 31 | @include vendor( 32 | "transition", 33 | ("opacity 0.5s ease", "transform 0.5s ease", "filter 0.25s ease") 34 | ); 35 | @include vendor("transform", "translateX(0)"); 36 | @include vendor("transition-delay", "0.65s"); 37 | @include vendor("filter", "blur(0)"); 38 | opacity: 1; 39 | border-bottom: solid 2px _palette(border); 40 | font-size: 2.25em; 41 | margin-bottom: _size(element-margin) * 0.4; 42 | padding-bottom: _size(element-margin) * 0.2; 43 | } 44 | 45 | p { 46 | @include vendor( 47 | "transition", 48 | ("opacity 0.5s ease", "transform 0.5s ease", "filter 0.25s ease") 49 | ); 50 | @include vendor("transform", "translateX(0)"); 51 | @include vendor("transition-delay", "0.8s"); 52 | @include vendor("filter", "blur(0)"); 53 | opacity: 1; 54 | font-family: _font(family-heading); 55 | font-size: 1em; 56 | font-weight: _font(weight-heading); 57 | letter-spacing: _font(kern-heading); 58 | line-height: 2; 59 | text-transform: uppercase; 60 | } 61 | 62 | @include breakpoint("<=large") { 63 | @include padding(7em, 0, (0, 0, _size(wrapper-edges, large) * 0.5, 0)); 64 | 65 | @include dynamic-background-image; 66 | background-color: _palette(bg); 67 | 68 | background-size: auto, cover; 69 | 70 | background-position: center, center; 71 | 72 | margin-bottom: (_size(wrapper-edges, large) * -1); 73 | } 74 | 75 | @include breakpoint("<=medium") { 76 | @include padding(12em, 3em, (0, 0, _size(wrapper-edges, medium) * 0.5, 0)); 77 | 78 | margin-bottom: (_size(wrapper-edges, medium) * -1); 79 | 80 | .inner { 81 | width: 100%; 82 | } 83 | } 84 | 85 | @include breakpoint("<=small") { 86 | @include padding(5em, 2em, (0, 0, _size(wrapper-edges, small) * 0.5, 0)); 87 | 88 | margin-bottom: (_size(wrapper-edges, small) * -1); 89 | 90 | .logo { 91 | margin: 0 0 (_size(element-margin) * 0.5) 0; 92 | 93 | .icon { 94 | font-size: 1.5em; 95 | } 96 | } 97 | 98 | h2 { 99 | font-size: 1.5em; 100 | } 101 | 102 | p { 103 | font-size: 0.8em; 104 | } 105 | } 106 | 107 | body.is-preload & { 108 | .logo { 109 | @include vendor("transform", "translateY(0.5em)"); 110 | opacity: 0; 111 | } 112 | 113 | h2 { 114 | opacity: 0; 115 | @include vendor("transform", "translateX(0.25em)"); 116 | @include vendor("filter", "blur(2px)"); 117 | } 118 | 119 | p { 120 | opacity: 0; 121 | @include vendor("transform", "translateX(0.5em)"); 122 | @include vendor("filter", "blur(2px)"); 123 | } 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /docs/assets/sass/layout/_footer.scss: -------------------------------------------------------------------------------- 1 | /* Footer */ 2 | 3 | #footer { 4 | .inner { 5 | @include padding(5em, 0); 6 | @include vendor("display", "flex"); 7 | @include vendor("flex-direction", "row"); 8 | @include vendor("flex-wrap", "wrap"); 9 | margin: 0 auto; 10 | width: _size(inner); 11 | 12 | > * { 13 | width: 100%; 14 | } 15 | 16 | form { 17 | margin: 0 _size(section-spacing, large) 0 0; 18 | width: calc(50% - #{_size(section-spacing, large) * 0.5}); 19 | } 20 | 21 | .contact { 22 | width: calc(50% - #{_size(section-spacing, large) * 0.5}); 23 | } 24 | 25 | .copyright { 26 | border-top: solid 2px _palette(border); 27 | list-style: none; 28 | margin: (_size(element-margin) * 2) 0 _size(element-margin) 0; 29 | padding: _size(element-margin) 0 0 0; 30 | width: 100%; 31 | 32 | li { 33 | border-left: solid 2px _palette(border); 34 | color: _palette(fg-light); 35 | display: inline-block; 36 | font-size: 0.9em; 37 | line-height: 1; 38 | margin-left: 1em; 39 | padding: 0; 40 | padding-left: 1em; 41 | 42 | &:first-child { 43 | border-left: 0; 44 | margin-left: 0; 45 | padding-left: 0; 46 | } 47 | 48 | a { 49 | color: inherit; 50 | } 51 | } 52 | } 53 | } 54 | 55 | @include breakpoint("<=large") { 56 | @include dynamic-background-image; 57 | background-color: _palette(bg); 58 | 59 | background-size: auto, cover; 60 | 61 | background-position: center, center; 62 | 63 | margin-top: (_size(wrapper-edges, large) * -1); 64 | padding-top: _size(wrapper-edges, large); 65 | } 66 | 67 | @include breakpoint("<=medium") { 68 | margin-top: (_size(wrapper-edges, medium) * -1); 69 | padding-top: _size(wrapper-edges, medium); 70 | 71 | .inner { 72 | @include padding(3em, 3em); 73 | display: block; 74 | width: 100%; 75 | 76 | form { 77 | width: 100%; 78 | margin: 0 0 (_size(element-margin) * 2) 0; 79 | } 80 | 81 | .contact { 82 | width: 100%; 83 | margin: 0 0 (_size(element-margin) * 2) 0; 84 | } 85 | 86 | .copyright { 87 | margin: (_size(element-margin) * 2) 0 _size(element-margin) 0; 88 | } 89 | } 90 | } 91 | 92 | @include breakpoint("<=small") { 93 | margin-top: (_size(wrapper-edges, small) * -1); 94 | padding-top: _size(wrapper-edges, small); 95 | 96 | .inner { 97 | @include padding(2em, 2em); 98 | 99 | form { 100 | margin: 0 0 (_size(element-margin) * 1.5) 0; 101 | } 102 | 103 | .contact { 104 | margin: 0 0 (_size(element-margin) * 1.5) 0; 105 | } 106 | } 107 | } 108 | 109 | @include breakpoint("<=xsmall") { 110 | .inner { 111 | .copyright { 112 | li { 113 | border-left: 0; 114 | display: block; 115 | margin: 1em 0 0 0; 116 | padding-left: 0; 117 | 118 | &:first-child { 119 | margin-top: 0; 120 | } 121 | } 122 | } 123 | } 124 | } 125 | 126 | @include breakpoint("<=xxsmall") { 127 | .inner { 128 | @include padding(2em, 1.5em); 129 | } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /docs/assets/sass/layout/_header.scss: -------------------------------------------------------------------------------- 1 | /* Header */ 2 | 3 | #header { 4 | @include vendor( 5 | "transition", 6 | "background-color #{_duration(transition)} ease-in-out" 7 | ); 8 | background-color: transparentize( 9 | desaturate(lighten(_palette(bg), 3), 1.5), 10 | 0.05 11 | ); 12 | height: 3.5em; 13 | left: 0; 14 | line-height: 3.5em; 15 | padding: 0 1.25em; 16 | position: fixed; 17 | top: 0; 18 | width: 100%; 19 | z-index: _misc(z-index-base); 20 | 21 | h1 { 22 | @include vendor( 23 | "transition", 24 | ( 25 | "opacity #{_duration(transition)} ease-in-out", 26 | "visibility #{_duration(transition)}" 27 | ) 28 | ); 29 | border-bottom: 0; 30 | font-size: 0.8em; 31 | margin-bottom: 0; 32 | opacity: 1; 33 | visibility: visible; 34 | 35 | a { 36 | border: 0; 37 | } 38 | } 39 | 40 | nav { 41 | font-family: _font(family-heading); 42 | font-size: 0.8em; 43 | font-weight: _font(weight-heading-bold); 44 | height: 3em; 45 | letter-spacing: _font(kern-heading); 46 | line-height: 3em; 47 | position: absolute; 48 | right: 0.7em; 49 | text-transform: uppercase; 50 | top: 0.7em; 51 | 52 | a { 53 | border: 0; 54 | display: inline-block; 55 | padding: 0 1em; 56 | 57 | &:before { 58 | float: right; 59 | margin-left: 0.75em; 60 | } 61 | 62 | &[href="#menu"] { 63 | @include icon(false, solid); 64 | @include vendor( 65 | "transition", 66 | "background-color #{_duration(transition)} ease-in-out" 67 | ); 68 | border-radius: _size(border-radius); 69 | box-shadow: inset 0 0 0 2px _palette(border); 70 | padding: 0 1.35em; 71 | 72 | &:before { 73 | content: "\f0c9"; 74 | line-height: inherit; 75 | } 76 | 77 | &:hover { 78 | background-color: _palette(border-bg); 79 | } 80 | 81 | &:active { 82 | background-color: _palette(border2-bg); 83 | } 84 | } 85 | } 86 | } 87 | 88 | &.alt { 89 | background-color: transparent; 90 | 91 | h1 { 92 | opacity: 0; 93 | visibility: hidden; 94 | } 95 | } 96 | 97 | @include breakpoint("<=small") { 98 | height: 2.75em; 99 | line-height: 2.75em; 100 | 101 | nav { 102 | top: 0; 103 | right: 0; 104 | height: inherit; 105 | line-height: inherit; 106 | 107 | a { 108 | height: inherit; 109 | line-height: inherit; 110 | 111 | &[href="#menu"] { 112 | box-shadow: none; 113 | padding: 0 1em; 114 | border-radius: 0; 115 | 116 | &:hover, 117 | &:active { 118 | background-color: inherit; 119 | } 120 | } 121 | } 122 | } 123 | } 124 | 125 | @include breakpoint("<=xsmall") { 126 | nav { 127 | a { 128 | &[href="#menu"] { 129 | width: 4em; 130 | white-space: nowrap; 131 | text-indent: 4em; 132 | position: relative; 133 | 134 | &:before { 135 | width: inherit; 136 | position: absolute; 137 | top: 0; 138 | left: 0; 139 | text-indent: 0; 140 | text-align: right; 141 | margin-left: 0; 142 | padding-right: 1.25em; 143 | } 144 | } 145 | } 146 | } 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /docs/assets/sass/layout/_menu.scss: -------------------------------------------------------------------------------- 1 | /* Menu */ 2 | 3 | #page-wrapper { 4 | @include vendor("transition", "filter 0.25s ease"); 5 | } 6 | 7 | #menu { 8 | @include vendor("align-items", "center"); 9 | @include vendor("display", "flex"); 10 | @include vendor("justify-content", "center"); 11 | @include vendor("pointer-events", "none"); 12 | @include vendor( 13 | "transition", 14 | ("opacity #{_duration(menu)} ease", "visibility #{_duration(menu)}") 15 | ); 16 | -moz-user-select: none; 17 | -webkit-user-select: none; 18 | -ms-user-select: none; 19 | user-select: none; 20 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 21 | background: transparentize(_palette(bg), $bg-transparent); 22 | cursor: default; 23 | height: 100%; 24 | left: 0; 25 | opacity: 0; 26 | position: fixed; 27 | text-align: center; 28 | top: 0; 29 | visibility: hidden; 30 | width: 100%; 31 | 32 | .inner { 33 | @include padding(2.5em, 1.5em); 34 | @include vendor("transform", "translateY(0.5em)"); 35 | @include vendor( 36 | "transition", 37 | ("opacity #{_duration(menu)} ease", "transform #{_duration(menu)} ease") 38 | ); 39 | -webkit-overflow-scrolling: touch; 40 | background: _palette(accent); 41 | border-radius: _size(border-radius); 42 | display: block; 43 | max-width: 100%; 44 | opacity: 0; 45 | position: relative; 46 | width: 20em; 47 | } 48 | 49 | h2 { 50 | border-bottom: solid 2px _palette(border); 51 | padding-bottom: 1em; 52 | } 53 | 54 | .close { 55 | background-image: url("images/close.svg"); 56 | background-position: 75% 25%; 57 | background-repeat: no-repeat; 58 | background-size: 2em 2em; 59 | border: 0; 60 | content: ""; 61 | display: block; 62 | height: 4em; 63 | overflow: hidden; 64 | position: absolute; 65 | right: 0; 66 | text-align: center; 67 | text-indent: 4em; 68 | top: 0; 69 | width: 4em; 70 | } 71 | 72 | .links { 73 | list-style: none; 74 | margin-bottom: (_size(element-margin) - 0.5em); 75 | padding: 0; 76 | 77 | li { 78 | padding: 0; 79 | 80 | a { 81 | border-radius: _size(border-radius); 82 | border: 0; 83 | display: block; 84 | font-family: _font(family-heading); 85 | font-size: 0.8em; 86 | font-weight: _font(weight-heading); 87 | letter-spacing: _font(kern-heading); 88 | line-height: 1.85em; 89 | padding: 0.75em 0; 90 | text-transform: uppercase; 91 | 92 | &:hover { 93 | background: saturate(darken(_palette(accent), 3), 1.5); 94 | } 95 | 96 | .software { 97 | font-weight: 600; 98 | } 99 | } 100 | } 101 | } 102 | 103 | @include breakpoint("<=small") { 104 | .inner { 105 | max-height: 100%; 106 | overflow-y: auto; 107 | overflow-x: hidden; 108 | 109 | .close { 110 | background-size: 1.5em 1.5em; 111 | } 112 | } 113 | } 114 | } 115 | 116 | body.is-menu-visible { 117 | #page-wrapper { 118 | @include vendor("filter", "blur(1.5px)"); 119 | } 120 | 121 | #menu { 122 | @include vendor("pointer-events", "auto"); 123 | opacity: 1; 124 | visibility: visible; 125 | 126 | .inner { 127 | @include vendor("transform", "translateY(0)"); 128 | opacity: 1; 129 | } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /docs/assets/sass/layout/_wrapper.scss: -------------------------------------------------------------------------------- 1 | /* Wrapper */ 2 | 3 | /// Sets the colors of the wrapper's top/bottom edges. 4 | /// @param {string} $color Color. 5 | @mixin wrapper-edges-color($color: black) { 6 | &:before, 7 | &:after { 8 | background-image: svg-url( 9 | '' 10 | ); 11 | } 12 | 13 | &:before { 14 | box-shadow: inset 0 -1px 0 0 $color, 0 1px 0 0 $color; 15 | } 16 | 17 | &:after { 18 | box-shadow: inset 0 -1px 0 0 $color, 0 1px 0 0 $color; 19 | } 20 | } 21 | 22 | #wrapper { 23 | > header { 24 | @include padding( 25 | 7.5em, 26 | 0, 27 | (3.5em, 0, _size(wrapper-edges, large) * -0.5, 0) 28 | ); 29 | 30 | .inner { 31 | margin: 0 auto; 32 | width: _size(inner); 33 | } 34 | 35 | h2 { 36 | border-bottom: solid 2px _palette(border); 37 | font-size: 2em; 38 | margin-bottom: _size(element-margin) * 0.4; 39 | padding-bottom: _size(element-margin) * 0.2; 40 | } 41 | 42 | p { 43 | font-family: _font(family-heading); 44 | font-size: 1em; 45 | font-weight: _font(weight-heading); 46 | letter-spacing: _font(kern-heading); 47 | line-height: 2; 48 | text-transform: uppercase; 49 | } 50 | } 51 | 52 | @include breakpoint("<=large") { 53 | > header { 54 | @include padding(5em, 0, (4em, 0, _size(wrapper-edges, large) * 0.5, 0)); 55 | 56 | @include dynamic-background-image; 57 | background-color: _palette(bg); 58 | 59 | background-size: auto, cover; 60 | 61 | background-position: center, 0% 30%; 62 | 63 | margin-bottom: (_size(wrapper-edges, large) * -1); 64 | } 65 | } 66 | 67 | @include breakpoint("<=medium") { 68 | > header { 69 | @include padding( 70 | 7em, 71 | 3em, 72 | (4em, 0, _size(wrapper-edges, medium) * 0.5, 0) 73 | ); 74 | 75 | background-size: auto, cover; 76 | 77 | background-position: center, 0% 0%; 78 | 79 | margin-bottom: (_size(wrapper-edges, medium) * -1); 80 | 81 | .inner { 82 | width: 100%; 83 | } 84 | } 85 | } 86 | 87 | @include breakpoint("<=small") { 88 | > header { 89 | @include padding( 90 | 3.75em, 91 | 2em, 92 | (2.75em, 0, _size(wrapper-edges, small) * 0.5, 0) 93 | ); 94 | 95 | background-size: auto, 125%; 96 | 97 | margin-bottom: (_size(wrapper-edges, small) * -1); 98 | 99 | h2 { 100 | font-size: 1.25em; 101 | } 102 | 103 | p { 104 | font-size: 0.8em; 105 | } 106 | } 107 | } 108 | } 109 | 110 | .wrapper { 111 | background-color: _palette(bg); 112 | margin: _size(wrapper-edges, large) 0; 113 | position: relative; 114 | @include wrapper-edges-color(_palette(bg)); 115 | 116 | &:before, 117 | &:after { 118 | background-repeat: no-repeat; 119 | background-size: 100% 100%; 120 | content: ""; 121 | display: block; 122 | height: _size(wrapper-edges, large); 123 | position: absolute; 124 | width: 100%; 125 | } 126 | 127 | &:before { 128 | left: 0; 129 | top: (_size(wrapper-edges, large) * -1); 130 | } 131 | 132 | &:after { 133 | @include vendor("transform", "scaleY(-1)"); 134 | bottom: (_size(wrapper-edges, large) * -1); 135 | left: 0; 136 | } 137 | 138 | &.alt { 139 | &:before { 140 | @include vendor("transform", "scaleX(-1)"); 141 | } 142 | 143 | &:after { 144 | @include vendor("transform", "scaleY(-1) scaleX(-1)"); 145 | } 146 | } 147 | 148 | .inner { 149 | @include padding(3em, 0); 150 | margin: 0 auto; 151 | width: _size(inner); 152 | } 153 | 154 | @for $i from 2 through _misc(max-wrapper-styles) { 155 | $j: 3 * ($i - 1); 156 | $color: desaturate(lighten(_palette(bg), $j), $j * 0.5); 157 | 158 | &.style#{$i} { 159 | background-color: $color; 160 | @include wrapper-edges-color($color); 161 | } 162 | } 163 | 164 | &.spotlight { 165 | @include wrapper-edges-color(_palette(accent)); 166 | background-color: _palette(accent); 167 | 168 | .inner { 169 | @include vendor("display", "flex"); 170 | @include vendor("align-items", "center"); 171 | @include vendor("flex-direction", "row"); 172 | } 173 | 174 | .image { 175 | border-radius: 100%; 176 | margin: 0 _size(section-spacing, large) _size(element-margin) 0; 177 | width: 22em; 178 | overflow: hidden; 179 | -ms-flex: 1; 180 | 181 | img { 182 | border-radius: 100%; 183 | width: 100%; 184 | } 185 | } 186 | 187 | .content { 188 | width: 100%; 189 | -ms-flex: 2; 190 | } 191 | 192 | &:nth-child(2n - 1) { 193 | .inner { 194 | @include vendor("flex-direction", "row-reverse"); 195 | text-align: right; 196 | } 197 | 198 | .image { 199 | margin: 0 0 _size(element-margin) _size(section-spacing, large); 200 | } 201 | } 202 | 203 | @for $i from 2 through _misc(max-wrapper-styles) { 204 | $j: 3 * ($i - 1); 205 | $color: saturate(darken(_palette(accent), $j), $j * 0.5); 206 | 207 | &.style#{$i} { 208 | background-color: $color; 209 | @include wrapper-edges-color($color); 210 | } 211 | } 212 | } 213 | 214 | @include breakpoint("<=medium") { 215 | margin: _size(wrapper-edges, medium) 0; 216 | 217 | &:before, 218 | &:after { 219 | height: _size(wrapper-edges, medium); 220 | } 221 | 222 | &:before { 223 | top: (_size(wrapper-edges, medium) * -1); 224 | } 225 | 226 | &:after { 227 | bottom: (_size(wrapper-edges, medium) * -1); 228 | left: 0; 229 | } 230 | 231 | .inner { 232 | @include padding(3em, 3em); 233 | width: 100%; 234 | } 235 | 236 | &.spotlight { 237 | .image { 238 | margin: 0 _size(section-spacing, medium) _size(element-margin) 0; 239 | width: 32em; 240 | } 241 | 242 | &:nth-child(2n - 1) { 243 | .image { 244 | margin: 0 0 _size(element-margin) _size(section-spacing, medium); 245 | } 246 | } 247 | } 248 | } 249 | 250 | @include breakpoint("<=small") { 251 | margin: _size(wrapper-edges, small) 0; 252 | 253 | &:before, 254 | &:after { 255 | height: _size(wrapper-edges, small); 256 | } 257 | 258 | &:before { 259 | top: (_size(wrapper-edges, small) * -1); 260 | } 261 | 262 | &:after { 263 | bottom: (_size(wrapper-edges, small) * -1); 264 | left: 0; 265 | } 266 | 267 | .inner { 268 | @include padding(2em, 2em); 269 | } 270 | 271 | &.spotlight { 272 | .inner { 273 | @include vendor("align-items", "flex-start"); 274 | } 275 | 276 | .image { 277 | width: 19em; 278 | margin: 0 _size(section-spacing, small) _size(element-margin) 0; 279 | } 280 | 281 | &:nth-child(2n - 1) { 282 | .image { 283 | margin: 0 0 _size(element-margin) _size(section-spacing, small); 284 | } 285 | } 286 | } 287 | } 288 | 289 | @include breakpoint("<=xsmall") { 290 | &.spotlight { 291 | .inner { 292 | display: block; 293 | } 294 | 295 | .image { 296 | margin: 0 0 (_size(element-margin) * 0.5) 0 !important; 297 | max-width: 85%; 298 | width: 12em; 299 | } 300 | } 301 | } 302 | 303 | @include breakpoint("<=xxsmall") { 304 | .inner { 305 | @include padding(2em, 1.5em); 306 | } 307 | } 308 | } 309 | -------------------------------------------------------------------------------- /docs/assets/sass/libs/_breakpoints.scss: -------------------------------------------------------------------------------- 1 | // breakpoints.scss v1.0 | @ajlkn | MIT licensed */ 2 | 3 | // Vars. 4 | 5 | /// Breakpoints. 6 | /// @var {list} 7 | $breakpoints: () !global; 8 | 9 | // Mixins. 10 | 11 | /// Sets breakpoints. 12 | /// @param {map} $x Breakpoints. 13 | @mixin breakpoints($x: ()) { 14 | $breakpoints: $x !global; 15 | } 16 | 17 | /// Wraps @content in a @media block targeting a specific orientation. 18 | /// @param {string} $orientation Orientation. 19 | @mixin orientation($orientation) { 20 | @media screen and (orientation: #{$orientation}) { 21 | @content; 22 | } 23 | } 24 | 25 | /// Wraps @content in a @media block using a given query. 26 | /// @param {string} $query Query. 27 | @mixin breakpoint($query: null) { 28 | $breakpoint: null; 29 | $op: null; 30 | $media: null; 31 | 32 | // Determine operator, breakpoint. 33 | 34 | // Greater than or equal. 35 | @if (str-slice($query, 0, 2) == ">=") { 36 | $op: "gte"; 37 | $breakpoint: str-slice($query, 3); 38 | } 39 | 40 | // Less than or equal. 41 | @elseif (str-slice($query, 0, 2) == '<=') { 42 | $op: "lte"; 43 | $breakpoint: str-slice($query, 3); 44 | } 45 | 46 | // Greater than. 47 | @elseif (str-slice($query, 0, 1) == '>') { 48 | $op: "gt"; 49 | $breakpoint: str-slice($query, 2); 50 | } 51 | 52 | // Less than. 53 | @elseif (str-slice($query, 0, 1) == '<') { 54 | $op: "lt"; 55 | $breakpoint: str-slice($query, 2); 56 | } 57 | 58 | // Not. 59 | @elseif (str-slice($query, 0, 1) == '!') { 60 | $op: "not"; 61 | $breakpoint: str-slice($query, 2); 62 | } 63 | 64 | // Equal. 65 | @else { 66 | $op: "eq"; 67 | $breakpoint: $query; 68 | } 69 | 70 | // Build media. 71 | @if ($breakpoint and map-has-key($breakpoints, $breakpoint)) { 72 | $a: map-get($breakpoints, $breakpoint); 73 | 74 | // Range. 75 | @if (type-of($a) == "list") { 76 | $x: nth($a, 1); 77 | $y: nth($a, 2); 78 | 79 | // Max only. 80 | @if ($x == null) { 81 | // Greater than or equal (>= 0 / anything) 82 | @if ($op == "gte") { 83 | $media: "screen"; 84 | } 85 | 86 | // Less than or equal (<= y) 87 | @elseif ($op == 'lte') { 88 | $media: "screen and (max-width: " + $y + ")"; 89 | } 90 | 91 | // Greater than (> y) 92 | @elseif ($op == 'gt') { 93 | $media: "screen and (min-width: " + ($y + 1) + ")"; 94 | } 95 | 96 | // Less than (< 0 / invalid) 97 | @elseif ($op == 'lt') { 98 | $media: "screen and (max-width: -1px)"; 99 | } 100 | 101 | // Not (> y) 102 | @elseif ($op == 'not') { 103 | $media: "screen and (min-width: " + ($y + 1) + ")"; 104 | } 105 | 106 | // Equal (<= y) 107 | @else { 108 | $media: "screen and (max-width: " + $y + ")"; 109 | } 110 | } 111 | 112 | // Min only. 113 | @else if ($y == null) { 114 | // Greater than or equal (>= x) 115 | @if ($op == "gte") { 116 | $media: "screen and (min-width: " + $x + ")"; 117 | } 118 | 119 | // Less than or equal (<= inf / anything) 120 | @elseif ($op == 'lte') { 121 | $media: "screen"; 122 | } 123 | 124 | // Greater than (> inf / invalid) 125 | @elseif ($op == 'gt') { 126 | $media: "screen and (max-width: -1px)"; 127 | } 128 | 129 | // Less than (< x) 130 | @elseif ($op == 'lt') { 131 | $media: "screen and (max-width: " + ($x - 1) + ")"; 132 | } 133 | 134 | // Not (< x) 135 | @elseif ($op == 'not') { 136 | $media: "screen and (max-width: " + ($x - 1) + ")"; 137 | } 138 | 139 | // Equal (>= x) 140 | @else { 141 | $media: "screen and (min-width: " + $x + ")"; 142 | } 143 | } 144 | 145 | // Min and max. 146 | @else { 147 | // Greater than or equal (>= x) 148 | @if ($op == "gte") { 149 | $media: "screen and (min-width: " + $x + ")"; 150 | } 151 | 152 | // Less than or equal (<= y) 153 | @elseif ($op == 'lte') { 154 | $media: "screen and (max-width: " + $y + ")"; 155 | } 156 | 157 | // Greater than (> y) 158 | @elseif ($op == 'gt') { 159 | $media: "screen and (min-width: " + ($y + 1) + ")"; 160 | } 161 | 162 | // Less than (< x) 163 | @elseif ($op == 'lt') { 164 | $media: "screen and (max-width: " + ($x - 1) + ")"; 165 | } 166 | 167 | // Not (< x and > y) 168 | @elseif ($op == 'not') { 169 | $media: "screen and (max-width: " + ($x - 1) + 170 | "), screen and (min-width: " + ($y + 1) + ")"; 171 | } 172 | 173 | // Equal (>= x and <= y) 174 | @else { 175 | $media: "screen and (min-width: " + 176 | $x + 177 | ") and (max-width: " + 178 | $y + 179 | ")"; 180 | } 181 | } 182 | } 183 | 184 | // String. 185 | @else { 186 | // Missing a media type? Prefix with "screen". 187 | @if (str-slice($a, 0, 1) == "(") { 188 | $media: "screen and " + $a; 189 | } 190 | 191 | // Otherwise, use as-is. 192 | @else { 193 | $media: $a; 194 | } 195 | } 196 | } 197 | 198 | // Output. 199 | @media #{$media} { 200 | @content; 201 | } 202 | } 203 | -------------------------------------------------------------------------------- /docs/assets/sass/libs/_functions.scss: -------------------------------------------------------------------------------- 1 | /// Removes a specific item from a list. 2 | /// @author Hugo Giraudel 3 | /// @param {list} $list List. 4 | /// @param {integer} $index Index. 5 | /// @return {list} Updated list. 6 | @function remove-nth($list, $index) { 7 | $result: null; 8 | 9 | @if type-of($index) != number { 10 | @warn "$index: #{quote($index)} is not a number for `remove-nth`."; 11 | } @else if $index == 0 { 12 | @warn "List index 0 must be a non-zero integer for `remove-nth`."; 13 | } @else if abs($index) > length($list) { 14 | @warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`."; 15 | } @else { 16 | $result: (); 17 | $index: if($index < 0, length($list) + $index + 1, $index); 18 | 19 | @for $i from 1 through length($list) { 20 | @if $i != $index { 21 | $result: append($result, nth($list, $i)); 22 | } 23 | } 24 | } 25 | 26 | @return $result; 27 | } 28 | 29 | /// Gets a value from a map. 30 | /// @author Hugo Giraudel 31 | /// @param {map} $map Map. 32 | /// @param {string} $keys Key(s). 33 | /// @return {string} Value. 34 | @function val($map, $keys...) { 35 | @if nth($keys, 1) == null { 36 | $keys: remove-nth($keys, 1); 37 | } 38 | 39 | @each $key in $keys { 40 | $map: map-get($map, $key); 41 | } 42 | 43 | @return $map; 44 | } 45 | 46 | /// Gets a duration value. 47 | /// @param {string} $keys Key(s). 48 | /// @return {string} Value. 49 | @function _duration($keys...) { 50 | @return val($duration, $keys...); 51 | } 52 | 53 | /// Gets a font value. 54 | /// @param {string} $keys Key(s). 55 | /// @return {string} Value. 56 | @function _font($keys...) { 57 | @return val($font, $keys...); 58 | } 59 | 60 | /// Gets a misc value. 61 | /// @param {string} $keys Key(s). 62 | /// @return {string} Value. 63 | @function _misc($keys...) { 64 | @return val($misc, $keys...); 65 | } 66 | 67 | /// Gets a palette value. 68 | /// @param {string} $keys Key(s). 69 | /// @return {string} Value. 70 | @function _palette($keys...) { 71 | @return val($palette, $keys...); 72 | } 73 | 74 | /// Gets a size value. 75 | /// @param {string} $keys Key(s). 76 | /// @return {string} Value. 77 | @function _size($keys...) { 78 | @return val($size, $keys...); 79 | } 80 | -------------------------------------------------------------------------------- /docs/assets/sass/libs/_html-grid.scss: -------------------------------------------------------------------------------- 1 | // html-grid.scss v1.0 | @ajlkn | MIT licensed */ 2 | 3 | // Mixins. 4 | 5 | /// Initializes the current element as an HTML grid. 6 | /// @param {mixed} $gutters Gutters (either a single number to set both column/row gutters, or a list to set them individually). 7 | /// @param {mixed} $suffix Column class suffix (optional; either a single suffix or a list). 8 | @mixin html-grid($gutters: 1.5em, $suffix: "") { 9 | // Initialize. 10 | $cols: 12; 11 | $multipliers: 0, 0.25, 0.5, 1, 1.5, 2; 12 | $unit: 100% / $cols; 13 | 14 | // Suffixes. 15 | $suffixes: null; 16 | 17 | @if (type-of($suffix) == "list") { 18 | $suffixes: $suffix; 19 | } @else { 20 | $suffixes: ($suffix); 21 | } 22 | 23 | // Gutters. 24 | $guttersCols: null; 25 | $guttersRows: null; 26 | 27 | @if (type-of($gutters) == "list") { 28 | $guttersCols: nth($gutters, 1); 29 | $guttersRows: nth($gutters, 2); 30 | } @else { 31 | $guttersCols: $gutters; 32 | $guttersRows: 0; 33 | } 34 | 35 | // Row. 36 | display: flex; 37 | flex-wrap: wrap; 38 | box-sizing: border-box; 39 | align-items: stretch; 40 | 41 | // Columns. 42 | > * { 43 | box-sizing: border-box; 44 | } 45 | 46 | // Gutters. 47 | &.gtr-uniform { 48 | > * { 49 | > :last-child { 50 | margin-bottom: 0; 51 | } 52 | } 53 | } 54 | 55 | // Alignment. 56 | &.aln-left { 57 | justify-content: flex-start; 58 | } 59 | 60 | &.aln-center { 61 | justify-content: center; 62 | } 63 | 64 | &.aln-right { 65 | justify-content: flex-end; 66 | } 67 | 68 | &.aln-top { 69 | align-items: flex-start; 70 | } 71 | 72 | &.aln-middle { 73 | align-items: center; 74 | } 75 | 76 | &.aln-bottom { 77 | align-items: flex-end; 78 | } 79 | 80 | // Step through suffixes. 81 | @each $suffix in $suffixes { 82 | // Suffix. 83 | @if ($suffix != "") { 84 | $suffix: "-" + $suffix; 85 | } @else { 86 | $suffix: ""; 87 | } 88 | 89 | // Row. 90 | 91 | // Important. 92 | > .imp#{$suffix} { 93 | order: -1; 94 | } 95 | 96 | // Columns, offsets. 97 | @for $i from 1 through $cols { 98 | > .col-#{$i}#{$suffix} { 99 | width: $unit * $i; 100 | } 101 | 102 | > .off-#{$i}#{$suffix} { 103 | margin-left: $unit * $i; 104 | } 105 | } 106 | 107 | // Step through multipliers. 108 | @each $multiplier in $multipliers { 109 | // Gutters. 110 | $class: null; 111 | 112 | @if ($multiplier != 1) { 113 | $class: ".gtr-" + ($multiplier * 100); 114 | } 115 | 116 | &#{$class} { 117 | margin-top: ($guttersRows * $multiplier * -1); 118 | margin-left: ($guttersCols * $multiplier * -1); 119 | 120 | > * { 121 | padding: ($guttersRows * $multiplier) 122 | 0 123 | 0 124 | ($guttersCols * $multiplier); 125 | } 126 | 127 | // Uniform. 128 | &.gtr-uniform { 129 | margin-top: $guttersCols * $multiplier * -1; 130 | 131 | > * { 132 | padding-top: $guttersCols * $multiplier; 133 | } 134 | } 135 | } 136 | } 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /docs/assets/sass/libs/_mixins.scss: -------------------------------------------------------------------------------- 1 | /// Makes an element's :before pseudoelement a FontAwesome icon. 2 | /// @param {string} $content Optional content value to use. 3 | /// @param {string} $category Optional category to use. 4 | /// @param {string} $where Optional pseudoelement to target (before or after). 5 | @mixin icon($content: false, $category: regular, $where: before) { 6 | text-decoration: none; 7 | 8 | &:#{$where} { 9 | @if $content { 10 | content: $content; 11 | } 12 | 13 | -moz-osx-font-smoothing: grayscale; 14 | -webkit-font-smoothing: antialiased; 15 | display: inline-block; 16 | font-style: normal; 17 | font-variant: normal; 18 | text-rendering: auto; 19 | line-height: 1; 20 | text-transform: none !important; 21 | 22 | @if ($category == brands) { 23 | font-family: "Font Awesome 5 Brands"; 24 | } 25 | @elseif ($category == solid) { 26 | font-family: "Font Awesome 5 Free"; 27 | font-weight: 900; 28 | } @else { 29 | font-family: "Font Awesome 5 Free"; 30 | font-weight: 400; 31 | } 32 | } 33 | } 34 | 35 | /// Applies padding to an element, taking the current element-margin value into account. 36 | /// @param {mixed} $tb Top/bottom padding. 37 | /// @param {mixed} $lr Left/right padding. 38 | /// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left) 39 | /// @param {bool} $important If true, adds !important. 40 | @mixin padding($tb, $lr, $pad: (0, 0, 0, 0), $important: null) { 41 | @if $important { 42 | $important: "!important"; 43 | } 44 | 45 | $x: 0.1em; 46 | 47 | @if unit(_size(element-margin)) == "rem" { 48 | $x: 0.1rem; 49 | } 50 | 51 | padding: ($tb + nth($pad, 1)) ($lr + nth($pad, 2)) 52 | max($x, $tb - _size(element-margin) + nth($pad, 3)) ($lr + nth($pad, 4)) #{$important}; 53 | } 54 | 55 | /// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp). 56 | /// @param {string} $svg SVG data URL. 57 | /// @return {string} Encoded SVG data URL. 58 | @function svg-url($svg) { 59 | $svg: str-replace($svg, '"', "'"); 60 | $svg: str-replace($svg, "%", "%25"); 61 | $svg: str-replace($svg, "<", "%3C"); 62 | $svg: str-replace($svg, ">", "%3E"); 63 | $svg: str-replace($svg, "&", "%26"); 64 | $svg: str-replace($svg, "#", "%23"); 65 | $svg: str-replace($svg, "{", "%7B"); 66 | $svg: str-replace($svg, "}", "%7D"); 67 | $svg: str-replace($svg, ";", "%3B"); 68 | 69 | @return url("data:image/svg+xml;charset=utf8,#{$svg}"); 70 | } 71 | 72 | // ! Dynamic background image 73 | @mixin dynamic-linear-gradient($name) { 74 | background-image: linear-gradient( 75 | to top, 76 | transparentize(_palette(bg), $bg-transparent), 77 | transparentize(_palette(bg), $bg-transparent) 78 | ), 79 | url("../../images/" + $name + ".png"); 80 | } 81 | 82 | @mixin dynamic-background-image { 83 | @include dynamic-linear-gradient("index"); 84 | 85 | &[background="glsl"] { 86 | @include dynamic-linear-gradient("glsl"); 87 | } 88 | 89 | &[background="osl"] { 90 | @include dynamic-linear-gradient("osl"); 91 | } 92 | 93 | &[background="vex"] { 94 | @include dynamic-linear-gradient("vex"); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /docs/assets/sass/libs/_prism.scss: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.23.0 2 | https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+python&plugins=normalize-whitespace */ 3 | /** 4 | * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML 5 | * Based on https://github.com/chriskempson/tomorrow-theme 6 | * @author Rose Pritchard 7 | */ 8 | 9 | code[class*="language-"], 10 | pre[class*="language-"] { 11 | color: #ccc; 12 | background: none; 13 | // font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; 14 | font-size: 1em; 15 | text-align: left; 16 | white-space: pre; 17 | word-spacing: normal; 18 | word-break: normal; 19 | word-wrap: normal; 20 | line-height: 1.5; 21 | 22 | -moz-tab-size: 4; 23 | -o-tab-size: 4; 24 | tab-size: 4; 25 | 26 | -webkit-hyphens: none; 27 | -moz-hyphens: none; 28 | -ms-hyphens: none; 29 | hyphens: none; 30 | } 31 | 32 | // /* Code blocks */ 33 | // pre[class*="language-"] { 34 | // padding: 1em; 35 | // margin: 0.5em 0; 36 | // overflow: auto; 37 | // } 38 | 39 | // :not(pre) > code[class*="language-"], 40 | // pre[class*="language-"] { 41 | // background: #2d2d2d; 42 | // } 43 | 44 | /* Inline code */ 45 | :not(pre) > code[class*="language-"] { 46 | padding: 0.1em; 47 | border-radius: 0.3em; 48 | white-space: normal; 49 | } 50 | 51 | .token.comment, 52 | .token.block-comment, 53 | .token.prolog, 54 | .token.doctype, 55 | .token.cdata { 56 | color: #999; 57 | } 58 | 59 | .token.punctuation { 60 | color: #ccc; 61 | } 62 | 63 | .token.tag, 64 | .token.attr-name, 65 | .token.namespace, 66 | .token.deleted { 67 | color: #e2777a; 68 | } 69 | 70 | .token.function-name { 71 | color: #6196cc; 72 | } 73 | 74 | .token.boolean, 75 | .token.number, 76 | .token.function { 77 | color: #f08d49; 78 | } 79 | 80 | .token.property, 81 | .token.class-name, 82 | .token.constant, 83 | .token.symbol { 84 | color: #f8c555; 85 | } 86 | 87 | .token.selector, 88 | .token.important, 89 | .token.atrule, 90 | .token.keyword, 91 | .token.builtin { 92 | color: #cc99cd; 93 | } 94 | 95 | .token.string, 96 | .token.char, 97 | .token.attr-value, 98 | .token.regex, 99 | .token.variable { 100 | color: #7ec699; 101 | } 102 | 103 | .token.operator, 104 | .token.entity, 105 | .token.url { 106 | color: #67cdcc; 107 | } 108 | 109 | .token.important, 110 | .token.bold { 111 | font-weight: bold; 112 | } 113 | .token.italic { 114 | font-style: italic; 115 | } 116 | 117 | .token.entity { 118 | cursor: help; 119 | } 120 | 121 | .token.inserted { 122 | color: green; 123 | } 124 | -------------------------------------------------------------------------------- /docs/assets/sass/libs/_vars.scss: -------------------------------------------------------------------------------- 1 | // Misc. 2 | $misc: ( 3 | z-index-base: 10000, 4 | max-wrapper-styles: 6, 5 | ); 6 | 7 | // Duration. 8 | $duration: ( 9 | menu: 0.35s, 10 | transition: 0.2s, 11 | ); 12 | 13 | // Size. 14 | $size: ( 15 | border-radius: 5px, 16 | element-height: 2.75em, 17 | element-margin: 2em, 18 | inner: 55em, 19 | section-spacing: ( 20 | large: 3em, 21 | medium: 2em, 22 | small: 1.75em, 23 | ), 24 | wrapper-edges: ( 25 | large: 6.5em, 26 | medium: 4.75em, 27 | small: 2.5em, 28 | ), 29 | ); 30 | 31 | // Font. 32 | $font: ( 33 | family: ( 34 | "Source Sans Pro", 35 | Helvetica, 36 | sans-serif, 37 | ), 38 | family-fixed: ( 39 | "Courier New", 40 | monospace, 41 | ), 42 | family-heading: ( 43 | Raleway, 44 | Helvetica, 45 | sans-serif, 46 | ), 47 | weight: 300, 48 | weight-bold: 600, 49 | weight-heading: 200, 50 | weight-heading-bold: 700, 51 | kern-heading: 0.1em, 52 | ); 53 | 54 | // Palette. 55 | $bg-transparent: 0.5; 56 | $palette: ( 57 | bg: #444444, 58 | fg: #ffffff, 59 | fg-bold: #ffffff, 60 | fg-light: rgba(255, 255, 255, 0.35), 61 | border: rgba(255, 255, 255, 0.125), 62 | border-bg: rgba(255, 255, 255, 0.025), 63 | border2: rgba(255, 255, 255, 0.25), 64 | border2-bg: rgba(255, 255, 255, 0.075), 65 | accent: #4c5c96, 66 | ); 67 | -------------------------------------------------------------------------------- /docs/assets/sass/libs/_vendor.scss: -------------------------------------------------------------------------------- 1 | // vendor.scss v1.0 | @ajlkn | MIT licensed */ 2 | 3 | // Vars. 4 | 5 | /// Vendor prefixes. 6 | /// @var {list} 7 | $vendor-prefixes: ("-moz-", "-webkit-", "-ms-", ""); 8 | 9 | /// Properties that should be vendorized. 10 | /// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org 11 | /// @var {list} 12 | $vendor-properties: ( 13 | // Animation. 14 | "animation", 15 | "animation-delay", 16 | "animation-direction", 17 | "animation-duration", 18 | "animation-fill-mode", 19 | "animation-iteration-count", 20 | "animation-name", 21 | "animation-play-state", 22 | "animation-timing-function", 23 | // Appearance. 24 | "appearance", 25 | // Backdrop filter. 26 | "backdrop-filter", 27 | // Background image options. 28 | "background-clip", 29 | "background-origin", 30 | "background-size", 31 | // Box sizing. 32 | "box-sizing", 33 | // Clip path. 34 | "clip-path", 35 | // Filter effects. 36 | "filter", 37 | // Flexbox. 38 | "align-content", 39 | "align-items", 40 | "align-self", 41 | "flex", 42 | "flex-basis", 43 | "flex-direction", 44 | "flex-flow", 45 | "flex-grow", 46 | "flex-shrink", 47 | "flex-wrap", 48 | "justify-content", 49 | "order", 50 | // Font feature. 51 | "font-feature-settings", 52 | "font-language-override", 53 | "font-variant-ligatures", 54 | // Font kerning. 55 | "font-kerning", 56 | // Fragmented borders and backgrounds. 57 | "box-decoration-break", 58 | // Grid layout. 59 | "grid-column", 60 | "grid-column-align", 61 | "grid-column-end", 62 | "grid-column-start", 63 | "grid-row", 64 | "grid-row-align", 65 | "grid-row-end", 66 | "grid-row-start", 67 | "grid-template-columns", 68 | "grid-template-rows", 69 | // Hyphens. 70 | "hyphens", 71 | "word-break", 72 | // Masks. 73 | "mask", 74 | "mask-border", 75 | "mask-border-outset", 76 | "mask-border-repeat", 77 | "mask-border-slice", 78 | "mask-border-source", 79 | "mask-border-width", 80 | "mask-clip", 81 | "mask-composite", 82 | "mask-image", 83 | "mask-origin", 84 | "mask-position", 85 | "mask-repeat", 86 | "mask-size", 87 | // Multicolumn. 88 | "break-after", 89 | "break-before", 90 | "break-inside", 91 | "column-count", 92 | "column-fill", 93 | "column-gap", 94 | "column-rule", 95 | "column-rule-color", 96 | "column-rule-style", 97 | "column-rule-width", 98 | "column-span", 99 | "column-width", 100 | "columns", 101 | // Object fit. 102 | "object-fit", 103 | "object-position", 104 | // Regions. 105 | "flow-from", 106 | "flow-into", 107 | "region-fragment", 108 | // Scroll snap points. 109 | "scroll-snap-coordinate", 110 | "scroll-snap-destination", 111 | "scroll-snap-points-x", 112 | "scroll-snap-points-y", 113 | "scroll-snap-type", 114 | // Shapes. 115 | "shape-image-threshold", 116 | "shape-margin", 117 | "shape-outside", 118 | // Tab size. 119 | "tab-size", 120 | // Text align last. 121 | "text-align-last", 122 | // Text decoration. 123 | "text-decoration-color", 124 | "text-decoration-line", 125 | "text-decoration-skip", 126 | "text-decoration-style", 127 | // Text emphasis. 128 | "text-emphasis", 129 | "text-emphasis-color", 130 | "text-emphasis-position", 131 | "text-emphasis-style", 132 | // Text size adjust. 133 | "text-size-adjust", 134 | // Text spacing. 135 | "text-spacing", 136 | // Transform. 137 | "transform", 138 | "transform-origin", 139 | // Transform 3D. 140 | "backface-visibility", 141 | "perspective", 142 | "perspective-origin", 143 | "transform-style", 144 | // Transition. 145 | "transition", 146 | "transition-delay", 147 | "transition-duration", 148 | "transition-property", 149 | "transition-timing-function", 150 | // Unicode bidi. 151 | "unicode-bidi", 152 | // User select. 153 | "user-select", 154 | // Writing mode. 155 | "writing-mode" 156 | ); 157 | 158 | /// Values that should be vendorized. 159 | /// Data via caniuse.com, github.com/postcss/autoprefixer, and developer.mozilla.org 160 | /// @var {list} 161 | $vendor-values: ( 162 | // Cross fade. 163 | "cross-fade", 164 | // Element function. 165 | "element", 166 | // Filter function. 167 | "filter", 168 | // Flexbox. 169 | "flex", 170 | "inline-flex", 171 | // Grab cursors. 172 | "grab", 173 | "grabbing", 174 | // Gradients. 175 | "linear-gradient", 176 | "repeating-linear-gradient", 177 | "radial-gradient", 178 | "repeating-radial-gradient", 179 | // Grid layout. 180 | "grid", 181 | "inline-grid", 182 | // Image set. 183 | "image-set", 184 | // Intrinsic width. 185 | "max-content", 186 | "min-content", 187 | "fit-content", 188 | "fill", 189 | "fill-available", 190 | "stretch", 191 | // Sticky position. 192 | "sticky", 193 | // Transform. 194 | "transform", 195 | // Zoom cursors. 196 | "zoom-in", 197 | "zoom-out" 198 | ); 199 | 200 | // Functions. 201 | 202 | /// Removes a specific item from a list. 203 | /// @author Hugo Giraudel 204 | /// @param {list} $list List. 205 | /// @param {integer} $index Index. 206 | /// @return {list} Updated list. 207 | @function remove-nth($list, $index) { 208 | $result: null; 209 | 210 | @if type-of($index) != number { 211 | @warn "$index: #{quote($index)} is not a number for `remove-nth`."; 212 | } @else if $index == 0 { 213 | @warn "List index 0 must be a non-zero integer for `remove-nth`."; 214 | } @else if abs($index) > length($list) { 215 | @warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`."; 216 | } @else { 217 | $result: (); 218 | $index: if($index < 0, length($list) + $index + 1, $index); 219 | 220 | @for $i from 1 through length($list) { 221 | @if $i != $index { 222 | $result: append($result, nth($list, $i)); 223 | } 224 | } 225 | } 226 | 227 | @return $result; 228 | } 229 | 230 | /// Replaces a substring within another string. 231 | /// @author Hugo Giraudel 232 | /// @param {string} $string String. 233 | /// @param {string} $search Substring. 234 | /// @param {string} $replace Replacement. 235 | /// @return {string} Updated string. 236 | @function str-replace($string, $search, $replace: "") { 237 | $index: str-index($string, $search); 238 | 239 | @if $index { 240 | @return str-slice($string, 1, $index - 1) + $replace + 241 | str-replace( 242 | str-slice($string, $index + str-length($search)), 243 | $search, 244 | $replace 245 | ); 246 | } 247 | 248 | @return $string; 249 | } 250 | 251 | /// Replaces a substring within each string in a list. 252 | /// @param {list} $strings List of strings. 253 | /// @param {string} $search Substring. 254 | /// @param {string} $replace Replacement. 255 | /// @return {list} Updated list of strings. 256 | @function str-replace-all($strings, $search, $replace: "") { 257 | @each $string in $strings { 258 | $strings: set-nth( 259 | $strings, 260 | index($strings, $string), 261 | str-replace($string, $search, $replace) 262 | ); 263 | } 264 | 265 | @return $strings; 266 | } 267 | 268 | // Mixins. 269 | 270 | /// Wraps @content in vendorized keyframe blocks. 271 | /// @param {string} $name Name. 272 | @mixin keyframes($name) { 273 | @-moz-keyframes #{$name} { 274 | @content; 275 | } 276 | @-webkit-keyframes #{$name} { 277 | @content; 278 | } 279 | @-ms-keyframes #{$name} { 280 | @content; 281 | } 282 | @keyframes #{$name} { 283 | @content; 284 | } 285 | } 286 | 287 | /// Vendorizes a declaration's property and/or value(s). 288 | /// @param {string} $property Property. 289 | /// @param {mixed} $value String/list of value(s). 290 | @mixin vendor($property, $value) { 291 | // Determine if property should expand. 292 | $expandProperty: index($vendor-properties, $property); 293 | 294 | // Determine if value should expand (and if so, add '-prefix-' placeholder). 295 | $expandValue: false; 296 | 297 | @each $x in $value { 298 | @each $y in $vendor-values { 299 | @if $y == str-slice($x, 1, str-length($y)) { 300 | $value: set-nth($value, index($value, $x), "-prefix-" + $x); 301 | $expandValue: true; 302 | } 303 | } 304 | } 305 | 306 | // Expand property? 307 | @if $expandProperty { 308 | @each $vendor in $vendor-prefixes { 309 | #{$vendor}#{$property}: #{str-replace-all($value, "-prefix-", $vendor)}; 310 | } 311 | } 312 | 313 | // Expand just the value? 314 | @elseif $expandValue { 315 | @each $vendor in $vendor-prefixes { 316 | #{$property}: #{str-replace-all($value, "-prefix-", $vendor)}; 317 | } 318 | } 319 | 320 | // Neither? Treat them as a normal declaration. 321 | @else { 322 | #{$property}: #{$value}; 323 | } 324 | } 325 | -------------------------------------------------------------------------------- /docs/assets/sass/main.scss: -------------------------------------------------------------------------------- 1 | @import "libs/vars"; 2 | @import "libs/functions"; 3 | @import "libs/mixins"; 4 | @import "libs/vendor"; 5 | @import "libs/breakpoints"; 6 | @import "libs/html-grid"; 7 | @import "libs/prism"; 8 | @import url("fontawesome-all.min.css"); 9 | @import url("https://fonts.googleapis.com/css?family=Raleway:200,700|Source+Sans+Pro:300,600,300italic,600italic"); 10 | 11 | // Breakpoints. 12 | 13 | @include breakpoints( 14 | ( 15 | xlarge: ( 16 | 1281px, 17 | 1680px, 18 | ), 19 | large: ( 20 | 981px, 21 | 1280px, 22 | ), 23 | medium: ( 24 | 737px, 25 | 980px, 26 | ), 27 | small: ( 28 | 481px, 29 | 736px, 30 | ), 31 | xsmall: ( 32 | 361px, 33 | 480px, 34 | ), 35 | xxsmall: ( 36 | null, 37 | 360px, 38 | ), 39 | ) 40 | ); 41 | 42 | // Base. 43 | 44 | @import "base/reset"; 45 | @import "base/page"; 46 | @import "base/typography"; 47 | 48 | // Component. 49 | 50 | @import "components/row"; 51 | @import "components/section"; 52 | @import "components/form"; 53 | @import "components/box"; 54 | @import "components/icon"; 55 | @import "components/image"; 56 | @import "components/list"; 57 | @import "components/actions"; 58 | @import "components/icons"; 59 | @import "components/contact"; 60 | @import "components/pagination"; 61 | @import "components/table"; 62 | @import "components/button"; 63 | @import "components/features"; 64 | 65 | // Layout. 66 | 67 | @import "layout/header"; 68 | @import "layout/menu"; 69 | @import "layout/banner"; 70 | @import "layout/wrapper"; 71 | @import "layout/footer"; 72 | -------------------------------------------------------------------------------- /docs/assets/sass/noscript.scss: -------------------------------------------------------------------------------- 1 | @import "libs/vars"; 2 | @import "libs/functions"; 3 | @import "libs/mixins"; 4 | @import "libs/vendor"; 5 | @import "libs/breakpoints"; 6 | @import "libs/html-grid"; 7 | @import "libs/prism"; 8 | 9 | /* Banner */ 10 | 11 | #banner { 12 | body.is-preload & { 13 | .logo { 14 | @include vendor("transform", "none"); 15 | opacity: 1; 16 | } 17 | 18 | h2 { 19 | opacity: 1; 20 | @include vendor("transform", "none"); 21 | @include vendor("filter", "none"); 22 | } 23 | 24 | p { 25 | opacity: 01; 26 | @include vendor("transform", "none"); 27 | @include vendor("filter", "none"); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/assets/template/footer.js: -------------------------------------------------------------------------------- 1 | document.querySelector("section#footer").innerHTML = ` 2 |
3 | 7 |
8 | `; 9 | -------------------------------------------------------------------------------- /docs/assets/template/header.js: -------------------------------------------------------------------------------- 1 | document.querySelector("header#header.alt").innerHTML = ` 2 |

🔮 ${window.PAGE_TITLE}

3 | 6 | `; 7 | -------------------------------------------------------------------------------- /docs/assets/template/menu.js: -------------------------------------------------------------------------------- 1 | document.querySelector("nav#menu").innerHTML = ` 2 | 12 | `; 13 | -------------------------------------------------------------------------------- /docs/assets/template/setup.js: -------------------------------------------------------------------------------- 1 | // ! Prototypes 2 | String.prototype.capitalize = function () { 3 | return this.charAt(0).toUpperCase() + this.slice(1); 4 | }; 5 | 6 | // ! Global variables 7 | window.YEAR_FOOTER = new Date().getFullYear(); 8 | window.PAGE_LINK = "diegoinacio.github.io"; 9 | 10 | // * Get meta title 11 | window.META_TITLE = document.querySelector(`meta[name="title"]`).content; 12 | window.PAGE_TITLE = 13 | window.META_TITLE !== "index" ? `${window.META_TITLE.toUpperCase()} | ` : ""; 14 | window.PAGE_TITLE += "Shading Lab"; 15 | 16 | // ! Dynamic settings 17 | // * Set title 18 | document.querySelector("title").innerText = window.PAGE_TITLE; 19 | 20 | // * Set background attributes 21 | document.querySelector("body").setAttribute("background", window.META_TITLE); 22 | document.querySelector("#banner").setAttribute("background", window.META_TITLE); 23 | document.querySelector("#footer").setAttribute("background", window.META_TITLE); 24 | -------------------------------------------------------------------------------- /docs/assets/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/assets/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /docs/assets/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/assets/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /docs/assets/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/assets/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /docs/assets/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/assets/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /docs/assets/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/assets/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /docs/assets/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/assets/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /docs/assets/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/assets/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /docs/assets/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/assets/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /docs/assets/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/assets/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /docs/assets/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/assets/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /docs/assets/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/assets/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /docs/assets/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/assets/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /docs/elements.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | Elements - Solid State by HTML5 UP 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 27 | 28 | 29 | 42 | 43 | 44 |
45 |
46 |
47 |

Elements

48 |

Phasellus non pulvinar erat. Fusce tincidunt nisl eget ipsum.

49 |
50 |
51 | 52 | 53 |
54 |
55 | 56 |
57 |

Text

58 |

This is bold and this is strong. This is italic and this is emphasized. 59 | This is superscript text and this is subscript text. 60 | This is underlined and this is code: for (;;) { ... }. Finally, this is a link.

61 |

Blockquote

62 |
Fringilla nisl. Donec accumsan interdum nisi, quis tincidunt felis sagittis eget tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan faucibus. Vestibulum ante ipsum primis in faucibus lorem ipsum dolor sit amet nullam adipiscing eu felis.
63 |

Preformatted

64 |
i = 0;
 65 | 
 66 | while (!deck.isInOrder()) {
 67 |   print 'Iteration ' + i;
 68 |   deck.shuffle();
 69 |   i++;
 70 | }
 71 | 
 72 | print 'It took ' + i + ' iterations to sort the deck.';
73 |
74 | 75 |
76 |

Lists

77 |
78 |
79 |

Unordered

80 |
    81 |
  • Dolor pulvinar etiam.
  • 82 |
  • Sagittis adipiscing.
  • 83 |
  • Felis enim feugiat.
  • 84 |
85 |

Alternate

86 |
    87 |
  • Dolor pulvinar etiam.
  • 88 |
  • Sagittis adipiscing.
  • 89 |
  • Felis enim feugiat.
  • 90 |
91 |
92 |
93 |

Ordered

94 |
    95 |
  1. Dolor pulvinar etiam.
  2. 96 |
  3. Etiam vel felis viverra.
  4. 97 |
  5. Felis enim feugiat.
  6. 98 |
  7. Dolor pulvinar etiam.
  8. 99 |
  9. Etiam vel felis lorem.
  10. 100 |
  11. Felis enim et feugiat.
  12. 101 |
102 |

Icons

103 | 109 |
110 |
111 |

Actions

112 |
113 |
114 | 118 | 122 | 126 | 130 |
131 |
132 | 136 | 140 |
141 |
142 |

Pagination

143 |
    144 |
  • Prev
  • 145 |
  • 1
  • 146 |
  • 2
  • 147 |
  • 3
  • 148 |
  • 149 |
  • 8
  • 150 |
  • 9
  • 151 |
  • 10
  • 152 |
  • Next
  • 153 |
154 |
155 | 156 |
157 |

Table

158 |

Default

159 |
160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 |
NameDescriptionPrice
Item OneAnte turpis integer aliquet porttitor.29.99
Item TwoVis ac commodo adipiscing arcu aliquet.19.99
Item Three Morbi faucibus arcu accumsan lorem.29.99
Item FourVitae integer tempus condimentum.19.99
Item FiveAnte turpis integer aliquet porttitor.29.99
100.00
202 |
203 | 204 |

Alternate

205 |
206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 |
NameDescriptionPrice
Item OneAnte turpis integer aliquet porttitor.29.99
Item TwoVis ac commodo adipiscing arcu aliquet.19.99
Item Three Morbi faucibus arcu accumsan lorem.29.99
Item FourVitae integer tempus condimentum.19.99
Item FiveAnte turpis integer aliquet porttitor.29.99
100.00
248 |
249 |
250 | 251 |
252 |

Buttons

253 | 257 | 261 | 266 | 271 | 275 |
    276 |
  • Disabled
  • 277 |
  • Disabled
  • 278 |
279 |
280 | 281 |
282 |

Form

283 |
284 |
285 |
286 | 287 | 288 |
289 |
290 | 291 | 292 |
293 |
294 | 295 | 302 |
303 |
304 | 305 | 306 |
307 |
308 | 309 | 310 |
311 |
312 | 313 | 314 |
315 |
316 | 317 | 318 |
319 |
320 | 321 | 322 |
323 |
324 | 325 | 326 |
327 |
328 |
    329 |
  • 330 |
  • 331 |
332 |
333 |
334 |
335 |
336 | 337 |
338 |

Image

339 |

Fit

340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |

Left & Right

355 |

Morbi mattis mi consectetur tortor elementum, varius pellentesque velit convallis. Aenean tincidunt lectus auctor mauris maximus, ac scelerisque ipsum tempor. Duis vulputate ex et ex tincidunt, quis lacinia velit aliquet. Duis non efficitur nisi, id malesuada justo. Maecenas sagittis felis ac sagittis semper. Curabitur purus leo, tempus sed finibus eget, fringilla quis risus. Maecenas et lorem quis sem varius sagittis et a est. Maecenas iaculis iaculis sem. Donec vel dolor at arcu tincidunt bibendum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce ut aliquet justo. Donec id neque ipsum. Integer eget ultricies odio. Nam vel ex a orci fringilla tincidunt. Aliquam eleifend ligula non velit accumsan cursus. Etiam ut gravida sapien. Morbi mattis mi consectetur tortor elementum, varius pellentesque velit convallis. Aenean tincidunt lectus auctor mauris maximus, ac scelerisque ipsum tempor. Duis vulputate ex et ex tincidunt, quis lacinia velit aliquet. Duis non efficitur nisi, id malesuada justo. Maecenas sagittis felis ac sagittis semper. Curabitur purus leo, tempus sed finibus eget, fringilla quis risus. Maecenas et lorem quis sem varius sagittis et a est. Maecenas iaculis iaculis sem. Donec vel dolor at arcu tincidunt bibendum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce ut aliquet justo. Donec id neque ipsum. Integer eget ultricies odio. Nam vel ex a orci fringilla tincidunt. Aliquam eleifend ligula non velit accumsan cursus. Etiam ut gravida sapien.

356 |

Vestibulum ultrices risus velit, sit amet blandit massa auctor sit amet. Sed eu lectus sem. Phasellus in odio at ipsum porttitor mollis id vel diam. Praesent sit amet posuere risus, eu faucibus lectus. Vivamus ex ligula, tempus pulvinar ipsum in, auctor porta quam. Proin nec dui cursus, posuere dui eget interdum. Fusce lectus magna, sagittis at facilisis vitae, pellentesque at etiam. Quisque posuere leo quis sem commodo, vel scelerisque nisi scelerisque. Suspendisse id quam vel tortor tincidunt suscipit. Nullam auctor orci eu dolor consectetur, interdum ullamcorper ante tincidunt. Mauris felis nec felis elementum varius. Nam sapien ante, varius in pulvinar vitae, rhoncus id massa. Donec varius ex in mauris ornare, eget euismod urna egestas. Etiam lacinia tempor ipsum, sodales porttitor justo. Aliquam dolor quam, semper in tortor eu, volutpat efficitur quam. Fusce nec fermentum nisl. Aenean erat diam, tempus aliquet erat. Etiam iaculis nulla ipsum, et pharetra libero rhoncus ut. Phasellus rutrum cursus velit, eget condimentum nunc blandit vel. In at pulvinar lectus. Morbi diam ante, vulputate et imperdiet eget, fermentum non dolor. Ut eleifend sagittis tincidunt. Sed viverra commodo mi, ac rhoncus justo. Duis neque ligula, elementum ut enim vel, posuere finibus justo. Vivamus facilisis maximus nibh quis pulvinar. Quisque hendrerit in ipsum id tellus facilisis fermentum. Proin mauris dui.

357 |
358 | 359 |
360 |
361 | 362 |
363 | 364 | 365 | 405 | 406 |
407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | -------------------------------------------------------------------------------- /docs/generic.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | Generic - Solid State by HTML5 UP 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 27 | 28 | 29 | 42 | 43 | 44 |
45 |
46 |
47 |

Generic

48 |

Phasellus non pulvinar erat. Fusce tincidunt nisl eget ipsum.

49 |
50 |
51 | 52 | 53 |
54 |
55 | 56 |

Lorem ipsum dolor

57 |

Morbi mattis mi consectetur tortor elementum, varius pellentesque velit convallis. Aenean tincidunt lectus auctor mauris maximus, ac scelerisque ipsum tempor. Duis vulputate ex et ex tincidunt, quis lacinia velit aliquet. Duis non efficitur nisi, id malesuada justo. Maecenas sagittis felis ac sagittis semper. Curabitur purus leo donec vel dolor at arcu tincidunt bibendum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce ut aliquet justo. Donec id neque ipsum. Integer eget ultricies odio. Nam vel ex a orci fringilla tincidunt. Aliquam eleifend ligula non velit accumsan cursus. Etiam ut gravida sapien.

58 | 59 |

Vestibulum ultrices risus velit, sit amet blandit massa auctor sit amet. Sed eu lectus sem. Phasellus in odio at ipsum porttitor mollis id vel diam. Praesent sit amet posuere risus, eu faucibus lectus. Vivamus ex ligula, tempus pulvinar ipsum in, auctor porta quam. Proin nec commodo, vel scelerisque nisi scelerisque. Suspendisse id quam vel tortor tincidunt suscipit. Nullam auctor orci eu dolor consectetur, interdum ullamcorper ante tincidunt. Mauris felis nec felis elementum varius.

60 | 61 |

Vitae phasellus

62 |

Cras mattis ante fermentum, malesuada neque vitae, eleifend erat. Phasellus non pulvinar erat. Fusce tincidunt, nisl eget mattis egestas, purus ipsum consequat orci, sit amet lobortis lorem lacus in tellus. Sed ac elementum arcu. Quisque placerat auctor laoreet.

63 | 64 |
65 |
66 | 67 |

Sed feugiat lorem

68 |

Lorem ipsum dolor sit amet, consectetur adipiscing vehicula id nulla dignissim dapibus ultrices.

69 | Learn more 70 |
71 |
72 | 73 |

Nisl placerat

74 |

Lorem ipsum dolor sit amet, consectetur adipiscing vehicula id nulla dignissim dapibus ultrices.

75 | Learn more 76 |
77 |
78 | 79 |
80 |
81 | 82 |
83 | 84 | 85 | 125 | 126 |
127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /docs/glsl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | GLSL 6 | 7 | 11 | 12 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 40 | 41 | 42 |
43 |
44 |
45 |

46 | A collection of shader and experiments using 47 | OpenGL Shading Language. Here you are going to find: 52 |

53 | 54 |
55 | 59 |
60 |

61 | If you want to know more, please consider vising the 62 | repository. 68 |

69 | 70 |
71 | 72 |

1. Constant Shaders

73 | 78 |

79 | Constant shaded color and not affected by lighting. It is 80 | probably the most basic shader to produce. 81 |

82 |
83 |
84 | 90 |

Constant Color

91 |

A simple pure shaded color.

92 | Learn more 98 |
99 |
100 | 106 |

Constant Texture

107 |

A simple pure shaded color from texture.

108 | Learn more 114 |
115 |
116 | 117 | 118 |

2. Iridescence Shader

119 | 124 |

125 | A simple iridescence effect inspired by the 126 | Goniochromism phenomenon, which varies its aspect based 127 | on the relationship between the surface normal and the camera 128 | angle. The visual beautification is due the 129 | pseudo noise function, that makes the aspect a little 130 | more appealing. 131 |

132 |
133 |                 
134 |                   float NaiveNoise(vec3 freq, vec3 offset) {
135 |                     // Naive noise function to make irregularity
136 |                     return sin(2.0*PI*P.x*freq.x*2.0 + 12.0 + offset.x) +
137 |                       cos(2.0*PI*P.z*freq.x + 21.0 + offset.x) *
138 |                       sin(2.0*PI*P.y*freq.y*2.0 + 23.0 + offset.y) +
139 |                       cos(2.0*PI*P.y*freq.y + 32.0 + offset.y) *
140 |                       sin(2.0*PI*P.z*freq.z*2.0 + 34.0 + offset.z) +
141 |                       cos(2.0*PI*P.x*freq.z + 43.0 + offset.z);
142 |                   }
143 | 
144 |                   vec3 iridescence(
145 |                     float orient,
146 |                     float noiseMult,
147 |                     vec3 freqA,
148 |                     vec3 offsetA,
149 |                     vec3 freqB,
150 |                     vec3 offsetB
151 |                   ) {
152 |                     // This function returns a iridescence value based on orientation
153 |                     vec3 irid;
154 |                     irid.x = abs(cos(
155 |                       2.0*PI*orient*freqA.x + NaiveNoise(freqB, offsetB)*noiseMult + 1.0 + offsetA.x
156 |                     ));
157 |                     irid.y = abs(cos(
158 |                       2.0*PI*orient*freqA.y + NaiveNoise(freqB, offsetB)*noiseMult + 2.0 + offsetA.y
159 |                     ));
160 |                     irid.z = abs(cos(
161 |                       2.0*PI*orient*freqA.z + NaiveNoise(freqB, offsetB)*noiseMult + 3.0 + offsetA.z
162 |                     ));
163 | 
164 |                     return irid;
165 |                   }
166 |                 
167 |               
168 |
169 |
170 | 176 |

Iridescence Simple

177 |

A simple iridescent shader.

178 | Learn more 184 |
185 |
186 | 187 |
188 |
189 |
190 |
191 | 192 | 193 | 194 |
195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | -------------------------------------------------------------------------------- /docs/images/_base/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/_base/bg.jpg -------------------------------------------------------------------------------- /docs/images/_base/pic01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/_base/pic01.jpg -------------------------------------------------------------------------------- /docs/images/_base/pic02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/_base/pic02.jpg -------------------------------------------------------------------------------- /docs/images/_base/pic03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/_base/pic03.jpg -------------------------------------------------------------------------------- /docs/images/_base/pic04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/_base/pic04.jpg -------------------------------------------------------------------------------- /docs/images/_base/pic05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/_base/pic05.jpg -------------------------------------------------------------------------------- /docs/images/_base/pic06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/_base/pic06.jpg -------------------------------------------------------------------------------- /docs/images/_base/pic07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/_base/pic07.jpg -------------------------------------------------------------------------------- /docs/images/_base/pic08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/_base/pic08.jpg -------------------------------------------------------------------------------- /docs/images/constant_color_glsl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/constant_color_glsl.jpg -------------------------------------------------------------------------------- /docs/images/constant_color_osl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/constant_color_osl.jpg -------------------------------------------------------------------------------- /docs/images/constant_color_vex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/constant_color_vex.jpg -------------------------------------------------------------------------------- /docs/images/constant_shader.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/constant_shader.jpg -------------------------------------------------------------------------------- /docs/images/constant_texture_glsl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/constant_texture_glsl.jpg -------------------------------------------------------------------------------- /docs/images/constant_texture_vex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/constant_texture_vex.jpg -------------------------------------------------------------------------------- /docs/images/cristalize_normals_vex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/cristalize_normals_vex.jpg -------------------------------------------------------------------------------- /docs/images/data_points_shader.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/data_points_shader.jpg -------------------------------------------------------------------------------- /docs/images/glsl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/glsl.png -------------------------------------------------------------------------------- /docs/images/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/index.png -------------------------------------------------------------------------------- /docs/images/iridescence_shader.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/iridescence_shader.jpg -------------------------------------------------------------------------------- /docs/images/iridescence_simple_glsl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/iridescence_simple_glsl.jpg -------------------------------------------------------------------------------- /docs/images/iridescence_simple_osl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/iridescence_simple_osl.jpg -------------------------------------------------------------------------------- /docs/images/iridescence_simple_vex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/iridescence_simple_vex.jpg -------------------------------------------------------------------------------- /docs/images/osl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/osl.png -------------------------------------------------------------------------------- /docs/images/qrotation_field_vex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/qrotation_field_vex.jpg -------------------------------------------------------------------------------- /docs/images/transfer_color_vex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/transfer_color_vex.jpg -------------------------------------------------------------------------------- /docs/images/vex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dicgi/shading-lab/12a23f58b0b9dbeddebf5262ca00b9d1bc243406/docs/images/vex.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Index 6 | 7 | 11 | 12 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 45 | 46 | 47 |
48 |
49 |
50 | 53 |
54 |

GLSL

55 |

56 | Experiments and Shaders written in 57 | OpenGL Shading Language. 62 |

63 | Know more 64 |
65 |
66 |
67 | 68 |
69 |
70 | 73 |
74 |

OSL

75 |

76 | Experiments and Shaders written in 77 | Open Shading Language. 82 |

83 | Know more 84 |
85 |
86 |
87 | 88 |
89 |
90 | 93 |
94 |

VEX

95 |

96 | Experiments and Shaders written in 97 | VEX Language. 102 |

103 | Know more 104 |
105 |
106 |
107 |
108 | 109 | 110 | 111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/osl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | OSL 6 | 7 | 11 | 12 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 40 | 41 | 42 |
43 |
44 |
45 |

46 | A collection of shader and experiments using 47 | Open Shading Language. Here you are going to find: 52 |

53 | 54 |
55 | 59 |
60 |

61 | If you want to know more, please consider vising the 62 | repository. 68 |

69 | 70 |
71 | 72 |

1. Constant Shader

73 | 78 |

79 | Constant shaded color and not affected by lighting. It is 80 | probably the most basic shader to produce. 81 |

82 |
83 |
84 | 90 |

Constant Color or Texture

91 |

A simple pure shaded color.

92 | Learn more 98 |
99 |
100 | 101 | 102 |

2. Iridescence Shader

103 | 108 |

109 | A simple iridescence effect inspired by the 110 | Goniochromism phenomenon, which varies its aspect based 111 | on the relationship between the surface normal and the camera 112 | angle. The visual beautification is due the 113 | pseudo noise function, that makes the aspect a little 114 | more appealing. 115 |

116 |
117 |                 
118 |                   float NaiveNoise(vector freq, vector offset) {
119 |                     // Naive noise function to make irregularity
120 |                     return sin(2*M_PI*P[0]*freq[0]*2 + 12 + offset[0]) +
121 |                       cos(2*M_PI*P[2]*freq[0] + 21 + offset[0]) *
122 |                       sin(2*M_PI*P[1]*freq[1]*2 + 23 + offset[1]) +
123 |                       cos(2*M_PI*P[1]*freq[1] + 32 + offset[1]) *
124 |                       sin(2*M_PI*P[2]*freq[2]*2 + 34 + offset[2]) +
125 |                       cos(2*M_PI*P[0]*freq[2] + 43 + offset[2]);
126 |                   }
127 |                   
128 |                   color iridescence(
129 |                     float orient,
130 |                     float noiseMult,
131 |                     vector freqA,
132 |                     vector offsetA,
133 |                     vector freqB,
134 |                     vector offsetB
135 |                   ) {
136 |                     // This function returns a iridescence value based on orientation
137 |                     color irid;
138 |                     irid[0] = abs(cos(
139 |                       2*M_PI*orient*freqA[0] + NaiveNoise(freqB, offsetB)*noiseMult + 1 + offsetA[0]
140 |                     ));
141 |                     irid[1] = abs(cos(
142 |                       2*M_PI*orient*freqA[1] + NaiveNoise(freqB, offsetB)*noiseMult + 2 + offsetA[1]
143 |                     ));
144 |                     irid[2] = abs(cos(
145 |                       2*M_PI*orient*freqA[2] + NaiveNoise(freqB, offsetB)*noiseMult + 3 + offsetA[2]
146 |                     ));
147 | 
148 |                     return irid;
149 |                   }
150 |                 
151 |               
152 |
153 |
154 | 160 |

Iridescence Simple

161 |

A simple iridescent shader.

162 | Learn more 168 |
169 |
170 | 171 |
172 |
173 |
174 |
175 | 176 | 177 | 178 |
179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | -------------------------------------------------------------------------------- /docs/vex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | VEX 6 | 7 | 11 | 12 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 40 | 41 | 42 |
43 |
44 |
45 |

46 | A collection of shader and experiments using 47 | VEX Language. Here you are going to find: 52 |

53 | 54 | 61 |

62 | If you want to know more, please consider vising the 63 | repository. 69 |

70 | 71 |
72 | 73 |

1. Constant Shaders

74 | 79 |

80 | Constant shaded color and not affected by lighting. It is 81 | probably the most basic shader to produce. 82 |

83 |
84 |
85 | 91 |

Constant Color

92 |

A simple pure shaded color.

93 | Learn more 99 |
100 |
101 | 107 |

Constant Texture

108 |

A simple pure shaded color from texture.

109 | Learn more 115 |
116 |
117 | 118 | 119 |

2. Iridescence Shader

120 | 125 |

126 | A simple iridescence effect inspired by the 127 | Goniochromism phenomenon, which varies its aspect based 128 | on the relationship between the surface normal and the camera 129 | angle. The visual beautification is due the 130 | pseudo noise function, that makes the aspect a little 131 | more appealing. 132 |

133 |
134 |                 
135 |                   float NaiveNoise(vector freq, offset) {
136 |                     // Naive noise function to make irregularity
137 |                     return sin(2*PI*P.x*freq.x*2 + 12 + offset.x) +
138 |                       cos(2*PI*P.z*freq.x + 21 + offset.x) *
139 |                       sin(2*PI*P.y*freq.y*2 + 23 + offset.y) +
140 |                       cos(2*PI*P.y*freq.y + 32 + offset.y) *
141 |                       sin(2*PI*P.z*freq.z*2 + 34 + offset.z) +
142 |                       cos(2*PI*P.x*freq.z + 43 + offset.z);
143 |                   }
144 |                 
145 |                 vector iridescence(
146 |                   float orient,
147 |                     noiseMult;
148 |                   vector freqA,
149 |                     offsetA,
150 |                     freqB,
151 |                     offsetB
152 |                 ) {
153 |                   // This function returns a iridescence value based on orientation
154 |                   vector irid;
155 |                   irid.x = abs(cos(
156 |                     2*PI*orient*freqA.x + NaiveNoise(freqB, offsetB)*noiseMult + 1 + offsetA.x
157 |                   ));
158 |                   irid.y = abs(cos(
159 |                     2*PI*orient*freqA.y + NaiveNoise(freqB, offsetB)*noiseMult + 2 + offsetA.y
160 |                   ));
161 |                   irid.z = abs(cos(
162 |                     2*PI*orient*freqA.z + NaiveNoise(freqB, offsetB)*noiseMult + 3 + offsetA.z
163 |                   ));
164 | 
165 |                   return irid;
166 |                 }
167 |                 
168 |               
169 |
170 |
171 | 177 |

Iridescence Simple

178 |

A simple iridescent shader.

179 | Learn more 185 |
186 |
187 | 188 | 189 |

3. Reading Data Points

190 | 195 |

196 | Reading data points and attributes from .bgeo files 197 | and bringing into shaders for whichever purpose. The main 198 | function which brings the point data into the shader context is 199 | expandpointgroup, given a filepath and a 200 | group name. The result is an array of 201 | point IDs so we can iterate through it. 202 |

203 |
204 |                 
205 |                   string DATA = "../path/to/file.bgeo";
206 |                   string group = "group_name";
207 |                   int p[] = expandpointgroup(DATA, group);
208 |                 
209 |               
210 |
211 |
212 | 218 |

QRotation Field

219 |

220 | A quaternion rotation field, using data points as centroids 221 | and respective normals as axes. 222 |

223 | Learn more 229 |
230 |
231 | 237 |

Cristalize Normals

238 |

239 | Transfer normals from the data points to the shader context, 240 | using voronoi distribution. 241 |

242 | Learn more 248 |
249 |
250 | 256 |

Transfer Color

257 |

258 | Transfer color radially from the data points to the shader 259 | context. 260 |

261 | Learn more 267 |
268 |
269 | 270 |
271 |
272 |
273 |
274 | 275 | 276 | 277 |
278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | --------------------------------------------------------------------------------