117 lines
2.7 KiB
SCSS
117 lines
2.7 KiB
SCSS
/// Removes a specific item from a list.
|
|
/// @author Hugo Giraudel
|
|
/// @param {list} $list List.
|
|
/// @param {integer} $index Index.
|
|
/// @return {list} Updated list.
|
|
@function remove-nth($list, $index) {
|
|
|
|
$result: null;
|
|
|
|
@if type-of($index) != number {
|
|
@warn "$index: #{quote($index)} is not a number for `remove-nth`.";
|
|
}
|
|
@else if $index == 0 {
|
|
@warn "List index 0 must be a non-zero integer for `remove-nth`.";
|
|
}
|
|
@else if abs($index) > length($list) {
|
|
@warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.";
|
|
}
|
|
@else {
|
|
|
|
$result: ();
|
|
$index: if($index < 0, length($list) + $index + 1, $index);
|
|
|
|
@for $i from 1 through length($list) {
|
|
|
|
@if $i != $index {
|
|
$result: append($result, nth($list, $i));
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@return $result;
|
|
|
|
}
|
|
|
|
/// Gets a value from a map.
|
|
/// @author Hugo Giraudel
|
|
/// @param {map} $map Map.
|
|
/// @param {string} $keys Key(s).
|
|
/// @return {string} Value.
|
|
@function val($map, $keys...) {
|
|
|
|
@if nth($keys, 1) == null {
|
|
$keys: remove-nth($keys, 1);
|
|
}
|
|
|
|
@each $key in $keys {
|
|
$map: map-get($map, $key);
|
|
}
|
|
|
|
@return $map;
|
|
|
|
}
|
|
|
|
/// Gets a font value.
|
|
/// @param {string} $keys Key(s).
|
|
/// @return {string} Value.
|
|
@function _font($keys...) {
|
|
@return val($font, $keys...);
|
|
}
|
|
|
|
// /// Gets a palette value.
|
|
// /// @param {string} $keys Key(s).
|
|
// /// @return {string} Value.
|
|
// @function _palette($keys...) {
|
|
// @return val($palette, $keys...);
|
|
// }
|
|
|
|
|
|
|
|
@font-face {
|
|
font-family: 'Terminus';
|
|
font-style: normal;
|
|
font-weight: 400;
|
|
src: local('Terminus Regular'), local('Terminus-Regular'), url(/assets/fonts/terminus/TerminusTTF.ttf) format('truetype');
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Terminus';
|
|
font-style: normal;
|
|
font-weight: 700;
|
|
src: local('Terminus Bold'), local('Terminus-Vold'), url(/assets/fonts/terminus/TerminusTTF-Bold.ttf) format('truetype');
|
|
}
|
|
|
|
$font: (
|
|
title: ('Terminus', 'Lucida Console', Monaco, monospace),
|
|
family: ('Terminus', 'Poppins', 'Arial', 'Helvetica', sans-serif),
|
|
family-fixed: ('Terminus', 'Lucida Console', Monaco, monospace),
|
|
weight: 400,
|
|
weight-bold: 700,
|
|
kerning: 0em,
|
|
kerning-alt: 0.125em
|
|
);
|
|
:root {
|
|
--border-radius: 3px;
|
|
--max-width: 1000px;
|
|
--anim-speed: 200ms;
|
|
|
|
}
|
|
|
|
// // Palette.
|
|
// $palette: (
|
|
|
|
// bg: #0C0F0A,
|
|
// bg-alt: rgba(12, 15, 10, 0.5),
|
|
// fg: #FFFFFF,
|
|
// fg-alt: rgba(255, 255, 255, 0.5),
|
|
// border: #000000,
|
|
// border-alt: rgba(0, 0, 0, 0.75),
|
|
// accent1: #41EAD4,
|
|
// accent1-alt:rgba(65, 234, 212, 0.75),
|
|
// accent2: #FF206E,
|
|
// accent2-alt:rgba(255, 32, 110, 0.75),
|
|
|
|
// ); |