create simple dspace theme based on mantis

This commit is contained in:
Art Lowel
2021-03-17 13:13:11 +01:00
parent 77a85793b6
commit fb90bf64d9
11 changed files with 186 additions and 1 deletions

View File

@@ -56,6 +56,11 @@
"input": "src/themes/custom/styles/theme.scss",
"inject": false,
"bundleName": "custom-theme"
},
{
"input": "src/themes/dspace/styles/theme.scss",
"inject": false,
"bundleName": "dspace-theme"
}
],
"scripts": []

View File

@@ -0,0 +1,5 @@
@import 'src/app/navbar/navbar.component.scss';
nav.navbar {
border-bottom: 5px var(--bs-green) solid;
}

View File

@@ -0,0 +1,15 @@
import { Component } from '@angular/core';
import { NavbarComponent as BaseComponent } from '../../../../app/navbar/navbar.component';
import { slideMobileNav } from '../../../../app/shared/animations/slide';
/**
* Component representing the public navbar
*/
@Component({
selector: 'ds-navbar',
styleUrls: ['./navbar.component.scss'],
templateUrl: '../../../../app/navbar/navbar.component.html',
animations: [slideMobileNav]
})
export class NavbarComponent extends BaseComponent {
}

View File

View File

View File

@@ -0,0 +1,2 @@
export const ENTRY_COMPONENTS = [
];

View File

@@ -0,0 +1,23 @@
// Add any global css for the theme here
// imports the base global style
@import '../../../styles/_global-styles.scss';
.facet-filter,.setting-option {
background-color: var(--bs-light);
border-radius: var(--bs-border-radius);
&.p-3 {
// Needs !important because the original bootstrap class uses it
padding-top: 0.5rem !important;
padding-bottom: 0.5rem !important;
}
.badge-secondary {
background-color: var(--bs-primary);
}
h5 {
font-size: 1.1rem
}
}

View File

@@ -0,0 +1,9 @@
// Override or add CSS variables for your theme here
:root {
--ds-banner-text-background: rgba(0, 0, 0, 0.35);
--ds-banner-background-gradient-width: 300px;
--ds-home-news-link-color: $green;
--ds-home-news-link-hover-color: #{darken($green, 15%)};
}

View File

@@ -1,13 +1,20 @@
// DSpace works with CSS variables for its own components, and has a mapping of all bootstrap Sass
// variables to CSS equivalents (see src/styles/_bootstrap_variables_mapping.scss). However Bootstrap
// still uses Sass variables internally. So if you want to override bootstrap (or other sass
// variables) you can do so here. Their CSS counterparts will include the changes you make here
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,200i,300,300i,400,400i,600,600i,700,700i,900,900i&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese');
$font-family-sans-serif: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
$gray-100: #e8ebf3 !default; // #eee
$gray-100: #e8ebf3 !default;
$gray-400: #ced4da !default;
$gray-800: #444444 !default; // #444
$navbar-dark-color: #FFFFFF;
/* Reassign color vars to semantic color scheme */
$blue: #43515f !default;
//$green: #92C642 !default;
$green: #92C642 !default;
$cyan: #2e80a3 !default;
$yellow: #ec9433 !default;
@@ -16,4 +23,8 @@ $dark: #43515f !default;
$body-color: $gray-800 !default;
$table-accent-bg: $gray-100 !default;
$table-hover-bg: $gray-400 !default;
$yiq-contrasted-threshold: 170 !default;

View File

@@ -0,0 +1,12 @@
// This file combines the other scss files in to one. You usually shouldn't edit this file directly
@import './_theme_sass_variable_overrides.scss';
@import '../../../styles/_variables.scss';
@import '../../../styles/_mixins.scss';
@import '../../../styles/helpers/font_awesome_imports.scss';
@import '../../../../node_modules/bootstrap/scss/bootstrap.scss';
@import '../../../../node_modules/nouislider/distribute/nouislider.min';
@import '../../../styles/_custom_variables.scss';
@import './_theme_css_variable_overrides.scss';
@import '../../../styles/bootstrap_variables_mapping.scss';
@import './_global-styles.scss';

View File

