Skip to content
Permalink
Browse files

New styling for left-menu pages.

  • Loading branch information...
kohler committed Oct 1, 2019
1 parent 77a3242 commit 6ed9fd66cc7d8ce234bdfd6d9ec5f5000594cbce
Showing with 131 additions and 68 deletions.
  1. +1 −1 buzzer.php
  2. +3 −4 help.php
  3. +12 −15 settings.php
  4. +25 −15 src/conference.php
  5. +1 −1 src/papertable.php
  6. +25 −0 stylesheets/mobile.css
  7. +64 −32 stylesheets/style.css
@@ -69,7 +69,7 @@ function kiosk_lookup($key) {
$Me->escape();
$Conf->header("Discussion status", "buzzer", ["action_bar" => false, "class" => "hide-tracker"]);
$Conf->header("Discussion status", "buzzer", ["action_bar" => false, "body_class" => "hide-tracker"]);
$Conf->stash_hotcrp_pc($Me, true);
echo '<div id="tracker-table" class="demargin" style="margin-top:1em"></div>';
@@ -19,8 +19,7 @@
$Conf->self_redirect($Qreq, ["t" => $want_topic]);
$topicj = $help_topics->get($topic);
$Conf->header_head($topic === "topics" ? "Help" : ["Help", $topicj->title, true]);
$Conf->header_body("Help", "help");
$Conf->header("Help", "help", ["title_div" => '<hr class="c">', "body_class" => "leftmenu"]);
class HtHead extends Ht {
public $conf;
@@ -214,7 +213,7 @@ function meaningful_round_name(Contact $user) {
}
echo '<div class="leftmenu-menu-container"><div class="leftmenu-list">';
echo '<div class="leftmenu-menu-container"><h1 class="leftmenu">Help</h1><div class="leftmenu-list">';
foreach ($help_topics->groups() as $gj) {
if ($gj->name === $topic)
echo '<div class="leftmenu-item active">', $gj->title, '</div>';
@@ -227,7 +226,7 @@ function meaningful_round_name(Contact $user) {
echo "</div></div>\n",
'<div class="leftmenu-content-container"><div id="helpcontent" class="leftmenu-content">';
echo '<h2 class="helppage">', $topicj->title, '</h2>';
echo '<h2 class="leftmenu">', $topicj->title, '</h2>';
$hth->render_group($topic);
echo "</div></div>\n";
@@ -53,38 +53,35 @@ function choose_setting_group($qreq, SettingValues $sv) {
$Sv->crosscheck();
$group_titles = $Sv->group_titles();
$Conf->header("Settings", "settings", ["subtitle" => $group_titles[$Group]]);
$Conf->header("Settings", "settings", ["subtitle" => $group_titles[$Group], "title_div" => '<hr class="c">', "body_class" => "leftmenu"]);
echo Ht::unstash(); // clear out other script references
echo $Conf->make_script_file("scripts/settings.js"), "\n";
echo Ht::form(hoturl_post("settings", "group=$Group"),
["id" => "settingsform", "class" => "need-unload-protection"]);
echo '<div class="leftmenu-menu-container"><div class="leftmenu-list">';
echo '<div class="leftmenu-menu-container"><h1 class="leftmenu">Settings</h1><div class="leftmenu-list">';
foreach ($group_titles as $name => $title) {
if ($name === $Group)
echo '<div class="leftmenu-item active">', $title, '</div>';
else
echo '<div class="leftmenu-item ui js-click-child">',
'<a href="', hoturl("settings", "group={$name}"), '">', $title, '</a></div>';
}
echo "</div></div>\n",
'<div class="leftmenu-content-container"><div class="leftmenu-content">';
function doActionArea($top) {
echo '<div class="aab aabr aabig">',
'<div class="aabut">', Ht::submit("update", "Save changes", ["class" => "btn-primary"]), '</div>',
'<div class="aabut">', Ht::submit("cancel", "Cancel"), '</div>',
'<hr class="c" /></div>';
}
doActionArea(true);
echo '</div><div class="leftmenu-if-left if-alert mt-5">',
Ht::submit("update", "Save changes", ["class" => "btn-primary"]),
"</div></div>\n",
'<div class="leftmenu-content-container"><div class="leftmenu-content">',
'<h2 class="leftmenu">', $group_titles[$Group], '</h2>';
$Sv->report(isset($Qreq->update) && $Qreq->post_ok());
$Sv->render_group($Group);
doActionArea(false);
echo "</div></div></form>\n";
echo '<div class="aab aabr aabig">',
'<div class="aabut">', Ht::submit("update", "Save changes", ["class" => "btn-primary"]), '</div>',
'<div class="aabut">', Ht::submit("cancel", "Cancel"), '</div>',
'<hr class="c" /></div></div></div></form>', "\n";
Ht::stash_script('hiliter_children("#settingsform")');
$Conf->footer();
@@ -95,6 +95,7 @@ class Conf {
public $paper_opts;
public $headerPrinted = false;
private $_footer_printed = false;
private $_save_logs = false;
public $_session_handler;
@@ -3412,7 +3413,7 @@ function header_body($title, $id, $extra = []) {
echo "<body";
if ($id)
echo ' id="body-', $id, '"';
$class = get($extra, "class");
$class = get($extra, "body_class");
if (($list = $this->active_list()))
$class = ($class ? $class . " " : "") . "has-hotlist";
if ($class)
@@ -3579,21 +3580,30 @@ static function git_status() {
return count($args) == 2 ? $args : null;
}
function footer() {
global $Me, $ConfSitePATH;
echo "</div>\n", // class='body'
'<div id="footer"><div id="footer-crp">',
$this->opt("extraFooter", ""),
'<a class="uu" href="https://hotcrp.com/">HotCRP</a>';
if (!$this->opt("noFooterVersion")) {
if ($Me && $Me->privChair) {
echo " v", HOTCRP_VERSION;
if (($git_data = self::git_status()) && $git_data[0] !== $git_data[1])
echo " [", substr($git_data[0], 0, 7), "...]";
} else
echo "<!-- Version ", HOTCRP_VERSION, " -->";
function print_footer() {
global $Me;
if (!$this->_footer_printed) {
echo '<div id="footer"><div id="footer-crp">',
$this->opt("extraFooter", ""),
'<a class="uu" href="https://hotcrp.com/">HotCRP</a>';
if (!$this->opt("noFooterVersion")) {
if ($Me && $Me->privChair) {
echo " v", HOTCRP_VERSION;
if (($git_data = self::git_status())
&& $git_data[0] !== $git_data[1])
echo " [", substr($git_data[0], 0, 7), "...]";
} else {
echo "<!-- Version ", HOTCRP_VERSION, " -->";
}
}
echo '</div><hr class="c"></div>';
}
echo "</div>\n <hr class=\"c\"></div>\n";
$this->_footer_printed = true;
}
function footer() {
echo "</div>"; // class='body'
$this->print_footer();
echo Ht::unstash(), "</body>\n</html>\n";
}
@@ -236,7 +236,7 @@ static function do_header($paperTable, $id, $action_mode, $qreq) {
$Conf->header($title, $id, [
"action_bar" => actionBar($action_mode, $qreq),
"title_div" => $t, "class" => "paper", "paperId" => $qreq->paperId
"title_div" => $t, "body_class" => "paper", "paperId" => $qreq->paperId
]);
if ($format)
echo Ht::unstash_script("render_text.on_page()");
@@ -25,9 +25,18 @@ html {
#header-right, h1.paptitle, div#footer {
padding-right: 12px;
}
h1.leftmenu, h2.leftmenu {
margin-bottom: 16px;
}
table.vbar {
margin-right: 12px;
}
body.leftmenu {
background: white;
}
body.leftmenu > #header {
background: #ecf2f4;
}
div#body {
margin: 0 12px;
}
@@ -54,9 +63,24 @@ h2.paptitle {
float: none;
position: static;
width: auto;
}
.pspcard {
margin-left: 0;
margin-bottom: 16px;
}
.leftmenu-menu-container {
margin-top: 0;
padding-top: 0;
margin-left: -12px;
margin-right: -12px;
padding-left: 12px;
padding-right: 12px;
padding-bottom: 12px;
background: #ecf2f4;
}
.leftmenu-if-left {
display: none;
}
.leftmenu-list {
-webkit-columns: 100px 4;
-moz-columns: 100px 4;
@@ -80,6 +104,7 @@ h2.paptitle {
margin: 0 -12px;
}
.leftmenu-content {
padding-top: 20px;
padding-left: 12px;
padding-right: 12px;
}

0 comments on commit 6ed9fd6

Please sign in to comment.
You can’t perform that action at this time.