Skip to content

Commit 712d2ed

Browse files
committed
fixed image slide aspect ratio
1 parent 248e7f9 commit 712d2ed

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
I"�{"source"=>"/home/bobby/Documents/websites/code_current", "destination"=>"/home/bobby/Documents/websites/code_current/_site", "collections_dir"=>"collections", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}, "projects"=>{"output"=>true}, "blog"=>{"output"=>true}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>["jekyll-feed", "jekyll-seo-tag"], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>nil, "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num/", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false}, "title"=>"Unusual Vehicles", "author"=>"Raul G.", "email"=>"memoryofatrufestival@gmail.com", "description"=>"Personal blog about model aircraft and small robots\n", "paginate"=>6, "github_username"=>"RCmags", "youtube_username"=>"XXXmags", "rcgroups_username_id"=>"189488", "show_excerpts"=>false, "minima"=>{"date_format"=>"%-d %b %Y"}, "livereload_port"=>35729, "serving"=>true, "watch"=>true, "url"=>"http://localhost:4000"}:ET
1+
I"X{"source"=>"/home/bobby/Documents/websites/code_current", "destination"=>"/home/bobby/Documents/websites/code_current/_site", "collections_dir"=>"collections", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}, "projects"=>{"output"=>true}, "blog"=>{"output"=>true}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>["jekyll-feed", "jekyll-seo-tag"], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>nil, "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num/", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false, "syntax_highlighter"=>"rouge", "syntax_highlighter_opts"=>{:default_lang=>"plaintext", :guess_lang=>true}, "coderay"=>{}}, "title"=>"Unusual Vehicles", "author"=>"Raul G.", "email"=>"memoryofatrufestival@gmail.com", "description"=>"Personal blog about model aircraft and small robots\n", "paginate"=>6, "github_username"=>"RCmags", "youtube_username"=>"XXXmags", "rcgroups_username_id"=>"189488", "show_excerpts"=>false, "minima"=>{"date_format"=>"%-d %b %Y"}, "livereload_port"=>35729, "serving"=>true, "watch"=>true, "url"=>"http://localhost:4000"}:ET

_includes/image-slider.html

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
<style>
2-
{% if include.aspect_ratio %}
3-
.aspect_ratio {
4-
aspect-ratio: {{ include.aspect_ratio }} !important;
5-
}
6-
{% endif %}
7-
</style>
8-
91
<div class="image-slider">
102
<div class="container_out">
113
{% for image in include.list %}
12-
<div class="aspect_ratio container_in">
4+
<div class="container_in"
5+
{% if include.aspect_ratio %}
6+
style="aspect-ratio: {{aspect_ratio}} !important;"
7+
{% endif %}>
138
<span class="counter">{{ forloop.index }} / {{ forloop.length }}</span>
14-
<img class="image" loading="lazy" src="{{ image.url }}">
9+
<img class="image" loading="lazy" src="{{ image.url }}">
1510
</div>
1611
{% endfor %}
1712
</div>

_sass/image-slider.scss

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
11
.image-slider {
2+
// scroll bar
3+
/* width */
4+
::-webkit-scrollbar {
5+
height: 10px;
6+
}
7+
8+
/* Track */
9+
::-webkit-scrollbar-track {
10+
box-shadow: inset 0 0 3px grey;
11+
//border: 1px solid grey;
12+
border-radius: 5px;
13+
}
14+
15+
/* Handle */
16+
::-webkit-scrollbar-thumb {
17+
background: LightGray;
18+
border-radius: 5px;
19+
}
20+
21+
/* Handle on hover */
22+
::-webkit-scrollbar-thumb:hover {
23+
background: gray;
24+
}
25+
26+
// containers
227
width: 100%;
328
margin-bottom: 16px;
429
max-width: $max-image-size;

collections/projects/Aircraft/_posts/2019-09-19-stabilized_airplane.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ __Iteration 2:__
107107

108108
For the second iteration, the thrust line of the aircraft was rotated by tilting the firewall of the motor. Through trial and error, the motor was aligned such that the thrust did not generate a noticeable torque about the pitch and yaw axes. This was verified by running the motor at full throttle and letting the airplane enter free fall to see how it rotated.
109109

110-
{% include image-slider.html list=page.slider2 aspect_ratio="16/9" %}
110+
{% include image-slider.html list=page.slider2 aspect_ratio="2/1" %}
111111

112112
The elevons were also made twice as large to increase the control authority and reduce lag in the control response. By extending the surfaces aft, not only did the area increase but so too did the lever arm with respect to the center of mass.
113113

0 commit comments

Comments
 (0)