Skip to content

Clean #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 568 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
568 commits
Select commit Hold shift + click to select a range
415f0f2
change CI image from alpine to stretch
mojavelinux Jul 16, 2019
703a44b
merge !86
mojavelinux Jul 16, 2019
a3573f9
update package lock file
mojavelinux Jul 16, 2019
a97920f
remove dependency override for gifsicle
mojavelinux Jul 16, 2019
d702b66
extract all colors into CSS variables
mojavelinux Jul 1, 2019
4ef8568
merge !85
mojavelinux Jul 16, 2019
ffda94d
update preview page [skip ci]
mojavelinux Jul 17, 2019
2ed2f7f
remove superfluous hyphens assignment in breadcrumbs
mojavelinux Jul 17, 2019
3fba4f6
change style of block titles
mojavelinux Jul 17, 2019
f293373
move styles for paragraph higher up in stylesheet [skip ci]
mojavelinux Jul 17, 2019
b81cbb0
move callout list closer to previous block
mojavelinux Jul 17, 2019
0ff51aa
add border radius to sidebar; tighten space between title and content
mojavelinux Jul 17, 2019
131b622
add right position of listing block annotation (source language)
mojavelinux Jul 17, 2019
76cf002
don't change font family of + in key sequence
mojavelinux Jul 17, 2019
09d798c
apply hyphens more carefully
mojavelinux Jul 17, 2019
e45c9d3
style code element in thead
mojavelinux Jul 17, 2019
5ea915f
use correct apostrophe on 404 page
mojavelinux Jul 17, 2019
443edde
add page class to doctitle for more accurate styling
mojavelinux Jul 17, 2019
0bd4409
group heading styles together
mojavelinux Jul 17, 2019
c3871f6
reorganize doc styles
mojavelinux Jul 17, 2019
ddd8740
add support for underline role
mojavelinux Jul 17, 2019
ca13282
slide nav explore panel up, over nav menu panel
mojavelinux Jul 17, 2019
e729770
constrain width of inline image wherever it's located
mojavelinux Jul 17, 2019
568b4a9
style caption on block image like other captions
mojavelinux Jul 17, 2019
be64766
make font color of inline code configurable
mojavelinux Jul 17, 2019
89cf460
change border color and style of example block; dim border color of q…
mojavelinux Jul 17, 2019
310df9d
fix invalid nav item in preview site [skip ci]
mojavelinux Jul 18, 2019
8ac08df
don't scale font size of navbar dropdown
mojavelinux Jul 18, 2019
266a37a
add border radius to bottom of navbar dropdown
mojavelinux Jul 18, 2019
fff4401
darken caption; lighten pre annotation
mojavelinux Jul 18, 2019
f5f00a0
set button font size to inherit by default
mojavelinux Jul 18, 2019
30a47d1
promote more button styles to base
mojavelinux Jul 18, 2019
c2ae755
fix rendering of page version menu
mojavelinux Jul 18, 2019
52e6448
revert emphasis for nested em and strong
mojavelinux Jul 19, 2019
5edda53
lighten weight of pre annotation
mojavelinux Jul 19, 2019
1062d64
use fancy caret for menu sequence
mojavelinux Jul 19, 2019
1d7d2a3
fix comment on highlight.js style
mojavelinux Jul 19, 2019
1bd5906
only adjust root text size on webkit
mojavelinux Jul 19, 2019
a560403
normalize line height
mojavelinux Jul 19, 2019
c2a2cb2
update shared button styles
mojavelinux Jul 19, 2019
c37fc00
fix stylelint error
mojavelinux Jul 19, 2019
d91f686
drop nav state functionality
mojavelinux Jul 19, 2019
44b788c
put global click listener on document element instead of window to ig…
mojavelinux Jul 19, 2019
8c44a09
merge !88
mojavelinux Jul 19, 2019
5085d72
recalibrate font sizes
mojavelinux Jul 17, 2019
9753213
extract font families and bold font weight into variables
mojavelinux Jul 19, 2019
94bb2a6
use variables for line heights
mojavelinux Jul 19, 2019
145c459
update variable convention
mojavelinux Jul 22, 2019
064fb84
use desktop media qualifier instead of mobile media qualifier for CSS…
mojavelinux Jul 22, 2019
286d491
use CSS var for doc margin
mojavelinux Jul 22, 2019
b072f7f
merge !87
mojavelinux Jul 22, 2019
b1d2f44
fix typo in README [skip ci]
mojavelinux Jul 22, 2019
c386d37
remove redundant property assignment in toolbar CSS
mojavelinux Jul 23, 2019
f21614b
only thicken bottom border of th inside thead
mojavelinux Aug 1, 2019
9789784
enable strict mode for highlight.js script
mojavelinux Aug 14, 2019
dc3bd19
add syntax highlighting for Go
mojavelinux Aug 14, 2019
af806a0
activate syntax highlighting immediately instead of deferring until load
mojavelinux Aug 14, 2019
68f17dc
format source
mojavelinux Aug 14, 2019
f4703bd
clarify info about canonical URL [skip ci]
mojavelinux Aug 21, 2019
632394c
disable hyphens for bare URLs
mojavelinux Aug 21, 2019
8a7690c
add hint about how to disable the page.editUrl property
mojavelinux Aug 22, 2019
38a28b7
add helper to return current year as a string
mojavelinux Aug 24, 2019
bbc0f9b
Update templates.adoc to clarify page.attributes usage. This might b…
djencks Aug 24, 2019
3086627
merge !89
mojavelinux Aug 24, 2019
e5d4cea
explain page attributes more clearly in docs
mojavelinux Aug 24, 2019
81e6b39
make current page URL argument to relativize helper optional
mojavelinux Aug 24, 2019
9879b23
merge !90
mojavelinux Aug 24, 2019
2c13e43
document the site.path property in the UI model
mojavelinux Aug 25, 2019
818d50d
clarify docs for site.path property in UI model
mojavelinux Aug 25, 2019
031977c
color unresolved link
mojavelinux Aug 25, 2019
d3eb161
use single-quoted strings in Handlebars expressions
mojavelinux Aug 28, 2019
498aed4
minor rewording in docs for site.url and site.path template vars
mojavelinux Aug 28, 2019
6ad0ba6
prepend site path when resolving relative URL if from is undefined or…
mojavelinux Aug 24, 2019
300ff19
merge !91
mojavelinux Aug 28, 2019
910218f
update dependencies; fix newly detected lint error
mojavelinux Aug 28, 2019
2da19ac
Update README.adoc
danyill Aug 28, 2019
cd9895e
copy any gif images under src/img
mojavelinux Sep 3, 2019
2bfe0fd
use fallback function when image optimizer isn't available
mojavelinux Sep 3, 2019
43a3326
update dependency lock file
mojavelinux Sep 3, 2019
c34951e
update dependencies
mojavelinux Sep 3, 2019
16e6a43
resolves #98 ignore image optimizer if not available
mojavelinux Sep 3, 2019
8c393ac
clarify how page attributes are defined and used
mojavelinux Sep 10, 2019
d8e6cd4
refresh dependencies
mojavelinux Sep 10, 2019
0f678ff
mention in README that Node.js provides npm
mojavelinux Sep 10, 2019
dc2308e
correctly document how to disable the editUrl (and hence Edit this Pa…
mojavelinux Sep 11, 2019
0652060
minor rewording in docs
mojavelinux Oct 1, 2019
f85a63a
remove redundant role from main element
mojavelinux Oct 1, 2019
9e39c6b
add .doc namespace to CSS selectors for doc where missing
mojavelinux Oct 1, 2019
675c16c
add support for line-through role
mojavelinux Oct 1, 2019
e334ed0
merge !94
mojavelinux Oct 1, 2019
b9ef3a0
document the siteRootPath template variable
mojavelinux Oct 1, 2019
ab3886d
document the env and antoraVersion template variables
mojavelinux Oct 1, 2019
6480d94
rename table role spread to stretch to be compliant with Asciidoctor …
mojavelinux Oct 4, 2019
138d8e6
Add information about page.editUrl as this functionnality is limited …
alemorvan Sep 11, 2019
941a082
update handlebars to address vuln
mojavelinux Oct 13, 2019
df8a0f7
use fileUri for edit page link if available
mojavelinux Oct 29, 2019
690cf85
merge !97
mojavelinux Oct 29, 2019
adb1706
don't use fileUri for edit link if CI env var is set
mojavelinux Oct 29, 2019
d88564c
resolves #103 style part heading and partintro block
mojavelinux Oct 30, 2019
606b577
update dependencies
mojavelinux Oct 31, 2019
c3079a4
upgrade eslint and update configuration for comma-dangle
mojavelinux Nov 2, 2019
a517965
make the reference table of UI variables clearer
mojavelinux Nov 13, 2019
ade56e2
add warning that using a backslash in front of a mustache expression …
mojavelinux Nov 13, 2019
eee4afc
document the page.displayVersion UI model property
mojavelinux Dec 10, 2019
759b791
add blank line after regexp constant in helper
mojavelinux Mar 18, 2020
cdc5f6c
modify implementation of relativize helper
mojavelinux Mar 18, 2020
0632d9a
fix: decode anchor hash string to support Chinese characters
konrumi Mar 8, 2020
e19e9cd
merge !101
mojavelinux Mar 18, 2020
f628456
improve implementation for #99 and add example to preview site
mojavelinux Mar 18, 2020
01f11f6
register built-in helpers (resolvePage and resolvePageURL) with stub …
mojavelinux Mar 18, 2020
357209c
merge !103
mojavelinux Mar 18, 2020
4011e79
honor environment variable (FORCE_SHOW_EDIT_PAGE_LINK) to force edit …
mojavelinux Mar 18, 2020
e12ee78
merge !102
mojavelinux Mar 19, 2020
ac18fb9
resolves #117 fix order of statements in relativize helper to avoid d…
mojavelinux Mar 26, 2020
cc84e99
format source
mojavelinux Mar 26, 2020
03d89d1
rework description of source maps and move to section about bundle
mojavelinux Mar 27, 2020
31bd61a
merge !92
mojavelinux Mar 27, 2020
37e4aab
select nav item on hash change (and initial page load)
mojavelinux Mar 30, 2020
c31fdc5
merge !104
mojavelinux Mar 30, 2020
b9a75d9
add article class to main element
mojavelinux Mar 30, 2020
393ee71
fix alignment of conums and description text in conum list
mojavelinux Mar 31, 2020
2884933
use em instead of rem to align conum in colist
mojavelinux Mar 31, 2020
18e5d0d
preallocate space for scrollbar on nav menu
mojavelinux Mar 31, 2020
a04cc98
merge !105
mojavelinux Mar 31, 2020
3b91bb6
disable background on link focus
mojavelinux Mar 31, 2020
d8786e7
correction: disable link background on active
mojavelinux Mar 31, 2020
ab9669e
add JavaScript that generates the "on this page" sidebar
mojavelinux Nov 19, 2018
0c5ccbf
add styles for TOC and integrate TOC into page layout
mojavelinux Mar 31, 2020
bd9d13b
merge !56
mojavelinux Mar 31, 2020
fb369c3
don't allow the toc sidebar to grow beyond the bounds of the content …
mojavelinux Apr 1, 2020
d39b7fe
only remove background color from active link, not whole background
mojavelinux Apr 2, 2020
381e1ee
use .. instead of ../this in template
mojavelinux Apr 4, 2020
016a963
put comparison value second in eq condition
mojavelinux Apr 4, 2020
c391e09
use #with instead of #if to retrieve Antora version
mojavelinux Apr 4, 2020
1326387
update dependency lock file
mojavelinux Apr 6, 2020
2bda46b
upgrade eslint
mojavelinux Apr 6, 2020
22f522d
upgrade handlebars
mojavelinux Apr 6, 2020
319ae04
upgrade stylelint
mojavelinux Apr 6, 2020
840e86c
upgrade gulp plugins
mojavelinux Apr 6, 2020
bbd41b6
upgrade postcss plugins
mojavelinux Apr 6, 2020
8025aa3
upgrade highlight.js
mojavelinux Apr 6, 2020
131522a
remove fringe languages from highlight.js bundle to reduce size
mojavelinux Apr 6, 2020
0986ee8
use #with for simple template fragments guarded by truthy checks
mojavelinux Apr 8, 2020
1d042ca
remove redundant guard around description and keywords meta
mojavelinux Apr 8, 2020
cd9645d
replace more #if statements with #with statements to simplify calls
mojavelinux Apr 8, 2020
3631c01
enable home icon in preview
mojavelinux Apr 8, 2020
31255b8
consolidate on this page code
mojavelinux Apr 8, 2020
4a5f718
apply ventilated prose to final section of preview page
mojavelinux Apr 8, 2020
3b82be7
activate entries in sidebar TOC for all visible headings when scroll …
mojavelinux Apr 8, 2020
9d581ae
slightly increase scroll spy buffer above heading
mojavelinux Apr 9, 2020
7373030
slighly tweak the thresholds for the scroll spy
mojavelinux Apr 9, 2020
e64e164
merge !107
mojavelinux Apr 9, 2020
db53721
use title of component version instead of component in nav menu
mojavelinux Apr 9, 2020
8ecb910
merge !108
mojavelinux Apr 9, 2020
ca3eae4
consolidate zip routine to a single call
mojavelinux Apr 11, 2020
f541f43
format source
mojavelinux Apr 11, 2020
cfb9b83
convert style value to float instead of integer in toc sidebar script
mojavelinux Apr 11, 2020
fc7f9bc
allow use of void keyword
mojavelinux Apr 11, 2020
d31b214
consolidate script for TOC sidebar
mojavelinux Apr 11, 2020
8a3abaa
output report from prettier to console using fancy-log
mojavelinux Apr 11, 2020
0538ff9
announce path of bundle in the form of the --ui-bundle-url option
mojavelinux Apr 11, 2020
355644f
merge !109
mojavelinux Apr 11, 2020
4f5242e
build TOC entries using text-only content
mojavelinux Apr 12, 2020
fd05e59
when creating a resource bundle, use mtime of newest bundled / import…
mojavelinux Apr 12, 2020
adbaa33
merge !111
mojavelinux Apr 14, 2020
081cb48
rewrite pipeline to emit compiled layouts from stream; use map to sto…
mojavelinux Apr 16, 2020
95fcd0f
show relative path of template that caused handlebars error
mojavelinux Apr 16, 2020
936fe3c
pass srcName option when compiling layout
mojavelinux Apr 16, 2020
1f96f6b
make template path in handlebars error message easier to spot
mojavelinux Apr 16, 2020
4ffdce1
add page or document role to body tag if defined in page source
mojavelinux Apr 19, 2020
f228a3d
remove void keyword from sidebar TOC script
mojavelinux Apr 24, 2020
37bf882
preserve option for postcss-custom-properties is now a boolean
mojavelinux Apr 25, 2020
e985bc0
consistently use triple handlebars to output URL
mojavelinux Apr 25, 2020
1da22bb
disable hyphens on monospaced phrases
mojavelinux Apr 25, 2020
310e324
turn hyphens on for article, then off for certain selectors
mojavelinux Apr 26, 2020
b8c46a1
merge !113
mojavelinux Apr 26, 2020
622cc39
add support for varargs to {{and}} and {{or}} helpers
mojavelinux Apr 26, 2020
5270e05
merge !114
mojavelinux Apr 27, 2020
b585af5
use equal sign in option hint so it can be selected with double click
mojavelinux Apr 28, 2020
ff7f9dd
disable hyphens for path value
mojavelinux Apr 29, 2020
71c3878
add pagination nav to bottom of page
mojavelinux Apr 25, 2020
4c04b4d
add next/prev links in head
mojavelinux Apr 28, 2020
d577f9b
only activate navigation pager if page-pager attribute is set
mojavelinux Apr 28, 2020
ef2f1b1
merge !112
mojavelinux Apr 29, 2020
e9a20c4
refresh dependency lock file
mojavelinux Apr 29, 2020
d81105a
don't attempt to set undefined contents on bundled file
mojavelinux Apr 29, 2020
cf64d19
force words to break that don't fit within available space
mojavelinux Apr 29, 2020
3c8aacc
merge !115
mojavelinux Apr 29, 2020
7fe0510
unmangle pseudo-element selectors
mojavelinux Apr 29, 2020
9d1b0d0
merge !116
mojavelinux May 1, 2020
920a909
add example of nav entry with hash that expands parent node
mojavelinux May 1, 2020
d70da3b
remove eslint override for no-void
mojavelinux May 8, 2020
6d5a17d
add flex: auto to article so it expands to available width
mojavelinux May 9, 2020
a0e59b6
merge !117
mojavelinux May 10, 2020
efad0cf
move name of package into antora scope
mojavelinux May 10, 2020
7dd7557
document that the page.title is in HTML format
mojavelinux May 10, 2020
925b24b
don't attempt to encode page role (as it should already be encoded)
mojavelinux May 10, 2020
af7e9af
don't attempt to escape uiRootPath value
mojavelinux May 10, 2020
8db2030
consistently use triple handlebars for URLs
mojavelinux May 10, 2020
12a4f4f
add index.js so package is requireable, but not packable
djencks May 10, 2020
cb44947
merge !110
mojavelinux May 10, 2020
f3e5cbb
refresh dependency lock file
mojavelinux May 11, 2020
4755855
Add instructions to @import typeface-*.css
snova-pavela May 13, 2020
3011e95
add comment for how to vendorize a library sourced from a node module
mojavelinux May 15, 2020
e5e3c4c
clarify the value of the next/previous/parent properties on the page …
mojavelinux May 16, 2020
1f3dbed
update list of properties on component and component version in UI model
mojavelinux May 16, 2020
e1c8481
clarify that breadcrumbs include text-only and external items
mojavelinux May 16, 2020
e1f2e1b
update description of page.navigation property in UI model
mojavelinux May 16, 2020
a87c6b9
add tip about how to remove site.path from site.url using helper
mojavelinux May 16, 2020
85299bb
fix Error.call conflict when Opal is loaded
mojavelinux May 11, 2020
8aee218
merge !118
mojavelinux May 17, 2020
b38cdef
revise additional steps for adding new font; add to manual section too
mojavelinux May 17, 2020
196a727
merge !119
mojavelinux May 17, 2020
9424c13
remove commented lines in highlight.js bundle
mojavelinux May 20, 2020
43624a6
add elixir language to highlight.js bundle
mojavelinux May 20, 2020
5b68c24
merge !120
mojavelinux May 23, 2020
2f93c2c
Merge remote-tracking branch 'antora-default-ui/master' into merge
hauner Jun 25, 2020
9666358
lint
hauner Jun 25, 2020
2aa87b4
add vue
hauner Jun 26, 2020
5cbf1e1
better package
hauner Jun 27, 2020
554b4b5
remove vue
hauner Jun 27, 2020
af76c15
add tailwind css
hauner Jun 27, 2020
07fb9ea
new oap layout
hauner Jun 27, 2020
73ef565
copy & modify asciidoc css
hauner Jun 27, 2020
6262347
cleanup default layout
hauner Jun 27, 2020
0fa0de8
extract versions button & menu
hauner Jun 27, 2020
fc9e885
cleanup
hauner Jun 27, 2020
5f1d23b
helper improvements
hauner Jun 27, 2020
64b5b16
icons
hauner Jun 28, 2020
dbb5972
cleanup
hauner Jun 28, 2020
d1e9df4
improve header & sidebar
hauner Jun 28, 2020
a4d3ea2
breadcrumb header
hauner Jun 28, 2020
081a1ce
fixed font
hauner Jun 28, 2020
962f749
prev/next toolbar
hauner Jun 28, 2020
d8f061e
adjust padding
hauner Jun 28, 2020
14af8b0
header, toc
hauner Jun 28, 2020
b9ba2b5
cleanup
hauner Jun 28, 2020
e7b6231
footer
hauner Jun 28, 2020
62087a9
hide wip link
hauner Jun 28, 2020
d7ea86e
lint
hauner Jun 28, 2020
b9a60a2
missing styles
hauner Jun 28, 2020
5d2d333
fix links
hauner Jun 28, 2020
83d0774
better style import
hauner Jun 28, 2020
a8d2a40
versions is not set (sometimes)
hauner Jun 28, 2020
ad2e11f
scroll to get see footer
hauner Jun 28, 2020
2213d45
simpler versions layout
hauner Jun 28, 2020
126139a
fixed missing title
hauner Jun 29, 2020
38fd7d6
fixed missing/broken css
hauner Jun 29, 2020
c772beb
fixed missing javascript
hauner Jun 29, 2020
c271a44
improved footer
hauner Jun 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
image: node:10.14.2-stretch
stages: [setup, verify, deploy]
install:
stage: setup
cache:
paths:
- .cache/npm
script:
- &npm_install
npm install --quiet --no-progress --cache=.cache/npm
lint:
stage: verify
cache: &pull_cache
policy: pull
paths:
- .cache/npm
script:
- *npm_install
- node_modules/.bin/gulp lint
bundle-stable:
stage: deploy
only:
- master@antora/antora-ui-default
cache: *pull_cache
script:
- *npm_install
- node_modules/.bin/gulp bundle
artifacts:
paths:
- build/ui-bundle.zip
bundle-dev:
stage: deploy
except:
- master
cache: *pull_cache
script:
- *npm_install
- node_modules/.bin/gulp bundle
artifacts:
expire_in: 1 day # unless marked as keep from job page
paths:
- build/ui-bundle.zip
pages:
stage: deploy
only:
- master@antora/antora-ui-default
cache: *pull_cache
script:
- *npm_install
- node_modules/.bin/gulp preview:build
# FIXME figure out a way to avoid copying these files to preview site
- rm -rf public/_/{helpers,layouts,partials}
artifacts:
paths:
- public
6 changes: 6 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,11 @@
"rules": {
"comment-empty-line-before": null,
"no-descending-specificity": null,
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["tailwind", "responsive"]
}
]
}
}
5 changes: 5 additions & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: antora-ui-default
title: Antora Default UI
version: master
nav:
- modules/ROOT/nav.adoc
13 changes: 13 additions & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
* xref:prerequisites.adoc[UI Development Prerequisites]
* xref:set-up-project.adoc[Set up a UI Project]
* xref:build-preview-ui.adoc[Build and Preview the UI]
* xref:development-workflow.adoc[UI Development Workflow]
* xref:templates.adoc[Work with the Handlebars Templates]
* xref:stylesheets.adoc[Work with the CSS Stylesheets]
** xref:add-fonts.adoc[Add Fonts]
* xref:style-guide.adoc[UI Element Styles]
** xref:inline-text-styles.adoc[Inline Text]
** xref:admonition-styles.adoc[Admonitions]
** xref:list-styles.adoc[Lists]
** xref:sidebar-styles.adoc[Sidebars]
** xref:ui-macro-styles.adoc[UI Macros]
123 changes: 123 additions & 0 deletions docs/modules/ROOT/pages/add-fonts.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
= Add Fonts

