CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/app/top-nav-consts.ts
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { CSS } from "@cocalc/frontend/app-framework";
7
8
// below this, the "page" is considered "narrow" and we use a different style
9
export const NARROW_THRESHOLD_PX = 550;
10
11
// show labels of projects, if there are less than this many
12
export const HIDE_LABEL_THRESHOLD = 6;
13
14
// the width of the top bar
15
export const NAV_HEIGHT_PX = 36;
16
17
// … and on narrower screens, a bit tigher
18
export const NAV_HEIGHT_NARROW_PX = 28;
19
20
export const NAV_CLASS = "hidden-xs";
21
22
// top bar font size in icons
23
// also used for the notification news badge offset, with a minus sign
24
export const FONT_SIZE_ICONS_NARROW = "14px";
25
export const FONT_SIZE_ICONS_NORMAL = "20px";
26
27
// used in several places, especially for *:hover
28
export const TOP_BAR_ELEMENT_CLASS = "cocalc-top-bar-element";
29
30
export interface PageStyle {
31
topBarStyle: CSS;
32
fileUseStyle: CSS;
33
projectsNavStyle: CSS | undefined;
34
fontSizeIcons: string; // {n}px
35
topPaddingIcons: string; // {n}px
36
sidePaddingIcons: string; // {n}px
37
isNarrow: boolean;
38
height: number;
39
}
40
41