Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/common-elements/panels.ts
This commit is contained in:
sajjad 2019-08-31 16:04:28 +04:30
commit eff165618c
11 changed files with 31 additions and 14 deletions

View File

@ -15,6 +15,7 @@
} }
</style> </style>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<link href="https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir.css" rel="stylesheet">
</head> </head>
<body> <body>
@ -25,4 +26,4 @@
<!-- <script src="../bundles/redoc.standalone.js"></script> --> <!-- <script src="../bundles/redoc.standalone.js"></script> -->
</body> </body>
</html> </html>

View File

@ -14,10 +14,11 @@
</style> </style>
{{{redocHead}}} {{{redocHead}}}
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<link href="https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir.css" rel="stylesheet">
</head> </head>
<body> <body>
{{{redocHTML}}} {{{redocHTML}}}
</body> </body>
</html> </html>

View File

@ -16,6 +16,7 @@
} }
</style> </style>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<link href="https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir.css" rel="stylesheet">
</head> </head>
<body> <body>
@ -23,4 +24,4 @@
<script src="redoc.standalone.js"></script> <script src="redoc.standalone.js"></script>
</body> </body>
</html> </html>

View File

@ -23,6 +23,7 @@
} }
</style> </style>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<link href="https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir.css" rel="stylesheet">
</head> </head>
<body> <body>
@ -43,4 +44,4 @@
</script> </script>
</body> </body>
</html> </html>

View File

@ -1,9 +1,9 @@
openapi: 3.0.0 openapi: 3.0.0
servers: servers:
- url: //petstore.swagger.io/v2 - url: //petstore.swagger.io/v2
description: Default server description: سرور پیش فرض
- url: //petstore.swagger.io/sandbox - url: //petstore.swagger.io/sandbox
description: Sandbox server description: sandbox سرور
info: info:
description: | description: |
این یک فایل تست api-doc است که مرتبط با مدیریت یک پت‌شاپ طراحی و نوشته شده است. این یک فایل تست api-doc است که مرتبط با مدیریت یک پت‌شاپ طراحی و نوشته شده است.

View File

@ -16,10 +16,11 @@
} }
</style> </style>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<link href="https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir.css" rel="stylesheet">
</head> </head>
<body> <body>
<redoc id="example"></redoc> <redoc id="example"></redoc>
</body> </body>
</html> </html>

View File

@ -40,6 +40,7 @@ const server = http.createServer(async (request, response) => {
</style> </style>
<script src="redoc.standalone.js"></script> <script src="redoc.standalone.js"></script>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<link href="https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir.css" rel="stylesheet">
${css} ${css}
</head> </head>
<body> <body>

View File

@ -4,7 +4,8 @@ import styled, { media } from '../styled-components';
export const MiddlePanel = styled.div` export const MiddlePanel = styled.div`
width: calc(100% - ${props => props.theme.rightPanel.width}); width: calc(100% - ${props => props.theme.rightPanel.width});
padding: 0 ${props => props.theme.spacing.sectionHorizontal}px; padding: 0 ${props => props.theme.spacing.sectionHorizontal}px;
text-align: ${({ theme }) => (theme.typography.direction === 'rtl') ? 'right' : 'left'}; direction: ${props => props.theme.typography.direction || 'ltr'};
text-align: ${props => (props.theme.typography.direction === 'rtl') ? 'right' : 'inherit'};
${media.lessThan('medium', true)` ${media.lessThan('medium', true)`
width: 100%; width: 100%;

View File

@ -28,7 +28,15 @@ export const DownloadButton = styled.a`
export const InfoSpan = styled.span` export const InfoSpan = styled.span`
&::before { &::before {
content: '|'; content: '|';
display: inline-block; display: ${props => (props.theme.typography.direction === 'ltr') ? 'inline-block' : 'none'};
opacity: 0.5;
width: ${delimiterWidth}px;
text-align: center;
}
&::after {
content: '|';
display: ${props => (props.theme.typography.direction === 'rtl') ? 'inline-block' : 'none'};
opacity: 0.5; opacity: 0.5;
width: ${delimiterWidth}px; width: ${delimiterWidth}px;
text-align: center; text-align: center;

View File

@ -25,6 +25,7 @@ export const EndpointInfo = styled.div<{ expanded?: boolean; inverted?: boolean
border: ${props => (props.inverted ? '0' : '1px solid transparent')}; border: ${props => (props.inverted ? '0' : '1px solid transparent')};
border-bottom: ${props => (props.inverted ? '1px solid #ccc' : '0')}; border-bottom: ${props => (props.inverted ? '1px solid #ccc' : '0')};
transition: border-color 0.25s ease; transition: border-color 0.25s ease;
direction: ltr;
${props => ${props =>
(props.expanded && !props.inverted && `border-color: ${props.theme.colors.border.dark};`) || ''} (props.expanded && !props.inverted && `border-color: ${props.theme.colors.border.dark};`) || ''}
@ -59,7 +60,7 @@ export const ServersOverlay = styled.div<{ expanded: boolean }>`
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
transition: all 0.25s ease; transition: all 0.25s ease;
text-align: ${({ theme }) => (theme.typography.direction === 'rtl') ? 'right' : 'left'};
${props => (props.expanded ? '' : 'transform: translateY(-50%) scaleY(0);')} ${props => (props.expanded ? '' : 'transform: translateY(-50%) scaleY(0);')}
`; `;
@ -68,6 +69,7 @@ export const ServerItem = styled.div`
`; `;
export const ServerUrl = styled.div` export const ServerUrl = styled.div`
text-align: left;
padding: 5px; padding: 5px;
border: 1px solid #ccc; border: 1px solid #ccc;
background: #fff; background: #fff;
@ -75,5 +77,5 @@ export const ServerUrl = styled.div`
color: ${props => props.theme.colors.primary.main}; color: ${props => props.theme.colors.primary.main};
> span { > span {
color: ${props => props.theme.colors.text.primary}; color: ${props => props.theme.colors.text.primary};
} };
`; `;

View File

@ -99,17 +99,17 @@ const defaultTheme: ThemeInterface = {
fontWeightRegular: '400', fontWeightRegular: '400',
fontWeightBold: '600', fontWeightBold: '600',
fontWeightLight: '300', fontWeightLight: '300',
fontFamily: 'Roboto, sans-serif', fontFamily: 'Roboto, sans-serif, Vazir',
smoothing: 'antialiased', smoothing: 'antialiased',
optimizeSpeed: true, optimizeSpeed: true,
headings: { headings: {
fontFamily: 'Montserrat, sans-serif', fontFamily: 'Montserrat, sans-serif, Vazir',
fontWeight: '400', fontWeight: '400',
lineHeight: '1.6em', lineHeight: '1.6em',
}, },
code: { code: {
fontSize: '13px', fontSize: '13px',
fontFamily: 'Courier, monospace', fontFamily: 'Courier, monospace, Vazir',
lineHeight: ({ typography }) => typography.lineHeight, lineHeight: ({ typography }) => typography.lineHeight,
fontWeight: ({ typography }) => typography.fontWeightRegular, fontWeight: ({ typography }) => typography.fontWeightRegular,
color: '#e53935', color: '#e53935',