Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion themes/hugo-darktable-docs-epub-theme
Submodule hugo-darktable-docs-epub-theme deleted from e378ba
2 changes: 2 additions & 0 deletions themes/hugo-darktable-docs-epub-theme/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.directory
*/node_modules/*
20 changes: 20 additions & 0 deletions themes/hugo-darktable-docs-epub-theme/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2020 YOUR_NAME_HERE

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13 changes: 13 additions & 0 deletions themes/hugo-darktable-docs-epub-theme/assets/sass/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* Override any bootstrap variables here before importing bootstrap itself */
@import 'modules/fonts';
@import 'modules/typography';
@import 'modules/page';
@import 'modules/cover-front';
@import 'modules/cover-back';
@import 'modules/body-page';
@import 'modules/toc';
@import 'modules/bookmarks';
@import 'modules/numbering';

/* Theme customizations */
@import 'modules/images';
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#body > .section {
page: body;
}

#cover-front > .title {
string-set: front-cover-title content();
}

#body > .section > .head1.title {
string-set: chapter content();
}

#body > .section > .section > .head1.title {
string-set: section content();
}

@mixin border-top {
border-top: 1px solid gray;
}

@mixin border-bottom {
border-bottom: 1px solid gray;
}

@page body {
@include border-top;
@include border-bottom;
padding-top: 6px;
padding-bottom: 6px;
@top-left-corner {
content: "";
}
@top-left {
content: string(chapter);
}
@top-center {
content: "";
}
@top-right {
content: string(section);
}
@top-right-corner {
content: "";
}

@bottom-left-corner {
content: "";
}
@bottom-left {
content: string(front-cover-title);
}
@bottom-center {
content: "";
}
@bottom-right {
content: counter(page);
}
@bottom-right-corner {
content: "";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.section {
.title {
bookmark-level: 1;
}
.content {
.head1,
.head2,
.head3 {
bookmark-level: none;
}
}
}

.section > .section {
.title {
bookmark-level: 2;
}
}

.section > .section > .section {
.title {
bookmark-level: 3;
}
}

.section > .section > .section > .section {
.title {
bookmark-level: 4;
}
}

.section > .section > .section > .section > .section {
.title {
bookmark-level: 5;
}
}

.section > .section > .section > .section > .section > .section {
.title {
bookmark-level: 6;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#cover-back {
page: cover-back;
break-before: always;
text-align: center;
margin-top: 95%;
}

@page cover-front {
@top-left-corner {
content: none;
}
@top-left {
content: none;
}
@top-center {
content: none;
}
@top-right {
content: none;
}
@top-right-corner {
content: none;
}

@bottom-left-corner {
content: none;
}
@bottom-left {
content: none;
}
@bottom-center {
content: none;
}
@bottom-right {
content: none;
}
@bottom-right-corner {
content: none;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#cover-front {
page: cover-front;
break-after: always;
padding-top: 35%;
height: 11in;
width: 8.5in;
.title {
text-align: center;
font-size: 48px;
line-height: 52px;
}
.title::before {
content: url(darktable-logo.svg);
display: block;
transform: scale(0.5);
margin: 0px auto;
margin-bottom: -10rem;
}
}

@page cover-front {
margin: 0;
padding: 0;
@top-left-corner {
content: none;
}
@top-left {
content: none;
}
@top-center {
content: none;
}
@top-right {
content: none;
}
@top-right-corner {
content: none;
}

@bottom-left-corner {
content: none;
}
@bottom-left {
content: none;
}
@bottom-center {
content: none;
}
@bottom-right {
content: none;
}
@bottom-right-corner {
content: none;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* {
font-family: sans-serif;
}

pre, code {
font-family: monospace;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
img {
display: block;
max-width: 100%;
}

.icon {
width: 25px;
display: inline-block;
vertical-align: middle;
}

.inline {
display: inline;
vertical-align: middle;
}

.w25 {
width: 24%;
}

.w33 {
width: 33%;
}

.w50 {
width: 48%;
}

.w66 {
width: 66%;
}

.w75 {
width: 72%;
}

.w100 {
width: 100%;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// The counters for the sections and ToC are presented together to keep the numbering consistent.

// Section 1
#body > .section,
#toc-body > ul > li {
counter-increment: section-1;
}

#body > .section > .title:before,
#toc-body > ul > li > a:before {
content: counter(section-1) ". ";
}

// Section 2
#body > .section > .section,
#toc-body > ul > li > ul > li {
counter-increment: section-2;
}

#body > .section > .section > .title:before,
#toc-body > ul > li > ul > li > a:before {
content: counter(section-1) "." counter(section-2) ". ";
}

// Section 3
#body > .section > .section > .section,
#toc-body > ul > li > ul > li > ul > li {
counter-increment: section-3;
}

#body > .section > .section > .section > .title:before,
#toc-body > ul > li > ul > li > ul > li > a:before {
content: counter(section-1) "." counter(section-2) "." counter(section-3) ". ";
}

// Section 4
#body > .section > .section > .section > .section,
#toc-body > ul > li > ul > li > ul > li > ul > li {
counter-increment: section-4;
}

#body > .section > .section > .section > .section > .title:before,
#toc-body > ul > li > ul > li > ul > li > ul > li > a:before {
content: counter(section-1) "." counter(section-2) "." counter(section-3) "." counter(section-4) ". ";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Basic page definition

@page {
size: letter portrait;
margin-top: 0.5in;
margin-bottom: 0.5in;
margin-right: 0.25in;
margin-left: 0.25in;
}
24 changes: 24 additions & 0 deletions themes/hugo-darktable-docs-epub-theme/assets/sass/modules/toc.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#toc {
break-after: always;
.title {
font-size: 2.323em;
}
#toc-body {
columns: 2;
ul {
list-style-type: none;
padding-left: 15px;
li {
padding-top: 1px;
padding-bottom: 2px;
a {
color: black;
text-decoration: none;
}
a:after {
content: " " target-counter(attr(href), page);
}
}
}
}
}
Loading
Loading