Skip to content

Commit

Permalink
fix: replace fontawesome with svg
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed May 1, 2023
1 parent 386733e commit f8cad28
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ <h2>CoCreate-modal</h2>
<div class="display:flex align-items:center transition:0.3s padding-left:10px" share-network="true" share-text="A draggable, customizable Pop up that toggle hiddent content via attributes. Great for multitasking and showing multiple views."
share-title="CoCreate-modal" share-height="600" share-width="700" share-media="https://cdn.cocreate.app/docs/modal.png" hover="display:block!important" hover-target=".social-networks">
<div class="display:none social-networks">
<a class="margin-right:15px" share-network='twitter' title="Share on twitter"><i class="fab fa-twitter"></i></a>
<a class="margin-right:15px" share-network='facebook' title="Share on Facebook"><i class="fab fa-facebook"></i></a>
<a class="margin-right:15px" share-network='instagram' title="Share on instagram"><i class="fab fa-instagram"></i></a>
<a class="margin-right:15px" share-network='twitter' title="Share on twitter"><i class="height:20px fill:#505050" src="/assets/svg/twitter.svg"></i></a>
<a class="margin-right:15px" share-network='facebook' title="Share on Facebook"><i class="height:20px fill:#505050" src="/assets/svg/facebook.svg"></i></a>
<a class="margin-right:15px" share-network='instagram' title="Share on instagram"><i class="height:20px fill:#505050" src="/assets/svg/instagram.svg"></i></a>
</div>
<a class="margin-right:15px" share-network='share' title="Share on share"><i class="fas fa-share-alt"></i></a>
<a class="margin-right:15px" share-network='share' title="Share on share"><i class="height:20px fill:#505050" src="/assets/svg/share-alt.svg"></i></a>
</div>
<a href="https://github.com/CoCreate-app/CoCreate-modal" target="_blank" class="margin-right:15px"><i class="fab fa-github"></i></a>
<a href="https://github.com/CoCreate-app/CoCreate-modal" target="_blank" class="margin-right:15px"><i class="height:20px fill:#505050" src="/assets/svg/github.svg"></i></a>
</div>
</div>
<h1 class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">A draggable, customizable Pop up that toggle hiddent content via attributes. Great for multitasking and showing multiple views.
Expand All @@ -50,7 +50,7 @@ <h1 class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-
<div id="modal-usage" class="margin-top:80px border-bottom:1px_solid_lightgrey" scroll scroll-intersect="color:dodgerblue" scroll-target="#modal-usage-section">
<span class="display:flex align-items:center width:fit-content" hover="display:block!important" hover-target='[href="#modal-usage"]'>
<h2 class="padding:5px_0px">Usage</h2>
<a class="margin-left:10px display:none" href="#modal-usage"><i class="fas fa-link"></i></a>
<a class="margin-left:10px display:none" href="#modal-usage"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
</span>
</div>
<div class="">
Expand Down Expand Up @@ -79,7 +79,7 @@ <h2 class="padding:5px_0px">Usage</h2>
<div id="modal-attributes" class="margin-top:80px border-bottom:1px_solid_lightgrey" scroll scroll-intersect="color:dodgerblue" scroll-target="#modal-attributes-section">
<span class="display:flex align-items:center width:fit-content" hover="display:block!important" hover-target='[href="#modal-attributes"]'>
<h2 class="padding:5px_0px">Attributes</h2>
<a class="margin-left:10px display:none" href="#modal-attributes"><i class="fas fa-link"></i></a>
<a class="margin-left:10px display:none" href="#modal-attributes"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
</span>
</div>
<ul class="list-style-type:none ">
Expand Down Expand Up @@ -127,7 +127,7 @@ <h4><span>open_in</span> <span class="cocreate-badge success">string</span> <spa
<div id="modal-demo" class="border-bottom:1px_solid_lightgrey" scroll scroll-intersect="color:dodgerblue" scroll-target="#modal-demo-section">
<span class="display:flex align-items:center width:fit-content" hover="display:block!important" hover-target='[href="#modal-demo"]'>
<h2 class="padding:5px_0px">Demo</h2>
<a class="margin-left:10px display:none" href="#modal-demo"><i class="fas fa-link"></i></a>
<a class="margin-left:10px display:none" href="#modal-demo"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
</span>
</div>
<div class="position:sticky top:0 padding:15px_0px height:100vh">
Expand All @@ -144,10 +144,10 @@ <h2 class="padding:5px_0px">Demo</h2>
</div>

<div class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
<a class="margin-right:10px" id="eye" show="#eye-slash" hide="#eye, #demo-preview" toggle="code-height" toggle-target="#demo-code"><i class="far fa-eye"></i></a>
<a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-target="#demo-code"><i class="fas fa-eye-slash"></i></a>
<a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i class="fa fa-code"></i></a>
<a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><i class="fas fa-code"></i></a>
<a class="margin-right:10px" id="eye" show="#eye-slash" hide="#eye, #demo-preview" toggle="code-height" toggle-target="#demo-code"><i class="height:18px fill:#505050" src="/assets/svg/eye.svg"></i></a>
<a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-target="#demo-code"><i class="height:20px fill:#505050" src="/assets/svg/eye-slash.svg"></i></a>
<a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i class="height:20px fill:#505050" src="/assets/svg/code.svg"></i></a>
<a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><i class="display:flex height:18px fill:#505050" src="/assets/svg/code.svg"></i></a>
<a class="margin-right:5px" fullscreen fullscreen-target="#playground"></a>
</div>

Expand All @@ -158,7 +158,7 @@ <h2 class="padding:5px_0px">Demo</h2>

</div>
<button href="https://github.com/CoCreate-app/CoCreate-modal/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..." target="_blank" class="position:fixed bottom:15px right:15px padding:15px background:dodgerblue color:#fff font-size:1.5rem grow-hover border-radius:50% border-width:0 box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)">
<i class="fas fa-pencil-alt"></i>
<i class="height:20px fill:#505050" src="/assets/svg/pencil-alt.svg"></i>
</button>
</main>

Expand Down
4 changes: 2 additions & 2 deletions src/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ Modal.prototype = {
headerTemplate = header
else
headerTemplate = `<div class="nav bg-light-gray"><ul class="modal-header">
<li><a class="minimizeBtn"><i class="far fa-window-minimize"></i></a></li>
<li><a class="minimizeBtn"><i class="height:18px fill:#505050" src="/assets/svg/window-minimize.svg"></i></a></li>
<li><a class="maximizeBtn"><i class="far fa-window-restore"></i></a></li>
<!-- <li><a class="parkBtn"><i class="fas fa-dot-circle "></i></a></li> -->
<li><a class="closeBtn"><i class="fas fa-times"></i></a></li>
<li><a class="closeBtn"><i class="height:18px fill:#505050" src="/assets/svg/times.svg"></i></a></li>
</ul></div>`;

this.el.innerHTML = headerTemplate + this.el.innerHTML;
Expand Down

0 comments on commit f8cad28

Please sign in to comment.