Skip to content

Commit

Permalink
Merge pull request #267 from NateWr/i8803_ui_library
Browse files Browse the repository at this point in the history
pkp/pkp-lib#8803 Update documentation for 3.4
  • Loading branch information
NateWr authored Mar 21, 2023
2 parents c9a9b2e + bcc277c commit aef7a2f
Show file tree
Hide file tree
Showing 164 changed files with 4,328 additions and 1,493 deletions.
27 changes: 15 additions & 12 deletions public/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ window.pkp = {
id: 20,
roles: [1, 16, 65536, 1048576],
username: 'dbarnes',
preferredName: 'Daniel Barnes'
preferredName: 'Daniel Barnes',
},

/**
Expand Down Expand Up @@ -65,7 +65,7 @@ window.pkp = {
DOI_STATUS_SUBMITTED: 2,
DOI_STATUS_REGISTERED: 3,
DOI_STATUS_ERROR: 4,
DOI_STATUS_STALE: 5
DOI_STATUS_STALE: 5,
},

/**
Expand All @@ -81,13 +81,14 @@ window.pkp = {
pdf: 'file-pdf-o', // DOCUMENT_TYPE_PDF
word: 'file-word-o', // DOCUMENT_TYPE_WORD
video: 'file-video-o', // DOCUMENT_TYPE_VIDEO
zip: 'file-archive-o' // DOCUMENT_TYPE_ZIP
zip: 'file-archive-o', // DOCUMENT_TYPE_ZIP
},

/**
* Locale keys loaded on the server-side
*/
localeKeys: {
'common.attachFiles': 'Attach Files',
'common.cancel': 'Cancel',
'common.clearSearch': 'Clear search',
'common.close': 'Close',
Expand Down Expand Up @@ -139,8 +140,8 @@ window.pkp = {
'form.multilingualProgress': '{$count}/{$total} languages completed',
'form.saved': 'Saved',
'help.help': 'Help',
'validator.required': 'This field is required.'
}
'validator.required': 'This field is required.',
},
};

/**
Expand All @@ -150,21 +151,23 @@ window.$.pkp = {
app: {
currentLocale: 'en',
primaryLocale: 'en',
rtlLocales: ['ar']
rtlLocales: ['ar'],
tinyMceContentCSS: 'styles/content.css',
tinyMceOneLineContentCSS: 'styles/content_oneline.css',
},
pkpHandler() {
alert(
'This action can not be completed in the UI library because it requires a legacy JS component that is part of the OJS or OMP application.'
'This action can not be completed in the UI library because it requires a legacy JS component that is part of the OJS, OMP or OPS application.'
);
},
classes: {
Helper: {
// A fake uuid generator to mock the one in the Helper component of the
// OJS/OMP applications. This is not guaranteed to be unique and should
// A fake uuid generator to mock the one in the Helper component of
// OJS, OMP and OPS. This is not guaranteed to be unique and should
// not be used in production
uuid() {
return Math.floor((1 + Math.random()) * 0x10000).toString(16);
}
}
}
},
},
},
};
3 changes: 2 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>UI Library - Public Knowledge Project</title>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Noto+Sans:400,400italic,700,700italic" type="text/css">
<link rel="icon" href="<%= BASE_URL %>pkp-icon.png" type="image/png">
<link rel="stylesheet" href="<%= BASE_URL %>styles/fonts.css" type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="<%= BASE_URL %>highlightjs.css" />
</head>
Expand Down
Binary file added public/pkp-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions public/styles/content.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@import "fonts.css";

html,
body {
font-family: "Noto Sans", "Noto Kufi Arabic", Arial, Helvetica, sans-serif;
font-size: 14px;
line-height: 24px;
background: #fff;
padding: 14px;
margin: 0;
}

p:first-child {
margin-top: 0;
}

span.pkpTag {
padding: 0.5em;
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
color: #777;
}

a {
color: #006798;
}

a:hover,
a:focus {
color: #113241;
}
27 changes: 27 additions & 0 deletions public/styles/content_oneline.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@import "content.css";

html {
padding: 0;
}

.mce-content-body {
height: 40px;
line-height: 40px;
padding: 0;
white-space: nowrap;
overflow: hidden;
}

sup {
position: relative;
top: -0.75em;
vertical-align: top;
font-size: 0.6em;
}

sub {
position: relative;
bottom: -0.75em;
vertical-align: bottom;
font-size: 0.6em;
}
55 changes: 55 additions & 0 deletions public/styles/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* noto-sans-regular - vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 400;
src: url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-regular.eot'); /* IE9 Compat Modes */
src: local(''),
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-regular.woff') format('woff'), /* Modern Browsers */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-regular.svg#NotoSans') format('svg'); /* Legacy iOS */
}

/* noto-sans-italic - vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Noto Sans';
font-style: italic;
font-weight: 400;
src: url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-italic.eot'); /* IE9 Compat Modes */
src: local(''),
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-italic.woff2') format('woff2'), /* Super Modern Browsers */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-italic.woff') format('woff'), /* Modern Browsers */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-italic.ttf') format('truetype'), /* Safari, Android, iOS */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-italic.svg#NotoSans') format('svg'); /* Legacy iOS */
}

/* noto-sans-700 - vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 700;
src: url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-700.eot'); /* IE9 Compat Modes */
src: local(''),
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-700.woff2') format('woff2'), /* Super Modern Browsers */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-700.woff') format('woff'), /* Modern Browsers */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-700.ttf') format('truetype'), /* Safari, Android, iOS */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-700.svg#NotoSans') format('svg'); /* Legacy iOS */
}

/* noto-sans-700italic - vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Noto Sans';
font-style: italic;
font-weight: 700;
src: url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-700italic.eot'); /* IE9 Compat Modes */
src: local(''),
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-700italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-700italic.woff2') format('woff2'), /* Super Modern Browsers */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-700italic.woff') format('woff'), /* Modern Browsers */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-700italic.ttf') format('truetype'), /* Safari, Android, iOS */
url('fonts/noto-sans-v11-vietnamese_latin-ext_latin_greek-ext_greek_devanagari_cyrillic-ext_cyrillic-700italic.svg#NotoSans') format('svg'); /* Legacy iOS */
}
1 change: 1 addition & 0 deletions public/styles/fonts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Noto Sans font is distributed under the terms of the [Apache License, 2.0](http://www.apache.org/licenses/LICENSE-2.0).
Binary file not shown.
Loading

0 comments on commit aef7a2f

Please sign in to comment.