Skip to content

Commit

Permalink
Add example image
Browse files Browse the repository at this point in the history
  • Loading branch information
erayd committed Nov 23, 2020
1 parent d4fa7a5 commit 664bedc
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
Binary file added public/example-image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion public/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ All are optional.

## Content

![Example image with caption.](/example-image.jpg#right;w=40%;my-class)

Content is provided as simple static markdown files, with optional YAML
[frontmatter](#yaml-frontmatter). It should be present on the webserver at the
request path, with a `.md` file extension.
Expand All @@ -103,7 +105,7 @@ discarded.

![Image caption](/url/of/image.jpg#right;w=50%;my-class)

The above example will display a right-floated figure, 50% wide, with the class
The above example will display a right-floated figure, 40% wide, with the class
`my-class`.

| Key | Description |
Expand Down
28 changes: 28 additions & 0 deletions public/template/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,31 @@ td:first-child, th:first-child {
tr:nth-child(2n+1) td {
background: #EEE;
}

p {
margin: 0 0 10px 0;
}

p::before {
content: "";
display: block;
overflow: hidden;
width: 200px;
}

figure.my-class {
margin: 0 0 10px 20px;
}

figcaption {
font-style: italic;
}

@media(max-width: 500px) {
figure.my-class { min-width: 190px; }
p::before { width: 150px; }
}

@media(max-width: 400px) {
figure.my-class { min-width: 150px; }
}

0 comments on commit 664bedc

Please sign in to comment.