Skip to content

Commit

Permalink
Include selected attribute in option
Browse files Browse the repository at this point in the history
  • Loading branch information
nntrn committed Sep 14, 2024
1 parent 51790da commit fd8ecd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ repository: nntrn/what-im-reading
github_username: nntrn
favicon_ico: /assets/favicon.ico
theme_color: "#34e045"
font_family: serif
fonts: ["monospace", "serif", "sans-serif"]

kramdown:
smart_quotes: ["apos", "apos", "quot", "quot"]
Expand Down
8 changes: 4 additions & 4 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<link rel="stylesheet" href="{{'/assets/vendor/bootstrap.css'|relative_url}}">
<link rel="stylesheet" href="{{'/assets/minimal.css'|relative_url}}">
</head>
<body>
<body data-layout="{{site.font_family}}">
<div class="container">
<header class="mt-2 mb-4">
<h1 class="site-title my-0 mb-2"><a href="{{ '/' | relative_url }}">{{site.title}}</a></h1>
Expand All @@ -50,9 +50,9 @@ <h1 class="site-title my-0 mb-2"><a href="{{ '/' | relative_url }}">{{site.title
</div>
<div class="align-content-center align-items-center">
<select class="form-select form-select-sm" id="theme" onclick="setTheme(this.value)">
<option name="serif" value="serif" default>serif</option>
<option name="monospace" value="monospace">monospace</option>
<option name="sans-serif" value="sans-serif">sans-serif</option>
{%- for font in site.fonts %}
<option name="{{font}}" value="{{font}}"{%- if site.font_family == font %} selected{%- endif -%}>{{font}}</option>
{%- endfor %}
</select>
</div>
</div>
Expand Down

0 comments on commit fd8ecd4

Please sign in to comment.