Skip to content

Commit c1e3450

Browse files
edit generate index
1 parent c016bb4 commit c1e3450

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

public/index.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
.notebook-item {
2828
margin-bottom: 2rem;
2929
padding: 1rem;
30-
border: 1px solid white;
30+
border: 2px solid white;
3131
border-radius: 8px;
3232
transition: transform 0.2s;
3333
}
@@ -51,12 +51,14 @@
5151
color: #2F2D2E;
5252
text-decoration: none;
5353
border-radius: 4px;
54-
transition: background-color 0.2s;
55-
border: 1px solid white;
54+
transition: all 0.2s;
55+
border: 2px solid white;
56+
font-weight: 600;
5657
}
5758
.notebook-link:hover {
5859
background-color: #5AA8E8;
59-
border: 1px solid white;
60+
border: 2px solid white;
61+
transform: translateY(-2px);
6062
}
6163
</style>
6264
</head>
@@ -65,27 +67,27 @@ <h1>CodeCut Blog Examples</h1>
6567
<ul class="notebook-list">
6668
<li class="notebook-item">
6769
<h2 class="notebook-title">narwhals</h2>
68-
<a href="data_science_tools/narwhals.html" class="notebook-link">View Notebooks</a>
70+
<a href="data_science_tools/narwhals.html" class="notebook-link">View the notebook</a>
6971
</li>
7072
<li class="notebook-item">
7173
<h2 class="notebook-title">narwhals row ordering</h2>
72-
<a href="data_science_tools/narwhals_row_ordering.html" class="notebook-link">View Notebooks</a>
74+
<a href="data_science_tools/narwhals_row_ordering.html" class="notebook-link">View the notebook</a>
7375
</li>
7476
<li class="notebook-item">
7577
<h2 class="notebook-title">pandas api on spark</h2>
76-
<a href="data_science_tools/pandas_api_on_spark.html" class="notebook-link">View Notebooks</a>
78+
<a href="data_science_tools/pandas_api_on_spark.html" class="notebook-link">View the notebook</a>
7779
</li>
7880
<li class="notebook-item">
7981
<h2 class="notebook-title">polars vs pandas</h2>
80-
<a href="data_science_tools/polars_vs_pandas.html" class="notebook-link">View Notebooks</a>
82+
<a href="data_science_tools/polars_vs_pandas.html" class="notebook-link">View the notebook</a>
8183
</li>
8284
<li class="notebook-item">
8385
<h2 class="notebook-title">pyspark parametrize</h2>
84-
<a href="data_science_tools/pyspark_parametrize.html" class="notebook-link">View Notebooks</a>
86+
<a href="data_science_tools/pyspark_parametrize.html" class="notebook-link">View the notebook</a>
8587
</li>
8688
<li class="notebook-item">
8789
<h2 class="notebook-title">pydantic ai examples</h2>
88-
<a href="llm/pydantic_ai_examples.html" class="notebook-link">View Notebooks</a>
90+
<a href="llm/pydantic_ai_examples.html" class="notebook-link">View the notebook</a>
8991
</li>
9092
</ul>
9193
</body>

scripts/generate_index.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def generate_index():
5353
.notebook-item {{
5454
margin-bottom: 2rem;
5555
padding: 1rem;
56-
border: 1px solid white;
56+
border: 2px solid white;
5757
border-radius: 8px;
5858
transition: transform 0.2s;
5959
}}
@@ -77,12 +77,14 @@ def generate_index():
7777
color: #2F2D2E;
7878
text-decoration: none;
7979
border-radius: 4px;
80-
transition: background-color 0.2s;
81-
border: 1px solid white;
80+
transition: all 0.2s;
81+
border: 2px solid white;
82+
font-weight: 600;
8283
}}
8384
.notebook-link:hover {{
8485
background-color: #5AA8E8;
85-
border: 1px solid white;
86+
border: 2px solid white;
87+
transform: translateY(-2px);
8688
}}
8789
</style>
8890
</head>
@@ -103,7 +105,7 @@ def generate_index():
103105
relative_path = html_file.relative_to(public_dir)
104106
notebook_items.append(f""" <li class="notebook-item">
105107
<h2 class="notebook-title">{title}</h2>
106-
<a href="{relative_path}" class="notebook-link">View Notebooks</a>
108+
<a href="{relative_path}" class="notebook-link">View the notebook</a>
107109
</li>""")
108110

109111
# Generate final HTML

0 commit comments

Comments
 (0)