kartikmandar commited on
Commit
771f304
·
1 Parent(s): 9924df1

add .gitignore

Browse files
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ __pycache__/
assets/stylesheets/explorer.css CHANGED
@@ -1 +1,5 @@
1
- /* Home Heading */
 
 
 
 
 
1
+ /* Home Heading */
2
+
3
+ :host(.home-heading) {
4
+ --font-size: 22px;
5
+ }
explorer.py CHANGED
@@ -1,45 +1,43 @@
1
  import panel as pn
2
- from utils.strings import HOME_HEADING_STRING, WELCOME_MESSAGE
3
 
4
 
5
  # Initialize panel extension
6
  pn.extension()
7
 
8
  # Create a boolean status indicator
9
- busy_indicator = pn.indicators.BooleanStatus(value=True, color='warning', width=30, height=30)
 
 
10
 
11
  # Create header
12
- HOME_HEADING = pn.pane.Markdown(HOME_HEADING_STRING, stylesheets=['../assets/stylesheets/explorer.css'])
 
 
 
 
13
 
14
  # Create a welcome message
15
- welcome_message = pn.pane.Markdown(WELCOME_MESSAGE)
 
 
 
16
 
17
  # Create main content layout
18
- main = pn.Column(HOME_HEADING, welcome_message)
19
 
20
- # Create sidebar using the create_sidebar function and pass the main content layout
21
  sidebar = pn.pane.Markdown("Sidebar")
22
 
23
  # Create a footer
24
- footer = pn.pane.Markdown(
25
- """
26
- <div style='text-align: center;'>
27
- <p>Stingray Explorer Dashboard</p>
28
- <p>&copy; 2021 Kartik Mandar</p>
29
- </div>
30
- """,
31
- width=200,
32
- )
33
 
34
  # Create a FastGridTemplate layout
