From 35079758502d06637cb9c26f4c0908efa4ffa69c Mon Sep 17 00:00:00 2001
From: Hsterts <62886439+Hsterts@users.noreply.github.com>
Date: Sat, 12 Nov 2022 04:24:39 +0800
Subject: [PATCH] more formatting previews
---
assets/js/fumen-canvas.js | 9 ++++-----
assets/styles/custom.scss | 5 +++++
assets/styles/darkmode.scss | 4 ++--
layouts/partials/darkmode.html | 4 ++--
layouts/partials/header.html | 2 +-
5 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/assets/js/fumen-canvas.js b/assets/js/fumen-canvas.js
index f7f1331d22331..00b1b4692727e 100644
--- a/assets/js/fumen-canvas.js
+++ b/assets/js/fumen-canvas.js
@@ -12,9 +12,6 @@ var colors = {
Empty: { normal: '#f3f3ed' },
};
-gridToggle = false;
-transparency_four = true;
-
function draw(fumenPage, numrows, numcols, cellSize, gridToggle, gridColor, transparency_four, background) {
var field = fumenPage.field;
var operation = fumenPage.operation;
@@ -49,6 +46,8 @@ function draw(fumenPage, numrows, numcols, cellSize, gridToggle, gridColor, tran
if (!transparency_four) {
context.fillStyle = background;
+ } else {
+ context.fillStyle = '#00000000';
}
context.fillRect(0, 0, width, height);
@@ -134,8 +133,8 @@ function fumencanvas(container) {
if(container.getAttribute('height') != null) {var height = container.getAttribute('height')} else {var height = 5};
if(container.getAttribute('width') != null) {var width = container.getAttribute('width')} else {var width = 10};
if(container.getAttribute('size') != null) {var cellSize = container.getAttribute('size')} else {var cellSize = 22};
- if(container.getAttribute('grid') != null) {var gridColor = container.getAttribute('grid'); gridToggle = true} else {gridToggle = false};
- if(container.getAttribute('background') != null) {var background = container.getAttribute('background'); transparency_four = false} else {transparency_four = true};
+ if(container.getAttribute('grid') != null) {var gridColor = container.getAttribute('grid'); var gridToggle = true} else {var gridToggle = false};
+ if(container.getAttribute('background') != null) {var background = container.getAttribute('background'); var transparency_four = false} else {var transparency_four = true};
container.innerHTML = '';
var fumenCodes = [];
diff --git a/assets/styles/custom.scss b/assets/styles/custom.scss
index adf3f0ba5943c..27d4b4134162e 100644
--- a/assets/styles/custom.scss
+++ b/assets/styles/custom.scss
@@ -94,4 +94,9 @@ img.imageOutput {
font-family: Karla, Arial;
font-size: 20px;
font-weight: 600;
+}
+
+#header-options{
+ display: flex;
+ flex-direction: row;
}
\ No newline at end of file
diff --git a/assets/styles/darkmode.scss b/assets/styles/darkmode.scss
index d959694af0e1f..4a6b1e4d040ac 100644
--- a/assets/styles/darkmode.scss
+++ b/assets/styles/darkmode.scss
@@ -45,7 +45,7 @@
.spinmode {
float: right;
- padding: 1em;
+ padding: 0 1em 0 1em;
min-width: 30px;
position: relative;
@@ -58,7 +58,7 @@
box-sizing: border-box;
}
- & svg {
+ & span {
opacity: 0;
position: absolute;
width: 20px;
diff --git a/layouts/partials/darkmode.html b/layouts/partials/darkmode.html
index 8eeec1b6d6b57..d8871eb6fdbda 100644
--- a/layouts/partials/darkmode.html
+++ b/layouts/partials/darkmode.html
@@ -18,10 +18,10 @@
\ No newline at end of file
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index c46d1f6203fe3..e55e9575190c8 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,7 +1,7 @@
{{ $config := cond (eq $.Site.Language.Lang "en") "config" (printf "config.%s" $.Site.Language.Lang) }}
-
+