break; | break; | ||||
case 'devide': | case 'devide': | ||||
$new = "<div>"; | |||||
$new = '<div class="content_element_devided">'; | |||||
$contents = explode($request[1],implode("\n",$body)); | $contents = explode($request[1],implode("\n",$body)); | ||||
$counter=0; | $counter=0; | ||||
foreach($contents as $part) { | foreach($contents as $part) { |
<img class="logo" src="{{@RESOURCES}}img/logo.png" /> | <img class="logo" src="{{@RESOURCES}}img/logo.png" /> | ||||
</check> | </check> | ||||
<h1><img class="text" src="/{{ @banner }}" alt="{{ @title }}" /></h1> | <h1><img class="text" src="/{{ @banner }}" alt="{{ @title }}" /></h1> | ||||
<nav id="languages"> | |||||
<include href="navigation.htm" with="menu={{ @navi.languages }}" /> | |||||
</nav> | |||||
</a> | </a> |
<ul> | |||||
<ul class="nav level{{ @level }}"> | |||||
<repeat group="{{ @menu }}" key="{{ @key }}" value="{{ @item }}"> | <repeat group="{{ @menu }}" key="{{ @key }}" value="{{ @item }}"> | ||||
<li><a href="{{ @item.href }}" >{{ @item.name }}</a> | |||||
<li class="{{ @item.class }}"><a href="{{ @item.href }}">{{ @item.name }}</a> | |||||
<check if="{{ is_array(@item.submenu) }}"> | <check if="{{ is_array(@item.submenu) }}"> | ||||
<include href="navigation.htm" with="menu={{ @item.submenu }}" /> | |||||
<include href="navigation.htm" with="menu={{ @item.submenu }},level={{ @level + 1 }}" /> | |||||
</check> | </check> | ||||
</li> | </li> | ||||
</repeat> | </repeat> | ||||
</ul> | </ul> | ||||
<check if="{{ false }}"> | <check if="{{ false }}"> | ||||
<ul> | <ul> | ||||
<repeat group="{{ @menu }}" key="{{ @key }}" value="{{ @item }}"> | <repeat group="{{ @menu }}" key="{{ @key }}" value="{{ @item }}"> |
<nav> | <nav> | ||||
<include href="navigation.htm" with="menu={{ @navi.footer }}" /> | <include href="navigation.htm" with="menu={{ @navi.footer }}" /> | ||||
</nav> | </nav> | ||||
<nav id="languages"> | |||||
<include href="navigation.htm" with="menu={{ @navi.languages }}" /> | |||||
</nav> | |||||
</footer> | </footer> | ||||
</div> <!-- #page-wrap --> | </div> <!-- #page-wrap --> |
function menu_recursion($m,$root="") { | function menu_recursion($m,$root="") { | ||||
$f3 = \Base::instance(); | $f3 = \Base::instance(); | ||||
//$url = explode("/", $f3->get('url')); | |||||
$out=[]; | $out=[]; | ||||
foreach ($m as $key=>$value) { | foreach ($m as $key=>$value) { | ||||
$folder = $key == "index" ? "" : "/".$key; | $folder = $key == "index" ? "" : "/".$key; | ||||
$path = $root.$folder; | $path = $root.$folder; | ||||
if (is_array($value)) { | if (is_array($value)) { | ||||
# submenu | |||||
$submenu=menu_recursion($value,$path); | $submenu=menu_recursion($value,$path); | ||||
$out[$path]=$submenu[$path]; | $out[$path]=$submenu[$path]; | ||||
unset($submenu[$path]); | unset($submenu[$path]); | ||||
$out[$path]['submenu']=$submenu; | $out[$path]['submenu']=$submenu; | ||||
} else { | } else { | ||||
$class=""; | |||||
$ex = explode(":=", $value); | $ex = explode(":=", $value); | ||||
if (count($ex) > 1) { | if (count($ex) > 1) { | ||||
# external link | # external link | ||||
} else { | } else { | ||||
# internal link | # internal link | ||||
$href = $f3->get('SITE_URL').$path; | $href = $f3->get('SITE_URL').$path; | ||||
$class .= in_array($path,$f3->get('url')) ? ' active' : ' away'; | |||||
} | } | ||||
$out[$path]['name']=$ex[0]; | $out[$path]['name']=$ex[0]; | ||||
$out[$path]['href']=$href; | $out[$path]['href']=$href; | ||||
//print($path." - ".$ex[0]." - ".$href."<br>"); | |||||
$out[$path]['class']=$class; | |||||
} | } | ||||
} | } | ||||
return $out; | return $out; | ||||
} | } | ||||
if (is_array($menu)) { | if (is_array($menu)) { | ||||
//var_dump($menu); | |||||
//print("<br>"); | |||||
$menu=menu_recursion($menu); | $menu=menu_recursion($menu); | ||||
} | } | ||||
$f3->set('navi.'.$menu_name, $menu); | $f3->set('navi.'.$menu_name, $menu); | ||||
//var_dump($f3->get('navi.'.$menu_name)); | |||||
//print("<br>"); | |||||
} | } | ||||
// this is needed so the menu can compare the current page with a link to it | |||||
// and use this information to determine the active state | |||||
$tmp_url = substr($_SERVER['REQUEST_URI'],1); | |||||
$url=substr($tmp_url,0,(strpos($tmp_url,'?') === false) ? 999 : strpos($tmp_url,'?')); | |||||
$url_ex=explode('/',$url); | |||||
$url=array(); | |||||
for ($i=1;$i<=count($url_ex);$i++) { | |||||
$url[]="/".implode("/",array_slice($url_ex,0,$i)); | |||||
} | |||||
$f3->set('url', $url); | |||||
$f3->set('level', 1); // this is for templates, to be abl to count nesting | |||||
read_menu("main"); | read_menu("main"); | ||||
read_menu("footer"); | read_menu("footer"); | ||||
read_menu("network"); | read_menu("network"); | ||||
read_menu("languages"); | read_menu("languages"); | ||||
// this is needed so the menu can compare the current page with a link to it | |||||
// and use this information to determine the active state | |||||
$tmp_url = substr($_SERVER['REQUEST_URI'],strlen($f3->get('SITE_URL'))+1); | |||||
$url=substr($tmp_url,0,(strpos($tmp_url,'?') === false) ? 999 : strpos($tmp_url,'?')); | |||||
$f3->set('url', explode("/", $url)); | |||||
/////////////////////////////////// | /////////////////////////////////// |
text-decoration: underline; | text-decoration: underline; | ||||
} | } | ||||
} | } | ||||
ul.nav { | |||||
list-style: none; | |||||
li { margin:0; } | |||||
.active>a { | |||||
font-weight: bold; | |||||
} | |||||
} | |||||
#main-nav { | |||||
background: #eec; | |||||
border-radius:1.2em 1.2em 0 0; | |||||
ul { padding-left: 1.5em; } | |||||
.level1>li,.level2>li { margin-top: 1em; } | |||||
} |
.content_elment_box_body { | .content_elment_box_body { | ||||
display: none; | display: none; | ||||
} | } | ||||
// devided | |||||
.content_element_devided { | |||||
display: grid; | |||||
grid-template-columns:50% 50%; | |||||
} | |||||
// lightbox ----------------------- | // lightbox ----------------------- | ||||
.featherlight .featherlight-content { | .featherlight .featherlight-content { |
// margin:0; | // margin:0; | ||||
// padding:0; | // padding:0; | ||||
} | } | ||||
html,body { | |||||
height:100%; | |||||
margin:0; | |||||
padding:0; | |||||
} | |||||
height:100px; | height:100px; | ||||
} | } | ||||
} | } | ||||
#page-wrap { | |||||
display: grid; | |||||
grid-template-columns:250px auto; | |||||
grid-template-rows:200px 100fr 3em; | |||||
height:100vh; | |||||
overflow: hidden; | |||||
max-width:1300px; | |||||
margin:0 auto; | |||||
>header { | |||||
grid-column:1 / -1; | |||||
} | |||||
#main-nav { | |||||
grid-column:1 / span 1; | |||||
grid-row:2 / -1; | |||||
} | |||||
#content { | |||||
grid-column: 2 / -1; | |||||
grid-row: 2 / 3; | |||||
overflow-y: auto; | |||||
} | |||||
#main-footer { | |||||
grid-column: 2 / -1; | |||||
grid-row: -2 / -1; | |||||
} | |||||
} | |||||
#main-nav { | |||||
.level2 .away ul { | |||||
display: none; | |||||
} | |||||
} | |||||
#content { | |||||
img { | |||||
max-width: 100%; | |||||
} | |||||
} |
.content_elment_box_body { | .content_elment_box_body { | ||||
display: none; } | display: none; } | ||||
.content_element_devided { | |||||
display: grid; | |||||
grid-template-columns: 50% 50%; } | |||||
.featherlight .featherlight-content { | .featherlight .featherlight-content { | ||||
background: none; | background: none; | ||||
overflow: visible; } | overflow: visible; } | ||||
#mobile-nav.open a.menu-toggle { | #mobile-nav.open a.menu-toggle { | ||||
background-position: bottom; } | background-position: bottom; } | ||||
html, body { | |||||
height: 100%; | |||||
margin: 0; | |||||
padding: 0; } | |||||
.content_element_page.wall a.content_element_box { | .content_element_page.wall a.content_element_box { | ||||
float: left; } | float: left; } | ||||
.content_element_page.wall:after { | .content_element_page.wall:after { | ||||
.content_element_page.wall div.content_element_box { | .content_element_page.wall div.content_element_box { | ||||
height: 100px; } | height: 100px; } | ||||
#page-wrap { | |||||
display: grid; | |||||
grid-template-columns: 250px auto; | |||||
grid-template-rows: 200px 100fr 3em; | |||||
height: 100vh; | |||||
overflow: hidden; | |||||
max-width: 1300px; | |||||
margin: 0 auto; } | |||||
#page-wrap > header { | |||||
grid-column: 1 / -1; } | |||||
#page-wrap #main-nav { | |||||
grid-column: 1 / span 1; | |||||
grid-row: 2 / -1; } | |||||
#page-wrap #content { | |||||
grid-column: 2 / -1; | |||||
grid-row: 2 / 3; | |||||
overflow-y: auto; } | |||||
#page-wrap #main-footer { | |||||
grid-column: 2 / -1; | |||||
grid-row: -2 / -1; } | |||||
#main-nav .level2 .away ul { | |||||
display: none; } | |||||
#content img { | |||||
max-width: 100%; } | |||||
a { | a { | ||||
text-decoration: none; } | text-decoration: none; } | ||||
a:hover { | a:hover { | ||||
text-decoration: underline; } | text-decoration: underline; } | ||||
ul.nav { | |||||
list-style: none; } | |||||
ul.nav li { | |||||
margin: 0; } | |||||
ul.nav .active > a { | |||||
font-weight: bold; } | |||||
#main-nav { | |||||
background: #eec; | |||||
border-radius: 1.2em 1.2em 0 0; } | |||||
#main-nav ul { | |||||
padding-left: 1.5em; } | |||||
#main-nav .level1 > li, #main-nav .level2 > li { | |||||
margin-top: 1em; } | |||||
/*# sourceMappingURL=style.css.map */ | /*# sourceMappingURL=style.css.map */ |
{ | { | ||||
"version": 3, | "version": 3, | ||||
"mappings": "AAUA,CAAE;EACE,UAAU,EAAC,UAAU;;ACJzB,IAAK;EACD,KAAK,EALH,IAAI;EAMN,UAAU,EARP,IAAI;;AAWX,CAAE;EACE,KAAK,EAVH,IAAI;;ACCN,4BAAO;EACC,OAAO,EAAE,IAAI;AAGjB,kCAAO;EACH,OAAO,EAAE,MAAM;AAEnB,qCAAU;EACN,OAAO,EAAE,IAAI;AAGrB,6CAAwB;EACpB,OAAO,EAAE,YAAY;EACrB,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,KAAK;EACb,MAAM,EAAC,GAAG;EAEV,oDAAO;IAAE,MAAM,EAAC,IAAI;EACpB,iDAAI;IACA,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;EAEf,sDAAS;IACL,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,IAAI;IACX,MAAM,EAAC,CAAC;IACR,KAAK,EAAC,CAAC;IACP,UAAU,EAAE,wBAAqB;;AAI7C,wBAAyB;EACrB,OAAO,EAAE,IAAI;;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AAQ,EAAE,OAAO;;AAMrB,0BAAiB;EACb,OAAO,EAAE,IAAI;;AAKjB,YAAI;EACA,SAAS,EAAE,IAAI;;ACjEvB,CAAE;EACE,eAAe,EAAE,IAAI;EACrB,OAAQ;IACJ,eAAe,EAAE,SAAS;;AAIlC,MAAO;EACH,UAAU,EAAE,IAAI;EAEhB,SAAG;IAAE,MAAM,EAAC,CAAC;EACb,kBAAU;IACN,WAAW,EAAE,IAAI;;AAIzB,SAAU;EACN,UAAU,EAAE,IAAI;EAChB,aAAa,EAAC,eAAe;EAE7B,YAAG;IAAE,YAAY,EAAE,KAAK;EACxB,8CAAsB;IAAE,UAAU,EAAE,GAAG", | |||||
"sources": ["sass/main.scss","sass/_colours.scss","sass/_freaCMSfeatures.scss","sass/_structure.scss","sass/_design.scss"], | "sources": ["sass/main.scss","sass/_colours.scss","sass/_freaCMSfeatures.scss","sass/_structure.scss","sass/_design.scss"], | ||||
"names": [], | "names": [], | ||||
"file": "style.css" | "file": "style.css" |