35
  layout = pn.template.FastGridTemplate(
36
-
37
  # Basic Panel layout components
38
  header="Next-Generation Spectral Timing Made Easy",
39
  sidebar=[sidebar],
40
- main=[main, footer],
41
  modal=True,
42
-
43
  # Parameters for the FastGridTemplate
44
  site="", # Not shown as already doing in title
45
  site_url="StingrayExplorer",
@@ -49,15 +47,13 @@ layout = pn.template.FastGridTemplate(
49
  sidebar_footer="Sidebar Footer",
50
  # config= (TemplateConfig): Contains configuration options similar to pn.config but applied to the current Template only. (Currently only css_files is supported) But css_files are now deprecated.
51
  busy_indicator=busy_indicator,
52
-
53
  # For configuring the grid
54
- cols={'lg': 12, 'md': 10, 'sm': 6, 'xs': 4, 'xxs': 2},
55
- breakpoints={'lg': 1200, 'md': 996, 'sm': 768, 'xs': 480, 'xxs': 0},
56
- row_height=150,
57
- dimensions={'minW': 0, 'maxW': float('inf'), 'minH': 0, 'maxH': float('inf')},
58
  prevent_collision=False,
59
  save_layout=True,
60
-
61
  # Styling parameter
62
  theme="default",
63
  theme_toggle=True,
@@ -73,21 +69,18 @@ layout = pn.template.FastGridTemplate(
73
  # font_url="",
74
  shadow=True,
75
  main_layout="card",
76
-
77
  # Layout parameters
78
  collapsed_sidebar=False,
79
  sidebar_width=250,
80
  main_max_width="100%",
81
-
82
-
83
  # Meta data
84
- meta_description='Stingray Explorer Dashboard',
85
- meta_keywords='Stingray, Explorer, Dashboard, Astronomy, Stingray Explorer, X-ray Astronomy, X-ray Data Analysis',
86
- meta_author='Kartik Mandar',
87
- meta_refresh='',
88
- meta_viewport='width=device-width, initial-scale=1',
89
- base_url='/',
90
- base_target='_self',
91
  )
92
 
93
  # Serve the layout
 
1
  import panel as pn
2
+ from utils.strings import HOME_HEADING_STRING, WELCOME_MESSAGE_STRING, FOOTER_STRING
3
 
4
 
5
  # Initialize panel extension
6
  pn.extension()
7
 
8
  # Create a boolean status indicator
9
+ busy_indicator = pn.indicators.BooleanStatus(
10
+ value=True, color="warning", width=30, height=30
11
+ )
12
 
13
  # Create header
14
+ home_heading = pn.pane.HTML(
15
+ HOME_HEADING_STRING,
16
+ stylesheets=["../assets/stylesheets/explorer.css"],
17
+ css_classes=["home-heading"],
18
+ )
19
 
20
  # Create a welcome message
21
+ welcome_message = pn.pane.HTML(
22
+ WELCOME_MESSAGE_STRING,
23
+ stylesheets=["../assets/stylesheets/explorer.css"],
24
+ )
25
 
26
  # Create main content layout
27
+ main = pn.Column(home_heading, welcome_message, height=800)
28
 
29
+ # Create a sidebar
30
  sidebar = pn.pane.Markdown("Sidebar")
31
 
32
  # Create a footer
33
+ footer = pn.pane.Markdown(FOOTER_STRING)
 
 
 
 
 
 
 
 
34
 
35
  # Create a FastGridTemplate layout
36
  layout = pn.template.FastGridTemplate(
 
37
  # Basic Panel layout components
38
  header="Next-Generation Spectral Timing Made Easy",
39
  sidebar=[sidebar],
 
40
  modal=True,
 
41
  # Parameters for the FastGridTemplate
42
  site="", # Not shown as already doing in title
43
  site_url="StingrayExplorer",
 
47
  sidebar_footer="Sidebar Footer",
48
  # config= (TemplateConfig): Contains configuration options similar to pn.config but applied to the current Template only. (Currently only css_files is supported) But css_files are now deprecated.
49
  busy_indicator=busy_indicator,
 
50
  # For configuring the grid
51
+ cols={"lg": 20, "md": 20, "sm": 20, "xs": 20, "xxs": 20},
52
+ breakpoints={"lg": 1200, "md": 996, "sm": 768, "xs": 480, "xxs": 0},
53
+ row_height=100,
54
+ dimensions={"minW": 0, "maxW": float("inf"), "minH": 0, "maxH": float("inf")},
55
  prevent_collision=False,
56
  save_layout=True,
 
57
  # Styling parameter
58
  theme="default",
59
  theme_toggle=True,
 
69
  # font_url="",
70
  shadow=True,
71
  main_layout="card",
 
72
  # Layout parameters
73
  collapsed_sidebar=False,
74
  sidebar_width=250,
75
  main_max_width="100%",
 
 
76
  # Meta data
77
+ meta_description="Stingray Explorer Dashboard",
78
+ meta_keywords="Stingray, Explorer, Dashboard, Astronomy, Stingray Explorer, X-ray Astronomy, X-ray Data Analysis",
79
+ meta_author="Kartik Mandar",
80
+ meta_refresh="",
81
+ meta_viewport="width=device-width, initial-scale=1",
82
+ base_url="/",
83
+ base_target="_self",
84
  )
85
 
86
  # Serve the layout
utils/__pycache__/strings.cpython-311.pyc CHANGED
Binary files a/utils/__pycache__/strings.cpython-311.pyc and b/utils/__pycache__/strings.cpython-311.pyc differ
 
utils/strings.py CHANGED
@@ -1,16 +1,13 @@
1
  ## This section contains the textual strings used in the explorer.py
2
 
3
- HOME_HEADING_STRING = """<div>
4
  <h1>Welcome to the Stingray Explorer Dashboard</h1>
5
- </div>"""
6
-
7
-
8
- ## This section contains the textual strings used in the explorer.py
9
 
10
- WELCOME_MESSAGE = """
11
  <div>
12
  <p>This dashboard is designed to provide a comprehensive toolset for X-ray astronomy data analysis. Here are the main features:</p>
13
- <ul style='text-align: left;'>
14
  <li><b>Quicklook with Stingray:</b><ul><li> Don't want to dabble around too much and generate plots fast and easy, this is the way.</li></ul></li>
15
  <li><b>Working with Event Data:</b>
16
  <ul>
@@ -65,3 +62,10 @@ WELCOME_MESSAGE = """
65
  <p>We hope you find this dashboard useful for your research!</p>
66
  </div>
67
  """
 
 
 
 
 
 
 
 
1
  ## This section contains the textual strings used in the explorer.py
2
 
3
+ HOME_HEADING_STRING = """
4
  <h1>Welcome to the Stingray Explorer Dashboard</h1>
5
+ """
 
 
 
6
 
7
+ WELCOME_MESSAGE_STRING = """
8
  <div>
9
  <p>This dashboard is designed to provide a comprehensive toolset for X-ray astronomy data analysis. Here are the main features:</p>
10
+ <ul>
11
  <li><b>Quicklook with Stingray:</b><ul><li> Don't want to dabble around too much and generate plots fast and easy, this is the way.</li></ul></li>
12
  <li><b>Working with Event Data:</b>
13
  <ul>
 
62
  <p>We hope you find this dashboard useful for your research!</p>
63
  </div>
64
  """
65
+
66
+ FOOTER_STRING = """
67
+ <div>
68
+ <p>Stingray Explorer Dashboard</p>
69
+ <p>&copy; 2021 Kartik Mandar</p>
70
+ </div>
71
+ """