This page explains how to add new fonts to your UI.
These instructions assume you've forked the default UI and are able to customize it.

There are three steps involved:

. Add the font to your UI project
. Add a font-face declaration to your stylesheet
. Use the new font in your stylesheet

How you reference the font file in the font-face declaration depends on how you decide to manage it.
You can manage the font with npm or download it manually and add it directly to your UI project.
The following sections describe each approach in turn.

== npm managed

You can use npm (or Yarn) to manage the font.
This approach saves you from having to store the font file directly in your UI project.
Here are the steps involved.

. Use npm (or Yarn) to install the font files from a package (e.g., https://www.npmjs.com/package/typeface-open-sans[typeface-open-sans])

$ npm install --save typeface-open-sans

. In [.path]_src/css_, add a corresponding CSS file (e.g., [.path]_typeface-open-sans.css_)
. In that file, declare the font face:
+
[source,css]
----
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
src:
local("Open Sans"),
local("Open Sans-Regular"),
url(~typeface-open-sans/files/open-sans-latin-400.woff) format("woff")
}
----
+
The Gulp build recognizes the `~` URL prefix and copies the font from the npm package to the build folder (and hence bundle).
+
You must define one @font-face for each font weight and style combination (e.g., `font-weight: 500` + `font-style: italic`) from the font that you want to use in your stylesheet.

