Browse Source

Adds boardlist to homepage creation (top bar). Standardizes tabs or spaces in some files. Adds css rules for better mobile experience.

pull/40/head
nonmakina 3 years ago
parent
commit
9543883f9f
  1. 39
      templates/themes/categories/frames.html
  2. 26
      templates/themes/categories/theme.php

39
templates/themes/categories/frames.html

@ -4,8 +4,8 @@
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}"> <link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}">
<style type="text/css"> <style type="text/css">
.sidebar { .sidebar {
width: 200px; width: 200px;
border-right-color: gray; border-right-color: gray;
@ -52,20 +52,29 @@
font-weight: bold; font-weight: bold;
} }
@media (max-width:768px) { @media (max-width:768px) {
.sidebar { .sidebar {
display: none; width: 80vw;
} border: none;
}
footer { .main {
display: none; flex-direction: column;
} align-items: center;
} }
</style>
<title>{{ settings.title }}</title> .boardlist {
display: none;
}
footer {
display: none;
}
}
</style>
<title>{{ settings.title }}</title>
</head> </head>
<body> <body>
{% include 'themes/categories/' ~ settings.file_sidebar %} {% include 'themes/categories/' ~ settings.file_sidebar %}
{% include 'themes/categories/' ~ settings.file_news %} {% include 'themes/categories/' ~ settings.file_news %}
</body> </body>
</html> </html>

26
templates/themes/categories/theme.php

@ -29,14 +29,16 @@
public static function homepage($settings) { public static function homepage($settings) {
global $config; global $config;
return Element( return Element(
'themes/categories/frames.html', 'themes/categories/frames.html',
Array( Array(
'config' => $config, 'config' => $config,
'settings' => $settings, 'settings' => $settings,
'categories' => Categories::getCategories($config) 'categories' => Categories::getCategories($config),
) 'boardlist' => createBoardlist(false)
);
)
);
} }
// Build news page // Build news page
@ -50,7 +52,7 @@
'settings' => $settings, 'settings' => $settings,
'config' => $config, 'config' => $config,
'news' => $news, 'news' => $news,
'boardlist' => createBoardlist(false) 'boardlist' => createBoardlist(false)
)); ));
} }
@ -65,7 +67,7 @@
)); ));
} }
private static function getCategories($config) { private static function getCategories($config) {
$categories = $config['categories']; $categories = $config['categories'];
foreach ($categories as &$boards) { foreach ($categories as &$boards) {
@ -77,8 +79,8 @@
} }
} }
return $categories; return $categories;
} }
}; };
?> ?>

Loading…
Cancel
Save