From f112ab08264aaa5d88b4be43bd52a319ae35c272 Mon Sep 17 00:00:00 2001 From: Chris White Date: Sat, 21 Mar 2020 08:58:43 -0400 Subject: [PATCH] Regularize whitespace; add editorconfig - Change the few files that use leading tabs into leading spaces. This way they match the other files in the repo. - Add an EditorConfig file so that supported editors will automatically use spaces instead of tabs. - (Extra) Add some common editor backup-file extensions to .gitignore. --- .editorconfig | 7 ++ .gitignore | 5 ++ README.md | 2 +- http/banner.css | 94 +++++++++++++-------------- script.sh | 6 +- templates/header.html | 70 ++++++++++---------- templates/layout.html | 120 +++++++++++++++++------------------ utils/index-all-repositories | 18 +++--- 8 files changed, 167 insertions(+), 155 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7ac3e2c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +# see https://editorconfig.org for the format of this file +root = true + +[*] +end_of_line = LF +indent_style = space +indent_size = 4 diff --git a/.gitignore b/.gitignore index a6bd427..5ac1417 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,8 @@ http/images http/*.html http/favicon.ico http/robots.txt + +# Editor and other backup files +*.swp +*~ +~* diff --git a/README.md b/README.md index 40dc1e6..1af967e 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ server.document-root = server_root + "/elixir/http" url.redirect = ( "^/$" => "/linux/latest/source" ) url.rewrite = ( "^/.*/(source|ident|search)" => "/web.py/$1") setenv.add-environment = ( "PYTHONIOENCODING" => "utf-8", - "LXR_PROJ_DIR" => "/path/to/elixir-data" ) + "LXR_PROJ_DIR" => "/path/to/elixir-data" ) ``` ### Using a cache to improve performance diff --git a/http/banner.css b/http/banner.css index 4eba234..61e7d9e 100644 --- a/http/banner.css +++ b/http/banner.css @@ -23,10 +23,10 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed', GradientType=0 ); } .message-banner-desktop p.title { - font-size: 14px; - margin: 0; - margin-top: 5px; - margin-bottom: 8px; + font-size: 14px; + margin: 0; + margin-top: 5px; + margin-bottom: 8px; } .message-banner-desktop .subtitle { width: 210px; @@ -37,46 +37,46 @@ } .message-banner-mobile { - display: none; - text-align: center; - position: absolute; - background: #fe003e; - color: #fff; - font-family: Arial; - -webkit-transform:rotate(-90deg); - -moz-transform:rotate(-90deg); - -o-transform: rotate(-90deg); - -ms-transform:rotate(-90deg); - transform: rotate(-90deg); - left: -58px; - bottom: 58px; - padding: 5px; + display: none; + text-align: center; + position: absolute; + background: #fe003e; + color: #fff; + font-family: Arial; + -webkit-transform:rotate(-90deg); + -moz-transform:rotate(-90deg); + -o-transform: rotate(-90deg); + -ms-transform:rotate(-90deg); + transform: rotate(-90deg); + left: -58px; + bottom: 58px; + padding: 5px; } .message-banner-mobile .title { - margin: 0; - font-size: 25px; + margin: 0; + font-size: 25px; } .message-banner-mobile .subtitle { - margin: 0; - font-size: 11px; + margin: 0; + font-size: 11px; } .message-banner-mobile:hover { - background: #f37b30; + background: #f37b30; } .message-banner-mobile .message-link, .message-banner-desktop .message-link { - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; - z-index: 99999; + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: 99999; } header.header { position: relative !important; } header.header h2 { - margin-bottom: 3rem; + margin-bottom: 3rem; } .icon-googleplus:before, .icon-mastodon:before { @@ -84,26 +84,26 @@ header.header h2 { left: 3px; } .select-projects { - background-position: bottom 0.15em right 0.3em; - width: 100%; + background-position: bottom 0.15em right 0.3em; + width: 100%; } @media screen and (max-width: 600px) { - .message-banner-desktop { - display: none; - } - .message-banner-mobile { - display: block; - } + .message-banner-desktop { + display: none; + } + .message-banner-mobile { + display: block; + } } @media screen and (max-width: 400px) { - .message-banner-mobile { - bottom: 50px; - } - .message-banner-mobile .title { - font-size: 20px; - } - .message-banner-mobile .subtitle { - font-size: 9.5px; - } + .message-banner-mobile { + bottom: 50px; + } + .message-banner-mobile .title { + font-size: 20px; + } + .message-banner-mobile .subtitle { + font-size: 9.5px; + } } diff --git a/script.sh b/script.sh index 8fd8bb5..993453f 100755 --- a/script.sh +++ b/script.sh @@ -105,13 +105,13 @@ list_blobs() v=`echo $opt2 | version_rev` if [ "$opt1" = '-p' ]; then - # "path" option: return blob hash and full path + # "path" option: return blob hash and full path format='\1 \2' elif [ "$opt1" = '-f' ]; then - # "file" option: return blob hash and file name (without its path) + # "file" option: return blob hash and file name (without its path) format='\1 \4' else - # default option: return only blob hash + # default option: return only blob hash format='\1' v=`echo $opt1 | version_rev` fi diff --git a/templates/header.html b/templates/header.html index 2248f4a..50305c8 100644 --- a/templates/header.html +++ b/templates/header.html @@ -1,37 +1,37 @@
-
-

Training sessions

-

Kernel and Embedded Linux

- -
-
-

Next training sessions

-
Linux Kernel: March 16-20
-
Embedded Linux: May 11-15
-
and on-site sessions
- -
-

- - - Bootlin logo - -

-

Elixir Cross Referencer

- +
+

Training sessions

+

Kernel and Embedded Linux

+ +
+
+

Next training sessions

+
Linux Kernel: March 16-20
+
Embedded Linux: May 11-15
+
and on-site sessions
+ +
+

+ + + Bootlin logo + +

+

Elixir Cross Referencer

+
diff --git a/templates/layout.html b/templates/layout.html index e094160..63f7b3c 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -1,64 +1,64 @@ - - - - {{title}} - - - + + + + {{title}} + + + - - - - - -
- {% include 'header.html' %} -
- - -
-
-
- {{main}} -
- -
- -
- - + + + + + +
+ {% include 'header.html' %} +
+ + +
+
+
+ {{main}} +
+ +
+ +
+ + diff --git a/utils/index-all-repositories b/utils/index-all-repositories index 9209c63..a526019 100755 --- a/utils/index-all-repositories +++ b/utils/index-all-repositories @@ -19,9 +19,9 @@ index() { if [ "$remote" != "" ] then - cd $LXR_REPO_DIR - git remote add other $remote - git fetch other + cd $LXR_REPO_DIR + git remote add other $remote + git fetch other fi cd $ELIXIR_INSTALL @@ -37,16 +37,16 @@ index() { if [ "$ELIXIR_ROOT" = "" ] then - echo "Error: ELIXIR_ROOT environment variable not set" - echo "It's where Elixir data are stored" - exit 1 + echo "Error: ELIXIR_ROOT environment variable not set" + echo "It's where Elixir data are stored" + exit 1 fi if [ "$ELIXIR_INSTALL" = "" ] then - echo "Error: ELIXIR_INSTALL environment variable not set" - echo "It's where Elixir code is stored" - exit 1 + echo "Error: ELIXIR_INSTALL environment variable not set" + echo "It's where Elixir code is stored" + exit 1 fi index amazon-freertos https://github.com/aws/amazon-freertos.git &