. Import the typeface CSS file you just created into the main stylesheet, [.path]_src/css/site.css_ (adjacent to the other typeface imports):
+
[source,css]
----
@import "typeface-open-sans.css";
----

. Repeat the previous steps for each font style and weight you want to use from that package.
. Change the CSS to use your newly imported font:
+
[source,css]
----
html {
font-family: "Open Sans", sans;
}
----
+
TIP: If you're building on the default UI, you may instead want to define or update the font family using a variable defined in [.path]_src/css/vars.css_.

. Test the new font by previewing your UI:

$ gulp preview

If you see the new font, you've now successfully added it to your UI.
If you aren't sure, look for the https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Edit_fonts[All fonts on page] section in your browser's developer tools to see whether the font was loaded.

== Manual

A simpler approach to adding fonts is to store them directly in your project.
Here are the steps involved.

. Download the font files and add them to the [.path]_src/font_ folder.
Create this folder if it does not exist.
. In [.path]_src/css_, add a corresponding CSS file (e.g., [.path]_typeface-open-sans.css_)
. In that file, declare the font face:
+
[source,css]
----
@font-face {
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
src:
local("Open Sans"),
local("Open Sans-Regular"),
url(../font/open-sans-latin-400.woff) format("woff")
}
----
+
Note that the path is a relative path starting from the [.path]_src/css_ folder to the [.path]_src/font_ folder.
+
You must define one @font-face for each font weight and style combination (e.g., `font-weight: 500` + `font-style: italic`) from the font that you want to use in your stylesheet.

