Skip to content

Commit

Permalink
adding style for EPUB
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto-butti committed Dec 21, 2023
1 parent 3db2683 commit 2fe6ab0
Show file tree
Hide file tree
Showing 3 changed files with 195 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ vendor/
/.idea

# Files/Dirs created by ibis init
assets/
content/
export/
ibis.php
/assets/
/content/
/export/
/ibis.php
1 change: 1 addition & 0 deletions src/Commands/InitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
$currentPath . '/assets/style.css',
$this->disk->get(__DIR__ . '/../../stubs/assets/style.css')
);

$this->output->writeln('');
$this->output->writeln('<info>Done!</info>');

Expand Down
190 changes: 190 additions & 0 deletions stubs/assets/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@

body {
font-family: calibri;
font-size: 14px;
line-height: 1.4;
color: #252525;
}


h1,
h2 {
font-family: times;
}

h3 {
font-family: calibri;
font-weight: bold;
}

h1 {
font-size: 35px;
padding-top: 0;
padding-bottom: 70px;
}

h2 {
text-align: left;
font-size: 20px;
padding-top: 0;
padding-bottom: 30px;
}

h3 {
text-align: left;
font-size: 19px;
padding-top: 20px;
padding-bottom: 0;
}

p,
ul,
ol {
margin-bottom: 20px;
}

pre {
line-height: 20px;
page-break-inside: avoid;
border-left: solid 5px #c8c8c8;
background-color: #f9f9fb;
padding-top: 15px;
padding-bottom: 15px;
padding-left: 20px;
margin-bottom: 30px;
}

a {
color: #1a1c3e;
}

pre code {
background: none;
font-size: 13px;
color: #2d2d2d;
}

code {
font-size: 14px;
color: #A5215D;
}

.mpdf_toc {
font-family: calibri;
color: #252525;
}

div.mpdf_toc_level_0 {
padding-top: 30px;
line-height: 30px;
}

div.mpdf_toc_level_1 {
line-height: 30px;
}

div.mpdf_toc_level_2 {
line-height: 30px;
}

span.mpdf_toc_t_level_0,
span.mpdf_toc_p_level_0 {
color: #252525;
font-family: calibri;
font-weight: bold;
font-style: normal;
}

span.mpdf_toc_t_level_1,
span.mpdf_toc_p_level_1 {
color: #252525;
font-family: calibri;
font-weight: normal;
font-style: normal;
}

span.mpdf_toc_t_level_2,
span.mpdf_toc_p_level_2 {
color: #252525;
font-family: calibri;
font-weight: normal;
font-style: normal;
}

#toc-title {
font-weight: bold;
font-size: 45px;
padding-top: 0;
padding-bottom: 10px;
text-align: center;
}

blockquote {
margin-top: 0;
margin-right: 0;
margin-bottom: 30px;
margin-left: 0;
page-break-inside: avoid;
}

blockquote p {
margin-top: 0;
margin-bottom: 0;
}

blockquote.quote {
padding-top: 20px;
padding-bottom: 20px;
padding-left: 20px;
padding-right: 20px;
font-style: italic;
}

blockquote.notice {
background-color: #f0f5ff;
border-left: solid 5px #5b87dd;
padding-top: 20px;
padding-bottom: 20px;
padding-left: 20px;
padding-right: 20px;
}

blockquote.notice strong {
color: #255ac0;
}

blockquote.warning {
background-color: #ffeced;
border-left: solid 5px #dd787d;
padding-top: 20px;
padding-bottom: 20px;
padding-left: 20px;
padding-right: 20px;
}

blockquote.warning strong {
color: #c0262b;
}

table {
border-collapse: collapse;
width: 100%;
}

td,
th {
border: 1px solid #ddd;
padding: 8px;
}

tr:nth-child(even) {
background-color: #f2f2f2;
}

th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #525252;
color: white;
}

0 comments on commit 2fe6ab0

Please sign in to comment.