Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
content
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ok1kvk.cz
content
Commits
980aceb6
Verified
Commit
980aceb6
authored
9 years ago
by
Isabella Skořepová
Browse files
Options
Downloads
Patches
Plain Diff
Do not minify images in debug mode
parent
feb20f9a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
sitegin/transformer-images.js
+10
-5
10 additions, 5 deletions
sitegin/transformer-images.js
sitegin/transformer-markdown.js
+9
-7
9 additions, 7 deletions
sitegin/transformer-markdown.js
theme/sass/style.scss
+1
-1
1 addition, 1 deletion
theme/sass/style.scss
with
20 additions
and
13 deletions
sitegin/transformer-images.js
+
10
−
5
View file @
980aceb6
...
...
@@ -82,11 +82,16 @@ module.exports = function() {
var
tr
=
this
;
tr
.
fancyname
=
"
transformer images
"
;
tr
.
pre
=
function
(
cb
,
list
)
{
minify
()
.
then
(
function
(
imageList
)
{
list
.
images
=
imageList
;
if
(
process
.
argv
[
2
]
==
"
compileonly
"
)
{
minify
()
.
then
(
function
(
imageList
)
{
list
.
images
=
imageList
;
cb
();
})
.
catch
(
function
(
err
)
{
console
.
log
(
err
.
stack
);
cb
();});
}
else
{
console
.
log
(
"
Skipping image minification
"
);
cb
();
})
.
catch
(
function
(
err
)
{
console
.
log
(
err
.
stack
);
cb
();});
}
}
}
This diff is collapsed.
Click to expand it.
sitegin/transformer-markdown.js
+
9
−
7
View file @
980aceb6
...
...
@@ -8,6 +8,7 @@ try {require('lwip');}
catch
(
e
)
{
minificationOK
=
false
;
}
if
(
process
.
argv
[
2
]
!==
"
compileonly
"
)
minificationOK
=
false
;
var
images
=
{};
...
...
@@ -44,10 +45,11 @@ module.exports = function() {
var
tr
=
this
;
tr
.
fancyname
=
"
transformer markdown
"
;
tr
.
pre
=
function
(
cb
,
list
)
{
list
.
images
.
forEach
((
img
)
=>
{
images
[
img
.
file
]
=
img
;
});
console
.
log
(
images
);
if
(
minificationOK
)
{
list
.
images
.
forEach
((
img
)
=>
{
images
[
img
.
file
]
=
img
;
});
}
cb
();
};
tr
.
forEachPage
=
function
(
article
,
cb
)
{
...
...
@@ -84,13 +86,13 @@ module.exports = function() {
if
(
size
.
length
>
1
&&
size
[
1
].
length
>
0
)
{
out
+=
'
height="
'
+
size
[
1
]
+
'
"
'
;
}
}
else
if
(
!
minificationOK
)
{
out
+=
'
style="max-width:512px"
'
;
}
if
(
title
)
{
out
+=
'
title="
'
+
title
+
'
"
'
;
}
if
(
!
minificationOK
)
{
out
+=
'
style="max-width:512px"
'
;
}
out
+=
'
>
'
;
if
(
full
)
{
var
a
=
'
<a href="
'
+
full
+
'
"
'
;
...
...
This diff is collapsed.
Click to expand it.
theme/sass/style.scss
+
1
−
1
View file @
980aceb6
...
...
@@ -258,7 +258,7 @@ nav.subnav li {
text-align
:
left
;
padding
:
0
.5rem
;
max-width
:
$p-max-width
;
margin
:
1
0px
auto
;
margin
:
0px
auto
;
}
h3
,
h4
,
h5
,
h6
{
max-width
:
$p-max-width
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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