commit 955a41913faefb8f4923fa82df6690b108e23a90 Author: Max Nullov Date: Wed Mar 5 12:58:04 2025 +0300 first commit diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ef64fae --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Max Chaev + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/build/output.epub b/build/output.epub new file mode 100644 index 0000000..3f3cd0a Binary files /dev/null and b/build/output.epub differ diff --git a/compile_epub.sh b/compile_epub.sh new file mode 100755 index 0000000..5dc4f63 --- /dev/null +++ b/compile_epub.sh @@ -0,0 +1,9 @@ +mkdir -p build + +pandoc \ + --filter pandoc-crossref \ + --css templates/epub.css \ + --resource-path=src:linked-img \ + --toc -N \ + -o build/output.epub \ + src/config.yml src/*.md \ No newline at end of file diff --git a/img/book-cover.pdf b/img/book-cover.pdf new file mode 100644 index 0000000..3bf0b3e Binary files /dev/null and b/img/book-cover.pdf differ diff --git a/img/book-cover.png b/img/book-cover.png new file mode 100644 index 0000000..989b5da Binary files /dev/null and b/img/book-cover.png differ diff --git a/src/01-intro.md b/src/01-intro.md new file mode 100644 index 0000000..5f5f30b --- /dev/null +++ b/src/01-intro.md @@ -0,0 +1,5 @@ +# Привет! + +тест! + +![an image](./linked-img/ava.jpg) \ No newline at end of file diff --git a/src/02-intro-in-linux.md b/src/02-intro-in-linux.md new file mode 100644 index 0000000..0323ac7 --- /dev/null +++ b/src/02-intro-in-linux.md @@ -0,0 +1,10 @@ +# Linux + +GNU/Linux - операционная система с открытым исходным кодом. + +```java +public static void Main(String Args[]) +{ + System.out.println("Hello World"); +} +``` \ No newline at end of file diff --git a/src/config.yml b/src/config.yml new file mode 100644 index 0000000..0b7d258 --- /dev/null +++ b/src/config.yml @@ -0,0 +1,14 @@ +--- +title: GNU/Linux для чайников +description: Пособие для новичков в Linux +author: zelenichai +subject: "Linux" +keywords: [books,programming,linux] +language: ru-RU +cover-image: img/book-cover.png +lof: true +lof-own-page: true +toc-own-page: true +titlepage: false +colorlinks: true +--- \ No newline at end of file diff --git a/src/linked-img/ava.jpg b/src/linked-img/ava.jpg new file mode 100644 index 0000000..432d1ce Binary files /dev/null and b/src/linked-img/ava.jpg differ diff --git a/templates/epub.css b/templates/epub.css new file mode 100644 index 0000000..6d4e170 --- /dev/null +++ b/templates/epub.css @@ -0,0 +1,138 @@ +/* Base Styles */ +body { + margin: 1.5% 5%; /* Reduced vertical margin */ + text-align: justify; + font-size: 1em; + line-height: 1.6; /* Better readability */ + max-width: 90%; /* Prevent overly long lines */ + font-family: "Georgia", serif; /* More book-like font */ + } + + /* Headings Hierarchy */ + h1 { + font-size: 2.2em; + text-align: center; + margin: 2em 0 1em; + line-height: 1.2; + font-weight: bold; + border-bottom: 1px solid #ccc; /* Decorative element */ + padding-bottom: 0.5em; + } + + h2 { + font-size: 1.8em; + margin: 2em 0 1em; + padding-bottom: 0.3em; + border-bottom: 1px solid #eee; + } + + h3 { font-size: 1.5em; margin: 1.8em 0 0.8em; } + h4 { font-size: 1.3em; margin: 1.5em 0 0.6em; } + h5 { font-size: 1.1em; margin: 1.2em 0 0.4em; } + h6 { font-size: 1em; margin: 1em 0 0.2em; } + + /* Code Blocks */ + code, pre { + font-family: "Fira Code", "Courier New", monospace; + background: #f8f8f8; + border-radius: 3px; + padding: 0.5em !important; /* Reduced padding */ + overflow-x: auto; /* Horizontal scroll for long code */ + } + + pre { + margin: 1.5em 0; + border-left: 4px solid #6ce26c; + } + + /* Special Text Elements */ + blockquote { + margin: 1.5em 0; + padding: 0.5em 1.5em; + background: #f8f8f8; + border-left: 4px solid #ccc; + } + + a { + color: #2a6496; + text-decoration: none; + } + + a:hover { + text-decoration: underline; + } + + /* Table of Contents */ + nav#toc ol { + padding: 0; + margin: 2em 0; + } + + nav#toc li { + list-style-type: none; + margin: 0.8em 0; + padding: 0.3em 1em; + border-left: 3px solid #eee; + transition: all 0.2s ease; + } + + nav#toc li:hover { + border-left-color: #6ce26c; + background: #f8f8f8; + } + + /* Paragraph and Spacing */ + p { + margin-bottom: 1.2em; + hyphens: auto; /* Better text justification */ + } + + /* Responsive Images */ + img { + max-width: 100%; + height: auto; + display: block; + margin: 1em auto; + } + + /* Title Page */ + h1.title { + font-size: 2.8em; + margin: 3em 0 0.5em; + border: none; + } + + h2.author { + font-size: 1.4em; + text-align: center; + margin: 0 0 2em; + color: #666; + font-weight: normal; + } + + h3.date { + text-align: center; + color: #999; + margin-bottom: 4em; + } + + /* Footnotes */ + .footnotes { + font-size: 0.9em; + color: #666; + margin-top: 4em; + border-top: 1px solid #eee; + padding-top: 1em; + } + + /* Mobile Optimization */ + @media (max-width: 600px) { + body { + margin: 3%; + max-width: 94%; + font-size: 0.95em; + } + + h1 { font-size: 1.8em; } + pre, code { font-size: 0.9em; } + } \ No newline at end of file