| Total files | Total lines of code | Duplicated lines | % of duplications |
|---|---|---|---|
| 360 | 12262 | 1037 | 8.46% |
14.52% Total files: 67, total lines of code: 3078, duplicated lines: 447[Top ↑↑↑]
Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
### Heading 3
Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
#### Heading 4
Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
##### Heading 5
Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
###### Heading 6
Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
* * *[html/template][gohtmltemplate] library for
its template engine. It is an extremely lightweight engine that provides a very
small amount of logic. In our experience that it is just the right amount of
logic to be able to create a good static website. If you have used other
template systems from different languages or frameworks you will find a lot of
similarities in Gotemplate has a struct (object) made available to it. In hugo each
template is passed either a page or a node struct depending on which type of
page you are rendering. More details are available on the
[variables](/layout/variables) page.
A variable is accessed by referencing the variable name.
<title>{{ .Title }}</title>
Variables can also be defined and referenced.
{{ $address := "123 Main St."}}
{{ $address }}
## Functions
Go template ship with a few functions which provide basic functionality. The Gotemplate system also provides a mechanism for applications to extend the
available functions with their own. [Hugo template
functions](/layout/functions) provide some additional functionality we believe
are useful for building websites. Functions are called by using their name
followed by the required parameters separated by spaces. Template
functions cannot be added without recompiling hugo.
**Example:**
{{ add 1 2 }}
## Includes
When including another template you will pass to it the data it will be
able to access. To pass along the current context please remember to
include a trailing dot. The templates location will always be starting at
the /layout/ directory within Hugo.
**Example:**
{{ template "chrome/header.html" . }}
## Logic
Go templates provide the most basic iteration and conditional logic.
### Iteration
Just like in Go,templates make heavy use of range to iterate over
a map, array or slice. The following are different examples of how to use
range.
**Example 1: Using Context**
{{ range array }}
{{ . }}
{{ end }}
**Example 2: Declaring value variable name**
{{range $element := array}}
{{ $element }}
{{ end }}
**Example 2: Declaring key and value variable name**
{{range $index, $element := array}}
{{ $index }}
{{ $element }}
{{ end }}
### Conditionals
If, else, with, or, & and provide the framework for handling conditional
logic in Go Templates. Like range, each statement is closed with `end`.
Go Templates treat the following values as false:
* false
* 0
* any array, slice, map, or string of length zero
**Example 1: If**
{{ if isset .Params "title" }}<h4>{{ index .Params "title" }}</h4>{{ end }}
**Example 2: If -> Else**
{{ if isset .Params "alt" }}
{{ index .Params "alt" }}
{{else}}
{{ index .Params "caption" }}
{{ end }}
**Example 3: And & Or**
{{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
**Example 4: With**
An alternative way of writing "if" and then referencing the same value
is to use "with" instead. With rebinds the context `.` within its scope,
and skips the block if the variable is absent.
The first example above could be simplified as:
{{ with .Params.title }}<h4>{{ . }}</h4>{{ end }}
**Example 5: If -> Else If**
{{ if isset .Params "alt" }}
{{ index .Params "alt" }}
{{ else if isset .Params "caption" }}
{{ index .Params "caption" }}
{{ end }}
## Pipes
One of the most powerful components of Gotemplates, the pipe is essential
to being able to chain together function calls. One limitation of the
pipes is that they only can work with a single value and that value
becomes the last parameter of the next pipeline.
A few simple examples should help convey how to use the pipe.
**Example 1 :**
{{ if eq 1 1 }} Same {{ end }}
is the same as
{{ eq 1 1 | if }} Same {{ end }}
It does look odd to place the if at the end, but it does provide a good
illustration of how to use the pipes.
**Example 2 :**
{{ index .Params "disqus_url" | html }}
Access the page parameter called "disqus_url" and escape the HTML.
**Example 3 :**
{{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
Stuff Here
{{ end }}
Could be rewritten as
{{ isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" | if }}
Stuff Here
{{ end }}
## Context (aka. the dot)
The most easily overlooked concept to understand about Gotemplates is that {{ . }}
always refers to the current context. In the top level of your template this
will be the data set made available to it. Inside of a iteration it will have
the value of the current item. When inside of a loop the context has changed. .
will no longer refer to the data available to the entire page. If you need to
access this from within the loop you will likely want to set it to a variable
instead of depending on the context.
**Example:**
{{ $title := .Site.Title }}
{{ range .Params.tags }}
<li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> - {{ $title }} </li>
{{ end }}
Notice how once we have entered the loop the value of {{ . }} has changed. We
have defined a variable outside of the loop so we have access to it from within
the loop.
# Hugo Parameters
Hugo provides the option of passing values to the template language
through the site configuration (for sitewide values), or through the meta
data of each specific piece of content. You can define any values of any
type (supported by your front matter/config format) and use them however
you want to inside of your templates.
## Using Content (page) Parameters
In each piece of content you can provide variables to be used by the
templates. This happens in the [front matter](/content/front-matter).
An example of this is used in this documentation site. Most of the pages
benefit from having the table of contents provided. Sometimes the TOC just
doesn't make a lot of sense. We've defined a variable in our front matter
of some pages to turn off the TOC from being displayed.
Here is the example front matter:
```
---
title: "Permalinks"
date: "2013-11-18"
aliases:
- "/doc/permalinks/"
groups: ["extras"]
groups_weight: 30
notoc: true
---
```
Here is the corresponding code inside of the template:
{{ if not .Params.notoc }}
<div id="toc" class="well col-md-4 col-sm-6">
{{ .TableOfContents }}
</div>
{{ end }}
## Using Site (config) Parameters
In your top-level configuration file (eg, `config.yaml`) you can define site
parameters, which are values which will be available to you in chrome.
For instance, you might declare:
```yaml
params:
CopyrightHTML: "Copyright © 2013 John Doe. All Rights Reserved."
TwitterUser: "spf13"
SidebarRecentLimit: 5
```
Within a footer layout, you might then declare a `<footer>` which is only
provided if the `CopyrightHTML` parameter is provided, and if it is given,
you would declare it to be HTML-safe, so that the HTML entity is not escaped
again. This would let you easily update just your top-level config file each
January 1st, instead of hunting through your templates.
```
{{if .Site.Params.CopyrightHTML}}<footer>
<div class="text-center">{{.Site.Params.CopyrightHTML | safeHtml}}</div>
</footer>{{end}}
```
An alternative way of writing the "if" and then referencing the same value
is to use "with" instead. With rebinds the context `.` within its scope,
and skips the block if the variable is absent:
```
{{with .Site.Params.TwitterUser}}<span class="twitter">
<a href="https://twitter.com/{{.}}" rel="author">
<img src="/images/twitter.png" width="48" height="48" title="Twitter: {{.}}"
alt="Twitter"></a>
</span>{{end}}Now we are going to run hugo again, but this time with hugo in watch mode.
/path/to/hugo/from/step/1/hugo server --source=./docs --watch
> 29 pages created
> 0 tags index created
> in 27 ms
> Web Server is available at http://localhost:1313
> Watching for changes in /Users/spf13/Code/hugo/docs/content
> Press ctrl+c to stop
Open your [favorite editor](http://vim.spf13.com) and change one of the source
content pages. How about changing this very file to *fix the typo*. How about changing this very file to *fix the typo*.
Content files are found in `docs/content/`. Unless otherwise specified, files
are located at the same relative location as the url, in our case
`docs/content/overview/quickstart.md`.
Change and save this file.. Notice what happened in your terminal.
> Change detected, rebuilding site
> 29 pages created
> 0 tags index created
> in 26 ms
Refresh the browser and observe that the typo is now fixed.
Notice how quick that was. Try to refresh the site before it's finished building.`static`
Jekyll has a rule that any directory not starting with `_` will be copied as-is to the `_site` output. Hugo keeps all static content under `static`. You should therefore move it all there.
With Jekyll, something that looked like
▾ <root>/
▾ images/
logo.png
should become
▾ <root>/
▾ static/
▾ images/
logo.png
Additionally, you'll want any files that should reside at the root (such as `CNAME`) to be moved to `static`.
## Create your Hugo configuration file
Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the [Hugo configuration documentation](/overview/configuration/) for details.
## Set your configuration publish folder to `_site`
The default is for Jekyll to publish to `_site` and for Hugo to publish to `public`. If, like me, you have [`_site` mapped to a git submodule on the `gh-pages` branch](http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.html), you'll want to do one of two alternatives:
1. Change your submodule to point to map `gh-pages` to public instead of `_site` (recommended).
git submodule deinit _site
git rm _site
git submodule add -b gh-pages git@github.com:your-username/your-repo.git public
2. Or, change the Hugo configuration to use `_site` instead of `public`.
{
..
"publishdir": "_site",
..
}
## Convert Jekyll templates to Hugo templates
That's the bulk of the work right here. The documentation is your friend. You should refer to [Jekyll's template documentation](http://jekyllrb.com/docs/templates/) if you need to refresh your memory on how you built your blog and [Hugo's template](/layout/templates/) to learn Hugo's way.
As a single reference data point, converting my templates for [heyitsalex.net](http://heyitsalex.net/) took me no more than a few hours.
## Convert Jekyll plugins to Hugo shortcodes
Jekyll has [plugins](http://jekyllrb.com/docs/plugins/); Hugo has [shortcodes](/doc/shortcodes/). It's fairly trivial to do a port.
### Implementation
As an example, I was using a custom [`image_tag`](https://github.com/alexandre-normand/alexandre-normand/blob/74bb12036a71334fdb7dba84e073382fc06908ec/_plugins/image_tag.rb) plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing.
Jekyll's plugin:
module Jekyll
class ImageTag < Liquid::Tag
@url = nil
@caption = nil
@class = nil
@link = nil
// Patterns
IMAGE_URL_WITH_CLASS_AND_CAPTION =
IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK = /(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)"(.*?)"(\s+)->((https?:\/\/|\/)(\S+))(\s*)/i
IMAGE_URL_WITH_CAPTION = /((https?:\/\/|\/)(\S+))(\s+)"(.*?)"/i
IMAGE_URL_WITH_CLASS = /(\w+)(\s+)((https?:\/\/|\/)(\S+))/i
IMAGE_URL = /((https?:\/\/|\/)(\S+))/i
def initialize(tag_name, markup, tokens)
super
if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK
@class = $1
@url = $3
@caption = $7
@link = $9
elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION
@class = $1
@url = $3
@caption = $7
elsif markup =~ IMAGE_URL_WITH_CAPTION
@url = $1
@caption = $5
elsif markup =~ IMAGE_URL_WITH_CLASS
@class = $1
@url = $3
elsif markup =~ IMAGE_URL
@url = $1
end
end
def render(context)
if @class
source = "<figure class='#{@class}'>"
else
source = "<figure>"
end
if @link
source += "<a href=\"#{@link}\">"
end
source += "<img src=\"#{@url}\">"
if @link
source += "</a>"
end
source += "<figcaption>#{@caption}</figcaption>" if @caption
source += "</figure>"
source
end
end
end
Liquid::Template.register_tag('image', Jekyll::ImageTag)
is written as this Hugo shortcode:
<!-- image -->
<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
{{ with .Get "link"}}<a href="{{.}}">{{ end }}
<img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}"{{ end }} />
{{ if .Get "link"}}</a>{{ end }}
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
<figcaption>{{ if isset .Params "title" }}
{{ .Get "title" }}{{ end }}
{{ if or (.Get "caption") (.Get "attr")}}<p>
{{ .Get "caption" }}
{{ with .Get "attrlink"}}<a href="{{.}}"> {{ end }}
{{ .Get "attr" }}
{{ if .Get "attrlink"}}</a> {{ end }}
</p> {{ end }}
</figcaption>
{{ end }}
</figure>
<!-- image -->
### Usage
I simply changed:
{% image full http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg "One of my favorite touristy-type photos. I secretly waited for the good light while we were "having fun" and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." ->http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/ %}
to this (this example uses a slightly extended version named `fig`, different than the built-in `figure`):
{{%/* fig class="full" src="http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg" title="One of my favorite touristy-type photos. I secretly waited for the good light while we were having fun and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." link="http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/" */%}}
As a bonus, the shortcode named parameters are, arguably, more readable.
## Finishing touches
### Fix content
Depending on the amount of customization that was done with each post with Jekyll, this step will require more or less effort. There are no hard and fast rules here except that `hugo server --watch` is your friend. Test your changes and fix errors as needed.
### Clean up
You'll want to remove the Jekyll configuration at this point. If you have anything else that isn't used, delete it.
## A practical example in a diff
[Hey, it's Alex](http://heyitsalex.net/) was migrated in less than a _father-with-kids day_ from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this [diff](https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610).1.81% Total files: 26, total lines of code: 1214, duplicated lines: 22[Top ↑↑↑]
# No posts empty state
- id: noposts_warning_title
translation: "You don't have any posts yet!"
- id: noposts_warning_description
translation: "Once you post something in any folder (section) under the <b>content</b> directory, it will appear here. Only one section \
(with the most posts) will be displayed on the main page by default."
- id: noposts_warning_tip
translation: "<b>Tip:</b> You can show as many sections as you like with \
<b><a href=\"https://gohugo.io/functions/where/#mainsections\"rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b> \
config parameter."# No posts empty state
- id: noposts_warning_title
translation: "You don't have any posts yet!"
- id: noposts_warning_description
translation: "Once you post something in any folder (section) under the <b>content</b> directory, it will appear here. Only one section \
(with the most posts) will be displayed on the main page by default."
- id: noposts_warning_tip
translation: "<b>Tip:</b> You can show as many sections as you like with \
<b><a href=\"https://gohugo.io/functions/where/#mainsections\"rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b> \
config parameter."4.31% Total files: 41, total lines of code: 997, duplicated lines: 43[Top ↑↑↑]
},
"devDependencies": {
"fa-icons": "^0.1.5",
"lit-element": "^2.2.1",
"node-sass": "^4.12.0",
"rollup": "^1.4.1",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-typescript2": "^0.25.3",
"tslint": "^5.18.0",
"typescript": "^3.5.0"
},
"scripts": {
"build": "./bin/build.sh",
"depcheck": "../../node_modules/.bin/depcheck || true",
"docker:start": "docker-compose up --build -d",
"lint:ts:tslint": "./node_modules/.bin/tslint -p . -c ../../tslint.json",
"lint:ts:ci:tslint": "./node_modules/.bin/tslint -p . -c ../../tslint.json -t checkstyle -o reports/tslint-tslint.xml"
},
"workspaces": {
"nohoist": [
"@fortawesome"
]
}
},
"lit-element": "^2.2.1",
"node-sass": "^4.12.0",
"rollup": "^1.4.1",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-typescript2": "^0.25.3",
"tslint": "^5.18.0",
"typescript": "^3.5.0"
},
"scripts": {
"build": "./bin/build.sh",
"depcheck": "../../node_modules/.bin/depcheck || true",
"docker:start": "docker-compose up --build -d",
"lint:ts:tslint": "./node_modules/.bin/tslint -p . -c ../../tslint.json",
"lint:ts:ci:tslint": "./node_modules/.bin/tslint -p . -c ../../tslint.json -t checkstyle -o reports/tslint-tslint.xml"
}
}0% Total files: 21, total lines of code: 356, duplicated lines: 0[Top ↑↑↑]
0% Total files: 5, total lines of code: 68, duplicated lines: 0[Top ↑↑↑]
2.98% Total files: 101, total lines of code: 3722, duplicated lines: 111[Top ↑↑↑]
, (): void => {
const manager = new Engine();
const entity = manager.createEntity();
expect(entity).not.toBeNull();
expect(entity).toBeInstanceOf(Entity);
expect(manager.getEntities().size).toBe(1);
manager.removeEntity("42", (): void => {
const model = new ConcreteObservable();
expect(model.getObservers().length).toBe(0);
const observer = new ConcreteObserver();
model.attach(observer);
expect(model.getObservers().length).toBe(1);
model;
const expected = document.createElement("p");
const when = document.createElement("span");
when.textContent = whenMessage;
const what = document.createElement("span");
what.textContent = ` - ${eventMessage}`;
expected.appendChild(when);
expected.appendChild(what);
Console.getInstance().append(eventMessage);
expect(
document.getElementsByClassName("console")[0],const screenEnterSpy = jest.spyOn(StartScreen.prototype, "enter");
const screenRenderSpy = jest.spyOn(StartScreen.prototype, "render");
const screen = new StartScreen(new Engine());
const game = new Game();
game.switchScreen(screen);
game();
screen.render(new Display(24, 80));
expect(displaySpy).toHaveBeenCalledTimes(22);
});
describe("handleInput", () => {
each([
[
null,
{
data: {},
type: "keydown",
},
],
[
null,
{
data: { keyCode: Keys.RETURN },
type: "keydown",
},
],
]).test(" should return appropriate value", (expected, params) => {
const screen = new WinScreen, (): void => {
const mockEntity = new Entity("42");
mockEntity.addComponent(new MoveableComponent());
mockEntity.addComponent(new PositionComponent());
const mockEntities: Map<string, Entity> = new Map<string, Entity>();
mockEntities.set("42", mockEntity);
const mockMove;
const mockMap = new GameMap(1, 1);
const mapPosition = { x: 0, y: 0 };
const originalImpl = GameMap.prototype.getTile;
GameMap.prototype.getTile = jest.fn().mockImplementation(() => {
return mockTile;
});
const system = new MovementSystem(entities, mapPosition);
const mapPosition = { x: 0, y: 0 };
const originalImpl = GameMap.prototype.getTile;
GameMap.prototype.getTile = jest.fn().mockImplementation(() => {
return mockTile;
});
const system = new MovementSystem(entities, mapPosition, mockMap);
const expected: MoveInterface = {
canMove: false();
const mockMap = new GameMap(1, 1);
const mapPosition = { x: 0, y: 0 };
const originalImpl = GameMap.prototype.getTile;
GameMap.prototype.getTile = jest.fn().mockImplementation(() => {
return mockTile;
});
const system = new MovementSystem(entities, mapPosition, mockMap);
const expected: MoveInterface = {
canMove: false,
newPosition: mapPosition,
};
expect(system.canMove()).toStrictEqual(expected);
GameMap.prototype.getTile = originalImpl;
});
}0% Total files: 1, total lines of code: 8, duplicated lines: 0[Top ↑↑↑]
1% Total files: 72, total lines of code: 1598, duplicated lines: 16[Top ↑↑↑]
<title>{{%PROJECT_TITLE%}}</title>
<link type="text/plain" rel="author" href="humans.txt" />
<link href="./vendor.css" rel="stylesheet" />
<link href="./style.css" rel="stylesheet" />
</head>
<body <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="application-name" content="Space Roguelike" />
<meta name="description" content="Space Roguelike" />
<meta name="robots" content="index, follow" />
<meta name="google" content="nositelinkssearchbox" />
<meta name="version" content="{{%VERSION%}}" />
<link rel="home" href="/" />
<title>Jérôme0% Total files: 19, total lines of code: 330, duplicated lines: 0[Top ↑↑↑]
0% Total files: 1, total lines of code: 1, duplicated lines: 0[Top ↑↑↑]
44.72% Total files: 6, total lines of code: 890, duplicated lines: 398[Top ↑↑↑]
;
}
h1,
h2,
h3,
h4,
h5,
h6,
time {
font-family: "Ruda", sans-serif;
}
#container {
margin: 0;
padding: 0;
max-width: 100vw;
min-height: 100vh;
display: flex;
flex-direction: column;
}
#container > * {
width: 700px;
margin: 0 auto;
}
@media only screen and (max-width: 800px) {
#container > * {
width: auto;
margin: 0 1.2em;
}
}
#container header {
margin-bottom: 1em;
}
#container header h1 {
font-size: 2.4rem;
}
#container header h1 a {
color: #000000;
}
#container header ul {
display: flex;
margin: 0;
padding: 0;
list-style: none;
float: right;
}
#container header ul li {
margin-left: 1em;
}
@media only screen and (max-width: 800px) {
#container header ul {
float: none;
}
#container header ul li {
margin: 0 1em 0 0;
}
}
#container nav {
border-bottom: solid 3px #cecece;
padding-bottom: 0.5em;
font-family: "Ruda", sans-serif;
}
#container nav ul {
margin: 0;
padding: 0;
list-style: none;
display: flex;
justify-content: flex-end;
}
#container nav ul li {
margin-left: 1em;
}
#container nav ul li a.active {
border-bottom: 0.5em solid #666666;
}
#container main {
flex: 1 0 0;
line-height: 1.5;
font-size: 1.2rem;
}
#container main section#home ul {
margin: 0;
padding: 0;
list-style: none;
}
#container main section#home ul li {
margin: 0.5em 0;
padding-bottom: 0.5em;
}
#container main section#home ul li h2 {
margin: 0.2em 0;
}
#container main section#home span {
color: #666666;
}
#container main section#list ul {
margin: 0;
padding: 0;
list-style: none;
}
#container main section#list ul li {
padding: 0.5em 0;
border-bottom: 1px solid #cecece;
}
#container main section#list ul li time, #container main section#list ul li span.count {
float: right;
}
#container main section#list ul li:last-child {
border-bottom: none;
}
#container main section.post-nav ul {
margin: 0.5em 0;
padding: 0.5em 0 0;
list-style: none;
display: flex;
justify-content: space-between;
border-top: 1px solid #f7f7f7;
font-size: 0.9em;
}
#container main article > pre {
background-color: #ffffcc;
font-size: 0.9em;
}
#container main article p kbd {
display: inline-block;
padding: 0.2em 0.3em;
font-size: 0.8em;
line-height: 1em;
color: #555555;
vertical-align: middle;
background-color: #fcfcfc;
border-width: 1px;
border-style: solid;
border-color: #cccccc #cccccc #bbbbbb;
border-image: none;
border-radius: 3px;
box-shadow: 0 -1px 0 #bbbbbb inset;
}
#container main h1 {
margin-bottom: 1rem;
}
#container footer {
border-top: solid 1px #cecece;
}
#container footer h6 {
font-size: 0.8em;
}
#container textarea, input {
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background-color: #fff;
border: 1px solid #cecece;
border-radius: 3px;
color: #000000;
/*display: -webkit-inline-box;*/
display: -ms-inline-flexbox;
display: inline-flex;
font-size: 14px;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
line-height: 24px;
padding: 8px;
position: relative;
box-shadow: inset 0 1px 2px rgba(17, 17, 17, 0.1);
max-width: 100%;
width: 100%;
}
#container button {
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
border: 1px solid #d3d6db;
border-radius: 3px;
color: #666666;
/*display: -webkit-inline-box;*/
display: -ms-inline-flexbox;
display: inline-flex;
position: relative;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
padding: 10px;
text-align: center;
}
#container button:hover {
border: solid #cecece 2px;
text-decoration: none;
}
.meta-aside, #container main section#home ul li aside, #container main article aside {
margin: 0.5em 0;
font-family: "Ruda", sans-serif;
color: #909090;
font-size: 0.8em;
}
.meta-aside ul, #container main section#home ul li aside ul, #container main article aside ul {
margin: 0;
padding: 0;
list-style: none;
}
.meta-aside ul li, #container main section#home ul li aside ul li, #container main article aside ul li {
margin: 0;
padding: 0;
}
a {
color: #666666;
text-decoration: none;
}
.image, figure img, img {
width: 100%;
box-shadow: 0 3px 3px #bbbbbb;
}
.full-image, figure.full img, img[src*="full"] {
width: 100%;
box-shadow: 0 3px 3px #bbbbbb;
}
@supports (width: 100vw) {
.full-image, figure.full img, img[src*="full"] {
width: 100vw;
position: relative;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right: -50vw;
}
}
.mid-image, figure.mid img, img[src*="mid"] {
width: 100%;
box-shadow: 0 3px 3px #bbbbbb;
}
@supports (width: 100vw) {
.mid-image, figure.mid img, img[src*="mid"] {
width: 800px;
position: relative;
left: 50%;
right: 50%;
margin-left: -400px;
margin-right: -400px;
}
@media only screen and (max-width: 800px) {
.mid-image, figure.mid img, img[src*="mid"] {
width: 100%;
left: 0;
right: 0;
margin: 0;
}
}
}
.float-image, figure.float img, img[src*="float"] {
width: 300px;
float: left;
margin: 0 1em 1em -3em;
box-shadow: 0 3px 3px #bbbbbb;
}
@media only screen and (max-width: 800px) {
.float-image, figure.float img, img[src*="float"] {
float: none;
margin: 0;
width: 100%;
}
}
.float-image-right, figure.float-right img, img[src*="float-right"] {
width: 300px;
float: right;
margin: 0 -3em 1em 1em;
box-shadow: 0 3px 3px #bbbbbb;
}
@media only screen and (max-width: 800px) {
.float-image-right, figure.float-right img, img[src*="float-right"] {
float: none;
margin: 0;
width: 100%;
}
}
figure {
margin: 0;
}
figure figcaption p {
margin-top: 0.3em;
font-size: 0.8em;
font-style: italic;
}
figure.full {
margin: 0;
}
figure.mid {
margin: 0;
}
figure.float {
margin: 0;
float: left;
}
figure.float-right {
margin: 0;
float: right;
}
figure.float-right figcaption {
margin-left: 1em;
}
table {
width: 100%;
border-bottom: solid 1px #cecece;
}
table thead {
background-color: #cecece;
}
blockquote {
margin: 1em;
border-left: solid 0.1em #cececeinset;
}
blockquote::before {
content: "\f10d";
font-family: "Font Awesome 5 Free";
font-weight: 900;
font-size: 3em;
color: rgba(192, 192, 192, 0.3);
position: absolute;
left: 6px;
top: 0;
}
@media only screen and (max-width: 800px) {
blockquote {
margin: 1em 0;
padding: 0.5em;
}
}
dl dd {
font-style: italic;
}
ul.pagination {
display: flex;
justify-content: center;
margin: 1em 0 0;
padding: 0.5em 0;
list-style: none;
}
ul.pagination li {
padding: 0 1em;
}