openrat-cms

# OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs

openrat-workbench.less (9567B)


      1 /*
      2 OpenRat Content Management System
      3 Copyright (C) 2002-2010 Jan Dankert
      4 
      5 This program is free software; you can redistribute it and/or
      6 modify it under the terms of the GNU General Public License
      7 as published by the Free Software Foundation; either version 2
      8 of the License, or (at your option) any later version.
      9 
     10 This program is distributed in the hope that it will be useful,
     11 but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 GNU General Public License for more details.
     14 
     15 You should have received a copy of the GNU General Public License
     16 along with this program; if not, write to the Free Software
     17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
     18 */
     19 
     20 /*
     21 Basis-Style for Openrat.
     22 */
     23 
     24 
     25 
     26 
     27 
     28 
     29 .border-radius (@radius) {
     30     border-radius: @radius;
     31     -moz-border-radius: @radius;
     32     -webkit-border-radius: @radius;
     33     -khtml-border-radius: @radius;
     34 }
     35 
     36 
     37 
     38 
     39 
     40 div#dialog {
     41 
     42     > .view {
     43         overflow: auto;
     44 
     45         /*width:60%;*/
     46         position: absolute;
     47         top: 5%;
     48         left: 10%;
     49         width: 80%;
     50         height: 80%;
     51 
     52         @media @smartphones {
     53             top: 2.5%;
     54             left: 2.5%;
     55             width: 95%;
     56             height: 95%;
     57         }
     58 
     59 
     60         z-index: 110;
     61 
     62         border: 1px solid !important;
     63     }
     64 
     65     &.is-closed {
     66         display: none;
     67         width: 0;
     68     }
     69 
     70     /* Modale Dialoge */
     71     .filler {
     72         position: absolute;
     73         z-index: 100;
     74         top: 0;
     75         left: 0;
     76         height: 100%;
     77         width: 100%;
     78         opacity: 0.5;
     79 
     80         span.icon {
     81             opacity: 1;
     82             font-size: 3em;
     83             font-weight: bold;
     84             text-align: center;
     85             width: 40px;
     86             height: 40px;
     87 
     88             position: absolute;
     89             right: 20px;
     90             top: 20px;
     91         }
     92     }
     93 
     94 }
     95 
     96 .arrow {
     97     width: 0;
     98     height: 0;
     99     margin: 6px;
    100     padding: 0;
    101     font-size: 0;
    102 
    103     &.arrow-down {
    104         border-right: 6px solid transparent;
    105         border-top: 6px solid;
    106         border-left: 6px solid transparent;
    107         border-bottom: 4px solid transparent;
    108         margin-top: 10px;
    109     }
    110     &.arrow-right {
    111         border-top: 6px solid transparent;
    112         border-left: 6px solid;
    113         border-bottom: 6px solid transparent;
    114         border-right: 4px solid transparent;
    115         margin-left: 10px;
    116     }
    117 }
    118 
    119 #editor .dirty {
    120     font-weight: bold;
    121 }
    122 
    123 .visible-for-nojs {
    124     display: none;
    125 }
    126 
    127 html.nojs .noscript {
    128     display: block;
    129 }
    130 
    131 .toggle-open-close {
    132 
    133     display: flex;
    134     flex-direction: column;
    135 
    136     .on-click-open-close {
    137         cursor: pointer;
    138         font-weight: normal;
    139         //flex: 1;
    140     }
    141 
    142     > .closable {
    143         //transition: transform 0.5s ease-in-out;
    144         transition: opacity 0.3s ease-out;
    145         //transition: max-height 1s linear;
    146         flex: 1;
    147         display: block;
    148         //overflow: hidden;
    149     }
    150 
    151     /* Geschlossen */
    152     &.closed {
    153         > .on-click-open-close > .on-closed {
    154             display: inline;
    155         }
    156         > .on-click-open-close > .on-open {
    157             display: none;
    158         }
    159         > .closable {
    160             //flex: 0.0001;
    161             opacity: 0;
    162             max-height: 0;
    163             overflow: hidden;
    164             //display: none;
    165         }
    166     }
    167 
    168     /* Offen */
    169     &.open {
    170         > .closable {
    171             height: auto;
    172         }
    173         > .on-click-open-close > .on-closed {
    174             display: none;
    175         }
    176         > .on-click-open-close > .on-open {
    177             display: inline;
    178         }
    179     }
    180 }
    181 
    182 @smartphones: ~"only screen and (max-width: 55rem)";
    183 @wide: ~"only screen and (min-width: 75rem)";
    184 
    185 
    186 html, body { width:100%; height:100%;}
    187 
    188 div#workbench {
    189 
    190     width: 100%;
    191     height: 100%;
    192     display: flex;
    193     flex-direction: column;
    194 
    195 
    196     /*
    197 
    198     div.panel.modal {
    199     position: relative;
    200     z-index: 101;
    201     border: 1px solid !important;
    202     }
    203      */
    204 
    205     /* vertikale Flex-Box zwischen Header und Hauptbereich */
    206     > * {
    207     }
    208 
    209     > header {
    210         height: 3.0rem;
    211 
    212         .toolbar-icon {
    213 
    214             .arrow-down {
    215                 display: inline;
    216             }
    217 
    218             span.label, .arrow-down {
    219                 @media @smartphones {
    220                     display: none;
    221                 }
    222             }
    223         }
    224     }
    225 
    226     > .or-main-area {
    227         flex: 1;
    228 
    229         /* Horizontale Flexbox */
    230         //display: flex;
    231         //flex-direction: row;
    232 
    233         /*
    234         https://stackoverflow.com/questions/28636832/firefox-overflow-y-not-working-with-nested-flexbox
    235         Whenever you've got an element with overflow: [hidden|scroll|auto] inside of a flex item, you need to give its ancestor flex item min-width:0 (in a horizontal flex container) or min-height:0 (in a vertical flex container), to disable this min-sizing behavior, or else the flex item will refuse to shrink smaller than the child's min-content size.
    236          */
    237         //min-width: 0;
    238         min-height: 0;
    239 
    240         padding-top: 0.5em;
    241 
    242         > * {
    243             min-width: 0;
    244             min-height: 0;
    245             overflow-y: auto;
    246             overflow-x: hidden;
    247 
    248             height:100%;
    249         }
    250 
    251         > nav {
    252             width:33%;
    253             transition: width 0.15s ease-in-out;
    254             position: fixed;
    255             height: ~"calc(100% - 3.0rem - 0.5em)";
    256 
    257             @media @smartphones {
    258                 width: 0;
    259             }
    260 
    261 
    262             &.small {
    263                 width: 5%;
    264                 opacity: 0.5;
    265                 overflow-y: hidden;
    266 
    267                 &:hover {
    268                     width: 33%;
    269                     overflow-y: auto;
    270                     opacity: 1;
    271                     background-color: inherit;
    272                     border-right: 1px solid inherit;
    273                 }
    274 
    275                 & ~ .or-workplace {
    276                     margin-left:5%;
    277                 }
    278             }
    279 
    280             &.open {
    281 
    282                 overflow-y: auto;
    283                 @media @smartphones {
    284                     width: 95%;
    285                     border-right: 1px solid;
    286                     opacity: 0.95;
    287                 }
    288             }
    289 
    290             @media @wide {
    291                 width: 33%;
    292                 overflow-y: auto;
    293             }
    294 
    295 
    296             div.view {
    297                 height: 100%;
    298             }
    299         }
    300 
    301         header {
    302 
    303             .or-view-icon, .or-view-headline {
    304                 margin: 0.3em;
    305                 display: inline;
    306                 font-size: 1.2em;
    307                 line-height: 1.5em;
    308             }
    309 
    310         }
    311 
    312         > .or-workplace {
    313 
    314             margin-left: 33%;
    315             transition: margin-left 0.15s ease-in-out;
    316 
    317             @media @smartphones {
    318                 margin-left: 0;
    319             }
    320 
    321             > #editor {
    322 
    323                 transition: opacity 0.5s ease;
    324                 display: flex;
    325                 flex-direction: column;
    326 
    327                 &.is-closed {
    328                     flex: 0.5;
    329                     cursor: not-allowed;
    330                     pointer-events: none;
    331 
    332                     @media @smartphones {
    333                         // do not display the views in mobile mode.
    334                         flex: 0;
    335                     }
    336 
    337                     //overflow: hidden;
    338                 }
    339 
    340                 > section {
    341                     margin: 1.5em;
    342                     @media @smartphones {
    343                         margin:0.5em;
    344                     }
    345 
    346                     border: 1px solid;
    347 
    348                     .border-radius(5px);
    349 
    350 
    351                     .view-toolbar {
    352                         display: inline;
    353                     }
    354 
    355                     .view {
    356                         //transition: flex 0.5s ease-in-out;
    357                     }
    358 
    359                     // Wenn Sektion geschlossen, keine Toolbar anzeigen.
    360                     &.closed {
    361                         .view-toolbar {
    362                             display: none;
    363                         }
    364                         //.view {                        flex: 0;                    }
    365                     }
    366 
    367                     // Diabled Sections are not displayed.
    368                     &.disabled {
    369                         //display: none;
    370                     }
    371                     &.is-empty {
    372                         //display: none;
    373                     }
    374                 }
    375             }
    376 
    377         }
    378 
    379     }
    380 
    381 }
    382 
    383 #title {
    384 
    385     .toggle-nav-small {
    386         display: inline;
    387         @media @smartphones {
    388             display: none;
    389         }
    390     }
    391 
    392     .toggle-nav-open-close {
    393         display: none;
    394         @media @smartphones {
    395             display: inline;
    396         }
    397     }
    398 
    399     .toolbar-icon.search {
    400         //width: 8em;
    401         @media @smartphones {
    402             //width: 8em;
    403         }
    404 
    405         input {
    406             @media @smartphones {
    407                 width: 3em;
    408             }
    409         }
    410     }
    411 }
    412 
    413 
    414 /* Fortschrittsbalken, fuer alle Elemente verfuegbar. */
    415 .loader
    416 {
    417     background: url(../images/loader.gif) no-repeat;
    418     background-position: center, top;
    419     height: 30px;
    420     opacity: 0.5;
    421     cursor: wait;
    422     pointer-events: none;
    423 }
    424 
    425 
    426 
    427 @media @smartphones {
    428     html {
    429         font-size: 1em;
    430     }
    431 }
    432 
    433 
    434 /* Navigation over the filler */
    435 .toggle-nav-small,
    436 .or-navigation
    437 {
    438     z-index: 102;
    439 
    440     &:hover {
    441         z-index: 112;
    442     }
    443 }
    444 
    445 .or-breadcrumb
    446 {
    447     margin-bottom: 0.1em;
    448     margin-left:1.5em;
    449     line-height: 18px;
    450     font-weight: normal;
    451     white-space: nowrap;
    452 
    453     li {
    454         display: inline;
    455         margin-right: 0.3em;
    456     }
    457 
    458     .or-breadcrumb-item .image-icon {
    459         margin-right:0.2em;
    460     }
    461 }