diff --git a/src/wikmd/static/css/wiki.css b/src/wikmd/static/css/wiki.css index 799477e..3425e4a 100644 --- a/src/wikmd/static/css/wiki.css +++ b/src/wikmd/static/css/wiki.css @@ -127,3 +127,130 @@ div.html-integration{ .mermaid { text-align: center; } + +.wmd-main { + grid-area:main; +} + + +@media (min-width: 768px) { + .wmd-main { + display:grid; + gap:inherit; + grid-template-areas:"intro" "toc" "content"; + grid-template-rows:auto auto 1fr; + } +} +@media (min-width: 992px) { + .wmd-main { + grid-template-areas:"intro toc" "content toc"; + grid-template-columns:4fr 1fr; + grid-template-rows:auto 1fr; + } +} + +@media (min-width: 768px) { + .wmd-layout { + display:grid; + gap:1.5rem; + grid-template-areas:"sidebar main"; + grid-template-columns:1fr 3fr; + } +} +@media (min-width: 992px) { + .wmd-layout { + grid-template-columns:1fr 5fr; + } +} + +.wmd-sidebar { + grid-area:sidebar; +} +.wmd-main { + grid-area:main; +} + +@media (max-width: 991.98px) { + .wmd-sidebar { + width: 100%; + } +} +.wmd-sidebar .active { + border-radius: 5px; +} + +.wmd-sidebar ul { + list-style-type: none; + padding-left: 0.5rem; +} + +.wmd-links { + overflow:auto; + font-weight:600; +} + +@media (min-width: 768px) { + .wmd-links { + position:-webkit-sticky; + /*! position:sticky; *//*! top:5rem; *//*! display:block !important; */height:calc(100vh - 7rem); + padding-left:.25rem; + margin-left:-.25rem; + overflow-y:auto; + } +} +@media (max-width: 767.98px) { + .wmd-links>ul { + padding:1.5rem .75rem; + background-color:#f8f9fa; + border-bottom:1px solid #e9ecef; + } +} + +.wmd-links a { + padding:.1875rem .5rem; + margin-top:.125rem; + margin-left:1.25rem; + color: var(--txt-light); + text-decoration:none; +} + +.wmd-links .btn { + padding:.25rem .5rem; + font-weight:600; + color: var(--txt-light); + background-color:transparent; + border:0; +} + +.wmd-links .btn::before { + width:1.25em; + line-height:0; + content:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28128,128,128,1%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e"); + transition:transform 0.35s ease; + transform-origin:.5em 50% +} + +.wmd-links .btn:hover, +.wmd-links .btn:focus { + color: var(--txt-light); + background-color:rgba(121,82,179,0.1); +} + +.wmd-links .btn[aria-expanded="true"] { + color:rgba(0,0,0,1); + font-style: oblique; +} + +.wmd-links .btn[aria-expanded="true"]::before { + transform:rotate(90deg) +} +.wmd-links .active { + font-weight:600; + color: var(--txt-light); +} +.wmd-links a:hover, +.wmd-links a:focus { + color: var(--txt-light); + background-color:rgba(121,82,179,0.1); +} + diff --git a/src/wikmd/static/css/wiki.dark.css b/src/wikmd/static/css/wiki.dark.css index c0fdfa9..5cc4885 100644 --- a/src/wikmd/static/css/wiki.dark.css +++ b/src/wikmd/static/css/wiki.dark.css @@ -56,4 +56,29 @@ div.html-integration{ .link-dark:hover, .link-dark { color: var(--txt-dark); +} + +.wmd-links a { + color: var(--txt-dark); +} + +.wmd-links .btn { + color: var(--txt-dark); +} + +.wmd-links .btn:hover, +.wmd-links .btn:focus { + color: var(--txt-dark); +} + +.wmd-links .btn[aria-expanded="true"] { + color: var(--txt-dark) +} + +.wmd-links .active { + color: var(--txt-dark) +} +.wmd-links a:hover, +.wmd-links a:focus { + color: var(--txt-dark); } \ No newline at end of file diff --git a/src/wikmd/templates/base.html b/src/wikmd/templates/base.html index a7d94bc..668dbfe 100644 --- a/src/wikmd/templates/base.html +++ b/src/wikmd/templates/base.html @@ -114,31 +114,34 @@
+
+ + {% include 'sidebar.html'%} -
+
{% block content %} {% endblock %}
+
- -
+ + + + + +
  • + © 2023 wikmd +
  • + + @@ -163,7 +166,6 @@ {% endblock %} {% for plug in system.plugins %}{% if plug.add_script is defined %}{{plug.add_script()|safe}}{% endif%}{%endfor%} - diff --git a/src/wikmd/templates/content.html b/src/wikmd/templates/content.html index a564b1e..784749d 100644 --- a/src/wikmd/templates/content.html +++ b/src/wikmd/templates/content.html @@ -8,33 +8,32 @@ {% endblock %} {% block content %} -

    {% if folder %} - {{ folder }}/ - {% endif %} - {{ title }} - - - - - - - -

    - {{ info|safe }} -
    + +

    {{ info|safe }}

    {{ modif }}

    diff --git a/src/wikmd/templates/index.html b/src/wikmd/templates/index.html index 6004e7f..700f594 100644 --- a/src/wikmd/templates/index.html +++ b/src/wikmd/templates/index.html @@ -2,16 +2,23 @@ {%block content%} - - - - -{{homepage|safe}} - + +

    + {{homepage|safe}} +

    {%endblock%} diff --git a/src/wikmd/templates/list_files.html b/src/wikmd/templates/list_files.html index 4c541b5..d88c99e 100644 --- a/src/wikmd/templates/list_files.html +++ b/src/wikmd/templates/list_files.html @@ -5,12 +5,12 @@

    {{ folder }} ALL FILES