Skip to content

Commit

Permalink
Update alerts.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhanson committed Jun 21, 2024
1 parent 1dc5196 commit a916965
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 44 deletions.
79 changes: 42 additions & 37 deletions assets/styles/all.css
Original file line number Diff line number Diff line change
Expand Up @@ -4861,52 +4861,57 @@ body.is-search .search-con {
display: none;
}
}
.alert {
padding: 10px;
margin-bottom: 20px;
border-width: 1px;
border-style: solid;
border-radius: 3px;
.markdown-alert {
border-left-width: 3px;
border-left-style: solid;
x-background-color: #fff;
margin-bottom: 16px;
padding: 8px 16px;
}
.alert:before {
content: "";
display: block;
width: 20px;
height: 20px;
float: left;
margin: 6px 2px 0 0;
.markdown-alert.markdown-alert-note {
border-color: #2d68d3;
}
.alert-success {
color: #000;
background-color: #c9edd2;
border-color: #68ff8c;
.markdown-alert .markdown-alert-title {
font-weight: 500;
display: flex;
align-items: center;
line-height: 1;
}
.alert-success:before {
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-check-circle'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'%3E%3C/path%3E%3Cpolyline points='22 4 12 14.01 9 11.01'%3E%3C/polyline%3E%3C/svg%3E") no-repeat;
.markdown-alert > :first-child {
margin-top: 0;
}
.alert-danger {
color: #000;
background-color: #ffb3b3;
border-color: #f33;
.markdown-alert > :last-child {
margin-bottom: 0;
}
.alert-danger:before {
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-alert-octagon'%3E%3Cpolygon points='7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2'%3E%3C/polygon%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E") no-repeat;
.markdown-alert.markdown-alert-note .markdown-alert-title {
color: #2d68d3;
}
.alert-warning {
color: #000;
background-color: #ffffe7;
border-color: #ffff35;
.markdown-alert.markdown-alert-tip {
border-color: #3d7d3f;
}
.alert-warning:before {
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-alert-triangle'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'%3E%3C/path%3E%3Cline x1='12' y1='9' x2='12' y2='13'%3E%3C/line%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'%3E%3C/line%3E%3C/svg%3E%0A") no-repeat;
.markdown-alert.markdown-alert-tip .markdown-alert-title {
color: #3d7d3f;
}
.alert-info {
color: #000;
background-color: #e6ffff;
border-color: #34eaff;
.markdown-alert.markdown-alert-important {
border-color: #7b53d7;
}
.markdown-alert.markdown-alert-important .markdown-alert-title {
color: #7b53d7;
}
.markdown-alert.markdown-alert-warning {
border-color: #b7892d;
}
.markdown-alert.markdown-alert-warning .markdown-alert-title {
color: #b7892d;
}
.markdown-alert.markdown-alert-caution {
border-color: #be3536;
}
.markdown-alert.markdown-alert-caution .markdown-alert-title {
color: #be3536;
}
.alert-info:before {
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-info'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'%3E%3C/line%3E%3C/svg%3E") no-repeat;
.octicon {
fill: currentColor;
}
@-moz-keyframes blink {
to {
Expand Down
16 changes: 9 additions & 7 deletions howtos/password/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,12 @@ <h5 data-control=""><i class="icon-budicon-461"></i><a href="/howtos/password/#i
<section class="chapter"><p>This guide describes the steps needed to add username and password
authentication to a <a href="https://nodejs.org/">Node.js</a> app using the <a href="https://expressjs.com/">Express</a>
web framework.</p>
<div class="alert alert-info">
This guide assumes familiarity with Passport. If you are learning, the
<a href="/tutorials/password/">username and password tutorial</a> is a better starting point.
<div class="markdown-alert markdown-alert-note">
<p class="markdown-alert-title"><svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>Note</p>
<p>This guide assumes familiarity with Passport. If you are learning, the
<a href="/tutorials/password/">username and pasword tutorial</a> is a better starting
point.</p>
</div>

<h1 id="install">Install</h1>
<p>Install <a href="https://www.passportjs.org/packages/passport-local/"><code>passport-local</code></a>
using <a href="https://www.npmjs.com/">npm</a>.</p>
Expand Down Expand Up @@ -176,9 +177,10 @@ <h1 id="install">Install</h1>
<span class="attr">successRedirect</span>: <span class="string">&#x27;/&#x27;</span>,
<span class="attr">failureRedirect</span>: <span class="string">&#x27;/login&#x27;</span>
}));
</code></pre><div class="alert alert-warning">
A session will be established after authentication. When using this strategy,
ensure that you have <a href="/howtos/session/">added support for sessions</a>.
</code></pre><div class="markdown-alert markdown-alert-important">
<p class="markdown-alert-title"><svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>Important</p>
<p>A session will be established after authentication. When using this strategy,
ensure that you have <a href="/howtos/session/">added support for sessions</a>.</p>
</div>
</section>
</div>
Expand Down

0 comments on commit a916965

Please sign in to comment.