样式介绍

This commit is contained in:
ciaochaos 2020-06-22 14:57:32 +08:00
parent 45cc9d65f9
commit 882d2ad05f
11 changed files with 97 additions and 6 deletions

BIN
public/img/dsj.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 KiB

View File

@ -68,6 +68,7 @@
width: 100vw; width: 100vw;
white-space: nowrap; white-space: nowrap;
display: flex; display: flex;
margin-bottom: calc((-10px - 2vmin)/2);
} }
.Qr-s::-webkit-scrollbar { .Qr-s::-webkit-scrollbar {
@ -194,6 +195,10 @@
color: #000000; color: #000000;
} }
.Qr-item-selected .Qr-item-desc-inner {
opacity: 1;
}
.Qr-item-detail { .Qr-item-detail {
color: rgba(0,0,0,0.3); color: rgba(0,0,0,0.3);
margin-top: 5px; margin-top: 5px;
@ -207,6 +212,48 @@
transition-duration: 0.2s; transition-duration: 0.2s;
} }
.Qr-item-desc {
}
.Qr-item-desc-inner {
opacity: 0;
word-wrap: break-word;
word-break: break-all;
white-space: normal;
width: calc((100vw - 56px) / 2);
text-align: left;
font-size: 12px;
color: rgba(0,0,0,0.6);
-webkit-transition-timing-function: ease-in-out;
-moz-transition-timing-function: ease-in-out;
transition-timing-function: ease-in-out;
-webkit-transition-duration: 0.2s; /* Safari */
-moz-animation-duration: 0.2s;
transition-duration: 0.2s;
}
@media (min-width: 500px) {
.Qr-item-desc-inner {
width: 200px;
font-size: 14px;
}
}
.Qr-item-desc a {
font-weight: bold;
padding: 0px 0;
color: #000000;
border-bottom: 1px solid #000000;
}
.Qr-item-desc a:hover {
color: #000000;
border-bottom: 1px solid #000000;
text-decoration: none;
}
tr { tr {
width: 100%; width: 100%;
display: inline-flex; display: inline-flex;

View File

@ -2,6 +2,7 @@ import React from "react";
import {ParamTypes} from "../../constant/ParamTypes"; import {ParamTypes} from "../../constant/ParamTypes";
import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler"; import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler";
import {createRenderer} from "../style/Renderer"; import {createRenderer} from "../style/Renderer";
import RendererResImage from "./RendererResImage";
function listPoints(qrcode, params) { function listPoints(qrcode, params) {
if (!qrcode) return [] if (!qrcode) return []
@ -91,3 +92,7 @@ const Renderer25D = createRenderer({
}) })
export default Renderer25D export default Renderer25D
Renderer25D.detail = (
<div>通向三维的半路可能有一点点难以识别</div>
);

View File

@ -232,14 +232,13 @@ export const RendererRandRound = createRenderer({
}); });
RendererRect.detail = ( RendererRect.detail = (
<p>生成矩形<LinkTrace href="https://zh.wikipedia.org/wiki/QR%E7%A2%BC">二维码</LinkTrace></p> <div>最基本的二维码也有有趣的玩法</div>
); );
RendererRound.detail = ( RendererRound.detail = (
<p>生成圆形二维码</p> <div>大厂喜欢的玩法非常适合在中间放置 Logo</div>
); );
RendererRandRound.detail = ( RendererRandRound.detail = (
<p>生成随机点圆形二维码</p> <div>随机圆点混乱与秩序</div>
); );

View File

@ -2,6 +2,8 @@ import React from "react";
import {ParamTypes} from "../../constant/ParamTypes"; import {ParamTypes} from "../../constant/ParamTypes";
import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler"; import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler";
import {createRenderer} from "../style/Renderer"; import {createRenderer} from "../style/Renderer";
import LinkTrace from "../link/LinkTrace";
import {RendererRect} from "./RendererBase";
function listPoints(qrcode, params) { function listPoints(qrcode, params) {
if (!qrcode) return [] if (!qrcode) return []
@ -193,4 +195,8 @@ const RenderDSJ = createRenderer({
getParamInfo: getParamInfo, getParamInfo: getParamInfo,
}) })
RenderDSJ.detail = (
<div>复刻了 DSJ <LinkTrace href="https://qrbtf.com/img/dsj.jpg" rel="noopener noreferrer" target="_blank">手工作品</LinkTrace></div>
);
export default RenderDSJ export default RenderDSJ

