diff options
-rw-r--r-- | themes/researcher/assets/css/dark.css | 10 | ||||
-rw-r--r-- | themes/researcher/exampleSite/config.toml | 53 | ||||
l--------- | themes/researcher/exampleSite/content/_index.md | 1 | ||||
-rw-r--r-- | themes/researcher/exampleSite/content/about.md | 61 | ||||
-rw-r--r-- | themes/researcher/exampleSite/content/contact.md | 24 | ||||
-rw-r--r-- | themes/researcher/exampleSite/static/avatar.jpg | bin | 12302 -> 0 bytes | |||
-rwxr-xr-x | themes/researcher/exampleSite/static/favicon.ico | bin | 7406 -> 0 bytes | |||
-rw-r--r-- | themes/researcher/exampleSite/static/resume.pdf | bin | 96781 -> 0 bytes | |||
-rw-r--r-- | themes/researcher/layouts/partials/head.html | 3 | ||||
-rw-r--r-- | themes/researcher/layouts/partials/header.html | 3 | ||||
-rw-r--r-- | themes/researcher/layouts/partials/toggle.html | 30 |
11 files changed, 45 insertions, 140 deletions
diff --git a/themes/researcher/assets/css/dark.css b/themes/researcher/assets/css/dark.css new file mode 100644 index 0000000..42a92f7 --- /dev/null +++ b/themes/researcher/assets/css/dark.css @@ -0,0 +1,10 @@ +html { + filter: invert(100%) hue-rotate(180deg) brightness(105%) contrast(85%); + -webkit-filter: invert(100%) hue-rotate(180deg) brightness(105%) contrast(85%); +} +img, +video, +body * [style*="background-image"] { + filter: hue-rotate(180deg) contrast(100%) invert(100%); + -webkit-filter: hue-rotate(180deg) contrast(100%) invert(100%); +} diff --git a/themes/researcher/exampleSite/config.toml b/themes/researcher/exampleSite/config.toml deleted file mode 100644 index 1ca459a..0000000 --- a/themes/researcher/exampleSite/config.toml +++ /dev/null @@ -1,53 +0,0 @@ -title = "Researcher" -baseURL = "https://example.com" -theme = "researcher" -disableKinds = ["taxonomy", "term"] -enableEmoji = true -math = false # enable KaTeX (https://katex.org/) globally -googleAnalytics = "" # add your tracking id - -[params] - author = "Olivier Roques" - description = "A simple monospaced resume theme for Hugo." - favicon = "favicon.ico" # path to a .ico to use as favicon - logo = "" # url or path to a logo to put in the header - [params.footer] - text = "By Olivier Roques" - url = "https://github.com/ojroques/hugo-researcher" - [params.style] # appearance options (can be omitted) - fontFamily = "Inconsolata" - pageWidth = "750px" - avatarSize = "90px" - colorBlack = "#222222" - colorRed = "#dc3545" - [[params.socialIcons]] - icon = "fab fa-twitter" - title = "Twitter" - url = "https://twitter.com/" - [[params.socialIcons]] - icon = "fas fa-envelope" - title = "E-mail" - url = "mailto:mail@example.com" - -[permalinks] - "/" = "/:filename" - -[menu] - [[menu.main]] - name = "About" - url = "/about" - weight = 1 - [[menu.main]] - name = "Resume" - url = "/resume.pdf" - # 'pre' and 'post' hooks are available - # here we use an icon from Bootstrap https://icons.getbootstrap.com/ - pre = '<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-file-earmark-person-fill" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M2 2a2 2 0 0 1 2-2h5.293A1 1 0 0 1 10 .293L13.707 4a1 1 0 0 1 .293.707V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2zm7.5 1.5v-2l3 3h-2a1 1 0 0 1-1-1zM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0zm2 5.755S12 12 8 12s-5 1.755-5 1.755V14a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-.245z"/></svg> ' - weight = 2 - [[menu.main]] - name = "Contact" - url = "/contact" - weight = 3 - -[markup.goldmark.renderer] - unsafe = true # allow raw HTML in markdown files diff --git a/themes/researcher/exampleSite/content/_index.md b/themes/researcher/exampleSite/content/_index.md deleted file mode 120000 index 9728823..0000000 --- a/themes/researcher/exampleSite/content/_index.md +++ /dev/null @@ -1 +0,0 @@ -about.md \ No newline at end of file diff --git a/themes/researcher/exampleSite/content/about.md b/themes/researcher/exampleSite/content/about.md deleted file mode 100644 index b9fda09..0000000 --- a/themes/researcher/exampleSite/content/about.md +++ /dev/null @@ -1,61 +0,0 @@ -+++ -title = "About" -+++ - -## About Me - -{{< figure class="avatar" src="/avatar.jpg" alt="avatar">}} - -This is a Hugo based resume template. You can find the full source code on -[GitHub](https://github.com/ojroques/hugo-researcher). - -## Research Interest - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam finibus ipsum -ac erat aliquam dapibus. Vestibulum vehicula placerat ex, a consectetur odio -pharetra quis[^1]. Mauris id urna ante. - -Fusce pharetra diam ac nisi aliquet, velegestas ex iaculis. Pellentesque -laoreet cursus tellus sed pellentesque. Praesent a rhoncus elit[^2]. Nunc -ipsum nisl, consequat sit amet pretium quis, gravida id ipsum. - -## Publications - -In chronological order: -1. F.Bar, J.Doe: Effects of having a placeholder of a name -2. S.Holmes, J.Watson: Consequences of living with a sociopath in London - -## Typography - -This is a [link](http://google.com). Something *italics* and something **bold**. - -Here is a table: - -Year | Award | Category ------|-------|-------- -2014 | Emmy | Won Outstanding Lead Actor in a miniseries or a movie -2015 | BAFTA | Nominated for Best Leading Actor for Sherlock -2014 | Satellite | Won Best Actor miniseries or television film - -Here is a horizontal rule: - ---- - -Here is a blockquote: - -> To a great mind, nothing is little - -Here is a `code` block: - -```python -def is_elementary(): - return True -``` - -## References - -* Foo Bar: Head of Department, Placeholder Names, Lorem -* John Doe: Associate Professor, Department of Computer Science, Ipsum - -[^1]: This is the first footnote. -[^2]: This is the second footnote. diff --git a/themes/researcher/exampleSite/content/contact.md b/themes/researcher/exampleSite/content/contact.md deleted file mode 100644 index a8864e1..0000000 --- a/themes/researcher/exampleSite/content/contact.md +++ /dev/null @@ -1,24 +0,0 @@ -+++ -title = "Contact" -+++ - -* Email: [foo@xyz.com](mailto:foo@xyz.com) -* Phone: [+91-123123](tel:+91-123123) - ---- - -## Mailing Address - -> 221B, Baker Street -> -> London -> -> United Kingdom - ---- - -## Social - -1. [Facebook](#) -2. [Twitter](#) -3. [Google+](#) diff --git a/themes/researcher/exampleSite/static/avatar.jpg b/themes/researcher/exampleSite/static/avatar.jpg deleted file mode 100644 index 062be4a..0000000 --- a/themes/researcher/exampleSite/static/avatar.jpg +++ /dev/null Binary files differdiff --git a/themes/researcher/exampleSite/static/favicon.ico b/themes/researcher/exampleSite/static/favicon.ico deleted file mode 100755 index 004044c..0000000 --- a/themes/researcher/exampleSite/static/favicon.ico +++ /dev/null Binary files differdiff --git a/themes/researcher/exampleSite/static/resume.pdf b/themes/researcher/exampleSite/static/resume.pdf deleted file mode 100644 index f720ae6..0000000 --- a/themes/researcher/exampleSite/static/resume.pdf +++ /dev/null Binary files differdiff --git a/themes/researcher/layouts/partials/head.html b/themes/researcher/layouts/partials/head.html index df307bb..5f792a8 100644 --- a/themes/researcher/layouts/partials/head.html +++ b/themes/researcher/layouts/partials/head.html @@ -12,6 +12,8 @@ {{ $style := resources.Get "sass/researcher.scss" | resources.ExecuteAsTemplate "sass/researcher.scss" . | toCSS | minify }} <link rel="stylesheet" href="{{ $style.RelPermalink }}"> + {{ $darkstyle := resources.Get "css/dark.css" | minify }} + <link disabled id="dark-mode-theme" rel="stylesheet" href="{{ $darkstyle.RelPermalink }}"> {{ with .Site.Params.favicon }} <link rel="icon" type="image/ico" href="{{ . | absURL }}"> @@ -24,4 +26,5 @@ {{ if not .Site.IsServer }} {{ template "_internal/google_analytics.html" . }} {{ end }} + </head> diff --git a/themes/researcher/layouts/partials/header.html b/themes/researcher/layouts/partials/header.html index b017ee2..8f97c4c 100644 --- a/themes/researcher/layouts/partials/header.html +++ b/themes/researcher/layouts/partials/header.html @@ -18,7 +18,8 @@ {{ end }} {{ end }} {{ end }} - </div> + {{- partial "toggle.html" . -}} + </div> </nav> </div> <hr> diff --git a/themes/researcher/layouts/partials/toggle.html b/themes/researcher/layouts/partials/toggle.html new file mode 100644 index 0000000..4ef8b86 --- /dev/null +++ b/themes/researcher/layouts/partials/toggle.html @@ -0,0 +1,30 @@ +<i id="dark-mode-toggle"></i> + +<script> +var toggle = document.getElementById("dark-mode-toggle"); +var darkTheme = document.getElementById("dark-mode-theme"); +var savedTheme = localStorage.getItem("dark-mode-storage") || "light"; + +setTheme(savedTheme); + +toggle.addEventListener("click", () => { + + if (toggle.className === "fas fa-moon") { + setTheme("dark"); + } else if (toggle.className === "fas fa-sun") { + setTheme("light"); + } +}); + +function setTheme(mode) { + localStorage.setItem("dark-mode-storage", mode); + + if (mode === "dark") { + darkTheme.disabled = false; + toggle.className = "fas fa-sun"; + } else if (mode === "light") { + darkTheme.disabled = true; + toggle.className = "fas fa-moon"; + } +} +</script> |