Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bjcp-2015-styleguide
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Frank Steinberg
bjcp-2015-styleguide
Commits
c8cbefbb
Commit
c8cbefbb
authored
5 years ago
by
Frank Steinberg
Browse files
Options
Downloads
Patches
Plain Diff
Improved HTML output. Various minor fixes.
parent
178e9a3c
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
.gitlab-ci.yml
+2
-0
2 additions, 0 deletions
.gitlab-ci.yml
xsl/bjcp-2015-styleguide-doc-to-xml.xsl
+19
-16
19 additions, 16 deletions
xsl/bjcp-2015-styleguide-doc-to-xml.xsl
xsl/bjcp-2015-styleguide-html.xsl
+169
-12
169 additions, 12 deletions
xsl/bjcp-2015-styleguide-html.xsl
with
190 additions
and
28 deletions
.gitlab-ci.yml
+
2
−
0
View file @
c8cbefbb
...
@@ -15,5 +15,7 @@ build:
...
@@ -15,5 +15,7 @@ build:
paths
:
paths
:
-
bjcp-2015-styleguide-orig.xml
-
bjcp-2015-styleguide-orig.xml
-
bjcp-2015-styleguide-de.xml
-
bjcp-2015-styleguide-de.xml
-
bjcp-2015-styleguide-orig.html
-
bjcp-2015-styleguide-de.html
expire_in
:
1 week
expire_in
:
1 week
This diff is collapsed.
Click to expand it.
xsl/bjcp-2015-styleguide-doc-to-xml.xsl
+
19
−
16
View file @
c8cbefbb
...
@@ -423,23 +423,26 @@
...
@@ -423,23 +423,26 @@
</xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:choose>
</xsl:variable>
</xsl:variable>
<xsl:choose>
<xsl:if
test=
"string-length($t) > 0"
>
<xsl:when
test=
"w:rPr/w:b[not(@w:val='0')]"
>
<xsl:choose>
<xsl:element
name=
"span"
>
<xsl:when
test=
"w:rPr/w:b[not(@w:val='0')]"
>
<xsl:attribute
name=
"class"
>
bold
</xsl:attribute>
<xsl:element
name=
"span"
>
<xsl:value-of
select=
"$t"
/>
<xsl:attribute
name=
"class"
>
bold
</xsl:attribute>
</xsl:element>
<xsl:value-of
select=
"$t"
/>
</xsl:when>
</xsl:element>
<xsl:when
test=
"w:rPr/w:i"
>
</xsl:when>
<xsl:element
name=
"span"
>
<!-- WTF, some ° chars are italic in the original document -->
<xsl:attribute
name=
"class"
>
italic
</xsl:attribute>
<xsl:when
test=
"(w:rPr/w:i) and ($t != '°')"
>
<xsl:element
name=
"span"
>
<xsl:attribute
name=
"class"
>
italic
</xsl:attribute>
<xsl:value-of
select=
"$t"
/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select=
"$t"
/>
<xsl:value-of
select=
"$t"
/>
</xsl:element>
</xsl:otherwise>
</xsl:when>
</xsl:choose>
<xsl:otherwise>
</xsl:if>
<xsl:value-of
select=
"$t"
/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:template>
...
...
This diff is collapsed.
Click to expand it.
xsl/bjcp-2015-styleguide-html.xsl
+
169
−
12
View file @
c8cbefbb
...
@@ -17,26 +17,144 @@
...
@@ -17,26 +17,144 @@
<xsl:text>
BJCP 2015 Styleguide
</xsl:text>
<xsl:text>
BJCP 2015 Styleguide
</xsl:text>
</xsl:element>
</xsl:element>
<xsl:element
name=
"style"
>
<xsl:element
name=
"style"
>
styleguide chapter {
display: list-item;
styleguide {
list-style-position: inside
;
font-family: Helvetica, Arial, Geneva, sans-serif
;
}
}
styleguide category {
styleguide chapter, styleguide category, styleguide subcategory {
font-size: 9pt;
margin-top:1em;
margin-bottom:1em;
margin-left:0em;
display: list-item;
display: list-item;
list-style-position: inside;
list-style-position: inside;
}
}
styleguide category:before {
display: inline;
styleguide p {
margin-top:1em;
}
styleguide span.bold {
font-weight: bold;
}
styleguide span.italic {
font-style: italic;
}
styleguide category:before, styleguide subcategory:before {
content: attr(id);
content: attr(id);
}
}
styleguide category name {
styleguide name {
display: inline;
display: inline-block;
margin-bottom:1em;
}
styleguide description {
font-size: 8pt;
margin-left:1em;
display: block;
}
styleguide description p {
margin-top: 0;
}
styleguide overall-impression:before {
content: "Overall Impression: ";
}
styleguide aroma:before {
content: "Aroma: ";
}
styleguide appearance:before {
content: "Appearance: ";
}
styleguide flavor:before {
content: "Flavor: ";
}
styleguide mouthfeel:before {
content: "Mouthfeel: ";
}
styleguide comments:before {
content: "Comments: ";
}
styleguide history:before {
content: "History: ";
}
}
styleguide c
ategory *
{
styleguide c
haracteristic-ingredients:before
{
display: none
;
content: "Characteristic Ingredients: "
;
}
}
styleguide category subcategory {
styleguide style-comparison:before {
display: none;
content: "Style Comparison: ";
}
styleguide entry-instructions:before {
content: "Entry Instructions: ";
}
styleguide specs:before {
content: "Vital Statistics: ";
}
styleguide commercial-examples:before {
content: "Commercial Examples: ";
}
styleguide tags:before {
content: "Tags: ";
}
styleguide overall-impression,
styleguide aroma,
styleguide appearance,
styleguide flavor,
styleguide mouthfeel,
styleguide comments,
styleguide history,
styleguide characteristic-ingredients,
styleguide style-comparison,
styleguide specs,
styleguide entry-instructions,
styleguide commercial-examples,
styleguide tags {
position: relative;
margin-left: 1em;
display: block;
font-size: 8pt;
}
styleguide overall-impression:before,
styleguide aroma:before,
styleguide appearance:before,
styleguide flavor:before,
styleguide mouthfeel:before,
styleguide comments:before,
styleguide history:before,
styleguide characteristic-ingredients:before,
styleguide style-comparison:before,
styleguide specs:before,
styleguide entry-instructions:before,
styleguide commercial-examples:before,
styleguide tags:before {
font-weight: bold;
}
styleguide specs div.ibu:before {
content: "IBU: ";
}
styleguide specs div.srm:before {
content: "SRM: ";
}
styleguide specs div.og:before {
content: "OG: ";
}
styleguide specs div.fg:before {
content: "FG: ";
}
styleguide specs div.abv:before {
content: "ABV: ";
}
styleguide specs div {
display: inline-block;
}
styleguide specs div * {
border: 1px solid;
display: inline-block;
width: 9em;
}
}
</xsl:element>
</xsl:element>
...
@@ -50,6 +168,45 @@ styleguide category subcategory {
...
@@ -50,6 +168,45 @@ styleguide category subcategory {
<xsl:template
match=
"specs"
mode=
"copy"
>
<xsl:element
name=
"specs"
>
<xsl:element
name=
"div"
>
<xsl:element
name=
"div"
>
<xsl:attribute
name=
"class"
>
ibu
</xsl:attribute>
<xsl:value-of
select=
"ibu/@min"
/>
<xsl:text>
-
</xsl:text>
<xsl:value-of
select=
"ibu/@max"
/>
</xsl:element>
<xsl:element
name=
"div"
>
<xsl:attribute
name=
"class"
>
srm
</xsl:attribute>
<xsl:value-of
select=
"srm/@min"
/>
<xsl:text>
-
</xsl:text>
<xsl:value-of
select=
"srm/@max"
/>
</xsl:element>
<xsl:element
name=
"div"
>
<xsl:attribute
name=
"class"
>
og
</xsl:attribute>
<xsl:value-of
select=
"og/@min"
/>
<xsl:text>
-
</xsl:text>
<xsl:value-of
select=
"og/@max"
/>
</xsl:element>
<xsl:element
name=
"div"
>
<xsl:attribute
name=
"class"
>
fg
</xsl:attribute>
<xsl:value-of
select=
"fg/@min"
/>
<xsl:text>
-
</xsl:text>
<xsl:value-of
select=
"fg/@max"
/>
</xsl:element>
<xsl:element
name=
"div"
>
<xsl:attribute
name=
"class"
>
abv
</xsl:attribute>
<xsl:value-of
select=
"abv/@min"
/>
<xsl:text>
-
</xsl:text>
<xsl:value-of
select=
"abv/@max"
/>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template
match=
"*"
mode=
"copy"
>
<xsl:template
match=
"*"
mode=
"copy"
>
<xsl:element
name=
"{local-name(.)}"
>
<xsl:element
name=
"{local-name(.)}"
>
<xsl:apply-templates
select=
"@*"
mode=
"copy"
/>
<xsl:apply-templates
select=
"@*"
mode=
"copy"
/>
...
...
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