Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleperilli committed Feb 28, 2024
1 parent a012342 commit be46c4f
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Docs0 Changelog

## 1.0.0 (2024-02-28)
- Initial commit
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ You must follow only 3 steps:
- Update the content of `_myassets` folder (images, css).
- Add your documents to the `_mydocs` folder (md, see sections below).

> If you also need to create custom layouts, you can do it by adding new files in the `_layouts` folder: in this case, please add `_my` suffix to the file name (e.g. `page_my.html`).

## Test Locally

Expand Down Expand Up @@ -74,8 +76,10 @@ Every file must contain a header (Front Matter) in the following format (note th
description: Document description in HTML meta/Next Reading/Related
menu_title: Document title in menu
next_title: Document title in Next Reading section
body_class: Document body CSS class name
published: true
draft: false
nodraft: false
date: 2021-11-15
modified: 2022-07-20
order: /01/02/document-title
Expand Down Expand Up @@ -104,6 +108,7 @@ Parameters:
- **description:** (optional) a page description used in page meta and the ***Next Reading***/***Related*** sections
- **menu_title:** (optional) set a title for the navigation menu, if you want to make it different from the main title.
- **next_title:** (optional) set a title for the ***Next Reading*** section of the pages, if you want to make it different from the main title.
- **body_class:** (optional) set a custom CSS class for the body of the document.
- **published:** set ***true*** to display the document on the website
- **draft:** (optional) set ***true*** to show a notice that the document is not completed (note that this notice appears automatically if the document is empty or if it contains a <todo></todo> tag. Set ***nodraft: true*** to avoid displaying the notice.
- **date:** set the creation date of the document.
Expand Down
2 changes: 1 addition & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<header class="main {% if page.nosearch == true %}nosearch{% endif %}">
<header class="main {% if page.nosearch or site.search == false %}nosearch{% endif %}">
<div class="logo">
<a href="/"><img src="/assets/images/logo.svg" class="light"><img src="/assets/images/logo-dark.svg" class="dark"></a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<script src="/assets/scripts/preload.min.js" defer></script>
</head>
<body class="page-{{ page.title | slugify }} {% if page.layout == 'home' %}front-site{% endif %}">
<body class="page-{{ page.title | slugify }} {% if page.layout == 'home' %}front-site{% endif %} {% if page.body_class %}{{ page.body_class }}{% endif %}">

{% include header.html %}

Expand Down
7 changes: 6 additions & 1 deletion _myassets/_sass/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@
// Dark colors
@mixin my-dark-colors {


--accent-color: #ec5d5d;
--accent-hover-color: #e94141;
--accent-back-color: #f7eded;
--accent-hover-back-color: #fae8e8;
--accent-border-color: #8f3838;
--accent-contrast-color: #fff;

// DAX Syntax
--code-comment-color: #86C573;
Expand Down
5 changes: 5 additions & 0 deletions assets/_sass/_front.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@
margin-top: 20px;
}
}

header.main,
footer.main {
display: none;
}
}
2 changes: 1 addition & 1 deletion assets/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ document.querySelectorAll("img").forEach(img => {
// TOC
const tocElement = document.querySelector(".toc");
if (tocElement) {
const container = document.querySelector(".main-content");
const container = document.querySelector(".main-content, .content-no-nav");
const items = tocElement.querySelectorAll("li");
const sections = container.querySelectorAll("h2, h3, h4, h5, h6");

Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/main.min.js

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

0 comments on commit be46c4f

Please sign in to comment.