Browse Source

updates

master
Tuan 8 months ago
parent
commit
3e109bafd1
  1. 15
      app/javascript/skins/glitch/metulayf/fix.scss
  2. 2
      app/views/layouts/application.html.haml
  3. 56
      public/snow.js

15
app/javascript/skins/glitch/metulayf/fix.scss

@ -219,7 +219,7 @@ button.column-header__button {
background: #0c0c0c !important;
}
.composer--options--dropdown--content--item {
background: #080808 !important;
background: #080808;
color: #edfcf5 !important;
}
.react-toggle-track {
@ -231,6 +231,9 @@ button.column-header__button {
.composer--options--dropdown--content--item:hover span:first-child {
color: #edfcf5 !important;
}
.actions-modal ul li:not(:empty) a {
color: #edfcf5 !important;
}
.composer--spoiler input {
color: #edfcf5 !important;
background: #080808 !important;
@ -289,6 +292,9 @@ confirmation-modal__do_not_ask_again {
margin-right: 5px !important;
}
.compose-form__poll-wrapper .icon-button.disabled {
color: #3a3a3a !important;
}
.compose-form__poll-wrapper .icon-button {
color: #a8171799 !important;
}
.compose-form__poll-wrapper {
@ -523,3 +529,10 @@ button.column-header__button.active:hover {
.autosuggest-textarea__suggestions__item>.account.small .display-name>span {
color: #909090 !important;
}
.composer--options--dropdown--content--item.active, .composer--options--dropdown--content--item:hover {
background: #a81717 !important;
color: #edfcf5 !important;
}
.react-toggle--checked .react-toggle-track {
background-color: #a81717 !important;
}

2
app/views/layouts/application.html.haml

@ -46,8 +46,6 @@
= stylesheet_link_tag custom_css_path, host: request.host, media: 'all'
%body{ class: body_classes }
<canvas id="snow"></canvas>
<script src="/snow.js"></script>
= content_for?(:content) ? yield(:content) : yield
.logo-resources

56
public/snow.js

@ -1,56 +0,0 @@
(function(){
var canvas = document.getElementById("snow");
var ctx = canvas.getContext("2d");
var flakeArray = [];
canvas.style.pointerEvents = "none";
canvas.style.position = "fixed";
canvas.style.top = 0;
canvas.style.left = 0;
canvas.style.width = "100vw";
canvas.style.height = "100vh";
canvas.style.zIndex = 1;
canvas.style.userSelect = "none";
function canvasResize(){
canvas.height = canvas.offsetHeight;
canvas.width = canvas.offsetWidth;
}
canvasResize();
window.onresize = function() {
canvasResize();
};
var MyMath = Math;
setInterval(function() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.beginPath();
var random = MyMath.random();
var distance = .05 + .95 * random;
flake = {};
flake.x = 1.5 * canvas.width * MyMath.random() - .5 * canvas.width;
flake.y = -9;
flake.velX = 2 * distance * (MyMath.random() / 2 + .5);
flake.velY = (4 + 2 * MyMath.random()) * distance;
flake.radius = MyMath.pow(5 * random, 2) / 5;
flake.update = function() {
var t = this;
t.x += t.velX;
t.y += t.velY;
ctx.beginPath();
ctx.arc(t.x, t.y, t.radius, 0, 2 * MyMath.PI, !1);
ctx.fillStyle = "#FFF";
ctx.fill()
};
flakeArray.push(flake);
for (b = 0; b < flakeArray.length; b++) {
flakeArray[b].y > canvas.height ? flakeArray.splice(b, 1) : flakeArray[b].update()
}
}, 16);
})();
Loading…
Cancel
Save