Skip to content

Commit

Permalink
Integrate with Bootstrap (#27)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Nov 13, 2024
1 parent cc789bb commit ce35e33
Show file tree
Hide file tree
Showing 104 changed files with 12,644 additions and 2 deletions.
2 changes: 2 additions & 0 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ noa https://github.com/sourcemeta/noa caad2e1ceedf9fd1a18686a6a6d1e2b9757ead75
jsontoolkit https://github.com/sourcemeta/jsontoolkit c6d056cc608bf98705ad7700c8c891e1cf6865a0
blaze https://github.com/sourcemeta/blaze 970e8aef78f0140551dde12e0784b30595580f49
hydra https://github.com/sourcemeta/hydra 295508f6d264c250a748ec7f80713de3b0897c11
bootstrap https://github.com/twbs/bootstrap v5.3.3
bootstrap-icons https://github.com/twbs/icons v1.11.3
4 changes: 3 additions & 1 deletion Dockerfile.ee
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM debian:bookworm AS builder
RUN apt-get --yes update && apt-get install --yes --no-install-recommends \
build-essential cmake && apt-get clean && rm -rf /var/lib/apt/lists/*
build-essential cmake sassc && apt-get clean && rm -rf /var/lib/apt/lists/*

COPY cmake /source/cmake
COPY src /source/src
Expand Down Expand Up @@ -31,3 +31,5 @@ COPY --from=builder /usr/bin/sourcemeta-registry-index \
/usr/bin/sourcemeta-registry-index
COPY --from=builder /usr/bin/sourcemeta-registry-server \
/usr/bin/sourcemeta-registry-server
COPY --from=builder /usr/share/sourcemeta/registry \
/usr/share/sourcemeta/registry
95 changes: 95 additions & 0 deletions cmake/BootstrapFiles.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
set(BOOTSTRAP_SCSS_DIR "${PROJECT_SOURCE_DIR}/vendor/bootstrap/scss")

set(BOOTSTRAP_SCSS_FILES
"${BOOTSTRAP_SCSS_DIR}/_functions.scss"
"${BOOTSTRAP_SCSS_DIR}/_containers.scss"
"${BOOTSTRAP_SCSS_DIR}/_toasts.scss"
"${BOOTSTRAP_SCSS_DIR}/_navbar.scss"
"${BOOTSTRAP_SCSS_DIR}/_variables.scss"
"${BOOTSTRAP_SCSS_DIR}/_progress.scss"
"${BOOTSTRAP_SCSS_DIR}/_offcanvas.scss"
"${BOOTSTRAP_SCSS_DIR}/_popover.scss"
"${BOOTSTRAP_SCSS_DIR}/forms/_floating-labels.scss"
"${BOOTSTRAP_SCSS_DIR}/forms/_input-group.scss"
"${BOOTSTRAP_SCSS_DIR}/forms/_form-check.scss"
"${BOOTSTRAP_SCSS_DIR}/forms/_form-text.scss"
"${BOOTSTRAP_SCSS_DIR}/forms/_form-range.scss"
"${BOOTSTRAP_SCSS_DIR}/forms/_form-select.scss"
"${BOOTSTRAP_SCSS_DIR}/forms/_form-control.scss"
"${BOOTSTRAP_SCSS_DIR}/forms/_validation.scss"
"${BOOTSTRAP_SCSS_DIR}/forms/_labels.scss"
"${BOOTSTRAP_SCSS_DIR}/_breadcrumb.scss"
"${BOOTSTRAP_SCSS_DIR}/_carousel.scss"
"${BOOTSTRAP_SCSS_DIR}/bootstrap.scss"
"${BOOTSTRAP_SCSS_DIR}/_badge.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_reset-text.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_table-variants.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_image.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_deprecate.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_lists.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_gradients.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_text-truncate.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_visually-hidden.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_container.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_utilities.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_breakpoints.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_box-shadow.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_forms.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_color-mode.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_buttons.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_transition.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_caret.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_resize.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_color-scheme.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_list-group.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_pagination.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_clearfix.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_grid.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_banner.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_alert.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_backdrop.scss"
"${BOOTSTRAP_SCSS_DIR}/mixins/_border-radius.scss"
"${BOOTSTRAP_SCSS_DIR}/_helpers.scss"
"${BOOTSTRAP_SCSS_DIR}/_placeholders.scss"
"${BOOTSTRAP_SCSS_DIR}/_accordion.scss"
"${BOOTSTRAP_SCSS_DIR}/_button-group.scss"
"${BOOTSTRAP_SCSS_DIR}/_reboot.scss"
"${BOOTSTRAP_SCSS_DIR}/_utilities.scss"
"${BOOTSTRAP_SCSS_DIR}/_forms.scss"
"${BOOTSTRAP_SCSS_DIR}/_buttons.scss"
"${BOOTSTRAP_SCSS_DIR}/_tables.scss"
"${BOOTSTRAP_SCSS_DIR}/utilities/_api.scss"
"${BOOTSTRAP_SCSS_DIR}/_images.scss"
"${BOOTSTRAP_SCSS_DIR}/_close.scss"
"${BOOTSTRAP_SCSS_DIR}/_list-group.scss"
"${BOOTSTRAP_SCSS_DIR}/bootstrap-grid.scss"
"${BOOTSTRAP_SCSS_DIR}/_pagination.scss"
"${BOOTSTRAP_SCSS_DIR}/_card.scss"
"${BOOTSTRAP_SCSS_DIR}/_grid.scss"
"${BOOTSTRAP_SCSS_DIR}/_mixins.scss"
"${BOOTSTRAP_SCSS_DIR}/_nav.scss"
"${BOOTSTRAP_SCSS_DIR}/_alert.scss"
"${BOOTSTRAP_SCSS_DIR}/_transitions.scss"
"${BOOTSTRAP_SCSS_DIR}/_tooltip.scss"
"${BOOTSTRAP_SCSS_DIR}/_root.scss"
"${BOOTSTRAP_SCSS_DIR}/_variables-dark.scss"
"${BOOTSTRAP_SCSS_DIR}/bootstrap-utilities.scss"
"${BOOTSTRAP_SCSS_DIR}/_modal.scss"
"${BOOTSTRAP_SCSS_DIR}/_spinners.scss"
"${BOOTSTRAP_SCSS_DIR}/helpers/_ratio.scss"
"${BOOTSTRAP_SCSS_DIR}/helpers/_focus-ring.scss"
"${BOOTSTRAP_SCSS_DIR}/helpers/_vr.scss"
"${BOOTSTRAP_SCSS_DIR}/helpers/_visually-hidden.scss"
"${BOOTSTRAP_SCSS_DIR}/helpers/_color-bg.scss"
"${BOOTSTRAP_SCSS_DIR}/helpers/_clearfix.scss"
"${BOOTSTRAP_SCSS_DIR}/helpers/_icon-link.scss"
"${BOOTSTRAP_SCSS_DIR}/helpers/_text-truncation.scss"
"${BOOTSTRAP_SCSS_DIR}/helpers/_stacks.scss"
"${BOOTSTRAP_SCSS_DIR}/helpers/_position.scss"
"${BOOTSTRAP_SCSS_DIR}/helpers/_stretched-link.scss"
"${BOOTSTRAP_SCSS_DIR}/helpers/_colored-links.scss"
"${BOOTSTRAP_SCSS_DIR}/_type.scss"
"${BOOTSTRAP_SCSS_DIR}/_dropdown.scss"
"${BOOTSTRAP_SCSS_DIR}/_maps.scss"
"${BOOTSTRAP_SCSS_DIR}/vendor/_rfs.scss"
"${BOOTSTRAP_SCSS_DIR}/bootstrap-reboot.scss")
22 changes: 21 additions & 1 deletion src/enterprise/server.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,25 @@ target_compile_definitions(schema_registry_server PRIVATE SOURCEMETA_REGISTRY_EN
cmake_path(GET CMAKE_CURRENT_LIST_FILE PARENT_PATH ENTERPRISE_SOURCE_DIR)
target_sources(schema_registry_server PRIVATE
"${ENTERPRISE_SOURCE_DIR}/enterprise_server.h"
"${ENTERPRISE_SOURCE_DIR}/enterprise_explorer.h")
"${ENTERPRISE_SOURCE_DIR}/enterprise_explorer.h"
"${CMAKE_CURRENT_BINARY_DIR}/style.min.css")
target_include_directories(schema_registry_server PRIVATE "${ENTERPRISE_SOURCE_DIR}")

include(BootstrapFiles)
find_program(SASSC_BIN NAMES sassc REQUIRED)
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/style.min.css"
COMMAND "${SASSC_BIN}" --style compressed
"${ENTERPRISE_SOURCE_DIR}/style.scss"
"${CMAKE_CURRENT_BINARY_DIR}/style.min.css"
DEPENDS
"${ENTERPRISE_SOURCE_DIR}/style.scss"
"${PROJECT_SOURCE_DIR}/vendor/bootstrap-icons/font/bootstrap-icons.scss"
${BOOTSTRAP_SCSS_FILES})

include(GNUInstallDirs)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/style.min.css"
"${PROJECT_SOURCE_DIR}/vendor/bootstrap-icons/font/fonts/bootstrap-icons.woff"
"${PROJECT_SOURCE_DIR}/vendor/bootstrap-icons/font/fonts/bootstrap-icons.woff2"
DESTINATION "${CMAKE_INSTALL_DATADIR}/sourcemeta/registry"
COMPONENT sourcemeta_registry)
48 changes: 48 additions & 0 deletions src/enterprise/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@import "../../vendor/bootstrap/scss/functions";

@import "../../vendor/bootstrap/scss/variables";
@import "../../vendor/bootstrap/scss/variables-dark";
@import "../../vendor/bootstrap/scss/maps";
@import "../../vendor/bootstrap/scss/mixins";
@import "../../vendor/bootstrap/scss/utilities";

@import "../../vendor/bootstrap/scss/root";
@import "../../vendor/bootstrap/scss/reboot";
@import "../../vendor/bootstrap/scss/type";
@import "../../vendor/bootstrap/scss/images";
@import "../../vendor/bootstrap/scss/containers";
@import "../../vendor/bootstrap/scss/grid";

@import "../../vendor/bootstrap/scss/tables";
@import "../../vendor/bootstrap/scss/forms";
@import "../../vendor/bootstrap/scss/buttons";
@import "../../vendor/bootstrap/scss/transitions";
@import "../../vendor/bootstrap/scss/dropdown";
@import "../../vendor/bootstrap/scss/button-group";
@import "../../vendor/bootstrap/scss/nav";
@import "../../vendor/bootstrap/scss/navbar";
@import "../../vendor/bootstrap/scss/card";
@import "../../vendor/bootstrap/scss/accordion";
@import "../../vendor/bootstrap/scss/breadcrumb";
@import "../../vendor/bootstrap/scss/pagination";
@import "../../vendor/bootstrap/scss/badge";
@import "../../vendor/bootstrap/scss/alert";
@import "../../vendor/bootstrap/scss/progress";
@import "../../vendor/bootstrap/scss/list-group";
@import "../../vendor/bootstrap/scss/close";
@import "../../vendor/bootstrap/scss/toasts";
@import "../../vendor/bootstrap/scss/modal";
@import "../../vendor/bootstrap/scss/tooltip";
@import "../../vendor/bootstrap/scss/popover";
@import "../../vendor/bootstrap/scss/carousel";
@import "../../vendor/bootstrap/scss/spinners";
@import "../../vendor/bootstrap/scss/offcanvas";
@import "../../vendor/bootstrap/scss/placeholders";

@import "../../vendor/bootstrap/scss/helpers";
@import "../../vendor/bootstrap/scss/utilities/api";

// Bootstrap Icons
$bootstrap-icons-font: bootstrap-icons;
$bootstrap-icons-font-dir: "";
@import "../../vendor/bootstrap-icons/font/bootstrap-icons.scss";
26 changes: 26 additions & 0 deletions vendor/bootstrap-icons.mask

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions vendor/bootstrap-icons/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ce35e33

Please sign in to comment.