@@ -0,0 +1,103 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AdminRegistriesModule } from '../../app/+admin/admin-registries/admin-registries.module';
import { AdminSearchModule } from '../../app/+admin/admin-search-page/admin-search.module';
import { AdminWorkflowModuleModule } from '../../app/+admin/admin-workflow-page/admin-workflow.module';
import { BitstreamFormatsModule } from '../../app/+admin/admin-registries/bitstream-formats/bitstream-formats.module';
import { BrowseByModule } from '../../app/+browse-by/browse-by.module';
import { CollectionFormModule } from '../../app/+collection-page/collection-form/collection-form.module';
import { CommunityFormModule } from '../../app/+community-page/community-form/community-form.module';
import { CoreModule } from '../../app/core/core.module';
import { DragDropModule } from '@angular/cdk/drag-drop';
import { EditItemPageModule } from '../../app/+item-page/edit-item-page/edit-item-page.module';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { IdlePreloadModule } from 'angular-idle-preload';
import { JournalEntitiesModule } from '../../app/entity-groups/journal-entities/journal-entities.module';
import { MyDspaceSearchModule } from '../../app/+my-dspace-page/my-dspace-search.module';
import { MenuModule } from '../../app/shared/menu/menu.module';
import { NavbarModule } from '../../app/navbar/navbar.module';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ProfilePageModule } from '../../app/profile-page/profile-page.module';
import { RegisterEmailFormModule } from '../../app/register-email-form/register-email-form.module';
import { ResearchEntitiesModule } from '../../app/entity-groups/research-entities/research-entities.module';
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
import { SearchPageModule } from '../../app/+search-page/search-page.module';
import { SharedModule } from '../../app/shared/shared.module';
import { StatisticsModule } from '../../app/statistics/statistics.module';
import { StoreModule } from '@ngrx/store';
import { StoreRouterConnectingModule } from '@ngrx/router-store';
import { TranslateModule } from '@ngx-translate/core';
import { HomePageModule } from '../../app/+home-page/home-page.module';
import { AppModule } from '../../app/app.module';
import { ItemPageModule } from '../../app/+item-page/item-page.module';
import { RouterModule } from '@angular/router';
import { CommunityListPageModule } from '../../app/community-list-page/community-list-page.module';
import { InfoModule } from '../../app/info/info.module';
import { StatisticsPageModule } from '../../app/statistics-page/statistics-page.module';
import { CommunityPageModule } from '../../app/+community-page/community-page.module';
import { CollectionPageModule } from '../../app/+collection-page/collection-page.module';
import { SubmissionModule } from '../../app/submission/submission.module';
import { MyDSpacePageModule } from '../../app/+my-dspace-page/my-dspace-page.module';
import { NavbarComponent } from './app/navbar/navbar.component';
const DECLARATIONS = [
NavbarComponent
];
@NgModule({
imports: [
AdminRegistriesModule,
AdminSearchModule,
AdminWorkflowModuleModule,
AppModule,
BitstreamFormatsModule,
BrowseByModule,
CollectionFormModule,
CollectionPageModule,
CommonModule,
CommunityFormModule,
CommunityListPageModule,
CommunityPageModule,
CoreModule,
DragDropModule,
ItemPageModule,
EditItemPageModule,
FormsModule,
HomePageModule,
HttpClientModule,
IdlePreloadModule,
InfoModule,
JournalEntitiesModule,
MenuModule,
MyDspaceSearchModule,
NavbarModule,
NgbModule,
ProfilePageModule,
RegisterEmailFormModule,
ResearchEntitiesModule,
RouterModule,
ScrollToModule,
SearchPageModule,
SharedModule,
StatisticsModule,
StatisticsPageModule,
StoreModule,
StoreRouterConnectingModule,
TranslateModule,
SubmissionModule,
MyDSpacePageModule,
MyDspaceSearchModule,
],
declarations: DECLARATIONS
})
/**
* This module serves as an index for all the components in this theme.
* It should import all other modules, so the compiler knows where to find any components referenced
* from a component in this theme
* It is purposefully not exported, it should never be imported anywhere else, its only purpose is
* to give lazily loaded components a context in which they can be compiled successfully
*/
class ThemeModule {
}