. Import the typeface CSS file you just created into the main stylesheet, [.path]_src/css/site.css_ (adjacent to the other typeface imports):
+
[source,css]
----
@import "typeface-open-sans.css";
----

. Repeat the previous steps for each font style and weight you want to use.
. Change the CSS to use your newly imported font:
+
[source,css]
----
html {
font-family: "Open Sans", sans;
}
----
+
TIP: If you're building on the default UI, you may instead want to define or update the font family using a variable defined in [.path]_src/css/vars.css_.

. Test the new font by previewing your UI:

$ gulp preview

If you see the new font, you've now successfully added it to your UI.
If you aren't sure, look for the https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Edit_fonts[All fonts on page] section in your browser's developer tools to see whether the font was loaded.
38 changes: 38 additions & 0 deletions docs/modules/ROOT/pages/admonition-styles.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
= Admonition Styles

An xref:antora:asciidoc:admonitions.adoc[admonition], also known as a notice, helps draw attention to content with a special label or icon.

== Admonition blocks

An admonition block is a table.
The table title element is specified by the block class: tip, note, important, warning, or caution.
Here's an AsciiDoc source example that produces an admonition with the table title warning:

[source,asciidoc]
----
WARNING: Watch out!
----

If font-based icons are enabled (`icons=font`), the table title text is replaced by the associated icon.