View File

@ -2,6 +2,8 @@ import React from "react";
import {ParamTypes} from "../../constant/ParamTypes"; import {ParamTypes} from "../../constant/ParamTypes";
import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler"; import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler";
import {createRenderer} from "../style/Renderer"; import {createRenderer} from "../style/Renderer";
import LinkTrace from "../link/LinkTrace";
import RenderDSJ from "./RendererDSJ";
function listPoints(qrcode, params) { function listPoints(qrcode, params) {
if (!qrcode) return [] if (!qrcode) return []
@ -231,3 +233,11 @@ export const RendererFuncB= createRenderer({
listPoints: listPoints, listPoints: listPoints,
getParamInfo: getParamInfoFuncB, getParamInfo: getParamInfoFuncB,
}); });
RendererFuncA.detail = (
<div>点干扰</div>
);
RendererFuncB.detail = (
<div>线干扰</div>
);

View File

@ -3,6 +3,7 @@ import {ParamTypes} from "../../constant/ParamTypes";
import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler"; import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler";
import {createRenderer} from "../style/Renderer"; import {createRenderer} from "../style/Renderer";
import {defaultImage} from "../../constant/References"; import {defaultImage} from "../../constant/References";
import {RendererRandRound} from "./RendererBase";
function listPoints(qrcode, params) { function listPoints(qrcode, params) {
if (!qrcode) return [] if (!qrcode) return []
@ -158,3 +159,7 @@ const RendererImage = createRenderer({
export default RendererImage export default RendererImage
RendererImage.detail = (
<div>加了背景图试试看还能扫描吗</div>
);

View File

@ -2,6 +2,8 @@ import React from "react";
import {ParamTypes} from "../../constant/ParamTypes"; import {ParamTypes} from "../../constant/ParamTypes";
import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler"; import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler";
import {createRenderer} from "../style/Renderer"; import {createRenderer} from "../style/Renderer";
import LinkTrace from "../link/LinkTrace";
import RenderDSJ from "./RendererDSJ";
function listPoints(qrcode, params) { function listPoints(qrcode, params) {
if (!qrcode) return [] if (!qrcode) return []
@ -223,3 +225,7 @@ export const RendererLine= createRenderer({
listPoints: listPoints, listPoints: listPoints,
getParamInfo: getParamInfoLine, getParamInfo: getParamInfoLine,
}); });
RendererLine.detail = (
<div>连连看可选方向</div>
);

View File

@ -1,6 +1,7 @@
import React from "react"; import React from "react";
import {rand} from "../../utils/util"; import {rand} from "../../utils/util";
import {createRenderer} from "../style/Renderer"; import {createRenderer} from "../style/Renderer";
import {RendererLine} from "./RendererLine";
function listPoints(qrcode, params) { function listPoints(qrcode, params) {
if (!qrcode) return [] if (!qrcode) return []
@ -47,3 +48,7 @@ const RendererRandRect = createRenderer({
}) })
export default RendererRandRect export default RendererRandRect
RendererRandRect.detail = (
<div>有一点点骚的配色很适合你</div>
);

View File

@ -3,6 +3,7 @@ import {gamma} from "../../utils/imageUtils";
import {ParamTypes} from "../../constant/ParamTypes"; import {ParamTypes} from "../../constant/ParamTypes";
import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler"; import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler";
import {defaultResImage} from "../../constant/References"; import {defaultResImage} from "../../constant/References";
import RendererRandRect from "./RendererRandRect";
function listPoints(qrcode, params) { function listPoints(qrcode, params) {
if (!qrcode) return [] if (!qrcode) return []
@ -185,3 +186,8 @@ const RendererResImage = ({qrcode, params, setParamInfo}) => {
export default RendererResImage export default RendererResImage
RendererResImage.detail = (
<div>满满科技感的重采样二值化像素点阵有点东西</div>
);

View File

@ -17,10 +17,12 @@ const Style = ({ value, renderer, selected, details, onSelected }) => (
<div className="Qr-item-detail"> <div className="Qr-item-detail">
{value} {value}
</div> </div>
<div className="Qr-item-detail"> <div className="Qr-item-desc">
<div className="Qr-item-desc-inner">
{details} {details}
</div> </div>
</div> </div>
</div>
); );
Style.propTypes = { Style.propTypes = {