Theme and responsiveness fixes (#509)
* Dark themed cards * Responsiveness fixes * added dark stylesheet option * highlight theme toggle * added highlight function * added highlight themes to assets/css * offline highlight implementation * Fixes for masonry * Revert "added highlight themes to assets/css" This reverts commit ee7cb7675671430697f3a38bd5a56405179e6dd9. * Update `code syntax highlighting` to use jsdelivr CDN * Project card responsiveness fixes * added personal website to readme veedata.github.io * Reverted responsiveness chnages * Minor adjustments Co-authored-by: rohandebsarkar <rohandebsarkar@gmail.com> Co-authored-by: Maruan Al-Shedivat <maruan@genesistherapeutics.ai>
This commit is contained in:
parent
a50364ce93
commit
77b60dc395
|
|
@ -63,6 +63,7 @@ Feel free to add your own page(s) by sending a PR.
|
||||||
<a href="https://scottleechua.github.io" target="_blank">★</a>
|
<a href="https://scottleechua.github.io" target="_blank">★</a>
|
||||||
<a href="https://sk1y101.github.io" target="_blank">★</a>
|
<a href="https://sk1y101.github.io" target="_blank">★</a>
|
||||||
<a href="https://yyang768osu.github.io" target="_blank">★</a>
|
<a href="https://yyang768osu.github.io" target="_blank">★</a>
|
||||||
|
<a href="https://veedata.github.io" target="_blank">★</a>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,8 @@ news_limit: 5
|
||||||
# Markdown and syntax highlight
|
# Markdown and syntax highlight
|
||||||
markdown: kramdown
|
markdown: kramdown
|
||||||
highlighter: rouge
|
highlighter: rouge
|
||||||
highlight_theme: github # https://github.com/jwarby/jekyll-pygments-themes
|
highlight_theme_light: github # https://github.com/jwarby/jekyll-pygments-themes
|
||||||
|
highlight_theme_dark: native # https://github.com/jwarby/jekyll-pygments-themes
|
||||||
kramdown:
|
kramdown:
|
||||||
input: GFM
|
input: GFM
|
||||||
syntax_highlighter_opts:
|
syntax_highlighter_opts:
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:100,300,400,500,700|Material+Icons">
|
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:100,300,400,500,700|Material+Icons">
|
||||||
|
|
||||||
<!-- Code Syntax Highlighting -->
|
<!-- Code Syntax Highlighting -->
|
||||||
<link rel="stylesheet" href="https://gitcdn.link/repo/jwarby/jekyll-pygments-themes/master/{{ site.highlight_theme }}.css" />
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jwarby/jekyll-pygments-themes@master/{{ site.highlight_theme_light | append: '.css' }}" media="none" id="highlight_theme_light" />
|
||||||
|
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
{% if site.icon != empty -%}
|
{% if site.icon != empty -%}
|
||||||
|
|
@ -20,10 +20,11 @@
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
|
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
|
||||||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
|
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
|
||||||
|
|
||||||
{%- if site.enable_darkmode %}
|
|
||||||
|
|
||||||
<!-- Dark Mode -->
|
<!-- Dark Mode -->
|
||||||
|
{% if site.enable_darkmode %}
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jwarby/jekyll-pygments-themes@master/{{ site.highlight_theme_dark | append: '.css' }}" media="none" id="highlight_theme_dark" />
|
||||||
|
|
||||||
<script src="{{ '/assets/js/theme.js' | relative_url }}"></script>
|
<script src="{{ '/assets/js/theme.js' | relative_url }}"></script>
|
||||||
<script src="{{ '/assets/js/dark_mode.js' | relative_url }}"></script>
|
<script src="{{ '/assets/js/dark_mode.js' | relative_url }}"></script>
|
||||||
{%- endif -%}
|
{% endif %}
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,36 @@
|
||||||
|
<!-- _includes/projects.html -->
|
||||||
<!-- _includes/projects.html -->
|
<div class="grid-sizer"></div>
|
||||||
<div class="grid-item">
|
<div class="grid-item">
|
||||||
{% if project.redirect -%}
|
{% if project.redirect -%}
|
||||||
<a href="{{ project.redirect }}">
|
<a href="{{ project.redirect }}">
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
<a href="{{ project.url | relative_url }}">
|
<a href="{{ project.url | relative_url }}">
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<div class="card hoverable">
|
<div class="card hoverable">
|
||||||
{%- if project.img %}
|
{%- if project.img %}
|
||||||
{%- include figure.html
|
{%- include figure.html
|
||||||
path=project.img
|
path=project.img
|
||||||
alt="project thumbnail" -%}
|
alt="project thumbnail" -%}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h2 class="card-title text-lowercase">{{ project.title }}</h2>
|
<h2 class="card-title text-lowercase">{{ project.title }}</h2>
|
||||||
<p class="card-text">{{ project.description }}</p>
|
<p class="card-text">{{ project.description }}</p>
|
||||||
<div class="row ml-1 mr-1 p-0">
|
<div class="row ml-1 mr-1 p-0">
|
||||||
{%- if project.github -%}
|
{%- if project.github -%}
|
||||||
<div class="github-icon">
|
<div class="github-icon">
|
||||||
<div class="icon" data-toggle="tooltip" title="Code Repository">
|
<div class="icon" data-toggle="tooltip" title="Code Repository">
|
||||||
<a href="{{ project.github }}"><i class="fab fa-github gh-icon"></i></a>
|
<a href="{{ project.github }}"><i class="fab fa-github gh-icon"></i></a>
|
||||||
</div>
|
|
||||||
{%- if project.github_stars -%}
|
|
||||||
<span class="stars" data-toggle="tooltip" title="GitHub Stars">
|
|
||||||
<i class="fas fa-star"></i>
|
|
||||||
<span id="{{ project.github_stars }}-stars"></span>
|
|
||||||
</span>
|
|
||||||
{%- endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{%- if project.github_stars -%}
|
||||||
|
<span class="stars" data-toggle="tooltip" title="GitHub Stars">
|
||||||
|
<i class="fas fa-star"></i>
|
||||||
|
<span id="{{ project.github_stars }}-stars"></span>
|
||||||
|
</span>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{%- endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
|
</div>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{%- if site.enable_masonry -%}
|
{%- if site.enable_masonry -%}
|
||||||
<!-- Mansory & imagesLoaded -->
|
<!-- Masonry & imagesLoaded -->
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/masonry-layout@{{ site.masonry.version }}/dist/masonry.pkgd.min.js" integrity="{{ site.masonry.integrity }}" crossorigin="anonymous"></script>
|
<script defer src="https://cdn.jsdelivr.net/npm/masonry-layout@{{ site.masonry.version }}/dist/masonry.pkgd.min.js" integrity="{{ site.masonry.integrity }}" crossorigin="anonymous"></script>
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/imagesloaded@4/imagesloaded.pkgd.min.js"></script>
|
<script defer src="https://cdn.jsdelivr.net/npm/imagesloaded@4/imagesloaded.pkgd.min.js"></script>
|
||||||
<script defer src="{{ '/assets/js/mansory.js' | relative_url }}" type="text/javascript"></script>
|
<script defer src="{{ '/assets/js/masonry.js' | relative_url }}" type="text/javascript"></script>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,30 @@ blockquote {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Card
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background-color: var(--global-card-bg-color);
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
color: var(--global-text-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-item {
|
||||||
|
width: auto;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Citation
|
// Citation
|
||||||
.citation, .citation-number {
|
.citation, .citation-number {
|
||||||
color: var(--global-theme-color);
|
color: var(--global-theme-color);
|
||||||
|
|
@ -349,9 +373,6 @@ footer.sticky-bottom {
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.card-title {
|
|
||||||
color: $black-color;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-item {
|
.card-item {
|
||||||
|
|
@ -364,7 +385,7 @@ footer.sticky-bottom {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-item {
|
.grid-sizer, .grid-item {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
--global-footer-link-color: #{$white-color};
|
--global-footer-link-color: #{$white-color};
|
||||||
--global-distill-app-color: #{$grey-color};
|
--global-distill-app-color: #{$grey-color};
|
||||||
--global-divider-color: rgba(0,0,0,.1);
|
--global-divider-color: rgba(0,0,0,.1);
|
||||||
|
--global-card-bg-color: #{$white-color};
|
||||||
|
|
||||||
.fa-sun {
|
.fa-sun {
|
||||||
display : none;
|
display : none;
|
||||||
|
|
@ -37,6 +38,7 @@ html[data-theme='dark'] {
|
||||||
--global-footer-link-color: #{$black-color};
|
--global-footer-link-color: #{$black-color};
|
||||||
--global-distill-app-color: #{$grey-color-light};
|
--global-distill-app-color: #{$grey-color-light};
|
||||||
--global-divider-color: #424246;
|
--global-divider-color: #424246;
|
||||||
|
--global-card-bg-color: #{$grey-900};
|
||||||
|
|
||||||
.fa-sun {
|
.fa-sun {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ $yellow-color: #efcc00 !default;
|
||||||
$grey-color: #828282 !default;
|
$grey-color: #828282 !default;
|
||||||
$grey-color-light: lighten($grey-color, 40%);
|
$grey-color-light: lighten($grey-color, 40%);
|
||||||
$grey-color-dark: #1C1C1D;
|
$grey-color-dark: #1C1C1D;
|
||||||
|
$grey-900: #212529;
|
||||||
|
|
||||||
$white-color: #ffffff !default;
|
$white-color: #ffffff !default;
|
||||||
$black-color: #000000 !default;
|
$black-color: #000000 !default;
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ let toggleTheme = (theme) => {
|
||||||
|
|
||||||
let setTheme = (theme) => {
|
let setTheme = (theme) => {
|
||||||
transTheme();
|
transTheme();
|
||||||
|
setHighlight(theme);
|
||||||
|
|
||||||
if (theme) {
|
if (theme) {
|
||||||
document.documentElement.setAttribute("data-theme", theme);
|
document.documentElement.setAttribute("data-theme", theme);
|
||||||
}
|
}
|
||||||
|
|
@ -28,6 +30,16 @@ let setTheme = (theme) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let setHighlight = (theme) => {
|
||||||
|
if (theme == "dark") {
|
||||||
|
document.getElementById("highlight_theme_light").media = "none";
|
||||||
|
document.getElementById("highlight_theme_dark").media = "";
|
||||||
|
} else {
|
||||||
|
document.getElementById("highlight_theme_dark").media = "none";
|
||||||
|
document.getElementById("highlight_theme_light").media = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let transTheme = () => {
|
let transTheme = () => {
|
||||||
document.documentElement.classList.add("transition");
|
document.documentElement.classList.add("transition");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue