Browse Source

composer, twig, old edits

mrkvon 3 years ago
parent
commit
0e9d62e6a1
5 changed files with 37 additions and 2 deletions
  1. 3
    0
      .gitignore
  2. 5
    0
      composer.json
  3. 26
    0
      css/index.css
  4. 0
    0
      css/reset.css
  5. 3
    2
      index.php

+ 3
- 0
.gitignore View File

@@ -14,3 +14,6 @@ openlife/map.php
14 14
 lib/*
15 15
 cache
16 16
 *.swp
17
+vendor
18
+composer.lock
19
+composer.phar

+ 5
- 0
composer.json View File

@@ -0,0 +1,5 @@
1
+{
2
+    "require": {
3
+        "twig/twig": "~2.0"
4
+    }
5
+}

+ 26
- 0
css/index.css View File

@@ -121,6 +121,10 @@ hr{
121 121
   border:0;
122 122
 }
123 123
 
124
+img {
125
+  max-width:100%;
126
+}
127
+
124 128
 img.left{
125 129
   float:left;
126 130
   margin-right:10px;
@@ -180,3 +184,25 @@ span[title] {
180 184
   color: #666;
181 185
 
182 186
 }
187
+
188
+/* make the code scroll, not overflow and add some colors */
189
+pre {
190
+  overflow-x: scroll;
191
+  overflow-y: hidden;
192
+  background-color: #222;
193
+  color: whitesmoke;
194
+}
195
+
196
+code {
197
+  font-family: monospace;
198
+}
199
+
200
+blockquote {
201
+  font-style: italic;
202
+  padding-left: 1em;
203
+  font-size: 0.9em;
204
+}
205
+
206
+:not(pre)>code {
207
+  border: 1px solid #81c0c5;
208
+}

+ 0
- 0
css/reset.css View File


+ 3
- 2
index.php View File

@@ -1,8 +1,9 @@
1 1
 <?php
2 2
 
3 3
 //setting Twig template engine
4
-require_once $_SERVER['DOCUMENT_ROOT'].'/lib/Twig/lib/Twig/Autoloader.php';
5
-Twig_Autoloader::register();
4
+// require_once $_SERVER['DOCUMENT_ROOT'].'/lib/Twig/lib/Twig/Autoloader.php';
5
+require __DIR__ . '/vendor/autoload.php';
6
+// Twig_Autoloader::register();
6 7
 
7 8
 $loader = new Twig_Loader_Filesystem($_SERVER['DOCUMENT_ROOT'].'/views');
8 9
 $twig = new Twig_Environment($loader, array(