Use graphs-base and congrats-base
This commit is contained in:
parent
fee6ee7319
commit
8f0f8f9af8
@ -32,7 +32,6 @@ filegroup(
|
||||
"core.css",
|
||||
"css_local",
|
||||
"editor",
|
||||
"//qt/aqt/data/web/css/vendor",
|
||||
],
|
||||
visibility = ["//qt:__subpackages__"],
|
||||
)
|
||||
|
17
qt/aqt/data/web/css/vendor/BUILD.bazel
vendored
17
qt/aqt/data/web/css/vendor/BUILD.bazel
vendored
@ -1,17 +0,0 @@
|
||||
load("//ts:vendor.bzl", "copy_bootstrap_css")
|
||||
|
||||
copy_bootstrap_css(name = "bootstrap")
|
||||
|
||||
files = [
|
||||
"bootstrap",
|
||||
]
|
||||
|
||||
directories = []
|
||||
|
||||
filegroup(
|
||||
name = "vendor",
|
||||
srcs = glob(["*.css"]) +
|
||||
["//qt/aqt/data/web/css/vendor:{}".format(file) for file in files] +
|
||||
["//qt/aqt/data/web/css/vendor/{}".format(dir) for dir in directories],
|
||||
visibility = ["//qt:__subpackages__"],
|
||||
)
|
@ -3,6 +3,7 @@ load("//ts:copy.bzl", "copy_files_into_group")
|
||||
copy_files_into_group(
|
||||
name = "graphs_page",
|
||||
srcs = [
|
||||
"graphs-base.css",
|
||||
"graphs.css",
|
||||
"graphs.html",
|
||||
"graphs.js",
|
||||
@ -13,6 +14,7 @@ copy_files_into_group(
|
||||
copy_files_into_group(
|
||||
name = "congrats_page",
|
||||
srcs = [
|
||||
"congrats-base.css",
|
||||
"congrats.css",
|
||||
"congrats.html",
|
||||
"congrats.js",
|
||||
|
@ -3,12 +3,20 @@ load("//ts:prettier.bzl", "prettier_test")
|
||||
load("//ts:eslint.bzl", "eslint_test")
|
||||
load("//ts/svelte:svelte.bzl", "svelte", "svelte_check")
|
||||
load("//ts:esbuild.bzl", "esbuild")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
|
||||
sass_binary(
|
||||
name = "base_css",
|
||||
src = "congrats-base.scss",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
svelte(
|
||||
name = "CongratsPage",
|
||||
entry_point = "CongratsPage.svelte",
|
||||
)
|
||||
|
||||
|
||||
ts_library(
|
||||
name = "index",
|
||||
srcs = ["index.ts"],
|
||||
@ -16,6 +24,7 @@ ts_library(
|
||||
"CongratsPage",
|
||||
"lib",
|
||||
"//ts/lib",
|
||||
"@npm//svelte",
|
||||
"@npm//svelte2tsx",
|
||||
],
|
||||
)
|
||||
@ -47,11 +56,11 @@ esbuild(
|
||||
output_css = True,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"CongratsPage",
|
||||
"index",
|
||||
"//ts/lib",
|
||||
"//ts/lib:backend_proto",
|
||||
"//ts/sass:core_css",
|
||||
"CongratsPage",
|
||||
":index",
|
||||
":base_css",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -3,8 +3,6 @@ Copyright: Ankitects Pty Ltd and contributors
|
||||
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
-->
|
||||
<script lang="ts">
|
||||
import "../sass/core.css";
|
||||
|
||||
import type pb from "anki/backend_proto";
|
||||
import { buildNextLearnMsg } from "./lib";
|
||||
import { bridgeLink } from "anki/bridgecommand";
|
||||
|
6
ts/congrats/congrats-base.scss
Normal file
6
ts/congrats/congrats-base.scss
Normal file
@ -0,0 +1,6 @@
|
||||
@use 'ts/sass/core';
|
||||
@use 'ts/sass/scrollbar';
|
||||
|
||||
.night-mode {
|
||||
@include scrollbar.night-mode;
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" id="viewport" content="width=device-width" />
|
||||
<link href="congrats-base.css" rel="stylesheet" />
|
||||
<link href="congrats.css" rel="stylesheet" />
|
||||
<script src="../js/vendor/protobuf.min.js"></script>
|
||||
<script src="congrats.js"></script>
|
||||
|
@ -3,6 +3,13 @@ load("//ts/svelte:svelte.bzl", "compile_svelte", "svelte_check")
|
||||
load("//ts:prettier.bzl", "prettier_test")
|
||||
load("//ts:eslint.bzl", "eslint_test")
|
||||
load("//ts:esbuild.bzl", "esbuild")
|
||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||
|
||||
sass_binary(
|
||||
name = "base_css",
|
||||
src = "graphs-base.scss",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
svelte_files = glob(["*.svelte"])
|
||||
|
||||
@ -67,7 +74,7 @@ esbuild(
|
||||
"//ts/lib",
|
||||
"//ts/lib:backend_proto",
|
||||
":index",
|
||||
"//ts/sass:core_css",
|
||||
":base_css",
|
||||
] + svelte_names,
|
||||
)
|
||||
|
||||
|
@ -3,8 +3,6 @@ Copyright: Ankitects Pty Ltd and contributors
|
||||
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
-->
|
||||
<script lang="typescript">
|
||||
import "../sass/core.css";
|
||||
|
||||
import type { SvelteComponent } from "svelte/internal";
|
||||
import { writable } from "svelte/store";
|
||||
|
||||
|
6
ts/graphs/graphs-base.scss
Normal file
6
ts/graphs/graphs-base.scss
Normal file
@ -0,0 +1,6 @@
|
||||
@use 'ts/sass/base';
|
||||
@use 'ts/sass/scrollbar';
|
||||
|
||||
.night-mode {
|
||||
@include scrollbar.night-mode;
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" id="viewport" content="width=device-width" />
|
||||
<link href="graphs-base.css" rel="stylesheet" />
|
||||
<link href="graphs.css" rel="stylesheet" />
|
||||
<script src="../js/vendor/protobuf.min.js"></script>
|
||||
<script src="graphs.js"></script>
|
||||
|
@ -7,8 +7,8 @@ $font-weight-base: 500;
|
||||
$link-hover-color: var(--link);
|
||||
$link-hover-decoration: none;
|
||||
|
||||
@import 'ts/node_modules/bootstrap/scss/bootstrap-reboot';
|
||||
@import 'ts/node_modules/bootstrap/scss/bootstrap-utilities';
|
||||
@import "ts/node_modules/bootstrap/scss/bootstrap-reboot";
|
||||
@import "ts/node_modules/bootstrap/scss/bootstrap-utilities";
|
||||
|
||||
body {
|
||||
overscroll-behavior: none;
|
||||
|
Loading…
Reference in New Issue
Block a user