Commit 394b33a5 authored by Isabella Skořepová's avatar Isabella Skořepová
Browse files

Fix remaining stuff

parent c2973a95
Pipeline #1019 canceled with stage
in 10 minutes and 2 seconds
......@@ -459,8 +459,8 @@ export function Base({
href="/clanek/jak-nahlasit-chybu/"
>
Jak nahlásit chybu
</a>
{footerlink}
</a>{' '}
{footerlink}{' '}
<div style={{ display: 'inline-block', height: '1em' }}>
<a
style={{
......
......@@ -15,16 +15,16 @@ function relURL(filename, dir_) {
export function List({ subtags, tag, content, metadata, file, config }) {
return (
<div id="content" class="container">
<div class="section">
<div class="row">
<div class="col">
<a class="breadcrumb">{tag.text}</a>
<div id="content" className="container">
<div className="section">
<div className="row">
<div className="col">
<a className="breadcrumb">{tag.text}</a>
{subtags &&
subtags.map(subtag => (
<a
href={`${config.baseurl}/${subtag.url}`}
class="chip"
className="chip"
key={subtag.url}
>
{subtag.text}
......@@ -32,10 +32,10 @@ export function List({ subtags, tag, content, metadata, file, config }) {
))}
</div>
</div>
<div class="row">
<div className="row">
{content.map(page => (
<div class="col s12 m6 l4" key={page.file}>
<div class="block article">
<div className="col s12 m6 l4" key={page.file}>
<div className="block article">
<a href={`${config.baseurl}/${page.file}`}>
<div
style={{
......@@ -50,9 +50,9 @@ export function List({ subtags, tag, content, metadata, file, config }) {
className="leadimage light-blue darken-2"
></div>
</a>
<div class="head-title">
<div className="head-title">
<a href={`${config.baseurl}/${page.file}`}>
<h5 class="center">{page.metadata.title}</h5>
<h5 className="center">{page.metadata.title}</h5>
</a>
</div>
<div style={{ padding: '0px 10px' }} className="head-perex">
......@@ -64,7 +64,7 @@ export function List({ subtags, tag, content, metadata, file, config }) {
? truncate(striptags(page.content))
: null}
</div>
<div class="clear"></div>
<div className="clear"></div>
<div style={{ padding: 10 }} className="head-info">
<span
style={{
......@@ -96,9 +96,9 @@ export function List({ subtags, tag, content, metadata, file, config }) {
<Paginator metadata={metadata} file={file} config={config} />
</div>
<div class="hide-on-small-only">
<div className="hide-on-small-only">
{metadata.prevurl && (
<div style={{ left: 0 }} class="sidelink sidelink-l">
<div style={{ left: 0 }} className="sidelink sidelink-l">
<a href={`${config.baseurl}/${metadata.prevurl}`}>
<div>
<SymbolBackward />
......@@ -107,7 +107,7 @@ export function List({ subtags, tag, content, metadata, file, config }) {
</div>
)}
{metadata.nexturl && (
<div style={{ right: 0 }} class="sidelink sidelink-r">
<div style={{ right: 0 }} className="sidelink sidelink-r">
<a href={`${config.baseurl}/${metadata.nexturl}`}>
<div>
<SymbolForward />
......
......@@ -27,7 +27,7 @@ function paginationList(page, count) {
export function Paginator({ metadata, file, config }) {
return (
<ul class="pagination">
<ul className="pagination">
<li>
<a
href={
......@@ -58,11 +58,11 @@ export function Paginator({ metadata, file, config }) {
</li>
{paginationList(metadata.thispage, 4).map(page =>
page === metadata.thispage ? (
<li class="active" key={page.pagenumber}>
<li className="active" key={page.file}>
<a>{page.metadata.pagenumber}</a>
</li>
) : (
<li class="waves-effect" key={page.pagenumber}>
<li className="waves-effect" key={page.file}>
<a href={`${config.baseurl}/${page.file}`}>
{page.metadata.pagenumber}
</a>
......
......@@ -4,7 +4,7 @@ import { SymbolClose } from './svgs'
export function Search() {
return (
<>
<div class="hidden" id="search" style={{ display: 'none' }}>
<div className="hidden" id="search" style={{ display: 'none' }}>
<div>
<div>
<div>
......@@ -30,7 +30,7 @@ export function Search() {
height: 50,
lineHeight: 50,
}}
class="close-search"
className="close-search"
>
<div
style={{
......
......@@ -14,6 +14,7 @@ export default function Article({
<Base
metadata={metadata}
config={config}
canonicalURL={canonicalURL}
prehead={
<>
<meta property="og:type" content="article" />
......@@ -24,7 +25,7 @@ export default function Article({
{metadata.image && (
<meta
property="og:image"
content={url.resolve(metadata.image, canonicalURL)}
content={url.resolve(canonicalURL, metadata.image)}
/>
)}
<meta
......@@ -51,8 +52,8 @@ export default function Article({
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
inlineMath: [ ['$','$'], ["\\\\(","\\\\)"] ],
displayMath: [ ['$$','$$'], ["\\\\[","\\\\]"] ],
processEscapes: true
},
elements: $("#content article"),
......@@ -76,15 +77,14 @@ export default function Article({
}
bodyClassName="type-article"
>
<div class="section container" id="content">
<div class="row">&nbsp;</div>
<div class="metadata">
<div className="section container" id="content">
<div className="row">&nbsp;</div>
<div className="metadata">
<h2 id="title">{metadata.title}</h2>
{metadata.nodate ? null : (
<a
class="author"
className="author"
style={{ color: '#a2a2a2', display: 'block' }}
class="black-text"
target="_blank"
href={`https://git.ok1kvk.cz/ok1kvk.cz/content/tree/master/content/articles/${file
.replace('clanek/', '')
......@@ -105,12 +105,14 @@ export default function Article({
)}
</a>
)}
<div class="tags">
<div className="tags">
{metadata.tags.map(tag =>
tag.url === 'tag/vse' ? null : (
<a href={`${config.baseurl}/${tag.url}/1/`}>
<div class="chip">{tag.text}</div>
</a>
<React.Fragment key={tag.url}>
<a href={`${config.baseurl}/${tag.url}/1/`}>
<div className="chip">{tag.text}</div>
</a>{' '}
</React.Fragment>
),
)}
</div>
......
......@@ -5,6 +5,7 @@ import { List as ListPartial } from '../partials/list'
export default function List(props) {
return (
<Base
canonicalURL={props.canonicalURL}
head={<meta property="og:type" content="website" />}
config={props.config}
>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment