python: adaptive layout

This commit is contained in:
Oleg Sinizin
2021-06-29 12:53:53 +03:00
committed by Sergey Linnik
parent ab82be9b3d
commit c52dbdde4e
3 changed files with 701 additions and 30 deletions

View File

@ -0,0 +1,580 @@
@media (min-width: 1280px) and (max-width: 1380px) {
.copy {
margin-right: 6.5%;
}
footer table tr td:first-child {
margin-left: 6.5%;
}
}
@media (max-width: 1280px) and (min-width: 1080px) {
.tableRow td:first-child {
flex-grow: 1;
width: 25%;
}
.tableHeaderCellFileName {
width: 25%;
}
.tableHeaderCellEditors {
width: 13%;
}
.tableHeaderCellViewers {
width: 29%;
text-align: end;
}
.tableHeaderCellDownload {
width: 21%;
padding-right: 18px;
}
.tableHeaderCellRemove {
padding-left: 13px;
}
footer table tr td:first-child {
margin-left: 5%;
}
.copy {
margin-right: 5%;
padding-right: 32px;
}
.left-panel {
margin-left: 48px;
width: 95%;
}
}
@media (max-width: 1080px) {
.copy {
margin-right: 32px;
}
footer table tr td:first-child {
margin-left: 0;
}
.tableRow {
width: 90%;
}
.tableHeaderCellFileName {
width: 16%;
}
.tableHeaderCellEditors {
width: 13%;
}
.tableHeaderCellViewers {
width: 38%;
}
.tableHeaderCellDownload {
width: 23%;
}
.tableHeaderCellRemove {
padding-left: 0px;
}
}
@media (max-width: 1008px) {
.left-panel {
margin-left: 0;
width: 94%;
}
.main-panel {
left: -1%;
padding: 48px 26px 24px;
}
}
@media (max-width: 769px) and (min-width: 593px) {
.contentCells-icon{
width: 5%;
}
.tableRow {
width: 55%;
}
.tableRow td:first-child {
border: none;
flex-grow: 1;
width: 100%;
max-width: 100%;
}
.tableHeader {
display: none;
}
.scroll-table-body {
top: 31px;
}
footer {
height: 80px;
}
.left-panel {
width: 90%;
}
.main-panel {
left: 0;
padding: 48px 18px 24px;
}
footer table td {
margin-left: 0;
margin-right: 0;
padding-right: 4px;
padding-left: 4px;
}
.copy {
/*margin-right: 0.5%;*/
padding-right: 1%;
}
footer table tr td:first-child {
margin-left: 2%;
padding-left: 1%;
margin-right: 1.5%;
}
.contentCells-shift {
padding-right: 22px;
}
}
@media (max-width: 715px) {
.tableRow {
width: 45%;
}
}
@media (max-width: 670px) and (min-width: 620px){
.main-panel{
width: 90%;
}
}
@media (max-width: 681px) and (min-width: 593px) {
.left-panel {
width: 10%;
}
.main-panel {
left: 2%;
padding: 48px 0 24px;
}
.help-block {
margin: 48px 20px 24px;
}
.file-upload{
width: 100%;
}
#fileupload{
width: 100%;
}
}
@media (max-width: 1080px) and (min-width: 970px) {
.tableHeader {
width: 90%;
}
.tableRow td:first-child {
flex-grow: 0;
width: 15%;
}
.tableHeaderCellFileName {
width: 16%;
}
.tableHeaderCellEditors {
width: 13%;
}
.tableHeaderCellViewers {
text-align: end;
width: 37%;
}
.tableHeaderCellDownload {
width: 22%;
}
}
@media (max-width: 970px) and (min-width: 890px) {
.tableHeader {
width: 75%;
}
.tableHeaderCellEditors {
width: 26%;
text-align: start;
}
.tableHeaderCellFileName {
width: 17%;
}
.tableHeaderCellViewers {
width: 27%;
text-align: end;
}
.tableHeaderCellDownload {
padding-right: 18px;
width: 20%;
}
.tableHeaderCellRemove {
padding-left: 0;
}
.tableRow {
width: 75%;
}
.tableRow td:last-child {
padding-right: 38px;
}
.tableRow td:first-child {
flex-grow: 0;
width: 15%;
}
.contentCells-icon {
width: 3%;
}
}
@media (max-width: 890px) and (min-width: 769px ) {
.left-panel{
width: 20%;
}
.contentCells-shift {
padding-right: 28px;
}
.main-panel {
width: 580px;
}
.tableRow {
width: 95%;
}
.tableHeader {
width: 95%;
}
.tableHeaderCellViewers {
width: 22%;
text-align: end;
}
.tableHeaderCellDownload {
padding-right: 4px;
width: 20%;
text-align: end;
}
.tableHeaderCellFileName {
width: 20%;
}
.tableHeaderCellEditors {
text-align: start;
width: 31%;
}
.tableHeaderCellViewers {
width: 18%;
}
}
@media (max-width: 890px) {
.tableRow td:first-child {
max-width: 17%;
}
}
.downloadContentCellShift:after {
top: 33px;
left: 0;
content: "";
background: #e5e5e5;
height: 1px;
position: absolute;
width: 100%;
}
@media (max-width: 769px) {
.tableRow td:first-child {
max-width: 100%;
}
.downloadContentCellShift:after {
top: 65px;
}
}
@media (max-width: 593px ) {
.file-upload{
width: 100%;
}
#fileupload{
width: 100%;
}
.tableHeader {
display: none;
}
.scroll-table-body {
top: 31px;
}
.menu {
display: flex;
}
header .center > a {
position: absolute;
left: 30px;
}
footer table tr {
justify-content: center;
}
footer table td {
padding-top: 16px;
padding-right: 32px;
padding-left: 32px;
}
footer {
height: 80px;
}
.copy {
margin: 0;
}
.left-panel {
width: 10%;
}
.help-block {
margin: 16px 10px 6px;
}
.main-panel {
left: 2%;
padding: 16px 0 6px;
}
.tableRow {
width: 40%;
}
.tableRow td {
border: none;
}
.firstContentCellShift {
border: none;
flex-basis: 10%;
flex-grow: 1;
}
.downloadContentCellShift {
max-width: 7%;
margin-right: -11px;
margin-left: auto;
}
.contentCells-icon {
width: 13%;
}
.tableRow td:last-child {
width: 12%;
padding-right: 40px;
border: none;
}
.contentCells-shift {
padding-right: 35px;
}
.downloadContentCellShift:after {
/*content: none;*/
top:97px;
width: 85%;
}
.firstContentCellViewers {
margin-left: 0;
border-bottom: 1px solid #e5e5e5 !important;
}
.firstContentCellViewers ~ td {
border-bottom: 1px solid #e5e5e5;
}
.tableRow td:first-child{
border: none;
width: 85%;
}
.downloadContentCellShift:after{
top: -1px;
}
.contentCellsEmpty{
display: none;
width: 1%;
}
}
@media (max-width: 560px) and (min-width: 510px) {
.contentCells-icon {
width: 13%;
}
.downloadContentCellShift {
padding-right: 45px;
max-width: 4%;
}
}
@media (max-width: 510px) and (min-width: 470px) {
.tableRow {
width: 35%;
}
.tableRow td:first-child{
width: 83%;
}
.contentCells-icon {
width: 13%;
}
.downloadContentCellShift {
max-width: 6%;
padding-right: 37px;
}
.firstContentCellShift {
flex-basis: 9%;
}
.tableRow td:last-child {
padding-right: 28px;
}
}
@media (max-width: 470px) and (min-width: 420px) {
.tableRow {
width: 30%;
}
.tableRow td:first-child{
width: 85%;
}
.contentCells-icon {
width: 11%;
}
.downloadContentCellShift {
max-width: 3%;
padding-right: 37px;
padding-left: 0;
}
.firstContentCellShift {
margin-left: 1px;
flex-basis: 15%;
}
.tableRow td:last-child {
width: 5%;
padding-right: 63px;
}
.firstContentCellViewers{
padding-right: 2px;
width: 12%;
}
.contentCellsEmpty{
display: none;
}
}
@media (max-width: 420px) and (min-width: 320px) {
.tableRow {
width: 25%;
}
.tableRow td:last-child {
width: 6%;
padding-right: 16px;
}
.downloadContentCellShift {
max-width: 4%;
margin-right: -18px;
margin-left: -1px;
}
.firstContentCellShift {
flex-basis: 2%;
}
.contentCells-icon{
width: 10%;
}
footer table td {
margin: 0;
padding-right: 5px;
padding-left: 5px;
}
.copy {
padding-right: 5px;
margin: 0;
}
.firstContentCellViewers{
padding-right: 2px;
width: 11%;
}
}
@media (max-width: 1160px) {
.left-panel {
margin-left: 0;
}
}
@media (min-width: 593px) {
.contentCellsEmpty {
display: none;
}
}
@media (max-width: 769px) and (min-width: 715px){
.tableRow{
width: 50%;
}
}

