first commit

This commit is contained in:
Max Chaev 2025-03-05 12:58:04 +03:00
commit 955a41913f
11 changed files with 197 additions and 0 deletions

21
LICENSE Normal file
View File

@ -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.

0
README.md Normal file
View File

BIN
build/output.epub Normal file

Binary file not shown.

9
compile_epub.sh Executable file
View File

@ -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

BIN
img/book-cover.pdf Normal file

Binary file not shown.

BIN
img/book-cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

5
src/01-intro.md Normal file
View File

@ -0,0 +1,5 @@
# Привет!
тест!
![an image](./linked-img/ava.jpg)

10
src/02-intro-in-linux.md Normal file
View File

@ -0,0 +1,10 @@
# Linux
GNU/Linux - операционная система с открытым исходным кодом.
```java
public static void Main(String Args[])
{
System.out.println("Hello World");
}
```

14
src/config.yml Normal file
View File

@ -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
---

BIN
src/linked-img/ava.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

138
templates/epub.css Normal file
View File

@ -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; }
}