Skip to content

Commit

Permalink
New styles organization
Browse files Browse the repository at this point in the history
  • Loading branch information
fadado committed Apr 2, 2017
1 parent 72fecaf commit 0e58fa9
Show file tree
Hide file tree
Showing 35 changed files with 122 additions and 170 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ The tools used in the implementation of _jqt_ are:
* [Pandoc](http://pandoc.org/), a universal document converter.
* [Bash](https://www.gnu.org/software/bash/), [sed](https://www.gnu.org/software/sed/) and other shell tools.

If you want to learn how to use _jqt_ consult the documentation at
<https://fadado.github.io/jqt/>. The documentation is generated using _jqt_ in
If you want to learn how to use _jqt_ visit the site
<https://fadado.github.io/jqt/>. The site pages are generated using _jqt_ in
the [`docs`](./docs/) folder of this repository.
If you are interested in _jq_ you can see also [JBOL](https://fadado.github.io/jbol/),
a related project with a collection of modules for the _jq_ language.
Expand Down Expand Up @@ -43,7 +43,7 @@ are:

### Installation

In systems with the GNU software installed tools as [Bash](https://www.gnu.org/software/bash/),
In systems with the GNU software installed tools such as [Bash](https://www.gnu.org/software/bash/),
[sed](https://www.gnu.org/software/sed/) and other shell tools are installed by default.
To use _jqt_ you must install additional tools like [GPP](https://logological.org/gpp)
or [Pandoc](http://pandoc.org/); for example, in recent _Fedora Linux_ distributions
Expand Down Expand Up @@ -84,7 +84,7 @@ another `jqt` uses.

### Documentation

The directory [`docs`](./docs/) contains the documentation for _jqt_, and is in itself a subproject with his
The directory [`docs`](./docs/) contains the source files for _jqt_ documentation, and is in itself a subproject with his
own makefile. Please see the directory [`docs`](./docs/) for all information on
this subproject.

Expand Down
14 changes: 8 additions & 6 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Destination := /tmp/jqt
# Input files directories
Assets := ./assets
Blocks := ./blocks
Layouts := ./blocks
Content := ./content
Data := ./data
Styles := ./styles
Expand All @@ -65,7 +66,7 @@ Common := \
$(Metadata)/config.json \
$(Metadata)/snippets.json \
$(Blocks)/*/markup.html \
$(Blocks)/main.html \
$(Layouts)/page.html \
$(Blocks)/filters.jq \
$(Content)/LINKS.txt \
$(Content)/macros.m \
Expand Down Expand Up @@ -130,21 +131,22 @@ DETAILS := sed \
$(Destination)/index.html: $(Content)/home.md $(Common) \
| $(Destination)
$(info ==> $@)
$(JQT) -d $< $(Blocks)/main.html > $@
$(JQT) -d $< $(Layouts)/page.html > $@

$(foreach p,$(Pages),$(Destination)/$(p).html): $(Content)/FLOW.txt $(Content)/opt/*.txt
$(Destination)/index.html $(Destination)/structure.html: $(Content)/EXAMPLE.txt

define Target
$(Destination)/$(1).html: $(Content)/$(1).md $(Blocks)/$(2).html $(Common) \
$(Destination)/$(1).html: $(Content)/$(1).md $(Layouts)/$(2).html $(Common) \
| $(Destination)
$$(info ==> $$@)
$(JQT) -d $$< $(Blocks)/$(2).html | $(DETAILS) > $$@
$(JQT) -d $$< $(Layouts)/$(2).html | $(DETAILS) > $$@
endef

$(foreach p,$(Pages),$(eval $(call Target,$(p),page)))
$(foreach p,$(Pages),$(eval $(call Target,$(p),page-toc)))

$(Destination)/styles.css: $(Styles)/*.css $(Styles)/new/*.css $(Blocks)/*/*style.css $(Styles)/macros.m
TOPCSS=$(Styles)/page.css
$(Destination)/styles.css: $(TOPCSS) $(Styles)/*.css $(Styles)/milligram/*.css $(Blocks)/*/*style.css $(Styles)/bem.m
$(info ==> $@)
jqt -P CSS-min -I$(Styles) <$< >$@

Expand Down
10 changes: 10 additions & 0 deletions docs/blocks/body/_toc/markup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<#######################################################################
# Body with TOC
######################################################################>&
<main class="#body">
<%include blocks/toc/markup.html>
<%include blocks/content/markup.html>
</main>
<#
vim:ts=2:sw=2:ai:et:fileencoding=utf8:syntax=html
#>&
6 changes: 1 addition & 5 deletions docs/blocks/body/markup.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<#######################################################################
# Body
# Body simple
######################################################################>&
<main class="#body">
<%ifndef BODY_BLOCK>&
<%include blocks/content/markup.html>&
<%else>&
<%call BODY_BLOCK>
<%endif>&
</main>
<#
vim:ts=2:sw=2:ai:et:fileencoding=utf8:syntax=html
Expand Down
12 changes: 0 additions & 12 deletions docs/blocks/container/markup.html

This file was deleted.

2 changes: 1 addition & 1 deletion docs/blocks/content/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
////////////////////////////////////////////////////////////////////////

&SEL{$content} h2:target::after,
&SEL{$content} h2:target::after,
&SEL{$content} h3:target::after,
&SEL{$content} h4:target::after {
content: " §";
color: &ColorQuaternary;
Expand Down
30 changes: 0 additions & 30 deletions docs/blocks/main.html

This file was deleted.

14 changes: 14 additions & 0 deletions docs/blocks/page-toc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<# Page with toc markup #>&
<#
# Main page block for content
#>&
<%define BODY_BLOCK
<%include blocks/body/_toc/markup.html>
>&
<#
# Inherit default layout
#>&
<%include blocks/page.html>&
<#
vim:ts=2:sw=2:ai:et:fileencoding=utf8:syntax=perl
#>&
46 changes: 35 additions & 11 deletions docs/blocks/page.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
<# Layout for documentation pages #>&
<# Top-level page markup #>&
<!DOCTYPE html>
<!-- this document uses polyglot markup (well formed XHTML5) -->
<html id="{{.page._id}}" xmlns="http://www.w3.org/1999/xhtml" lang="{{.page.lang//.site.lang}}" xml:lang="{{.page.lang//.site.lang}}">
<head>
<#
# Main page block for content
#>&
<%define BODY_BLOCK
<%include blocks/toc/markup.html>
<%include blocks/content/markup.html>
>&
# Meta elements
#>
<meta charset="utf-8" />
<# Document title and related metadata #>
<title>jqt · {{.page.title}}</title>
<meta name='description' content='{{.page.description//empty}}' />
<meta name='keywords' content='{{.page.keywords//empty}}' />
<meta name='author' content='{{[(.page.author//.site.author)[].name] | sort[]}}' />
<# More metadata #>
<meta name="generator" content="jqt v<%include ../VERSION>" />
<meta name='dcterms.date' content='{{.page.updated//empty}}' />
<# Presentation #>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<link rel="stylesheet" type="text/css" href="styles.css"/>
{{.page._highlight}}
</head>
<#
# Inherit default layout
#>&
<%include blocks/main.html>&
# Document body
#>
<body class="#container">
<%include blocks/header/markup.html>&
<%ifndef BODY_BLOCK>&
<%include blocks/body/markup.html>&
<%else>&
<%call BODY_BLOCK>
<%endif>&
<%include blocks/footer/markup.html>&
<%partial analytics 'UA-82432866-1'>&
</body>
</html>
<#
vim:ts=2:sw=2:ai:et:fileencoding=utf8:syntax=html
#>&
#>
2 changes: 1 addition & 1 deletion docs/content/content.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: page
layout: page-toc
title: Authoring content in jqt using MarkDown
description: jqt transforms MarkDown documents to HTML using Pandoc.
keywords: jqt, markdown, pandoc, gpp, preprocessing, authoring content
Expand Down
2 changes: 1 addition & 1 deletion docs/content/data.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: page
layout: page-toc
title: Managing the data model with jqt
description: jqt combines one template with one MarkDown document and a data model.
keywords: jqt, JSON, YAML, gpp, preprocessing, data model
Expand Down
2 changes: 1 addition & 1 deletion docs/content/engine.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: page
layout: page-toc
title: The jqt template engine
description: jqt orchestrates several shell utilities to transform MarkDown text and YAML or JSON data into a final HTML page.
keywords: jqt, jq, YAML, gpp, preprocessing, template engine
Expand Down
2 changes: 1 addition & 1 deletion docs/content/home.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: page
title: Welcome to jqt
description: Could be jq the basis for a web template engine?
keywords: jqt, jq, template engine
Expand Down
2 changes: 1 addition & 1 deletion docs/content/structure.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: page
layout: page-toc
title: Defining the page structure with jqt
description: Web pages structure is defined by the HTML macros.
keywords: jqt, jq, gpp, preprocessing, template engine
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// CSS named colors
&define{Black}{ #000000}
&define{Navy}{ #000080}
&define{DarkBlue}{ #00008B}
Expand Down
36 changes: 21 additions & 15 deletions docs/styles/milligram.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,27 @@
&define{SpacingScale}{0.7}
&define{TypographyScale}{0.8}

@media screen {
html {
background-color: &ColorInitial;
}
}

// Modules
&include{new/color.css}
&include{new/base.css}
&include{new/spacing.css}
&include{new/typography.css}
&include{new/blockquote.css}
&include{new/code.css}
&include{new/link.css}
&include{new/list.css}
&include{new/table.css}
&include{new/divider.css}
&include{new/grid.css}
&include{new/utility.css}
//&include{new/image.css}
//&include{new/form.css}
//&include{new/button.css}
&include{milligram/color.css}
&include{milligram/base.css}
&include{milligram/spacing.css}
&include{milligram/typography.css}
&include{milligram/blockquote.css}
&include{milligram/code.css}
&include{milligram/link.css}
&include{milligram/list.css}
&include{milligram/table.css}
&include{milligram/divider.css}
&include{milligram/grid.css}
&include{milligram/utility.css}
//&include{milligram/image.css}
//&include{milligram/form.css}
//&include{milligram/button.css}

// vim:ts=2:sw=2:ai:et:fileencoding=utf-8:syntax=css
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 0 additions & 25 deletions docs/styles/new/default.css

This file was deleted.

Loading

0 comments on commit 0e58fa9

Please sign in to comment.