"Fossies" - the Fresh Open Source Software Archive

Member "moodle/install/css.php" (6 Sep 2019, 11249 Bytes) of package /linux/www/moodle-3.6.6.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "css.php" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 3.6.5_vs_3.6.6.

    1 <?php
    2 // This file is part of Moodle - http://moodle.org/
    3 //
    4 // Moodle is free software: you can redistribute it and/or modify
    5 // it under the terms of the GNU General Public License as published by
    6 // the Free Software Foundation, either version 3 of the License, or
    7 // (at your option) any later version.
    8 //
    9 // Moodle is distributed in the hope that it will be useful,
   10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
   11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   12 // GNU General Public License for more details.
   13 //
   14 // You should have received a copy of the GNU General Public License
   15 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
   16 
   17 /**
   18  * This script prints basic CSS for the installer
   19  *
   20  * @package    core
   21  * @subpackage install
   22  * @copyright  2011 Petr Skoda (http://skodak.org)
   23  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
   24  */
   25 
   26 if (file_exists(__DIR__.'/../config.php')) {
   27     // already installed
   28     die;
   29 }
   30 
   31 // include only the necessary stuff from themes, keep this small otherwise IE will complain...
   32 
   33 // MDL-43839 IE9 cannot handle all of our css.
   34 // Once IE9 is no longer supported we can include 'bootstrapbase/style/moodle.css'
   35 // and remove some of the CSS in $content.
   36 $files = array();
   37 
   38 $content = '';
   39 
   40 foreach($files as $file) {
   41     $content .= file_get_contents(__DIR__.'/../theme/'.$file) . "\n";
   42 }
   43 
   44 $content .= <<<EOF
   45 
   46 body {
   47     padding: 4px;
   48 }
   49 
   50 .text-ltr {
   51     direction: ltr !important;
   52 }
   53 
   54 .headermain {
   55     margin: 15px;
   56 }
   57 
   58 h2 {
   59   text-align:center;
   60 }
   61 
   62 textarea, .uneditable-input {
   63     width: 50%;
   64 }
   65 
   66 #installdiv {
   67     width: 800px;
   68     margin-left:auto;
   69     margin-right:auto;
   70     padding: 5px;
   71     margin-bottom: 15px;
   72 }
   73 
   74 #installdiv dt {
   75     font-weight: bold;
   76 }
   77 
   78 #installdiv dd {
   79     padding-bottom: 0.5em;
   80 }
   81 
   82 .stage {
   83     margin-top: 2em;
   84     margin-bottom: 2em;
   85     padding: 25px;
   86 }
   87 
   88 #installform {
   89     width: 100%;
   90 }
   91 
   92 #envresult {
   93     text-align:left;
   94     width: auto;
   95     margin-left:10em;
   96 }
   97 
   98 #envresult dd {
   99     color: red;
  100 }
  101 
  102 fieldset {
  103     text-align:center;
  104     border:none;
  105 }
  106 
  107 fieldset .configphp,
  108 fieldset .alert {
  109     text-align: left;
  110     direction: ltr;
  111 }
  112 
  113 .sitelink {
  114     text-align: center;
  115 }
  116 
  117 /*
  118 MDL-43839 IE9 cannot handle all of our CSS.
  119 Once IE9 is no longer supported we can include 'bootstrapbase/style/moodle.css' above
  120 and remove the following.
  121 */
  122 
  123 #page-footer {
  124     padding: 1em 0;
  125     margin-top: 1em;
  126     border-top: 2px solid #ddd;
  127 }
  128 
  129 .fitem {
  130     clear:both;
  131     text-align:left;
  132     padding: 8px;
  133 }
  134 
  135 .fitemtitle {
  136     float: left;
  137     width: 245px;
  138     text-align: right;
  139 }
  140 html[dir=rtl] .fitemtitle {
  141     float: right;
  142 }
  143 label {
  144     font-weight: bold;
  145     display: inline-block;
  146     margin: 5px;
  147 }
  148 
  149 .fitemelement {
  150     margin-left: 265px;
  151 }
  152 html[dir=rtl] .fitemelement {
  153     margin-right: 265px;
  154     margin-left: 0;
  155     direction: ltr;
  156 }
  157 .alert, .alert h4 {
  158     color: #c09853;
  159 }
  160 .alert {
  161     padding: 8px 35px 8px 14px;
  162     margin-bottom: 20px;
  163     text-shadow: 0 1px 0 rgba(255,255,255,0.5);
  164     background-color: #fcf8e3;
  165     border: 1px solid #fbeed5;
  166     -webkit-border-radius: 4px;
  167     -moz-border-radius: 4px;
  168     border-radius: 4px;
  169 }
  170 
  171 .alert-info {
  172     color: #3a87ad;
  173     background-color: #d9edf7;
  174     border-color: #bce8f1;
  175 }
  176 
  177 .alert-success {
  178     color: #468847;
  179     background-color: #dff0d8;
  180     border-color: #d6e9c6;
  181 }
  182 
  183 .alert-error {
  184     color: #b94a48;
  185     background-color: #f2dede;
  186     border-color: #eed3d7;
  187 }
  188 
  189 pre {
  190     display: block;
  191     padding: 9.5px;
  192     margin: 0 0 10px;
  193     font-size: 13px;
  194     line-height: 20px;
  195     word-break: break-all;
  196     word-wrap: break-word;
  197     white-space: pre;
  198     white-space: pre-wrap;
  199     background-color: #f5f5f5;
  200     border: 1px solid #ccc;
  201     border: 1px solid rgba(0,0,0,0.15);
  202     -webkit-border-radius: 4px;
  203     -moz-border-radius: 4px;
  204     border-radius: 4px;
  205 }
  206 
  207 .notifytiny {
  208     font-size: 10.5px;
  209 }
  210 
  211 input[type="button"], input[type="submit"] {
  212     margin: 0 0 10px 5px;
  213     display: inline-block;
  214     padding: 4px 12px;
  215     font-size: 14px;
  216     line-height: 20px;
  217     color: #333;
  218     text-align: center;
  219     text-shadow: 0 1px 1px rgba(255,255,255,0.75);
  220     vertical-align: middle;
  221     cursor: pointer;
  222     background-color: #f5f5f5;
  223     background-image: -moz-linear-gradient(top,#fff,#e6e6e6);
  224     background-image: -webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));
  225     background-image: -webkit-linear-gradient(top,#fff,#e6e6e6);
  226     background-image: -o-linear-gradient(top,#fff,#e6e6e6);
  227     background-image: linear-gradient(to bottom,#fff,#e6e6e6);
  228     background-repeat: repeat-x;
  229     border: 1px solid #ccc;
  230     border-color: #e6e6e6 #e6e6e6 #bfbfbf;
  231     border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
  232     border-bottom-color: #b3b3b3;
  233     -webkit-border-radius: 4px;
  234     -moz-border-radius: 4px;
  235     border-radius: 4px;
  236     filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);
  237     filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  238     -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
  239     -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
  240     box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
  241 }
  242 
  243 input[type="button"]:hover, input[type="submit"]:hover, input[type="button"]:focus, input[type="submit"]:focus {
  244     color: #333;
  245     text-decoration: none;
  246     background-position: 0 -15px;
  247     -webkit-transition: background-position .1s linear;
  248     -moz-transition: background-position .1s linear;
  249     -o-transition: background-position .1s linear;
  250     transition: background-position .1s linear;
  251 }
  252 
  253 input[type="button"]:hover, input[type="submit"]:hover, input[type="button"]:focus, input[type="submit"]:focus, input[type="button"]:active, input[type="submit"]:active, input[type="button"].active, input[type="submit"].active, input[type="button"].disabled, input[type="submit"].disabled, input[type="reset"].disabled, input[type="submit"][disabled], input[type="reset"][disabled] {
  254     color: #333;
  255     background-color: #e6e6e6;
  256 }
  257 
  258 button, input, select, textarea {
  259     margin: 0;
  260 }
  261 
  262 select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"] {
  263     display: inline-block;
  264     height: 20px;
  265     padding: 4px 6px;
  266     margin-bottom: 10px;
  267     font-size: 14px;
  268     line-height: 20px;
  269     color: #555;
  270     vertical-align: middle;
  271     -webkit-border-radius: 4px;
  272     -moz-border-radius: 4px;
  273     border-radius: 4px;
  274 }
  275 
  276 select {
  277     background-color: #fff;
  278     border: 1px solid #ccc;
  279 }
  280 
  281 label, select, button, input[type="button"], input[type="submit"], input[type="radio"], input[type="checkbox"] {
  282     cursor: pointer;
  283 }
  284 
  285 
  286 select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"] {
  287     display: inline-block;
  288     height: 20px;
  289     padding: 4px 6px;
  290     margin-bottom: 10px;
  291     font-size: 14px;
  292     line-height: 20px;
  293     color: #555;
  294     vertical-align: middle;
  295     -webkit-border-radius: 4px;
  296     -moz-border-radius: 4px;
  297     border-radius: 4px;
  298 }
  299 
  300 select, input[type="file"] {
  301     height: 30px;
  302     line-height: 30px;
  303 }
  304 
  305 textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"] {
  306     background-color: #fff;
  307     border: 1px solid #ccc;
  308     -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
  309     -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
  310     box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
  311     -webkit-transition: border linear .2s,box-shadow linear .2s;
  312     -moz-transition: border linear .2s,box-shadow linear .2s;
  313     -o-transition: border linear .2s,box-shadow linear .2s;
  314     transition: border linear .2s,box-shadow linear .2s;
  315 }
  316 
  317 input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
  318     cursor: not-allowed;
  319     background-color: #eee;
  320 }
  321 
  322 input.btn-primary {
  323     color: #fff;
  324     text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
  325     background-color: #005aa8;
  326     background-image: -moz-linear-gradient(top,#0070a8,#0038a8);
  327     background-image: -webkit-gradient(linear,0 0,0 100%,from(#0070a8),to(#0038a8));
  328     background-image: -webkit-linear-gradient(top,#0070a8,#0038a8);
  329     background-image: -o-linear-gradient(top,#0070a8,#0038a8);
  330     background-image: linear-gradient(to bottom,#0070a8,#0038a8);
  331     background-repeat: repeat-x;
  332     border-color: #0038a8 #0038a8 #001e5c;
  333     border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
  334     filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0070a8',endColorstr='#ff0038a8',GradientType=0);
  335     filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  336 }
  337 
  338 input.btn-primary:hover,
  339 input.btn-primary:active,
  340 input.btn-primary:focus {
  341     color: #fff;
  342     background-color: #0038a8;
  343 }
  344 
  345 
  346 .breadcrumb {
  347     background-color: #f5f5f5;
  348 }
  349 .breadcrumb {
  350     padding: 8px 15px;
  351     margin: 0 0 20px;
  352     list-style: none;
  353     background-color: #f5f5f5;
  354     -webkit-border-radius: 4px;
  355     -moz-border-radius: 4px;
  356     border-radius: 4px;
  357 }
  358 
  359 .breadcrumb > li {
  360     display: inline-block;
  361     text-shadow: 0 1px 0 #fff;
  362     line-height: 20px;
  363 }
  364 
  365 body {
  366     font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  367     font-size: 14px;
  368     line-height: 20px;
  369     color: #333;
  370 }
  371 .breadcrumb {
  372     background-color: rgb(245, 245, 245);
  373     padding: 8px 15px;
  374 }
  375 
  376 .w-100 {
  377     width: 100%!important;
  378 }
  379 .flex-row-reverse {
  380     flex-direction: row-reverse!important;
  381 }
  382 .btn-group, .btn-group-vertical {
  383     position: relative;
  384     display: inline-flex;
  385     vertical-align: middle;
  386 }
  387 .mb-3, .my-3 {
  388     margin-bottom: 1rem!important;
  389 }
  390 .mr-auto, .mx-auto {
  391     margin-right: auto!important;
  392 }
  393 .ml-auto, .mx-auto {
  394     margin-left: auto!important;
  395 }
  396 .ml-1, .mx-1 {
  397     margin-left: .25rem!important;
  398 }
  399 /*
  400 End of MDL-43839 IE9 specific CSS.
  401 */
  402 
  403 EOF;
  404 
  405 // fix used urls
  406 $content = str_replace('[[pix:theme|hgradient]]', '../theme/standard/pix/hgradient.jpg', $content);
  407 $content = str_replace('[[pix:theme|vgradient]]', '../theme/standard/pix/vgradient.jpg', $content);
  408 
  409 @header('Content-Disposition: inline; filename="css.php"');
  410 @header('Cache-Control: no-store, no-cache, must-revalidate');
  411 @header('Cache-Control: post-check=0, pre-check=0', false);
  412 @header('Pragma: no-cache');
  413 @header('Expires: Mon, 20 Aug 1969 09:23:00 GMT');
  414 @header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
  415 @header('Accept-Ranges: none');
  416 @header('Content-Type: text/css; charset=utf-8');
  417 
  418 echo $content;