Skip to content

Commit

Permalink
fixed squished component title
Browse files Browse the repository at this point in the history
  • Loading branch information
lennessyy committed Nov 12, 2021
1 parent 1765e73 commit 6021954
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 1 deletion.
Binary file modified build/ui-bundle.zip
Binary file not shown.
29 changes: 29 additions & 0 deletions preview-src/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,35 @@ image::multirepo-ssg.svg[Multirepo SSG,250]

Make the switch today!

== GSQL highlighting
[source,gsql]
----
CREATE QUERY pageRankDyn (FLOAT maxChange=0.00, INT maxIter=25,
FLOAT damping=0.85,
STRING vType, STRING eType, STRING attr) //parameterized schema
//no graph name
{
MaxAccum<float> @@maxDiff = 9999;
SumAccum<float> @rcvd_score = 0;
SumAccum<float> @score = 1;
Start = {vType};
WHILE @@maxDiff > maxChange LIMIT maxIter DO
@@maxDiff = 0;
V = SELECT s
FROM Start:s -(eType:e)- vType:t //parameterized
ACCUM t.@rcvd_score += s.@score/(s.outdegree(eType)) //param
POST-ACCUM s.@score = (1.0-damping) + damping * s.@rcvd_score,
s.@rcvd_score = 0,
@@maxDiff += abs(s.@score - s.@score);
END;
V = SELECT s FROM Start:s
POST-ACCUM s.setAttr(attr, s.@score); //parameterized
}
RUN QUERY pageRankDyn(_,_,_,"Page", "Link", "Score")
----

[#english+中文]
== English + 中文

Expand Down
2 changes: 1 addition & 1 deletion preview-src/ui-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ site:
latestVersion: *latest_version_abc
- &component
name: xyz
title: &component_title Project XYZ
title: &component_title TigerGraph Graph Data Science Library
url: /xyz/6.0/index.html
versions:
- &latest_version_xyz
Expand Down
4 changes: 4 additions & 0 deletions src/css/nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ html.is-clipped--nav {
height: var(--drawer-height);
}

.nav-panel-explore .context .title {
width: 11rem;
}

.nav-panel-explore .context .version {
display: flex;
align-items: inherit;
Expand Down
40 changes: 40 additions & 0 deletions src/highlight-gsql/gsql.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
Language: GSQL
Contributors: Dan Barkus <[email protected]>
Description: GSQL language for TigerGraph
Website: https://www.tigergraph.com/
*/

export default function(hljs) {
return {
name: "GSQL",
keywords:
{
keyword: 'accum and any api as asc avg bag batch between bool both break by case catch coalesce compress continue count create datetime datetime_add datetime_sub delete desc distributed do double edge else end escape exception false file filter float foreach for from graph group gsql_int_max gsql_int_min gsql_uint_max having if in insert int interpret intersect interval into is isempty jsonarray jsonobject lasthop leading like limit list load_accum log map match max min minus not now null offset or order path per pinned post_accum post-accum primary_id print query raise range replace reset_collection_accum return returns run sample select select_vertex set src static string sum syntax target tagstgt then to to_csv to_datetime trailing trim true try tuple typedef uint union update values vertex when where while with',
literal: 'true false null'
},
contains: [
// hljs.QUOTE_STRING_MODE,
// hljs.APOS_STRING_MODE,
hljs.C_NUMBER_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.HASH_COMMENT_MODE,
{
className: 'clause',
keywords: {
built_in: 'accum having limit order postAccum sample where'
}
},
{
className: 'accum',
keywords: {
built_in: 'andaccum arrayaccum avgaccum bagaccum bitwiseandaccum bitwiseoraccum groupbyaccum heapaccum listaccum MapAccum maxaccum minaccum oraccum setaccum sumaccum'
}
},
{
className: 'relation',
begin: /(-\s?)(\(.*\:\w?\))(\s?-)/,
}
]
}
}
4 changes: 4 additions & 0 deletions src/js/vendor/highlight.bundle.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// var path = require('path');
// var filePath = path.join('..', '..', 'highlight-gsql', 'gsql.js');
// console.log(filePath);

;(function () {
'use strict'

Expand Down

0 comments on commit 6021954

Please sign in to comment.