diff options
author | 2018-10-24 14:27:30 +0300 | |
---|---|---|
committer | 2023-01-13 10:37:53 +0300 | |
commit | 955f75f1c049e4b81f2995ef4e90f5d4a657077a (patch) | |
tree | 5bb12bf43cea5aac9bd41882ee6b1f28f727c303 /vnext/src | |
parent | 9643826617928fd23722497a308fd8d24d873cd7 (diff) |
drop schema.org metadata
Diffstat (limited to 'vnext/src')
-rw-r--r-- | vnext/src/components/Avatar.js | 12 | ||||
-rw-r--r-- | vnext/src/components/Message.js | 10 | ||||
-rw-r--r-- | vnext/src/components/Thread.js | 4 | ||||
-rw-r--r-- | vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap | 12 | ||||
-rw-r--r-- | vnext/src/views/index.html | 5 |
5 files changed, 17 insertions, 26 deletions
diff --git a/vnext/src/components/Avatar.js b/vnext/src/components/Avatar.js index f79d7b09..31d7dd34 100644 --- a/vnext/src/components/Avatar.js +++ b/vnext/src/components/Avatar.js @@ -4,7 +4,7 @@ import { Link } from 'react-router-dom'; import { UserType } from './Types'; -export default function Avatar(props) { +const Avatar = React.memo(function AvatarComponent(props) { return ( <div style={{ display: 'flex' }}> <div className="msg-avatar"> @@ -13,16 +13,18 @@ export default function Avatar(props) { </Link> </div> <div style={{ display: 'flex', flexDirection: 'column' }}> - <span itemProp="author" itemScope="" itemType="http://schema.org/Person"> - <Link to={{ pathname: `/${props.user.uname}/` }} itemProp="url" rel="author"> - <span itemProp="name">{props.user.uname}</span> + <span> + <Link to={{ pathname: `/${props.user.uname}/` }}> + <span>{props.user.uname}</span> </Link> </span> {props.children} </div> </div> ); -} +}); + +export default Avatar; Avatar.propTypes = { user: UserType, diff --git a/vnext/src/components/Message.js b/vnext/src/components/Message.js index b36936ba..1ecbf996 100644 --- a/vnext/src/components/Message.js +++ b/vnext/src/components/Message.js @@ -11,12 +11,12 @@ import { format } from '../utils/embed'; export default function Message({ data, visitor, children, ...rest }) { return ( - <div className="msg-cont" itemProp="blogPost" itemScope="" itemType="http://schema.org/BlogPosting" itemRef="org"> + <div className="msg-cont"> <header className="h"> <Avatar user={data.user}> <div className="msg-ts"> <Link to={{ pathname: `/${data.user.uname}/${data.mid}`, state: { msg: data } }}> - <time itemProp="datePublished dateModified" itemType="http://schema.org/Date" dateTime={data.timestamp} + <time dateTime={data.timestamp} title={moment.utc(data.timestamp).local().format('lll')}> {moment.utc(data.timestamp).fromNow()} </time> @@ -26,11 +26,11 @@ export default function Message({ data, visitor, children, ...rest }) { <Tags user={data.user} data={data.tags || []} /> </header> <div className="msg-txt"> - <p itemProp="description" dangerouslySetInnerHTML={{ __html: format(data.body, data.mid, (data.tags || []).indexOf('code') >= 0) }}></p> + <p dangerouslySetInnerHTML={{ __html: format(data.body, data.mid, (data.tags || []).indexOf('code') >= 0) }}></p> </div> {data.photo && <p className="ir"><a href={`//i.juick.com/p/${data.mid}.${data.attach}`} data-fname={`${data.mid}.${data.attach}`}> - <img itemProp="image" src={`//i.juick.com/photos-512/${data.mid}.${data.attach}`} alt="" /></a> + <img src={`//i.juick.com/photos-512/${data.mid}.${data.attach}`} alt="" /></a> </p> } <nav className="l"> @@ -91,7 +91,7 @@ export default function Message({ data, visitor, children, ...rest }) { function Tags({ data, user, ...rest }) { return data.length > 0 && ( - <div className="msg-tags" itemProp="headline"> + <div className="msg-tags"> { data.map(tag => { return (<Link key={tag} to={{ pathname: `/${user.uname}`, search: `?tag=${tag}` }} title={tag}>{tag}</Link>); diff --git a/vnext/src/components/Thread.js b/vnext/src/components/Thread.js index 2097a315..a1255fd5 100644 --- a/vnext/src/components/Thread.js +++ b/vnext/src/components/Thread.js @@ -103,7 +103,7 @@ export default class Thread extends React.Component { <Avatar user={msg.user}> <div className="msg-ts"> <a href={`/${msg.user.uname}/${msg.mid}`}> - <time itemProp="datePublished dateModified" itemType="http://schema.org/Date" dateTime={msg.timestamp} + <time dateTime={msg.timestamp} title={moment.utc(msg.timestamp).local().format('lll')}> {moment.utc(msg.timestamp).fromNow()} </time> @@ -119,7 +119,7 @@ export default class Thread extends React.Component { { msg.photo && <p className="ir"><a href={`//i.juick.com/p/${msg.mid}-${msg.rid}.${msg.attach}`} data-fname={`${msg.mid}-${msg.rid}.${msg.attach}`}> - <img itemProp="image" src={`//i.juick.com/p/${msg.mid}-${msg.rid}.${msg.attach}`} alt="" /></a> + <img src={`//i.juick.com/p/${msg.mid}-${msg.rid}.${msg.attach}`} alt="" /></a> </p> } <div className="msg-links"> diff --git a/vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap b/vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap index e44b49db..ef7be4ed 100644 --- a/vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap +++ b/vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap @@ -29,20 +29,12 @@ exports[`Avatar renders correctly 1`] = ` } } > - <span - itemProp="author" - itemScope="" - itemType="http://schema.org/Person" - > + <span> <a href="/ugnich/" - itemProp="url" onClick={[Function]} - rel="author" > - <span - itemProp="name" - > + <span> ugnich </span> </a> diff --git a/vnext/src/views/index.html b/vnext/src/views/index.html index ba80b464..8cb189df 100644 --- a/vnext/src/views/index.html +++ b/vnext/src/views/index.html @@ -1,11 +1,9 @@ <!DOCTYPE html> <html prefix="og: http://ogp.me/ns#"> -<head id="org" itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization"> +<head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <title itemprop="name">Juick</title> - <meta itemprop="url" content="https://juick.com/" /> <meta property="og:type" content="website" /> <meta property="fb:app_id" content="130568668304" /> <meta name="viewport" content="width=device-width,initial-scale=1" /> @@ -25,7 +23,6 @@ <link rel="apple-touch-icon" sizes="144x144" href="//i.juick.com/apple-icon-144x144.png" /> <link rel="apple-touch-icon" sizes="152x152" href="//i.juick.com/apple-icon-152x152.png" /> <link rel="apple-touch-icon" sizes="180x180" href="//i.juick.com/apple-icon-180x180.png" /> - <link itemprop="logo" href="http://juick.com/#juick-logo" itemtype="http://schema.org/ImageObject" /> <link rel="icon" type="image/png" sizes="32x32" href="//i.juick.com/favicon-32x32.png" /> <link rel="icon" type="image/png" sizes="96x96" href="//i.juick.com/favicon-96x96.png" /> <link rel="icon" type="image/png" sizes="16x16" href="//i.juick.com/favicon-16x16.png" /> |