Commit a976fff8 authored by Michael Ochmann's avatar Michael Ochmann
Browse files

added theme options

parent 36d59a90
......@@ -10,6 +10,8 @@ class Backend {
public function scripts() {
wp_enqueue_style("fsi_admin_css", get_stylesheet_directory_uri()."/css/admin.css");
wp_enqueue_script("fsi_admin_script", get_stylesheet_directory_uri()."/javascript/admin.js", ["jquery"]);
wp_enqueue_media();
}
public function addThemeMenu() {
......@@ -27,7 +29,45 @@ class Backend {
public function drawThemeMenu() {
if (!current_user_can("manage_options"))
return;
$template = new Template("themeOptions.php");
if (isset($_POST["fsi-theme-options"]))
$this->handlePostData();
$notice = get_option("fsi-notice-text", "");
$display = get_option("fsi-notice-display", 0);
$display = $display == 0 ? "" : " checked='checked'";
$rat = get_option("fsi-rat-desc", "");
$ratIMGURL = get_option("fsi-rat-img", "");
$ratIMG = $ratIMGURL != "" ? "<img src='$ratIMGURL'>" : "";
$social = get_option("fsi-social", "");
$nonce = wp_nonce_field("saveOptions", "optionsNonce", false, false);
$template = new Template("themeOptions.php");
$template->setValues([
"nonce" => $nonce,
"notice" => $notice,
"noticeChecked" => $display,
"rat" => $rat,
"ratIMGURL" => $ratIMGURL,
"ratIMG" => $ratIMG,
"social" => $social
]);
$template->render();
}
private function handlePostData() {
if (!wp_verify_nonce($_POST["optionsNonce"], "saveOptions"))
return;
$notice = $_POST["fsi-notice"]["text"];
$display = $_POST["fsi-notice"]["display"];
$display = $display == null ? 0 : $display;
$ratText = strip_tags($_POST["fsi-rat-desc"], "<a>");
$ratIMG = $_POST["fsi-rat-img"];
$social = $_POST["fsi-social"];
update_option("fsi-notice-text", $notice);
update_option("fsi-notice-display", $display);
update_option("fsi-rat-desc", $ratText);
update_option("fsi-rat-img", $ratIMG);
update_option("fsi-social", $social);
}
}
\ No newline at end of file
......@@ -45,6 +45,7 @@ class Theme {
wp_enqueue_script("jquery");
wp_enqueue_script("scrollToFix", get_template_directory_uri()."/javascript/scrollToFix.js");
wp_enqueue_script("mainJS", get_template_directory_uri()."/javascript/fsi.js");
wp_enqueue_style('dashicons');
}
/**
......
......@@ -382,6 +382,18 @@ main {
color: $bootstrap;
}
.social a span {
font-size: xx-large;
}
.social a {
margin-right: 25px;
transition: all 0.2s ease-in-out;
}
.social a:hover {
text-decoration: none;
opacity: 0.7;
}
.wrapper {
background: url("../images/footer.jpg") no-repeat center bottom fixed $fsi;
background-size: contain;
......
......@@ -18,6 +18,10 @@ div.subtype-svg\+xml div.filename {
vertical-align: top;
}
.ratIMG img {
max-width: 250px;
}
.settingsSection {
margin-top: 35px;
}
......
......@@ -3,4 +3,4 @@
*
* © 2016, Michael Ochmann
* CSS für die Homepage der Fachschaft Informatik an der Hochschule Trier.
*/@import"bootstrap.min.css";@font-face{font-family:"Linux Libertine";src:url("../fonts/LinuxLibertine.otf");}article.post{font-size:large;line-height:1.8em;padding:20px;-webkit-column-count:2;-moz-column-count:2;column-count:2;-moz-column-gap:35px;-webkit-column-gap:35px;column-gap:35px;text-align:justify;}fsi-tile.post fsi-title{font-size:xx-large;color:#333;}fsi-tile.sidebar li{list-style:none;font-size:medium;}article.loopPost{margin-bottom:40px;font-size:medium;}article.page{font-size:large;line-height:1.5em;}article.page img.eventCover{float:left;margin:0 25px 20px 0;}body{margin:0;padding:0;font-size:small;background:#005196;font-family:"Linux Libertine",Georgia,Times,serif;}footer{background:#eee;background:transparent;font-family:sans-serif;color:#222;box-sizing:border-box;box-shadow:0 2px 12px rgba(0,0,0,0.6) inset;}footer h4{font-family:"Linux Libertine",Georgia,Times,serif;font-size:large;}footer .overlay{background:rgba(0,0,0,0.8);padding:12px;padding-top:10px;box-sizing:border-box;color:#ffffff;}footer .overlay a{color:#ccc;}footer p{font-size:small;text-align:center;color:#888;margin:8% 0 0 0;}footer .social{margin-top:25px;}footer .social img{width:12%;margin-right:8px;transition:all 0.2s ease-in-out;}footer .social img:hover{transform:scale(1.1);}footer ul{list-style:none;padding-left:8%;}footer ul li{margin:8px 0;}footer h4{margin-top:25px;}fsi-calendar table{width:100%;}fsi-calendar table tr td{text-align:center;border:solid 1px#ccc;font-family:sans-serif;position:relative;}fsi-calendar table tr:first-child td{font-family:"Linux Libertine";}fsi-calendar table tr th{font-family:sans-serif;text-align:center;padding:6px;border:solid 1px#ccc;}fsi-calendar table a{display:block;padding:11px;font-size:medium;}fsi-calendar table a.today{box-shadow:0 0 12px rgba(0,0,0,0.3) inset;}fsi-calendar table a.hasEvent:after{content:"";display:block;position:absolute;bottom:0;left:0;width:100%;background:#005196;height:4px;transition:all 0.3s ease-in-out;}fsi-calendar table a.hasEvent:hover:after{width:84%;left:8%;}fsi-calendar table tr:first-child td{position:relative;}fsi-calendar table tr:first-child fsi-nav{display:inline-block;position:absolute;top:10px;cursor:pointer;}fsi-calendar table tr:first-child a:hover{background:transparent;}fsi-calendar table tr:first-child fsi-nav:first-child{left:5%;}fsi-calendar table tr:first-child fsi-nav:last-child{right:5%;}fsi-calendar table a:hover{background:#eee;text-decoration:none;}fsi-calendar .month{font-size:large;padding:8px;background:#eee;}fsi-door{position:fixed;top:5px;left:9px;transition:all 0.2s ease-in-out;}fsi-door img{width:25px;transition:all 0.2s ease-in-out;}fsi-subtitle:before{content:"–";display:inline;}fsi-subtitle{color:#888;padding-left:30px;display:block;font-family:sans-serif;font-size:13px;margin-bottom:12px;}fsi-tile{background:white;display:block;margin:8px;padding:12px;min-height:100%;flex-direction:row;box-sizing:border-box;line-height:1.8em;}fsi-tile img{max-width:100%;box-sizing:border-box;}fsi-tile.news nav hr{margin:8px 0;}fsi-tile.news nav h4{font-size:medium;}fsi-title{display:block;color:#666;padding:12px 0 0 12px;margin-bottom:6px;font-size:x-large;}header{top:0;background:white;position:fixed;width:100%;box-sizing:border-box;box-shadow:0 0 12px rgba(0,0,0,0.6);z-index:100;}header a.menuButton{display:none;}header.headerSmall:not(:hover) header-logo{width:5%;margin-left:-2.5%;padding:0.1%;content:"";}header.headerSmall:not(:hover) fsi-door img{width:20px;}header.headerSmall:not(:hover) fsi-door{top:4px;}header nav.second>*{max-height:50px;transition:all 0.2s ease-in-out;}header nav.second{max-height:50px;background:#eee;transition:all 0.2s ease-in-out;}header nav a{display:block;width:100%;color:#222;max-height:50px;text-align:center;box-sizing:border-box;font-size:large;padding:12px;transition:all 0.2s ease-in-out;}header nav a:after{content:"";display:block;width:0;height:5px;position:absolute;bottom:0;left:50%;background:#005196;transition:width 0.2s ease-in-out,left 0.2s ease-in-out;}header nav a:hover,header nav a:focus{text-decoration:none;}header nav a:hover:after,header nav a.active:after{width:100%;left:0;}header nav a.active:after{background:#FF9C00;}header-logo{display:block;position:fixed;top:0;width:12%;background:white;padding:0.3%;border-radius:50%;left:50%;box-sizing:border-box;margin-left:-6%;border:solid 1px#aaa;transition:width 0.2s ease-in,margin-left 0.2s ease-in;z-index:100;}header-logo img{width:100%;}main{background:#005196;padding:105px 0 8px 0;}.alert{margin:8px;box-sizing:border-box;}.cover{margin:12px;display:inline-block;text-align:center;}.cover img{transition:transform 0.3s ease-in-out,box-shadow 0.3s ease-in-out;}.cover img:hover{transform:scale(1.1);box-shadow:0 0 15px rgba(0,0,0,0.9);}.news{font-size:medium;}.news hr{margin:10px 0 10px 0;}.news span{margin-top:-5px;color:#888;display:block;font-size:small;padding:0 0 0 8px;}.news h4{word-break:break-all;}.serviceIcon{width:25%;display:block;float:left;box-sizing:border-box;margin:0;font-size:medium;color:#555;padding:5%;text-align:center;transition:all 0.3s ease-in;}.serviceIcon:hover{transform:scale(1.1);text-decoration:none;color:#555;}.wrapper{background:url("../images/footer.jpg") no-repeat center bottom fixed#005196;background-size:contain;width:100%;box-sizing:border-box;}@media(max-width:991px){body{padding:0 0 0 0;}header{position:relative;}header .menu{position:fixed;width:100%;box-sizing:border-box;overflow-y:scroll;height:0;padding-top:50px;background:white;transition:all 0.3s ease-in-out;}header nav a{background:white;margin:0 auto;border-bottom:solid 1px#eee;width:90% !important;}header.headerSmall:not(:hover) nav>a{display:block;width:100%;color:#222;max-height:50px;text-align:center;box-sizing:border-box;font-size:large;padding:12px;transition:all 0.2s ease-in-out;}header a.menuButton{font-family:'Glyphicons Halflings';font-size:large;color:#222;display:block;padding:12px;background:white;width:100%;box-sizing:border-box;position:fixed;text-align:right;box-shadow:0 0 6px rgba(0,0,0,0.6);top:0;z-index:100;}header a.menuButton>span{transition:all 0.3s ease-in-out;}header a.menuButton.active>span{transform:rotate(90deg);}header:after{content:"" !important;display:block;width:30px;background:url('../images/logo_fachschaft_Informatik_small.svg') no-repeat;background-size:cover;padding-top:30px;position:fixed;top:10px;left:50%;margin-left:-15px;z-index:150;}header nav{background:white !important;}header fsi-door,header.headerSmall fsi-door{z-index:150 !important;top:9px !important;}header fsi-door img,header.headerSmall fsi-door img{width:20px !important;}header-logo{display:none;}main{padding:40px 0 8px 0;}.cover{width:40%;}.serviceIcon{width:15.5%;min-width:55px;min-height:55px;padding:3%;font-size:0;line-height:0;}.services div{font-size:0;}.wrapper{background-size:cover;}footer h4{font-size:large;}footer ul{padding-left:2%;}footer ul li{margin:15px;}footer .social img{width:6%;}.row-eq-height{display:block !important;}}@media(min-width:992px),(max-width:1300px){.wrapper{background-size:cover;}header.headerSmall:not(:hover) nav>a{font-size:medium;padding:8px !important;transition:all 0.2s ease-in-out;}header.headerSmall:not(:hover) nav.second>a,header.headerSmall:not(:hover) nav.second,header.headerSmall:not(:hover) nav.second>*{max-height:0 !important;overflow:hidden;padding:0;}}@media(min-width:992px){.row.row-eq-height .col-md-4{width:calc(100%/3-16px);}.col-md-4{width:calc(100%/3-0px);}}@media(min-width:1440px){body,header{max-width:1440px;margin:0 auto;}footer{box-shadow:none;}fsi-door{left:50%;margin-left:-711px;}header header-logo{width:150px !important;margin-left:-75px !important;}header.headerSmall header-logo{width:58px !important;margin-left:-29px !important;}}.alert,.btn{border-radius:0;font-family:sans-serif;}.alert-warning,.btn-warning{background:#FF9C00;border-color:#B26D00;color:#323238;}.btn-warning{text-shadow:1px 1px 0 rgba(255,255,255,0.4);}.btn-warning:hover,.btn-warning:active{background:#B26D00;text-shadow:1px 1px 0 rgba(0,0,0,0.6);}.row{margin:0;box-sizing:border-box;width:100%;}main .col-md-4,main .col-md-8,main .col-sm-4,main .col-sm-8,main .col-md-9,main .col-md-1,main .col-md-2,main .col-md-3,main .col-md-5,main .col-md-6,main .col-md-7,main .col-md-10,main .col-md-11{padding:0;}main .row-eq-height .col-md-4,main .row-eq-height .col-md-8{padding:0;margin:8px;background:white;;}.row-eq-height fsi-tile{margin:0;}.row-eq-height{display:flex;flex-direction:row;}.alignnone{margin:5px 20px 20px 0;}.aligncenter,div.aligncenter{display:block;margin:5px auto 5px auto;}.alignright{float:right;margin:5px 0 20px 20px;}.alignleft{float:left;margin:5px 20px 20px 0;}a img.alignright{float:right;margin:5px 0 20px 20px;}a img.alignnone{margin:5px 20px 20px 0;}a img.alignleft{float:left;margin:5px 20px 20px 0;}a img.aligncenter{display:block;margin-left:auto;margin-right:auto}.wp-caption{background:#fff;border:1px solid#f0f0f0;max-width:96%;padding:5px 3px 10px;text-align:center;}.wp-caption.alignnone{margin:5px 20px 20px 0;}.wp-caption.alignleft{margin:5px 20px 20px 0;}.wp-caption.alignright{margin:5px 0 20px 20px;}.wp-caption img{border:0 none;height:auto;margin:0;max-width:98.5%;padding:0;width:auto;}.wp-caption p.wp-caption-text{font-size:11px;line-height:17px;margin:0;padding:0 4px 5px;}.screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute !important;height:1px;width:1px;overflow:hidden;}.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,0.6);clip:auto !important;color:#21759b;display:block;font-size:14px;font-size:0.875rem;font-weight:bold;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000;}
\ No newline at end of file
*/@import"bootstrap.min.css";@font-face{font-family:"Linux Libertine";src:url("../fonts/LinuxLibertine.otf");}article.post{font-size:large;line-height:1.8em;padding:20px;-webkit-column-count:2;-moz-column-count:2;column-count:2;-moz-column-gap:35px;-webkit-column-gap:35px;column-gap:35px;text-align:justify;}fsi-tile.post fsi-title{font-size:xx-large;color:#333;}fsi-tile.sidebar li{list-style:none;font-size:medium;}article.loopPost{margin-bottom:40px;font-size:medium;}article.page{font-size:large;line-height:1.5em;}article.page img.eventCover{float:left;margin:0 25px 20px 0;}body{margin:0;padding:0;font-size:small;background:#005196;font-family:"Linux Libertine",Georgia,Times,serif;}footer{background:#eee;background:transparent;font-family:sans-serif;color:#222;box-sizing:border-box;box-shadow:0 2px 12px rgba(0,0,0,0.6) inset;}footer h4{font-family:"Linux Libertine",Georgia,Times,serif;font-size:large;}footer .overlay{background:rgba(0,0,0,0.8);padding:12px;padding-top:10px;box-sizing:border-box;color:#ffffff;}footer .overlay a{color:#ccc;}footer p{font-size:small;text-align:center;color:#888;margin:8% 0 0 0;}footer .social{margin-top:25px;}footer .social img{width:12%;margin-right:8px;transition:all 0.2s ease-in-out;}footer .social img:hover{transform:scale(1.1);}footer ul{list-style:none;padding-left:8%;}footer ul li{margin:8px 0;}footer h4{margin-top:25px;}fsi-calendar table{width:100%;}fsi-calendar table tr td{text-align:center;border:solid 1px#ccc;font-family:sans-serif;position:relative;}fsi-calendar table tr:first-child td{font-family:"Linux Libertine";}fsi-calendar table tr th{font-family:sans-serif;text-align:center;padding:6px;border:solid 1px#ccc;}fsi-calendar table a{display:block;padding:11px;font-size:medium;}fsi-calendar table a.today{box-shadow:0 0 12px rgba(0,0,0,0.3) inset;}fsi-calendar table a.hasEvent:after{content:"";display:block;position:absolute;bottom:0;left:0;width:100%;background:#005196;height:4px;transition:all 0.3s ease-in-out;}fsi-calendar table a.hasEvent:hover:after{width:84%;left:8%;}fsi-calendar table tr:first-child td{position:relative;}fsi-calendar table tr:first-child fsi-nav{display:inline-block;position:absolute;top:10px;cursor:pointer;}fsi-calendar table tr:first-child a:hover{background:transparent;}fsi-calendar table tr:first-child fsi-nav:first-child{left:5%;}fsi-calendar table tr:first-child fsi-nav:last-child{right:5%;}fsi-calendar table a:hover{background:#eee;text-decoration:none;}fsi-calendar .month{font-size:large;padding:8px;background:#eee;}fsi-door{position:fixed;top:5px;left:9px;transition:all 0.2s ease-in-out;}fsi-door img{width:25px;transition:all 0.2s ease-in-out;}fsi-subtitle:before{content:"–";display:inline;}fsi-subtitle{color:#888;padding-left:30px;display:block;font-family:sans-serif;font-size:13px;margin-bottom:12px;}fsi-tile{background:white;display:block;margin:8px;padding:12px;min-height:100%;flex-direction:row;box-sizing:border-box;line-height:1.8em;}fsi-tile img{max-width:100%;box-sizing:border-box;}fsi-tile.news nav hr{margin:8px 0;}fsi-tile.news nav h4{font-size:medium;}fsi-title{display:block;color:#666;padding:12px 0 0 12px;margin-bottom:6px;font-size:x-large;}header{top:0;background:white;position:fixed;width:100%;box-sizing:border-box;box-shadow:0 0 12px rgba(0,0,0,0.6);z-index:100;}header a.menuButton{display:none;}header.headerSmall:not(:hover) header-logo{width:5%;margin-left:-2.5%;padding:0.1%;content:"";}header.headerSmall:not(:hover) fsi-door img{width:20px;}header.headerSmall:not(:hover) fsi-door{top:4px;}header nav.second>*{max-height:50px;transition:all 0.2s ease-in-out;}header nav.second{max-height:50px;background:#eee;transition:all 0.2s ease-in-out;}header nav a{display:block;width:100%;color:#222;max-height:50px;text-align:center;box-sizing:border-box;font-size:large;padding:12px;transition:all 0.2s ease-in-out;}header nav a:after{content:"";display:block;width:0;height:5px;position:absolute;bottom:0;left:50%;background:#005196;transition:width 0.2s ease-in-out,left 0.2s ease-in-out;}header nav a:hover,header nav a:focus{text-decoration:none;}header nav a:hover:after,header nav a.active:after{width:100%;left:0;}header nav a.active:after{background:#FF9C00;}header-logo{display:block;position:fixed;top:0;width:12%;background:white;padding:0.3%;border-radius:50%;left:50%;box-sizing:border-box;margin-left:-6%;border:solid 1px#aaa;transition:width 0.2s ease-in,margin-left 0.2s ease-in;z-index:100;}header-logo img{width:100%;}main{background:#005196;padding:105px 0 8px 0;}.alert{margin:8px;box-sizing:border-box;}.cover{margin:12px;display:inline-block;text-align:center;}.cover img{transition:transform 0.3s ease-in-out,box-shadow 0.3s ease-in-out;}.cover img:hover{transform:scale(1.1);box-shadow:0 0 15px rgba(0,0,0,0.9);}.news{font-size:medium;}.news hr{margin:10px 0 10px 0;}.news span{margin-top:-5px;color:#888;display:block;font-size:small;padding:0 0 0 8px;}.news h4{word-break:break-all;}.serviceIcon{width:25%;display:block;float:left;box-sizing:border-box;margin:0;font-size:medium;color:#555;padding:5%;text-align:center;transition:all 0.3s ease-in;}.serviceIcon:hover{transform:scale(1.1);text-decoration:none;color:#555;}.social a span{font-size:xx-large;}.social a{margin-right:25px;transition:all 0.2s ease-in-out;}.social a:hover{text-decoration:none;opacity:0.7;}.wrapper{background:url("../images/footer.jpg") no-repeat center bottom fixed#005196;background-size:contain;width:100%;box-sizing:border-box;}@media(max-width:991px){body{padding:0 0 0 0;}header{position:relative;}header .menu{position:fixed;width:100%;box-sizing:border-box;overflow-y:scroll;height:0;padding-top:50px;background:white;transition:all 0.3s ease-in-out;}header nav a{background:white;margin:0 auto;border-bottom:solid 1px#eee;width:90% !important;}header.headerSmall:not(:hover) nav>a{display:block;width:100%;color:#222;max-height:50px;text-align:center;box-sizing:border-box;font-size:large;padding:12px;transition:all 0.2s ease-in-out;}header a.menuButton{font-family:'Glyphicons Halflings';font-size:large;color:#222;display:block;padding:12px;background:white;width:100%;box-sizing:border-box;position:fixed;text-align:right;box-shadow:0 0 6px rgba(0,0,0,0.6);top:0;z-index:100;}header a.menuButton>span{transition:all 0.3s ease-in-out;}header a.menuButton.active>span{transform:rotate(90deg);}header:after{content:"" !important;display:block;width:30px;background:url('../images/logo_fachschaft_Informatik_small.svg') no-repeat;background-size:cover;padding-top:30px;position:fixed;top:10px;left:50%;margin-left:-15px;z-index:150;}header nav{background:white !important;}header fsi-door,header.headerSmall fsi-door{z-index:150 !important;top:9px !important;}header fsi-door img,header.headerSmall fsi-door img{width:20px !important;}header-logo{display:none;}main{padding:40px 0 8px 0;}.cover{width:40%;}.serviceIcon{width:15.5%;min-width:55px;min-height:55px;padding:3%;font-size:0;line-height:0;}.services div{font-size:0;}.wrapper{background-size:cover;}footer h4{font-size:large;}footer ul{padding-left:2%;}footer ul li{margin:15px;}footer .social img{width:6%;}.row-eq-height{display:block !important;}}@media(min-width:992px),(max-width:1300px){.wrapper{background-size:cover;}header.headerSmall:not(:hover) nav>a{font-size:medium;padding:8px !important;transition:all 0.2s ease-in-out;}header.headerSmall:not(:hover) nav.second>a,header.headerSmall:not(:hover) nav.second,header.headerSmall:not(:hover) nav.second>*{max-height:0 !important;overflow:hidden;padding:0;}}@media(min-width:992px){.row.row-eq-height .col-md-4{width:calc(100%/3-16px);}.col-md-4{width:calc(100%/3-0px);}}@media(min-width:1440px){body,header{max-width:1440px;margin:0 auto;}footer{box-shadow:none;}fsi-door{left:50%;margin-left:-711px;}header header-logo{width:150px !important;margin-left:-75px !important;}header.headerSmall header-logo{width:58px !important;margin-left:-29px !important;}}.alert,.btn{border-radius:0;font-family:sans-serif;}.alert-warning,.btn-warning{background:#FF9C00;border-color:#B26D00;color:#323238;}.btn-warning{text-shadow:1px 1px 0 rgba(255,255,255,0.4);}.btn-warning:hover,.btn-warning:active{background:#B26D00;text-shadow:1px 1px 0 rgba(0,0,0,0.6);}.row{margin:0;box-sizing:border-box;width:100%;}main .col-md-4,main .col-md-8,main .col-sm-4,main .col-sm-8,main .col-md-9,main .col-md-1,main .col-md-2,main .col-md-3,main .col-md-5,main .col-md-6,main .col-md-7,main .col-md-10,main .col-md-11{padding:0;}main .row-eq-height .col-md-4,main .row-eq-height .col-md-8{padding:0;margin:8px;background:white;;}.row-eq-height fsi-tile{margin:0;}.row-eq-height{display:flex;flex-direction:row;}.alignnone{margin:5px 20px 20px 0;}.aligncenter,div.aligncenter{display:block;margin:5px auto 5px auto;}.alignright{float:right;margin:5px 0 20px 20px;}.alignleft{float:left;margin:5px 20px 20px 0;}a img.alignright{float:right;margin:5px 0 20px 20px;}a img.alignnone{margin:5px 20px 20px 0;}a img.alignleft{float:left;margin:5px 20px 20px 0;}a img.aligncenter{display:block;margin-left:auto;margin-right:auto}.wp-caption{background:#fff;border:1px solid#f0f0f0;max-width:96%;padding:5px 3px 10px;text-align:center;}.wp-caption.alignnone{margin:5px 20px 20px 0;}.wp-caption.alignleft{margin:5px 20px 20px 0;}.wp-caption.alignright{margin:5px 0 20px 20px;}.wp-caption img{border:0 none;height:auto;margin:0;max-width:98.5%;padding:0;width:auto;}.wp-caption p.wp-caption-text{font-size:11px;line-height:17px;margin:0;padding:0 4px 5px;}.screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute !important;height:1px;width:1px;overflow:hidden;}.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,0.6);clip:auto !important;color:#21759b;display:block;font-size:14px;font-size:0.875rem;font-weight:bold;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000;}
\ No newline at end of file
......@@ -20,13 +20,16 @@
\FSI\FooterMenus::getMenu("footer4");
?>
<section class="social">
<a href=""><img src="images/icons/social/facebook.svg" alt="" /></a>
<a href=""><img src="images/icons/social/youtube.svg" alt="" /></a>
<a href=""><img src="images/icons/social/twitter.svg" alt="" /></a>
<a href=""><img src="images/icons/social/twitch.svg" alt="" /></a>
<?php
$socials = explode("\n", get_option("fsi-social", ""));
foreach ($socials as $social) {
$values = explode("::", $social);
echo "<a href='".$values[1]."'><span class='dashicons ".$values[0]."'></span></a>";
}
?>
</section>
</nav>
<p class="col-md-12">&copy; 2016, Fachschaft Informatik – Hochschule Trier</p>
<p class="col-md-12">&copy; <?php echo date("Y"); ?>, Fachschaft Informatik – <a href="https://hochschule-trier.de">Hochschule Trier</a></p>
<div style="clear: both;"></div>
</section>
</footer>
......
jQuery(document).ready(function($){
$('#upload-btn').click(function(e) {
e.preventDefault();
var image = wp.media({
title: 'Upload Image',
multiple: false
}).open()
.on('select', function(e){
var uploaded_image = image.state().get('selection').first();
var image_url = uploaded_image.toJSON().url;
$('#image_url').val(image_url);
$('#ratIMG').html("<img src='" + image_url + "'>");
});
});
});
\ No newline at end of file
......@@ -11,12 +11,20 @@ get_header();
?>
<main>
<section class="row">
<article class="alert alert-warning">
<?php
if (get_option("fsi-notice-display") == 1) {
$notice = get_option("fsi-notice-text");
echo "
<article class=\"alert alert-warning\">
<b>Hinweis:</b>
<p>
Deine Mudder stinkt übel nach Fisch!
$notice
</p>
</article>
";
}
?>
</section>
<section class="row row-eq-height">
<article class="col-md-4">
......@@ -63,10 +71,15 @@ get_header();
<fsi-tile>
<fsi-title>Der Fachschaftsrat</fsi-title>
<fsi-subtitle>die gewählten Vertreter der Fachschaft</fsi-subtitle>
<img src="images/rat.png" alt="Gruppenbild des Fachschaftsrates"/>
<?php
$imgurl = get_option("fsi-rat-img", "");
$img = $imgurl != "" ? "<img src='$imgurl' alt='Gruppenbild des Fachschaftsrates' />" : "";
echo $img;
?>
<br><br>
<p>
Der Fachschaftsrat tut Dinge, Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore.<br>
<?php echo get_option("fsi-rat-desc", ""); ?>
Du willst mehr wissen? Weitere Infos gibt im Wiki:
</p>
<p>
......
<section class="wrap">
<h1>FSI Theme-Options</h1>
<form action="#" method="post">
<input type="hidden" name="fsi-theme-options" value="update" />
{{nonce}}
<table class="form-table">
<tr>
<th>Social Media</th>
<td><input type="text" class="regular-text" /></td>
<td>
<p class="description">
Die Socialmedia-Links der Fachschaft; Einen pro Zeile in der Form:<br>
<code>iconname::https://adresse</code><br><br>
verfügbare Iconnames unter:<br>
<a href="https://developer.wordpress.org/resource/dashicons/">https://developer.wordpress.org/resource/dashicons/</a>
</p>
<textarea class="large-text code" rows="3" name="fsi-social">{{social}}</textarea>
</td>
</tr>
<tr>
<th>Hinweis</th>
......@@ -12,18 +22,38 @@
<p class="description">
Der Hinweistext auf der Startseite
</p>
<textarea class="large-text" rows="6"></textarea>
<textarea class="large-text" rows="6" name="fsi-notice[text]">{{notice}}</textarea>
</td>
</tr>
<tr>
<th>Hinweis anzeigen</th>
<td>
<label class="toggleSwitch" for="fsi_notice">
<input type="checkbox" id="fsi_notice" />
<input type="checkbox" id="fsi_notice" name="fsi-notice[display]" value="1" {{noticeChecked}}/>
</label>
</td>
</tr>
<tr>
<th>Gruppenbild FSRI</th>
<td>
<input type="text" class="" name="fsi-rat-img" value="{{ratIMGURL}}" id="image_url">
<a class="button-secondary" id="upload-btn">Bild auswählen</a>
<p id="ratIMG" class="ratIMG">{{ratIMG}}</p>
</td>
</tr>
<tr>
<th>über den Fachschaftsrat</th>
<td>
<p class="description">
Beschreibungstext des Rates auf der Startseite
</p>
<textarea class="large-text" rows="6" name="fsi-rat-desc">{{rat}}</textarea>
</td>
</tr>
</table>
<p>
<button class="button-primary">Aktualisieren</button>
</p>
</form>
<section class="settingsSection">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment