这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 62 additions & 8 deletions console/src/components/Main/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@ class Main extends React.Component {
let accessKeyHtml = null;
if (globals.accessKey === '' || globals.accessKey === null) {
accessKeyHtml = (
<OverlayTrigger placement="left" overlay={tooltip.secureEndpoint}>
<a href="https://docs.hasura.io/1.0/graphql/manual/deployment/securing-graphql-endpoint.html">
<button className={'btn btn-danger ' + styles.add_mar_right}>
<div className={styles.secureSection}>
<OverlayTrigger placement="left" overlay={tooltip.secureEndpoint}>
<a href="https://docs.hasura.io/1.0/graphql/manual/deployment/securing-graphql-endpoint.html">
<i
className={
styles.padd_small_right + ' fa fa-exclamation-triangle'
}
/>
Secure your endpoint
</button>
</a>
</OverlayTrigger>
</a>
</OverlayTrigger>
</div>
);
}

Expand All @@ -115,7 +115,7 @@ class Main extends React.Component {
</div>
</div>
<div className={styles.header_items}>
<ul>
<ul className={styles.sidebarItems}>
<OverlayTrigger placement="right" overlay={tooltip.apiexplorer}>
<li>
<Link
Expand Down Expand Up @@ -164,7 +164,61 @@ class Main extends React.Component {
</OverlayTrigger>
</ul>
</div>
<div className={styles.clusterInfoWrapper}>{accessKeyHtml}</div>
<div className={styles.clusterInfoWrapper}>
{accessKeyHtml}
<a href="https://docs.hasura.io">
<div className={styles.helpSection}>
<i className={styles.question + ' fa fa-question'} />
</div>
</a>
<div
className={styles.shareSection + ' dropdown-toggle'}
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<i className={styles.heart + ' fa fa-heart'} />
</div>
<ul className={'dropdown-menu ' + styles.dropdown_menu}>
<div className={styles.dropdown_menu_container}>
<div className={styles.arrow_up_dropdown} />
<div className={styles.graphqlHeartText}>
Love GraphQL Engine? Shout it from the rooftops!
<br />
Or just spread the word{' '}
<span role="img" aria-label="smile">
😊
</span>
</div>
<div className={styles.displayFlex}>
<li className={'dropdown-item'}>
<div className={styles.gitHubBtn}>
<iframe
title="github"
src="https://ghbtns.com/github-btn.html?user=hasura&repo=graphql-engine&type=star&count=true"
frameBorder="0"
scrolling="0"
width="100px"
height="30px"
/>
</div>
</li>
<li className={'dropdown-item '}>
<div className="btn-o">
<a
href="https://twitter.com/intent/tweet?hashtags=hasura,graphql,postgres&amp;text=Get%20Instant%20Realtime%20GraphQL%20APIs%20on%20PostgreSQL&amp;url=https%3A%2F%2Fgithub.com%2F/hasura%2Fgraphql-engine"
target="_blank"
rel="noopener noreferrer"
className={styles.twitterShare}
>
<button className="label">Tweet</button>
</a>
</div>
</li>
</div>
</div>
</ul>
</div>
</div>
<div className={styles.main + ' container-fluid'}>{mainContent}</div>
{this.state.showBannerNotification ? (
Expand Down
181 changes: 177 additions & 4 deletions console/src/components/Main/Main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
font-size: 20px;
}
.header_items {
width: 60%;
width: 50%;
}
.header_logo_wrapper
{
Expand Down Expand Up @@ -121,8 +121,10 @@
z-index: 1;
}
.clusterInfoWrapper {
width: 20%;
text-align: right;
width: 30%;
display: flex;
justify-content: flex-end;
position: relative;
.clusterBtn {
background-color: transparent;
color: #DEDEDE;
Expand Down Expand Up @@ -392,7 +394,7 @@
border-top-color: #aaa;
opacity: 0.8;
}
ul {
.sidebarItems {
list-style-type: none;
padding: 0;
display: inline-block;
Expand Down Expand Up @@ -799,3 +801,174 @@
overflow: hidden;
bottom: 20px;
}

.spreadWord {
display: flex;
align-items: center;
.yellow_button {
border-radius: 20px;
margin-right: 20px;
i {
padding-top: 0px;
}
}
}

.question {
display: flex;
color: #fff;
cursor: pointer;
align-items: center;
padding: 3px;
}

.heart {
display: inline-block;
i {
font-size: 20px;
// color: #fb5f5f;
color: #fff;
}
}
.borderBottom
{
border-bottom: 1px solid #788095;
}
.helpSection {
display: flex;
align-items: center;
background-color: #22283b;
padding: 15px;
}

.shareSection {
display: flex;
align-items: center;
background-color: #fb5151;
padding: 15px;
color: white;
cursor: pointer;
}

.secureSection {
background-color: #545a6c;

padding: 15px;
a {
color: white;
text-decoration: none;
}
}

@keyframes heartbeat
{
0%
{
transform: scale( .75 );
}
20%
{
transform: scale( 1 );
}
40%
{
transform: scale( .75 );
}
60%
{
transform: scale( 1 );
}
80%
{
transform: scale( .75 );
}
100%
{
transform: scale( .75 );
}
}
.graphqlHeartText
{
font-size: 14px;
font-weight: 300;
text-transform: none;
text-align: center;
}
.dropdown_menu
{
top: 53px;
right: 10px;
background-color: transparent;
box-shadow: none;
border: 0;
.dropdown_menu_container
{
width: 330px;
float: right;
background-color: #43495a;
padding: 15px;
border-radius: 5px;
}
.arrow_up_dropdown
{
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 10px solid #43495a;
position: absolute;
top: -5px;
right: 10px;
}
.displayFlex
{
display: flex;
align-items: center;
justify-content: center;
margin-top: 10px;
}
li
{
display: block;
color: #fff;
text-transform: none;
padding: 10px 0;
display: inline-block;
padding-bottom: 0;
a
{
padding: 0;
}
a:hover
{
text-decoration: none;
}
.gitHubBtn
{
height: 20px;
}
}
li:hover
{
text-decoration: none;
color: #ccc;
}
}
.twitterShare {
position: relative;
height: 20px;
box-sizing: border-box;
padding: 1px 8px 1px 6px;
margin-left: 10px;
color: #fff;
border-radius: 3px;
font-weight: 500;
cursor: pointer;
button
{
background-color: #1b95e0;
padding: 5px;
letter-spacing: 0.4px;
border: 0;
}
}