Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update tag display system #80

2 changes: 1 addition & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ assets_version = "2.1.0" # DO NOT EDIT: Managed by `mdbook-catppuccin install`

[output.html]
additional-css = ["./theme/catppuccin.css", "./theme/catppuccin-admonish.css", "./mdbook-admonish.css", "./theme/custom.css"]
additional-js = ["./theme/tagsindex.json", "./theme/tagscolors.json"]
additional-js = ["./theme/tagsindex.json", "./theme/tagscolors.json", "./theme/main.js"]
template-path = "theme"
copy-images = true
default-theme = "navy"
Expand Down
105 changes: 105 additions & 0 deletions theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,109 @@
.sidebar-logo img {
max-width: 80%;
height: auto;
}

.left-buttons {
position: relative;
}

#sidebar .sidebar-scrollbox {
overflow-y: scroll;
/* Force Show scrollbars */
}

/* Colored Tag Span. Displayed at the top of tagged pages */
.colored-tag {
background-color: var(--tag-color);
margin: 0 5px 10px 0;
padding: 5px 10px;
border-radius: 20px;
display: inline-flex;
align-items: center;
justify-content: center;
color: white;
}

.colored-tag i {
margin-right: 5px;
}

/* Tag Search Styles */
.tags-dropdown {
position: absolute;
top: 100%;
left: 0;
background: var(--sidebar-bg);
border: 1px solid var(--sidebar-fg);
border-radius: 4px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 10px;
z-index: 1000;
min-width: 200px;
margin-top: 5px;
}

#tag-search {
width: 100%;
padding: 10px 16px;
box-sizing: border-box;
margin-bottom: 10px;
border: 1px solid var(--searchbar-border-color);
border-radius: 3px;
background-color: var(--searchbar-bg);
color: var(--searchbar-fg);
}

.tags-list {
box-sizing: border-box;
list-style-type: none;
padding: 0;
margin: 0;
max-height: 200px;
overflow-y: auto;
scrollbar-color: var(--sidebar-fg) var(--sidebar-bg);
}

.tags-list li {
padding: 5px 0;
}

.tags-list li:hover {
color: var(--sidebar-active);
}

.tags-list label {
display: flex;
align-items: flex-start;
}

.tags-list input[type="checkbox"] {
margin-right: 5px;
margin-top: 4px;
}

#sidebar.filtered .chapter-item:has(> *:not(.selected)) {
display: none;
}

.announcement-stripe {
background-color: #5e1118;
font-weight: bold;
color: #fff;
padding: 10px;
position: relative;
text-align: center;
margin: 0 auto;
width: 100%;
z-index: 1000;
}

.announcement-stripe p {
margin: 0;
}

/* Add this new style for the sidebar */
#sidebar {
z-index: 1001;
/* Higher z-index than the announcement stripe */
}
Loading
Loading