[source,html]
----
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Watch out!</p>
</div>
</td>
</tr>
</table>
</div>
----

Here's how it might appear when the title is displayed as text:

WARNING: Watch out!
70 changes: 70 additions & 0 deletions docs/modules/ROOT/pages/build-preview-ui.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
= Build a UI Project for Local Preview
// Settings:
:idprefix:
:idseparator: -
:experimental:

== Build Preview Site

Once you've modified the site UI, the first thing you'll want to do is check out how it looks.
That's what the files in the [.path]_preview-src/_ folder are for.
This folder contains HTML file fragments that provide a representative sample of content from the site.
The preview saves you from having to generate the whole site just to test the UI.
These files should give you an idea of how the UI will look when applied to the actual site.

The pages in the preview site are assembled using the Handlebars templates and link to the pre-compiled asset files (emulating the behavior of the site generator).
Thus, to look at them, you need to run them through the UI build.

There are two preview modes available.
You can run the build once and examine the result or you can run the build continuously so you can see changes as you make them.
The next two sections explain how to use these modes.

=== Build Once

To build the UI once for preview, then stop, execute the following command:

$ gulp preview:build

This task pre-compiles the UI files into the [.path]_public_ directory.
To view the preview pages, navigate to the HTML pages in the [.path]_public_ directory using your browser (e.g., [.path]_public/index.html_).

