Pārlūkot izejas kodu

First attempt at a custom Daux theme

microsub
J. King pirms 5 gadiem
vecāks
revīzija
8bbcae4aa4
  1. 2
      .gitignore
  2. 14
      RoboFile.php
  3. 2
      docs/theme/arsse/arsse.css
  4. 27
      docs/theme/src/arsse.scss
  5. 18
      package.json
  6. 16
      postcss.config.js
  7. 2264
      yarn.lock

2
.gitignore

@ -2,12 +2,14 @@
/vendor/
/vendor-bin/*/vendor
/node_modules
/documentation/
/manual/
/tests/coverage/
/arsse.db*
/config.php
/.php_cs.cache
yarn-error.log
# Windows files

14
RoboFile.php

@ -188,4 +188,18 @@ class RoboFile extends \Robo\Tasks {
$execpath = escapeshellarg(realpath(self::BASE."vendor/bin/daux"));
return $this->taskExec($execpath)->arg("serve")->args($args)->run();
}
/** Rebuilds the manual theme
*
* This requires Node and Yarn to be installed, and only needs to be done when
* Daux's theme changes
*/
public function manualTheme(array $args): Result {
$postcss = escapeshellarg(realpath(self::BASE."node_modules/.bin/postcss"));
$themesrc = realpath(self::BASE."docs/theme/src/");
$themeout = realpath(self::BASE."docs/theme/arsse/");
$scss = $themesrc."/arsse.scss";
$css = $themeout."/arsse.css";
return $this->taskExec($postcss)->arg($scss)->option("-o", $css)->args($args)->run();
}
}

2
docs/theme/arsse/arsse.css

Faila izmaiņas netiek rādītas, jo viena vai vairākas līnijas ir pārāk garas

27
docs/theme/src/arsse.scss

@ -0,0 +1,27 @@
/* Daux imports; fonts are omitted */
@import "../../../vendor-bin/daux/vendor/daux/daux.io/themes/daux/scss/vendor/normalize.scss";
@import "../../../vendor-bin/daux/vendor/daux/daux.io/themes/daux/scss/_variables.scss";
@import "../../../vendor-bin/daux/vendor/daux/daux.io/themes/daux/scss/_mixins.scss";
@import "../../../vendor-bin/daux/vendor/daux/daux.io/themes/daux/scss/_structure.scss";
@import "../../../vendor-bin/daux/vendor/daux/daux.io/themes/daux/scss/_typography.scss";
@import "../../../vendor-bin/daux/vendor/daux/daux.io/themes/daux/scss/_components.scss";
@import "../../../vendor-bin/daux/vendor/daux/daux.io/themes/daux/scss/_homepage.scss";
@import "../../../vendor-bin/daux/vendor/daux/daux.io/themes/daux/scss/vendor/highlight.scss";
@import "../../../vendor-bin/daux/vendor/daux/daux.io/themes/daux/scss/_print.scss" print;
/* The Arsse overrides */
:root {
--font-family-text: -apple-system, ".SFNSText-Regular", "San Francisco",
"Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial,
sans-serif;
--font-family-monospace: Monaco, Menlo, Consolas, "Lucida Console",
"Courier New", monospace;
--font-family-heading: "Roboto Slab", var(--font-family-text);
}
:root {
--sidebar-background: #f7f7f7;
--sidebar-link-active-background: #c5c5cb;
--dark: #3f4657;
--light: #82becd;
}

18
package.json

@ -0,0 +1,18 @@
{
"dependencies": {
"autoprefixer": "^9.6.1",
"postcss-csso": "^3.0.0",
"postcss-custom-properties": "^9.0.2",
"postcss-discard-comments": "^4.0.2",
"postcss-mixins": "^6.2.2",
"postcss-nested": "^4.1.2",
"postcss-sassy-mixins": "^2.1.0",
"postcss-scss": "^2.0.0"
},
"devDependencies": {
"postcss-cli": "^6.1.3",
"postcss-custom-media": "^7.0.8",
"postcss-import": "^12.0.1",
"postcss-media-minmax": "^4.0.0"
}
}

16
postcss.config.js

@ -0,0 +1,16 @@
module.exports = ctx => ({
//map: ctx.options.map,
parser: 'postcss-scss',
//syntax: 'postcss-scss',
plugins: {
'postcss-import': { root: ctx.file.dirname },
'postcss-discard-comments': {},
'postcss-sassy-mixins': {},
'postcss-custom-media': {preserve: false},
'postcss-media-minmax': {},
'postcss-custom-properties': {preserve: false},
'postcss-nested': {},
'autoprefixer': {},
'postcss-csso': {},
}
})

2264
yarn.lock

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Notiek ielāde…
Atcelt
Saglabāt