Handle sass compilation with a gradle plugin
This commit is contained in:
parent
efd38f4c11
commit
d30b7a2392
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,6 +3,8 @@ build/
|
|||||||
!gradle/wrapper/gradle-wrapper.jar
|
!gradle/wrapper/gradle-wrapper.jar
|
||||||
!**/src/main/**/build/
|
!**/src/main/**/build/
|
||||||
!**/src/test/**/build/
|
!**/src/test/**/build/
|
||||||
|
data/**/*.css
|
||||||
|
!data/**/libs/*.css
|
||||||
|
|
||||||
### STS ###
|
### STS ###
|
||||||
.apt_generated
|
.apt_generated
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
import ru.mipt.npm.gradle.KScienceVersions
|
import ru.mipt.npm.gradle.KScienceVersions
|
||||||
|
import sass.embedded_protocol.EmbeddedSass.OutputStyle
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("ru.mipt.npm.gradle.project")
|
id("ru.mipt.npm.gradle.project")
|
||||||
id("ru.mipt.npm.gradle.jvm")
|
id("ru.mipt.npm.gradle.jvm")
|
||||||
application
|
application
|
||||||
|
id("io.freefair.sass-java") version "6.4.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
//repositories{
|
//repositories{
|
||||||
@ -51,8 +53,28 @@ kotlin {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val dataSourcePath = project.rootDir.resolve("data")
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
resources.srcDir(project.rootDir.resolve("data"))
|
resources.srcDir(dataSourcePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.compileSass {
|
||||||
|
destinationDir.set(dataSourcePath)
|
||||||
|
sourceMapEnabled.set(false)
|
||||||
|
setOutputStyle(OutputStyle.COMPRESSED.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.processResources {
|
||||||
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
|
exclude("**/*.scss")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.clean {
|
||||||
|
delete(fileTree(dataSourcePath).matching {
|
||||||
|
include("**/*.css")
|
||||||
|
exclude("**/libs/*.css")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
Hyperspace by HTML5 UP
|
|
||||||
html5up.net | @ajlkn
|
|
||||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Spotlights */
|
|
||||||
|
|
||||||
.spotlights > section > .image:before {
|
|
||||||
opacity: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spotlights > section > .content > .inner {
|
|
||||||
-moz-transform: none !important;
|
|
||||||
-webkit-transform: none !important;
|
|
||||||
-ms-transform: none !important;
|
|
||||||
transform: none !important;
|
|
||||||
opacity: 1 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Wrapper */
|
|
||||||
|
|
||||||
.wrapper > .inner {
|
|
||||||
opacity: 1 !important;
|
|
||||||
-moz-transform: none !important;
|
|
||||||
-webkit-transform: none !important;
|
|
||||||
-ms-transform: none !important;
|
|
||||||
transform: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sidebar */
|
|
||||||
|
|
||||||
#sidebar > .inner {
|
|
||||||
opacity: 1 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#sidebar nav > ul > li {
|
|
||||||
-moz-transform: none !important;
|
|
||||||
-webkit-transform: none !important;
|
|
||||||
-ms-transform: none !important;
|
|
||||||
transform: none !important;
|
|
||||||
opacity: 1 !important;
|
|
||||||
}
|
|
6
data/magprog/assets/styles/components/_collapsible.scss
Normal file
6
data/magprog/assets/styles/components/_collapsible.scss
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
.collapsible-content {
|
||||||
|
padding: 0 18px;
|
||||||
|
max-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: max-height 0.2s ease-out;
|
||||||
|
}
|
Before Width: | Height: | Size: 801 B After Width: | Height: | Size: 801 B |
@ -4,7 +4,7 @@
|
|||||||
@import 'libs/vendor';
|
@import 'libs/vendor';
|
||||||
@import 'libs/breakpoints';
|
@import 'libs/breakpoints';
|
||||||
@import 'libs/html-grid';
|
@import 'libs/html-grid';
|
||||||
@import 'fontawesome-all.min.css';
|
@import 'libs/fontawesome-all.min.css';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Hyperspace by HTML5 UP
|
Hyperspace by HTML5 UP
|
||||||
@ -48,6 +48,7 @@
|
|||||||
@import 'components/spotlights';
|
@import 'components/spotlights';
|
||||||
@import 'components/table';
|
@import 'components/table';
|
||||||
@import 'components/wrapper';
|
@import 'components/wrapper';
|
||||||
|
@import 'components/collapsible';
|
||||||
|
|
||||||
// Layout.
|
// Layout.
|
||||||
|
|
@ -207,7 +207,7 @@ context(PageContext) internal fun HTML.magProgHead(title: String) {
|
|||||||
}
|
}
|
||||||
link {
|
link {
|
||||||
rel = "stylesheet"
|
rel = "stylesheet"
|
||||||
href = resolveRef("css/main.css")
|
href = resolveRef("styles/main.css")
|
||||||
}
|
}
|
||||||
link {
|
link {
|
||||||
rel = "shortcut icon"
|
rel = "shortcut icon"
|
||||||
@ -216,7 +216,7 @@ context(PageContext) internal fun HTML.magProgHead(title: String) {
|
|||||||
noScript {
|
noScript {
|
||||||
link {
|
link {
|
||||||
rel = "stylesheet"
|
rel = "stylesheet"
|
||||||
href = resolveRef("css/noscript.css")
|
href = resolveRef("styles/noscript.css")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user