=== Build Continuously

To avoid the need to run the `preview:build` task over and over while developing, you can use the `preview` command instead to have it run continuously.
This task also launches a local HTTP server so updates get synchronized with the browser (i.e., "`live reload`").

To launch the preview server, execute the following command:

$ gulp preview

You'll see a URL listed in the output of this command:

....
[12:59:28] Starting 'preview:serve'...
[12:59:28] Starting server...
[12:59:28] Server started http://localhost:5252
[12:59:28] Running server
....

Navigate to the URL to view the preview site.
While this command is running, any changes you make to the source files will be instantly reflected in the browser.
This works by monitoring the project for changes, running the `preview:build` task if a change is detected, and sending the updates to the browser.

Press kbd:[Ctrl+C] to stop the preview server and end the continuous build.

== Package for Previewing

If you need to bundle the UI in order to preview the UI on the real site in local development, run the following command:

$ gulp bundle

The `bundle` command also invokes the `lint` command to check that the CSS and JavaScript follow the coding standards.

The UI bundle will be available at [.path]_build/ui-bundle.zip_.
You can then point Antora at this bundle using the `--ui-bundle-url` command-line option.

If you have the preview running, and you want to bundle without causing the preview to be clobbered, use:

$ gulp bundle:pack

The UI bundle will again be available at [.path]_build/ui-bundle.zip_.
34 changes: 34 additions & 0 deletions docs/modules/ROOT/pages/development-workflow.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
= UI Development Workflow
// Settings:
:idprefix:
:idseparator: -

// This section provides information about some of the UI files you'll be modifying and how to prepare and submit those changes.

All changes pushed to a UI project's master branch can trigger a new release (not described here).
Therefore, you want to make your changes to a development branch and submit it as a pull request (PR) to be approved.
(Even better would be to issue the PR from a fork).
Only when the PR is approved and merged will the new release be triggered.

== git steps

Use the following command to create a local development branch named `name-me`:

$ git checkout -b name-me -t origin/master

You'll then apply your changes to the UI files.
Once you're done making changes, commit those changes to the local branch:

$ git commit -a -m "describe your change"

Then, push your branch to the remote repository:

$ git push origin name-me

Finally, navigate to your UI project in your browser and create a new pull request from this branch.

The maintainer of the UI should review the changes.
If the changes are acceptable, the maintainer will merge the pull request.
As soon as the pull request is merged into master, an automated process will take over to publish a new release for the site generator to use.

Now that you've got the process down, let's review some of the files you'll be working with in more detail.
Loading