diff --git a/package.json b/package.json index 5d7fbd1..2e311b7 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "primeflex": "^3.2.1", "primeicons": "^6.0.1", "primevue": "^3.18.1", - "prismjs": "^1.29.0", "vue": "^3.2.41", "vue-router": "^4.1.5" }, diff --git a/src/assets/demo/styles/documentation.scss b/src/assets/demo/styles/documentation.scss deleted file mode 100644 index 0bbfb99..0000000 --- a/src/assets/demo/styles/documentation.scss +++ /dev/null @@ -1,56 +0,0 @@ -pre[class*='language-'] { - background-color: var(--surface-ground) !important; - border-radius: var(--border-radius); - - &:before, - &:after { - display: none !important; - } - - code { - border-left: 0px solid var(--surface-border) !important; - box-shadow: none !important; - background: var(--surface-ground) !important; - color: var(--text-color); - font-size: 14px; - } - - .token { - &.tag, - &.keyword { - color: #2196f3 !important; - } - - &.attr-name, - &.attr-string { - color: #2196f3 !important; - } - - &.attr-value { - color: #4caf50 !important; - } - - &.punctuation { - color: var(--text-color); - } - - &.operator, - &.string { - background: transparent; - } - } -} - -i:not([class~='pi']) { - /* background-color: transparent; */ - color: #2196f3; - font-family: Monaco, courier, monospace; - font-style: normal; - font-size: 12px; - font-weight: 500; - padding: 0 4px; - letter-spacing: 0.5px; - font-weight: 600; - margin: 0 2px; - display: inline-flex; -} diff --git a/src/assets/layout/styles/layout/_main.scss b/src/assets/layout/styles/layout/_main.scss index d80db70..dd9ac50 100644 --- a/src/assets/layout/styles/layout/_main.scss +++ b/src/assets/layout/styles/layout/_main.scss @@ -20,7 +20,6 @@ body { a { text-decoration: none; - /* color: var(--primary-color); */ } .layout-wrapper { diff --git a/src/assets/styles.scss b/src/assets/styles.scss index 9a9adeb..36d5e78 100644 --- a/src/assets/styles.scss +++ b/src/assets/styles.scss @@ -8,9 +8,6 @@ $gutter: 1rem; //for primeflex grid system @import 'primeflex/primeflex.scss'; @import 'primeicons/primeicons.css'; -/* Prismjs */ -@import 'prismjs/themes/prism-coy.css'; - /* Demos */ @import '@/assets/demo/styles/flags/flags.css'; @import '@/assets/demo/styles/badges.scss'; diff --git a/src/components/CodeHighlight.js b/src/components/CodeHighlight.js deleted file mode 100644 index 5aa23c9..0000000 --- a/src/components/CodeHighlight.js +++ /dev/null @@ -1,16 +0,0 @@ -import Prism from 'prismjs'; - -const CodeHighlight = { - beforeMount(el, binding) { - const modifiers = binding.modifiers; - const value = binding.value; - - if (modifiers.script || value === 'script') el.className = 'language-javascript'; - else if (modifiers.css || value === 'css') el.className = 'language-css'; - else el.className = 'language-markup'; - - Prism.highlightElement(el.children[0]); - } -}; - -export default CodeHighlight; diff --git a/src/components/CodeHighlight.vue b/src/components/CodeHighlight.vue new file mode 100644 index 0000000..f27c18a --- /dev/null +++ b/src/components/CodeHighlight.vue @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 7674075..0e77165 100644 --- a/src/main.js +++ b/src/main.js @@ -100,7 +100,7 @@ import TreeTable from 'primevue/treetable'; import TriStateCheckbox from 'primevue/tristatecheckbox'; import VirtualScroller from 'primevue/virtualscroller'; -import CodeHighlight from '@/components/CodeHighlight'; +import CodeHighlight from '@/components/CodeHighlight.vue'; import BlockViewer from '@/components/BlockViewer.vue'; import '@/assets/styles.scss'; @@ -117,7 +117,9 @@ app.directive('tooltip', Tooltip); app.directive('badge', BadgeDirective); app.directive('ripple', Ripple); app.directive('styleclass', StyleClass); -app.directive('code', CodeHighlight); + +app.component('CodeHighlight', CodeHighlight); +app.component('BlockViewer', BlockViewer); app.component('Accordion', Accordion); app.component('AccordionTab', AccordionTab); @@ -209,6 +211,4 @@ app.component('TreeTable', TreeTable); app.component('TriStateCheckbox', TriStateCheckbox); app.component('VirtualScroller', VirtualScroller); -app.component('BlockViewer', BlockViewer); - app.mount('#app'); diff --git a/src/views/utilities/Documentation.vue b/src/views/utilities/Documentation.vue index a251929..67a943a 100644 --- a/src/views/utilities/Documentation.vue +++ b/src/views/utilities/Documentation.vue @@ -7,88 +7,86 @@
Getting Started

- Sakai is an application template for Vue based on the Vue CLI that provides out-of-the-box standard tooling for Vue projects. To get started, clone the + Sakai is an application template for Vue based on the create-vue, the recommended way to start a Vite-powered Vue projects. To get started, clone the repository from GitHub and install the dependencies with npm or yarn.

-

+
 npm install
-
-
+ or -

+
 yarn
+
 
-
+

Next step is running the application using the serve script and navigate to http://localhost:5173/ to view the application. That is it, you may now start with the development of your application using the Sakai template.

-

Next step is running the application using the serve script and navigate to http://localhost:8080/ to view the application. That is it, you may now start with the development of your application using the Sakai template.

- -

-npm run serve
-
-
- -
Vue CLI Scripts
-

Following commands are derived from create-app-app.

-

-"npm run serve": Starts the development server
-"npm run build": Builds the application for deployment.
-"npm run lint": Executes the lint checks.
-"npm run test:unit": Runs the tests.
-
-
+ +npm run dev +
Structure
-

- Sakai consists of 2 main parts; the application layout and the resources. App.vue inside src folder is the main component containing the template for the base layout whereas required resources such as SASS structure for the - layout are placed inside the src/assets/ folder. -

- -
Layout Components
-

- Main layout is the template of the App.vue, it is divided into a couple of child components such as topbar, menu and footer. Here is template of the App.vue component that implements the logic such as menu state, - layout modes and so on. -

+

Sakai consists of a couple folders, demos and layout have been separated so that you can easily remove what is not necessary for your application.

+
Menu
-

- Menu is a separate component defined in AppMenu.vue file based on PrimeVue MenuModel API. In order to define the menuitems, navigate to data section of App.vue file and define your own model as a nested structure - using the menu property. -

+

Main menu is defined at src/layout/AppMenu.vue file.

-
Dependencies
-

Dependencies of Sakai are listed below and needs to be added to package.json.

- -
-
-{
-    "primevue": "~3.11.0",
-    "primeicons": "~5.0.0",
-    "primeflex": "~3.1.2",
-}
-
-
+
Integration with Existing Vite Applications
+

Only the folders that are related to the layout needs to move in to your project. We've created a short tutorial with details.

+ +
+ +
PrimeVue Theme
-

Sakai uses the free Saga, Arya and Vela themes which are distributed within PrimeVue, however it can be used with any PrimeVue theme as well such as material, tailwind and bootstrap.

+

+ Sakai theming is based on the PrimeVue theme being used. Default theme is lara-light-indigo. +

SASS Variables
-

In case you'd like to customize the layout variables, open _variables.scss file under src/layout folder. Saving the changes will be reflected instantly at your browser.

+

+ In case you'd like to customize the main layout variables, open _variables.scss file under src/layout folder. Saving the changes will be reflected instantly at your browser. +

-
src/assets/_variables.scss
-
-
-$fontSize:1rem;
-$borderRadius:12px;
-$transitionDuration:.2s;
-
-
+
src/layout/_variables.scss
+ +/* General */ +
+$scale:14px; /* main font size */ +
+$borderRadius:12px; /* border radius of layout element e.g. card, sidebar */ +
+$transitionDuration:.2s; /* transition duration of layout elements e.g. sidebar, overlay menus */ +
- + \ No newline at end of file diff --git a/src/views/utilities/Icons.vue b/src/views/utilities/Icons.vue index f4c1ac1..b1458e0 100644 --- a/src/views/utilities/Icons.vue +++ b/src/views/utilities/Icons.vue @@ -1,5 +1,5 @@