View File

@ -41,6 +41,7 @@ body {
overflow-y: overlay;
padding: 0;
text-decoration: none;
overflow-x: hidden;
}
form {
@ -72,6 +73,7 @@ header img {
}
.center {
position: relative;
margin: 0 auto 0;
width: 1152px;
}
@ -362,19 +364,30 @@ footer {
background: #333333;
color: #AAAAAA;
height: 64px;
min-width: 1152px;
width: auto;
}
width: 100%;
}
footer > .center{
width: 100%;
}
footer table {
width: 100%;
border-spacing: 0;
}
footer table tr {
position: relative;
display: flex;
flex-direction: row;
align-items: center;
align-content: center;
flex-wrap: wrap;
width: 100%;
height: 64px;
}
footer table td {
position: relative;
padding-left: 32px;
}
@ -389,9 +402,16 @@ footer a:visited {
footer a:hover {
text-decoration: none;
}
footer table tr td:first-child {
margin-left: 14%;
}
.copy {
padding-left: 510px;
color: #aaaaaa;
width: max-content;
position: relative;
margin-left: auto;
margin-right: 14%;
/*padding-left: 510px;*/
}
.help-block {
@ -689,4 +709,62 @@ footer a:hover {
line-height: 160%;
letter-spacing: -0.02em;
word-wrap: break-word;
}
}
.menu {
cursor: pointer;
display: none;
flex-wrap: nowrap;
flex-direction: column;
justify-content: space-between;
top: 23px;
left: 12px;
position: absolute;
content: "";
height: 26px;
width: 30px;
}
.menu span {
content: "";
width: 26px;
height: 3px;
background: rgb(194, 194, 194);
}
html {
overflow-x: hidden;
}
.tableRow {
width: 100%;
display: flex;
flex-wrap: wrap;
flex-direction: row;
position: relative;
}
.tableRow td:first-child {
display: flex;
flex-grow: 1;
max-width: 25%;
}
.tableHeaderCellFileName {
width: 30%;
}
.tableHeaderCellEditors {
width: 28%;
}
.tableHeaderCellViewers {
text-align: center;
width: 18%
}
.firstContentCellViewers {
margin-left: auto;
}

View File

@ -38,6 +38,7 @@
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:900,800,700,600,500,400,300&subset=latin,cyrillic-ext,cyrillic,latin-ext" />
<link rel="stylesheet" type="text/css" href="{% static "css/stylesheet.css" %}" />
<link rel="stylesheet" type="text/css" href="{% static "css/jquery-ui.css" %}" />
<link rel="stylesheet" type="text/css" href="{% static "css/media.css" %}" />
</head>
<body>
<header>
@ -158,40 +159,52 @@
<img src="{% static "images/mobile.svg" %}" alt="Open in editor for mobile devices" title="Open in editor for mobile devices"/>
</a>
</td>
<td class="contentCells contentCells-icon">
{% if file.type == 'word' %}
<a href="edit?filename={{ file.title }}&type=desktop&mode=review" target="_blank">
<img src="{% static "images/review.svg" %}" alt="Open in editor for review" title="Open in editor for review"/>
</a>
{% elif file.type == 'cell' %}
<a href="edit?filename={{ file.title }}&type=desktop&mode=filter" target="_blank">
<img src="{% static "images/filter.svg" %}" alt="Open in editor without access to change the filter" title="Open in editor without access to change the filter" />
</a>
{% endif %}
</td>
<td class="contentCells contentCells-icon">
<a href="edit?filename={{ file.title }}&type=desktop&mode=comment" target="_blank">
<img src="{% static "images/comment.svg" %}" alt="Open in editor for comment" title="Open in editor for comment"/>
</a>
</td>
<td class="contentCells contentCells-icon">
{% if file.type == 'word' %}
{% if file.type == 'word' %}
<td class="contentCells contentCells-icon">
<a href="edit?filename={{ file.title }}&type=desktop&mode=review" target="_blank">
<img src="{% static "images/review.svg" %}" alt="Open in editor for review" title="Open in editor for review"/>
</a>
</td>
{% elif file.type == 'cell' %}
<td class="contentCells contentCells-icon">
<a href="edit?filename={{ file.title }}&type=desktop&mode=filter" target="_blank">
<img src="{% static "images/filter.svg" %}" alt="Open in editor without access to change the filter" title="Open in editor without access to change the filter" />
</a>
</td>
{% endif %}
{% if file.type!='word' && file.type!='cell' %}
<td class="contentCells contentCells-icon contentCellsEmpty"></td>
{% endif %}
{% if file.type == 'word' %}
<td class="contentCells contentCells-icon">
<a href="edit?filename={{ file.title }}&type=desktop&mode=fillForms" target="_blank">
<img src="{% static "images/fill-forms.svg" %}" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
</a>
{% endif %}
</td>
<td class="contentCells contentCells-shift contentCells-icon">
{% if file.type == 'word' %}
</td>
{% else %}
<td class="contentCells contentCells-icon "></td>
{% endif %}
{% if file.type == 'word' %}
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift">
<a href="edit?filename={{ file.title }}&type=desktop&mode=blockcontent" target="_blank">
<img src="{% static "images/block-content.svg" %}" alt="Open in editor without content control modification" title="Open in editor without content control modification"/>
</a>
{% endif %}
</td>
</td>
{% else %}
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift"></td>
{% endif %}
{% if file.type!='word' && file.type!='cell' %}
<td class="contentCells contentCells-icon "></td>
{% endif %}
{% else %}
<td class="contentCells contentCells-shift contentCells-icon" colspan="6"></td>
<td class="contentCells contentCells-shift contentCells-icon contentCellsEmpty" colspan="6"></td>
{% endif %}
<td class="contentCells contentCells-icon">
<td class="contentCells contentCells-icon firstContentCellViewers">
<a href="edit?filename={{ file.title }}&type=desktop&mode=view" target="_blank">
<img src="{% static "images/desktop.svg" %}" alt="Open in viewer for full size screens" title="Open in viewer for full size screens"/>
</a>
@ -206,7 +219,7 @@
<img src="{% static "images/embeded.svg" %}" alt="Open in embedded mode" title="Open in embedded mode"/>
</a>
</td>
<td class="contentCells contentCells-icon contentCells-shift">
<td class="contentCells contentCells-icon contentCells-shift downloadContentCellShift">
<a href="download?fileName={{ file.title }}">
<img class="icon-download" src="{% static "images/download.svg" %}" alt="Download" title="Download" />
</a>
@ -222,10 +235,10 @@
</table>
</div>
</div>
{% endif %}
{% endif %}
</div>
</td>
</tr>
</tr>
</tbody>
</table>
</div>