diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2023-01-01 20:13:03 +0100 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2023-01-01 20:13:03 +0100 |
| commit | 0e3f1021cc14e2616086e69019de1cc67ba55dc1 (patch) | |
| tree | f811380216abfc9ea5fcd9910301be6661f569df | |
| parent | 4c6fe8691bbce3ccf253ed6ff464866bbb4465a9 (diff) | |
frontend - add documentationv0.4.6
| -rw-r--r-- | README.rst | 2 | ||||
| -rw-r--r-- | VERSION | 2 | ||||
| -rw-r--r-- | docs/index.rst | 1 | ||||
| -rw-r--r-- | src_doit/__init__.py | 7 | ||||
| -rw-r--r-- | src_doit/c.py | 4 | ||||
| -rw-r--r-- | src_js/vt/params.ts | 13 | ||||
| -rw-r--r-- | src_scss/main.scss | 14 |
7 files changed, 31 insertions, 12 deletions
@@ -170,7 +170,7 @@ License opcut - cutting stock problem optimizer -Copyright (C) 2017-2022 Bozo Kopic +Copyright (C) 2017-2023 Bozo Kopic This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1 +1 @@ -0.4.5 +0.4.6 diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..72a3355 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1 @@ +.. include:: ../README.rst diff --git a/src_doit/__init__.py b/src_doit/__init__.py index 1120e13..12759b7 100644 --- a/src_doit/__init__.py +++ b/src_doit/__init__.py @@ -4,6 +4,7 @@ import tempfile from hat import json from hat.doit import common +from hat.doit.docs import build_sphinx from hat.doit.js import (ESLintConf, run_eslint) from hat.doit.py import (build_wheel, @@ -40,6 +41,7 @@ node_modules_dir = Path('node_modules') build_py_dir = build_dir / 'py' ui_dir = src_py_dir / 'opcut/ui' +ui_docs_dir = ui_dir / 'docs' json_schema_repo_path = src_py_dir / 'opcut/json_schema_repo.json' @@ -95,6 +97,11 @@ def task_ui(): common.rm_rf(ui_dir) common.cp_r(src_static_dir, ui_dir) common.cp_r(schemas_dir, ui_dir) + + build_sphinx(src_dir=docs_dir, + dst_dir=ui_docs_dir, + project='opcut') + with tempfile.TemporaryDirectory() as tmpdir: tmpdir = Path(tmpdir) config_path = tmpdir / 'webpack.config.js' diff --git a/src_doit/c.py b/src_doit/c.py index d365826..ecbd498 100644 --- a/src_doit/c.py +++ b/src_doit/c.py @@ -1,4 +1,5 @@ from pathlib import Path +import os from hat.doit import common from hat.doit.c import (get_lib_suffix, @@ -19,7 +20,8 @@ build_c_dir = build_dir / 'c' platforms = [common.local_platform] if common.local_platform == common.Platform.LINUX_GNU_X86_64: - platforms.append(common.Platform.WINDOWS_AMD64) + if 'SKIP_CROSS_COMPILE' not in os.environ: + platforms.append(common.Platform.WINDOWS_AMD64) cc_flags = ['-fPIC', '-O2'] # cc_flags = ['-fPIC', '-O0', '-ggdb'] diff --git a/src_js/vt/params.ts b/src_js/vt/params.ts index 3ac8848..99abd34 100644 --- a/src_js/vt/params.ts +++ b/src_js/vt/params.ts @@ -10,12 +10,21 @@ export function main(): u.VNodeChild[] { return [ ['div.header', ['span.title', 'OPCUT'], - ['a.github', { + ['a.icon', { props: { title: 'GitHub', - href: 'https://github.com/bozokopic/opcut' + href: 'https://github.com/bozokopic/opcut', + target: '_blank' }}, ['span.fa.fa-github'] + ], + ['a.icon', { + props: { + title: 'Documentation', + href: 'docs/index.html', + target: '_blank' + }}, + ['span.fa.fa-question-circle'] ] ], ['div.form', diff --git a/src_scss/main.scss b/src_scss/main.scss index ece52ed..6b18c6e 100644 --- a/src_scss/main.scss +++ b/src_scss/main.scss @@ -8,7 +8,6 @@ html, body, button, input, select { font-family: 'Inter'; - font-size: 12pt; } html, body { @@ -50,17 +49,18 @@ body { & > .title { flex-grow: 1; - font-size: 18pt; + font-size: 1.4rem; font-weight: 500; - color: $color-grey-800; + color: $color-grey-700; } - & > .github { - font-size: 24pt; - color: $color-grey-800; + & > .icon { + font-size: 1.5rem; + color: $color-grey-700; + margin-left: 0.5rem; &:visited { - color: $color-grey-800; + color: $color-grey-700; } &:hover { |
