diff --git a/.gitignore b/.gitignore index b0b0131..88ca1e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ pile.db vendor -files +docs +*.woff +error_log diff --git a/assets/pile_white.svg b/assets/pile_white.svg new file mode 100644 index 0000000..2bd67fc --- /dev/null +++ b/assets/pile_white.svg @@ -0,0 +1,104 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/www/_templates/admin_tag_edit.php b/www/_templates/admin_tag_edit.php new file mode 100644 index 0000000..81b5fff --- /dev/null +++ b/www/_templates/admin_tag_edit.php @@ -0,0 +1,10 @@ +
+
"> + Name: ">
+ Description:
+
+ +
+
diff --git a/www/admin.php b/www/admin.php index bebd5f9..10390e5 100644 --- a/www/admin.php +++ b/www/admin.php @@ -36,7 +36,7 @@ if (isset($_SESSION['ID'])){ if (isset($_POST["Title"])){ if ( !empty($_FILES['upfile']['name']) ){ try { - $url = "http://pile.sdbs.cz/files/" . rawurlencode($uploader->handle($_FILES, "files/")); + $url = "http://pile.sdbs.cz/docs/" . rawurlencode($uploader->handle($_FILES, "docs/")); } catch (RuntimeException $ex){ $page->text = $ex->getMessage(); echo $page->render('full_text.php'); diff --git a/www/assets/admin.css b/www/assets/admin.css new file mode 100644 index 0000000..380b532 --- /dev/null +++ b/www/assets/admin.css @@ -0,0 +1,242 @@ +@font-face { + font-family: Prociono; + src: url(Prociono.woff); +} + +*, *:before, *:after { + -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; +} + +body { + font-family: Prociono; + margin: 0; + padding: 0; + position: relative; + height: 100%; + background: #202020; +} + +a { + color: #202020; + text-decoration: none; +} + +#sidebar { + font-family: Prociono, serif; +} + +#sidebar-head { + background-color: #f2f2f2; + color: 202020; + text-align: center; +} + +#sidebar-head > h1 { + padding: 0.5em; + margin: 0 0 1rem 0;; +} + +#sidebar-taglist { + background: #f2f2f2; + color: #202020; + padding: 1rem 0 1rem 0; +} + +#sidebar-taglist > ul > li { + list-style: none; + font-size: 14pt; + margin-bottom: .5em; +} + +#sidebar-taglist > ul > li:before { + content: "/ "; +} + +#sidebar-taglist-top:before { + content: "\\ " !important; +} + +#sidebar-taglist a { + color: #202020; + text-decoration: none; +} + +#sidebar-taglist ul:not(:last-child) { + padding-bottom: .5rem; + box-shadow: 0px 24px 0px -22px #202020; +} + +#content { + font-size: 14pt; +} + +.text { + background: #f2f2f2; + color: #202020; + padding: 1rem; + margin: 0 0 1rem 0; +} + +.doc-item-text { + display: inline-block; + margin-right: 3em; +} + +.doc-item h2 { + font-size: 14pt; + font-weight: normal; + margin: 0; +} + +.doc-item h3 { + margin: 0; + font-size: 11pt; + font-weight: normal; + font-style: italic; +} + +.doc-item-link { + display: inline-block; + float: right; + position: relative; + top: 7px; + right: 1em; +} + +.doc-new-item { + width: 100%; + text-align: center; +} + +.doc-new-item a { + width: 100%; +} + +.document h1 { + margin: 0; + font-size: 24pt; +} + +.document h2 { + margin: 2pt 0 2pt 0; + font-style: italic; + font-weight: normal; + font-size: 16pt; +} + +.document h3 { + margin: 2pt 0 2pt 0; + font-weight: normal; + font-size: 16pt; +} + +.doc-taglist li { + list-style: none; + display: inline-block; +} + +.doc-taglist li a { + text-decoration: underline; +} + +.doc-taglist li:after { + content: "/"; +} + +.doc-taglist li:last-of-type:after { + content: ""; +} + +.doc-description-intro, .doc-link-intro { + font-weight: bold; +} + +.doc-link-intro:before { + content: "➜ "; +} + +.doc-link a { + text-decoration: underline; +} + +.tag-edit-link { + text-align: right; +} + +input[type="text"] { + width: 80%; +} + +@media screen and (min-width: 64em ) { + #sidebar { + position: absolute; + top: 0; + left: 2rem; + width: 14rem; + } + + #content { + margin: 2rem 2rem 0 18rem; + padding: 0 0 2rem 0; + } +} + +@media screen and (max-width: 64em ) { + #sidebar-head { + background-position: 14%; + background-size: 4rem; + height: 7rem; + margin-bottom: 1rem; + } + + #sidebar-head > h1 { + padding-top: 1.5rem; + font-size: 3rem; + } + + #sidebar-taglist { + margin-bottom: 1rem; + } +} + +#login { + position: absolute; + bottom: 0; + right: 2rem; +} + +#login input { + height: 14pt; + border: 1px solid lightgray; +} + +#login button { + height: 14pt; + font-size: 8pt; + border: 1px solid lightgray; + background: 202020; +} + +.czech { + font-size: 12pt; +} + +.sign { + font-weight: bold; + font-size: 16pt; + margin: 0; +} + +input[type="submit"], input[type="file"]{ + font-family: Prociono, serif; +} + +.button { + -webkit-appearance: button; + -moz-appearance: button; + appearance: button; + + text-decoration: none; + color: initial; + padding: 2px; +}