Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Quack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
commul
Zeit.shift
Quack
Commits
ff1677ec
Commit
ff1677ec
authored
11 years ago
by
Toke Eskildsen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed #23 (HTML-snippets in folders)
parent
0b7f3e22
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
folder_template.html
+1
-1
1 addition, 1 deletion
folder_template.html
image_template.html
+1
-1
1 addition, 1 deletion
image_template.html
quack.sh
+24
-0
24 additions, 0 deletions
quack.sh
with
26 additions
and
2 deletions
folder_template.html
+
1
−
1
View file @
ff1677ec
...
...
@@ -10,7 +10,7 @@
<body
class=
"folder"
>
<h1>
Quack
<span
style=
"color: #999"
>
${SRC_FOLDER}
</span></h1>
<div
class=
"foldersnippet"
>
${SNIPPET
_FOLDER
}
</div>
<div
class=
"foldersnippet"
>
${SNIPPET}
</div>
<!-- TODO: Create decent bread crumbs -->
<p>
Parent folder:
<a
href=
"../index.html"
>
${PARENT}
</a></p>
...
...
This diff is collapsed.
Click to expand it.
image_template.html
+
1
−
1
View file @
ff1677ec
...
...
@@ -19,7 +19,7 @@ ${IDPREVS}
<body
class=
"previewpage"
>
<h1>
Quack
<span
style=
"color: #999"
>
${SOURCE_SHORT}
</span></h1>
<div
class=
"imagesnippet"
>
${SNIPPET
_IMAGE
}
</div>
<div
class=
"imagesnippet"
>
${SNIPPET}
</div>
<div
id=
"controlpanel"
class=
"control"
>
<p
class=
"navigation"
>
${NAVIGATION}
</p>
...
...
This diff is collapsed.
Click to expand it.
quack.sh
+
24
−
0
View file @
ff1677ec
...
...
@@ -133,12 +133,23 @@ export OVERLAY_WHITE=FFFF00
# Snippets are inserted verbatim at the top of the folder and the image pages.
# Use them for specifying things like delivery date or provider notes.
# Note that these snippet can be overridden on a per-folder and per-image basis
# by creating special files in the source tree (see SPECIFIC_FOLDER_SNIPPET and
# SPECIFIC_IMAGE_SNIPPET_EXTENSION below).
export
SNIPPET_FOLDER
=
""
export
SNIPPET_IMAGE
=
""
# End default settings. User-supplied overrides will be loaded from quack.settings
# If present in a source-folder, the content of the folder will be inserted into
# the generated folder HTML file.
SPECIFIC_FOLDER_SNIPPET
=
"folder.snippet"
# If a file with image basename + this extension is encountered, the content will
# be inserted into the generated image HTML file.
SPECIFIC_IMAGE_SNIPPET_EXTENSION
=
".snippet"
pushd
`
dirname
$0
`
>
/dev/null
ROOT
=
`
pwd
`
...
...
@@ -590,6 +601,14 @@ function makePreviewPage() {
BASE
=
${
SANS_PATH
%.*
}
P
=
"
${
DEST_FOLDER
}
/
${
BASE
}
.html"
local
SSNIP
=
"
${
BASE
}${
SPECIFIC_IMAGE_SNIPPET_EXTENSION
}
"
if
[
-f
$SSNIP
]
;
then
SNIPPET
=
`
cat
$SSNIP
`
else
SNIPPET
=
"
$SNIPPET_FOLDER
"
fi
# Used by function caller
PAGE_LINK
=
"
${
BASE
}
.html"
...
...
@@ -742,6 +761,11 @@ function makeIndex() {
exit
fi
pushd
$SRC_FOLDER
>
/dev/null
if
[
-f
$SPECIFIC_FOLDER_SNIPPET
]
;
then
SNIPPET
=
`
cat
$SPECIFIC_FOLDER_SNIPPET
`
else
SNIPPET
=
"
$SNIPPET_FOLDER
"
fi
local
SRC_FOLDER
=
`
pwd
`
popd
>
/dev/null
echo
"Processing
$SRC_FOLDER
"
...
...
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