-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from surajwate:dev
Improve code display and format tables, add new post and change post detail on blog page
- Loading branch information
Showing
12 changed files
with
422 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,6 +209,7 @@ td { | |
th { | ||
background-color: var(--primary-color); | ||
color: white; | ||
border-radius: 5px; | ||
} | ||
|
||
button { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:[email protected]&display=swap'); | ||
|
||
/* Only apply border and background to <pre>, not <code> */ | ||
pre[class*="language-"] { | ||
background-color: transparent; /* Set your desired background color */ | ||
border: 1px solid #ccc; /* Border around the entire code block */ | ||
border-radius: 5px; /* Optional: Rounded corners */ | ||
padding: 1em; /* Padding inside the code block */ | ||
overflow-x: auto; /* Allow horizontal scrolling for long code */ | ||
} | ||
|
||
/* Style the <code> element but no border or background */ | ||
code[class*="language-"] { | ||
background-color: transparent; /* Keep transparent */ | ||
padding: 0; /* Remove padding inside individual lines */ | ||
font-family: "Fira Code", monospace; | ||
font-size: 0.9em; | ||
} | ||
|
||
code, | ||
pre { | ||
font-family: "Fira Code", monospace; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* General table styles */ | ||
table { | ||
width: 100%; /* Ensure the table takes full width */ | ||
border-collapse: separate; /* Allow border radius to work */ | ||
margin-bottom: 2em; /* Add space after the table */ | ||
border: 1px solid #ddd; /* Add a light border around the table */ | ||
border-radius: 5px; /* Apply rounding to the table itself */ | ||
border-spacing: 0; /* Ensure no space between borders */ | ||
} | ||
|
||
/* Header styles */ | ||
th { | ||
background-color: transparent; /* Use your site's primary color */ | ||
color: var(--primary-color); /* White text for headers */ | ||
padding: 12px; /* Add padding for headers */ | ||
text-align: left; /* Align text to the left */ | ||
font-weight: bold; /* Make headers bold */ | ||
font-size: 1.0em; /* Increase header font size */ | ||
border-radius: 5px; /* Apply rounding to the headers */ | ||
} | ||
|
||
/* Row styles */ | ||
td { | ||
border: 1px #ddd; /* Border for cells */ | ||
padding: 10px; /* Padding for cells */ | ||
text-align: left; /* Align text to the left */ | ||
font-size: 0.95em; /* Set font size */ | ||
color: var(--text-color); /* Ensure text is readable */ | ||
} | ||
|
||
/* Specific adjustments for the first and last header cells */ | ||
th:first-child { | ||
border-top-left-radius: 5px; /* Ensure top-left corner is rounded */ | ||
} | ||
|
||
th:last-child { | ||
border-top-right-radius: 5px; /* Ensure top-right corner is rounded */ | ||
} | ||
|
||
/* Specific adjustments for the first and last rows' cells */ | ||
td:first-child { | ||
border-bottom-left-radius: 5px; /* Ensure bottom-left corner is rounded */ | ||
} | ||
|
||
td:last-child { | ||
border-bottom-right-radius: 5px; /* Ensure bottom-right corner is rounded */ | ||
} | ||
|
||
/* Stripe alternate rows for better readability */ | ||
tr:nth-child(even) { | ||
background-color: #f9f9f9; /* Light background color for even rows */ | ||
} | ||
|
||
/* Optional: Hover effect for rows */ | ||
tr:hover { | ||
background-color: #f1f1f1; /* Change background on hover */ | ||
} | ||
|
||
/* First column special styling (row numbers or labels) */ | ||
td:first-child, th:first-child { | ||
background-color: transparent; /* Make first column stand out */ | ||
color: var(--primary-color); /* White text */ | ||
text-align: center; /* Center align the first column */ | ||
width: 80px; /* Set a fixed width for the first column */ | ||
font-weight: bold; /* Make text bold */ | ||
border-right: 1px solid #ddd; /* Add a border to the right */ | ||
} | ||
|
||
/* Coefficient table special styling (if needed) */ | ||
table.coefficient-table td { | ||
text-align: center; /* Center align text for coefficient table */ | ||
} | ||
|
||
/* Responsive: Table should look good on mobile */ | ||
@media (max-width: 768px) { | ||
table, thead, tbody, th, td, tr { | ||
display: block; /* Make tables stack on small screens */ | ||
} | ||
|
||
tr { | ||
margin-bottom: 1em; | ||
} | ||
|
||
th { | ||
position: relative; | ||
padding-left: 50%; | ||
text-align: left; | ||
} | ||
|
||
td { | ||
position: relative; | ||
padding-left: 50%; | ||
text-align: left; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.