Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
askuric committed May 2, 2022
2 parents 8086a32 + 7fe1c49 commit 6a87c20
Show file tree
Hide file tree
Showing 90 changed files with 2,136 additions and 772 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@ Documentation website for SimpleFOCproject
- [Shop](https://simplefoc.com/shop)


## Running the site using anaconda environement

Nice tutorial: https://s-canchi.github.io/2021-04-30-jekyll-conda/

First create the new anaconda environmnet using the `environment.yaml`file
```
conda env create -f environment.yaml
conda activate simpledocs
```

Once in the environment `simpledocs` install jekyll
```
gem install jekyll bundler
```
Then install necessary jekyll dependencies of the simplefoc docs:
```
bundle install
```
And you're ready to go!

Just make sure that whenever you open your terminal to generate the webiste to activate the conda anvironment:
```
conda activate simpledocs
```


## Generating the website

To generate the site locally clone the repo to your local directory and then open terminal inside the repo folder and run:
```
bundle exec jekyll serve
Expand Down
4 changes: 3 additions & 1 deletion _includes/head_custom.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

<link href="https://fonts.googleapis.com/css?family=Roboto:wght@;300;400;500;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:ital,wght@200;300;500;600;700&display=swap" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script>
9 changes: 8 additions & 1 deletion _includes/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ var libraires =[
"MagneticSensorI2C.h",
"MagneticSensorPWM.h",
"MagneticSensorAnalog.h",
"LowsideCurrentSense.h",
"InlineCurrentSense.h",
"MySensor.h",
"Sensor.h"
]
Expand Down Expand Up @@ -53,7 +55,8 @@ var defines =[
"_2PI",
"HIGH",
"LOW",
"DEF_VEL_LIM"
"DEF_VEL_LIM",
"_NC"
]

var classNames = [
Expand All @@ -79,6 +82,7 @@ var classNames = [
"LowPassFilter",
"PIDController",
"InlineCurrentSense",
"LowsideCurrentSense",
"CurrentSense",
"StepDirListener",
"Commander",
Expand All @@ -97,7 +101,9 @@ var classProps = [
"quadrature",
"pullup",
"voltage_limit",
"current_limit",
"voltage_power_supply",
"controller",
"index_search_velocity",
"controller",
"velocity_limit",
Expand Down Expand Up @@ -154,6 +160,7 @@ var funcNames = [
"getCurrent",
"getPhaseCurrents",
"getFOCCurrents",
"getDCCurrent",
"driverAlign",
"setPhaseState",
"handle",
Expand Down
31 changes: 23 additions & 8 deletions _includes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
{%- for node in pages_list -%}
{%- unless node.nav_exclude -%}
{%- if node.parent == nil -%}
<li class="navigation-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title or page.grand_grand_parent == node.title or page.grand_grand_grand_parent == node.title %} active{% endif %}">
{%- if page.parent == node.title or page.grand_parent == node.title or page.grand_grand_parent == node.title or page.grand_grand_grand_parent == node.title -%}
<li class="navigation-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title or page.grand_grand_parent == node.title or page.grand_grand_grand_parent == node.title or page.grand_grand_grand_grand_parent == node.title%} active{% endif %}">
{%- if page.parent == node.title or page.grand_parent == node.title or page.grand_grand_parent == node.title or page.grand_grand_grand_parent == node.title or page.grand_grand_grand_grand_parent == node.title -%}
{%- assign first_level_url = node.url | absolute_url -%}
{%- endif -%}
<a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
{%- if node.has_children -%}
{%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%}
<ul class="navigation-list-child-list " style="list-style-type: none;">
{%- for child in children_list -%}
<li class="navigation-list-item child-list {% if page.url == child.url or page.parent == child.title or page.grand_parent == child.title or page.grand_grand_parent == child.title %} active{% endif %}">
{%- if page.url == child.url or page.parent == child.title or page.grand_parent == child.title or page.grand_grand_parent == child.title -%}
<li class="navigation-list-item child-list {% if page.url == child.url or page.parent == child.title or page.grand_parent == child.title or page.grand_grand_parent == child.title or page.grand_grand_grand_parent == child.title %} active{% endif %}">
{%- if page.url == child.url or page.parent == child.title or page.grand_parent == child.title or page.grand_grand_parent == child.title or page.grand_grand_grand_parent == child.title -%}
{%- assign second_level_url = child.url | absolute_url -%}
{%- endif -%}
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
{%- if child.has_children -%}
{%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%}
<ul class="navigation-list-child-list " style="list-style-type: none;" >
{%- for grand_child in grand_children_list -%}
<li class="navigation-list-item grand-child-list {% if page.url == grand_child.url or page.parent == grand_child.title or page.grand_parent == grand_child.title%} active{% endif %}">
<li class="navigation-list-item grand-child-list {% if page.url == grand_child.url or page.parent == grand_child.title or page.grand_parent == grand_child.title or page.grand_grand_parent == grand_child.title%} active{% endif %}">
{%- if page.url == grand_child.url or page.parent == grand_child.title or page.grand_parent == grand_child.title or page.grand_grand_parent == grand_child.title-%}
{%- assign third_level_url = grand_child.url | absolute_url -%}
{%- endif -%}
Expand All @@ -31,17 +31,32 @@
{%- assign grand_grand_children_list = site.html_pages | where: "parent", grand_child.title | sort:"nav_order" -%}
<ul class="navigation-list-child-list " style="list-style-type: none;" >
{%- for grand_grand_child in grand_grand_children_list -%}
<li class="navigation-list-item grand-grand-child-list {% if page.url == grand_grand_child.url or page.parent == grand_grand_child.title%} active{% endif %}">
{%- if page.url == grand_grand_child.url or page.parent == grand_grand_child.title -%}
<li class="navigation-list-item grand-grand-child-list {% if page.url == grand_grand_child.url or page.parent == grand_grand_child.title or page.grand_parent == grand_grand_child.title %} active{% endif %}">
{%- if page.url == grand_grand_child.url or page.parent == grand_grand_child.title or page.grand_parent == grand_grand_child.title -%}
{%- assign fourth_level_url = grand_grand_child.url | absolute_url -%}
{%- endif -%}
<a href="{{ grand_grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_grand_child.url %} active{% endif %}">{{ grand_grand_child.title }}</a>
{%- if grand_grand_child.has_children -%}
{%- assign grand_grand_grand_children_list = site.html_pages | where: "parent", grand_grand_child.title | sort:"nav_order" -%}
<ul class="navigation-list-child-list " style="list-style-type: none;" >
{%- for grand_grand_grand_child in grand_grand_grand_children_list -%}
<li class="navigation-list-item grand-grand-grand-child-list {% if page.url == grand_grand_grand_child.url %} active{% endif %}">
<li class="navigation-list-item grand-grand-grand-child-list {% if page.url == grand_grand_grand_child.url or page.parent == grand_grand_grand_child.title %} active{% endif %}">
{%- if page.url == grand_grand_grand_child.url or page.parent == grand_grand_grand_child.title -%}
{%- assign fifth_level_url = grand_grand_grand_child.url | absolute_url -%}
{%- endif -%}
<a href="{{ grand_grand_grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_grand_grand_child.url %} active{% endif %}">{{ grand_grand_grand_child.title }}</a>

{%- if grand_grand_grand_child.has_children -%}
{%- assign grand_grand_grand_grand_children_list = site.html_pages | where: "parent", grand_grand_grand_child.title | sort:"nav_order" -%}
<ul class="navigation-list-child-list " style="list-style-type: none;" >
{%- for grand_grand_grand_grand_child in grand_grand_grand_grand_children_list -%}
<li class="navigation-list-item grand-grand-grand-grand-child-list {% if page.url == grand_grand_grand_grand_child.url %} active{% endif %}">
<a href="{{ grand_grand_grand_grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_grand_grand_grand_child.url %} active{% endif %}">{{ grand_grand_grand_grand_child.title }}</a>
</li>
{%- endfor -%}
</ul>
{%- endif -%}

</li>
{%- endfor -%}
</ul>
Expand Down
35 changes: 29 additions & 6 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,26 @@
<li class="nav-item rm-md">
<a href="https://github.com/simplefoc" ><i class="fa fa-github fa-lg"></i> <span> GitHub</span> </a>
</li>
<li class="nav-item contact-rm rm-md">
<a href="https://discord.gg/kWBwuzY32n" ><i class="fa fa-dicord fa-lg"></i>
<i class="fa fa-lg">
<svg style="width:20px;" viewBox="0 0 71 55" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<path d="M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.471 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6202 41.8354 49.6202 53.3179 44.3151C53.3935 44.2785 53.4831 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z" fill="#23272A"/>
</g>
<defs>
<clipPath id="clip0">
<rect width="71" height="55" fill="white"/>
</clipPath>
</defs>
</svg>
</i>
<span> Discord</span>
</a>
</li>
<li class="nav-item ">
<a href="https://community.simplefoc.com" title="SimpleFOC project home">
<i class="fa fa-lg">
<i class="fa fa-lg" >
<svg id="fab-discourse" style="width:15px" viewBox="0 0 448 512">
<path d="M225.9 32C103.3 32 0 130.5 0 252.1 0 256 .1 480 .1 480l225.8-.2c122.7 0 222.1-102.3 222.1-223.9C448 134.3 348.6 32 225.9 32zM224 384c-19.4 0-37.9-4.3-54.4-12.1L88.5 392l22.9-75c-9.8-18.1-15.4-38.9-15.4-61 0-70.7 57.3-128 128-128s128 57.3 128 128-57.3 128-128 128z"></path>
</svg>
Expand All @@ -83,14 +100,20 @@
{% unless page.url == "/" %}
{% if page.parent %}
<nav class="breadcrumb-nav">
<ol class="breadcrumb-nav-list">
{% if page.grand_grand_grand_parent%}
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.grand_grand_grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item"><a href="{{ second_level_url }}">{{ page.grand_grand_parent }}</a></li>
<ol class=" ">
{% if page.grand_grand_grand_grand_parent %}
<li class="breadcrumb-nav-list-item rm-md "><a href="{{ first_level_url }}">{{ page.grand_grand_grand_grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item rm-md"><a href="{{ second_level_url }}">{{ page.grand_grand_grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item rm-md"><a href="{{ third_level_url }}">{{ page.grand_grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item"><a href="{{ fourth_level_url }}">{{ page.grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item"><a href="{{ fifth_level_url }}">{{ page.parent }}</a></li>
{% elsif page.grand_grand_grand_parent %}
<li class="breadcrumb-nav-list-item rm-md"><a href="{{ first_level_url }}">{{ page.grand_grand_grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item rm-md "><a href="{{ second_level_url }}">{{ page.grand_grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item"><a href="{{ third_level_url }}">{{ page.grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item"><a href="{{ fourth_level_url }}">{{ page.parent }}</a></li>
{% elsif page.grand_grand_parent %}
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.grand_grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item rm-md"><a href="{{ first_level_url }}">{{ page.grand_grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item"><a href="{{ second_level_url }}">{{ page.grand_parent }}</a></li>
<li class="breadcrumb-nav-list-item"><a href="{{ third_level_url }}">{{ page.parent }}</a></li>
{% elsif page.grand_parent %}
Expand Down
11 changes: 11 additions & 0 deletions _sass/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
display: none;
@include fs-3;
}

.grand-grand-grand-grand-child-list {
display: none;
@include fs-3;
}
.child-list {
display: bock;
@include fs-4;
Expand All @@ -81,6 +86,12 @@
&.active{
.grand-grand-grand-child-list{
display: block;

&.active{
.grand-grand-grand-grand-child-list{
display: block;
}
}
}
}
}
Expand Down
16 changes: 13 additions & 3 deletions _sass/overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ ul.nav-custom-bottom li.nav-item a{
li.nav-item svg{
fill: #5c5962;
}

li.nav-item path{
fill: #5c5962;
}
li.nav-item:hover {
background-color: #0099da;
}
Expand All @@ -329,21 +333,27 @@ li.nav-item:hover a{
li.nav-item:hover svg{
fill:white;
}
li.nav-item:hover path{
fill:white;
}

@media (max-width: 1200px) {
@media (max-width: 1300px) {
li.rm-md span{
display:none;
}
.contact-rm{
display:none;
}
.breadcrumb-nav-list-item.rm-md {
display:none;
}
}
@media (min-width: 1200px) and (max-width: 1300px) {
@media (min-width: 1300px) and (max-width: 1400px) {
.search{
max-width:225px;
}
}
@media (min-width: 853px) and (max-width: 1200px) {
@media (min-width: 853px) and (max-width: 1300px) {
.search{
max-width:220px;
}
Expand Down
Loading

0 comments on commit 6a87c20

Please sign in to comment.