Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
parametricPagedJs
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pagedjs
parametricPagedJs
Commits
462ffc38
Commit
462ffc38
authored
4 years ago
by
julientaq
Browse files
Options
Downloads
Patches
Plain Diff
add dist file
parent
6aaa309d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dist/pagedMaker.js
+17
-16
17 additions, 16 deletions
dist/pagedMaker.js
with
17 additions
and
16 deletions
dist/pagedMaker.js
+
17
−
16
View file @
462ffc38
(()
=>
{
// js/modules/config.js
var
pagedMakerConfig2
=
window
.
pagedMakerConfig
||
{
var
config
;
var
config_default
=
config
=
window
.
pagedMakerConfig
||
{
content
:
void
0
,
stylesheet
:
void
0
,
hooks
:
void
0
,
...
...
@@ -253,7 +254,7 @@ iframe {
.modal .form {
padding: 2em;
background:
${
pagedMakerConfig2
.
ui
?
pagedMakerConfig2
.
ui
.
color
:
"
white
"
}
;
background:
${
config_default
.
ui
?
config_default
.
uicolor
:
"
white
"
}
;
}
.pagedMaker-hyde {
...
...
@@ -270,7 +271,7 @@ iframe {
<div class="form">
<img class="logo" src="img/pagedjsLogo.svg" alt="Logo type of Paged.js: a sheet of paper in the shape of the letter P">
<div class="item pagesize
${
pagedMakerConfig
.
features
.
includes
(
"
pagedSize
"
)
?
""
:
"
pagedMaker-hyde
"
}
">
<div class="item pagesize
${
config_default
.
features
.
includes
(
"
pagedSize
"
)
?
""
:
"
pagedMaker-hyde
"
}
">
<label class="pagedSize" for="page-size">page size</label>
<select name="page-size" id="page-size" class="pagedSize">
...
...
@@ -281,7 +282,7 @@ iframe {
</select>
</div>
<div class="item margins
${
pagedMakerConfig
.
features
.
includes
(
"
pagedMargins
"
)
?
""
:
"
pagedMaker-hyde
"
}
">
<div class="item margins
${
config_default
.
features
.
includes
(
"
pagedMargins
"
)
?
""
:
"
pagedMaker-hyde
"
}
">
<label for="marginTop">margin-top</label>
<input class="marginUpdate" id="margin-top" name="marginTop" value="10" data-sizing="mm">
<label for="marginRight">margin-right</label>
...
...
@@ -293,7 +294,7 @@ iframe {
</div>
<div class="item
${
pagedMakerConfig
.
features
.
includes
(
"
fontFamily
"
)
?
""
:
"
pagedMaker-hyde
"
}
">
<div class="item
${
config_default
.
features
.
includes
(
"
fontFamily
"
)
?
""
:
"
pagedMaker-hyde
"
}
">
<label for="fontFamily">font-family</label>
<select id="fontFamily" name="fontfamily" data-css-prop="--fontBody">
<option value="Spectral" selected>Spectral</option>
...
...
@@ -301,17 +302,17 @@ iframe {
<option value="sans-serif">sans serif</option>
</select>
</div>
<div class="item
${
pagedMakerConfig
.
features
.
includes
(
"
fontSize
"
)
?
""
:
"
pagedMaker-hyde
"
}
">
<div class="item
${
config_default
.
features
.
includes
(
"
fontSize
"
)
?
""
:
"
pagedMaker-hyde
"
}
">
<label for="fontSize">font-size</label>
<input class="cssVarUpdate" id="fontSize" name="fontSize" data-css-prop="--fontSize" type="range" min="12" max="20"
data-sizing="px">
</div>
<div class="item
${
pagedMakerConfig
.
features
.
includes
(
"
fontLineHeight
"
)
?
""
:
"
pagedMaker-hyde
"
}
">
<div class="item
${
config_default
.
features
.
includes
(
"
fontLineHeight
"
)
?
""
:
"
pagedMaker-hyde
"
}
">
<label for="lineHeight">line-height</label>
<input class="cssVarUpdate" id="lineHeight" step="0.1" name="lineHeight" data-css-prop="--lineHeight" type="range" min=".8" max="2" >
</div>
<div class="item
${
pagedMakerConfig
.
features
.
includes
(
"
backgroundColor
"
)
?
""
:
"
pagedMaker-hyde
"
}
">
<div class="item
${
config_default
.
features
.
includes
(
"
backgroundColor
"
)
?
""
:
"
pagedMaker-hyde
"
}
">
<label for="background-color">background color</label>
<input class="cssVarUpdate" id="background-color" type="color" name="color" data-css-prop="--background-color"
value="#ffffff">
...
...
@@ -334,7 +335,7 @@ iframe {
}
});
var
uicsscontent
=
document
.
createElement
(
"
style
"
);
uicsscontent
.
innerTex
t
=
uicss_default
;
uicsscontent
.
textConten
t
=
uicss_default
;
document
.
head
.
append
(
uicsscontent
);
var
inputs
=
document
.
querySelectorAll
(
"
.cssVarUpdate
"
);
var
selects
=
document
.
querySelectorAll
(
"
select
"
);
...
...
@@ -364,21 +365,21 @@ iframe {
createFrame
();
await
delay
(
100
);
let
interfacecss
=
document
.
createElement
(
"
style
"
);
interfacecss
.
innerTex
t
=
pagedmakerCSS_default
;
interfacecss
.
textConten
t
=
pagedmakerCSS_default
;
document
.
querySelector
(
"
.previewFrame
"
).
contentDocument
.
head
.
appendChild
(
interfacecss
);
if
(
pagedMakerConfig2
.
stylesheet
.
length
>
1
)
{
if
(
config_default
.
stylesheet
!=
void
0
)
{
let
stylesheetConf
=
document
.
createElement
(
"
link
"
);
stylesheetConf
.
href
=
`
${
pagedMakerConfig2
.
stylesheet
}
`
;
stylesheetConf
.
href
=
`
${
config_default
.
stylesheet
}
`
;
stylesheetConf
.
rel
=
"
stylesheet
"
;
document
.
querySelector
(
"
.previewFrame
"
).
contentDocument
.
head
.
appendChild
(
stylesheetConf
);
}
let
styleElement
=
document
.
querySelector
(
"
.previewFrame
"
).
contentDocument
.
createElement
(
"
style
"
);
styleElement
.
innerTex
t
=
baseStylesheet_default
+
getMargins
()
+
getPageSize
();
styleElement
.
textConten
t
=
baseStylesheet_default
+
getMargins
()
+
getPageSize
();
let
articleContent
=
document
.
querySelector
(
"
.previewFrame
"
).
contentDocument
.
createElement
(
"
article
"
);
if
(
pagedMakerConfig2
.
content
==
void
0
)
{
if
(
config_default
.
content
==
void
0
)
{
articleContent
.
innerHTML
=
document
.
body
.
innerHTML
;
}
else
{
articleContent
.
innerHTML
=
document
.
querySelector
(
`
${
pagedMakerConfig2
.
content
}
`
).
innerHTML
;
articleContent
.
innerHTML
=
document
.
querySelector
(
`
${
config_default
.
content
}
`
).
innerHTML
;
}
document
.
querySelector
(
"
.previewFrame
"
).
contentDocument
.
body
.
appendChild
(
articleContent
);
getAllValues
(
styleElement
);
...
...
@@ -400,7 +401,7 @@ iframe {
}
});
values
=
`body {
${
values
}
}`
;
return
styleElement
.
innerTex
t
=
styleElement
.
innerTex
t
+
values
;
return
styleElement
.
textConten
t
=
styleElement
.
textConten
t
+
values
;
}
function
createFrame
()
{
const
pagedMaker
=
document
.
createElement
(
"
iframe
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment