This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch fix/file-upload-navigation in repository https://gitbox.apache.org/repos/asf/struts-site.git
commit 471ce2b5e2ad10d3274b30dccc88ec67f673b5cb Author: Lukasz Lenart <lukaszlen...@apache.org> AuthorDate: Sun Mar 17 10:18:02 2024 +0100 Adds dedicate examples with different styles --- .gitignore | 3 +- Gemfile.lock | 70 ------ _config.yml | 4 +- docker-arm64-serve.sh | 3 + source/_layouts/default.html | 2 +- source/core-developers/file-upload-interceptor.md | 3 +- source/core-developers/file-upload.md | 2 +- source/core-developers/interceptors.md | 2 +- source/css/main.css | 2 - source/css/syntax.css | 273 +++++++++++++++++----- source/mail.md | 6 +- source/updating-website.md | 199 ++++++++++++++++ 12 files changed, 428 insertions(+), 141 deletions(-) diff --git a/.gitignore b/.gitignore index 94afaf573..e5cc71cca 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,8 @@ target .bundle .jekyll-metadata .jekyll-cache -_site +_site/ .project .settings/ .rvm/ +Gemfile.lock \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 471d19761..000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,70 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - addressable (2.8.1) - public_suffix (>= 2.0.2, < 6.0) - colorator (1.1.0) - concurrent-ruby (1.1.10) - em-websocket (0.5.3) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0) - eventmachine (1.2.7) - ffi (1.15.5) - forwardable-extended (2.6.0) - http_parser.rb (0.8.0) - i18n (1.12.0) - concurrent-ruby (~> 1.0) - jekyll (4.2.2) - addressable (~> 2.4) - colorator (~> 1.0) - em-websocket (~> 0.5) - i18n (~> 1.0) - jekyll-sass-converter (~> 2.0) - jekyll-watch (~> 2.0) - kramdown (~> 2.3) - kramdown-parser-gfm (~> 1.0) - liquid (~> 4.0) - mercenary (~> 0.4.0) - pathutil (~> 0.9) - rouge (~> 3.0) - safe_yaml (~> 1.0) - terminal-table (~> 2.0) - jekyll-sass-converter (2.2.0) - sassc (> 2.0.1, < 3.0) - jekyll-watch (2.2.1) - listen (~> 3.0) - json (2.6.1) - kramdown (2.4.0) - rexml - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) - liquid (4.0.3) - listen (3.7.1) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.4.0) - pathutil (0.16.2) - forwardable-extended (~> 2.6) - public_suffix (4.0.7) - rb-fsevent (0.11.2) - rb-inotify (0.10.1) - ffi (~> 1.0) - rexml (3.2.5) - rouge (3.30.0) - safe_yaml (1.0.5) - sassc (2.4.0) - ffi (~> 1.9) - terminal-table (2.0.0) - unicode-display_width (~> 1.1, >= 1.1.1) - unicode-display_width (1.8.0) - -PLATFORMS - x86_64-darwin-21 - x86_64-linux - -DEPENDENCIES - jekyll - json - -BUNDLED WITH - 2.3.23 diff --git a/_config.yml b/_config.yml index a25f0d5be..0f31b71a7 100644 --- a/_config.yml +++ b/_config.yml @@ -5,8 +5,10 @@ source: source encoding: UTF-8 highlighter: rouge kramdown: - input: GFM + input: GFM syntax_highlighter: rouge + auto_ids: true + toc_levels: 1..3 # Simplifies introducing changes related to the latest release current_version: 6.3.0.2 diff --git a/docker-arm64-serve.sh b/docker-arm64-serve.sh new file mode 100644 index 000000000..9cdf262ca --- /dev/null +++ b/docker-arm64-serve.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +docker run --rm -v "$PWD:/var/jekyll" -p 4000:4000 -it mrxder/jekyll-docker-arm64:latest jekyll serve --host=0.0.0.0 --incremental diff --git a/source/_layouts/default.html b/source/_layouts/default.html index f5cd55043..475bdfb3a 100644 --- a/source/_layouts/default.html +++ b/source/_layouts/default.html @@ -13,7 +13,7 @@ <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> <link href="/css/main.css" rel="stylesheet"> <link href="/css/custom.css" rel="stylesheet"> - <link href="/highlighter/github-theme.css" rel="stylesheet"> + <link href="/css/syntax.css" rel="stylesheet"> <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> <script type="text/javascript" src="/bootstrap/js/bootstrap.js"></script> diff --git a/source/core-developers/file-upload-interceptor.md b/source/core-developers/file-upload-interceptor.md index b5799c15f..cc0dd8a99 100644 --- a/source/core-developers/file-upload-interceptor.md +++ b/source/core-developers/file-upload-interceptor.md @@ -8,7 +8,8 @@ parent: # File Upload Interceptor -> Since Struts 6.4.0 this interceptor is deprecated, please use [Action File Upload Interceptor](action-file-upload-interceptor) instead! +Since Struts 6.4.0 this interceptor is deprecated, please use [Action File Upload Interceptor](action-file-upload-interceptor) instead! +{:.alert .alert-warning} See [this page](file-upload) for more examples and advanced configuration. diff --git a/source/core-developers/file-upload.md b/source/core-developers/file-upload.md index 0f61e2aa5..aa2223ea2 100644 --- a/source/core-developers/file-upload.md +++ b/source/core-developers/file-upload.md @@ -13,7 +13,7 @@ parent: {:toc} Since Struts 6.4.0 the `FileUploadInterceptor` is deprecated, and you should use [ActionFileUploadInterceptor](action-file-upload-interceptor) instead! -{:.alert .alert-block .alert-error} +{:.alert .alert-warning} The Struts 2 framework provides built-in support for processing file uploads that conform to [RFC 1867](http://www.ietf.org/rfc/rfc1867.txt), "Form-based File Upload in HTML". When correctly configured the framework will pass uploaded file(s) into your Action diff --git a/source/core-developers/interceptors.md b/source/core-developers/interceptors.md index e11f6cb2f..a1d0b5204 100644 --- a/source/core-developers/interceptors.md +++ b/source/core-developers/interceptors.md @@ -10,7 +10,7 @@ parent: {:.no_toc} * Will be replaced with the ToC, excluding a header - {:toc} +{:toc} The default Interceptor stack is designed to serve the needs of most applications. Most applications will **not** need to add Interceptors or change the Interceptor stack. diff --git a/source/css/main.css b/source/css/main.css index 6fc13774a..862cea402 100644 --- a/source/css/main.css +++ b/source/css/main.css @@ -6661,8 +6661,6 @@ blockquote { } .alert { - background-color: #3165a7; - color: #fff; padding: 1rem 1.25rem; margin: 1em 0; border: none; diff --git a/source/css/syntax.css b/source/css/syntax.css index 2774b7649..2af5601ad 100644 --- a/source/css/syntax.css +++ b/source/css/syntax.css @@ -1,60 +1,213 @@ -.highlight { background: #ffffff; } -.highlight .c { color: #999988; font-style: italic } /* Comment */ -.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ -.highlight .k { font-weight: bold } /* Keyword */ -.highlight .o { font-weight: bold } /* Operator */ -.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ -.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ -.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ -.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #aa0000 } /* Generic.Error */ -.highlight .gh { color: #999999 } /* Generic.Heading */ -.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ -.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ -.highlight .go { color: #888888 } /* Generic.Output */ -.highlight .gp { color: #555555 } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ -.highlight .gt { color: #aa0000 } /* Generic.Traceback */ -.highlight .kc { font-weight: bold } /* Keyword.Constant */ -.highlight .kd { font-weight: bold } /* Keyword.Declaration */ -.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ -.highlight .kr { font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ -.highlight .m { color: #009999 } /* Literal.Number */ -.highlight .s { color: #d14 } /* Literal.String */ -.highlight .na { color: #008080 } /* Name.Attribute */ -.highlight .nb { color: #0086B3 } /* Name.Builtin */ -.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ -.highlight .no { color: #008080 } /* Name.Constant */ -.highlight .ni { color: #800080 } /* Name.Entity */ -.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ -.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ -.highlight .nn { color: #555555 } /* Name.Namespace */ -.highlight .nt { color: #000080 } /* Name.Tag */ -.highlight .nv { color: #008080 } /* Name.Variable */ -.highlight .ow { font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mf { color: #009999 } /* Literal.Number.Float */ -.highlight .mh { color: #009999 } /* Literal.Number.Hex */ -.highlight .mi { color: #009999 } /* Literal.Number.Integer */ -.highlight .mo { color: #009999 } /* Literal.Number.Oct */ -.highlight .sb { color: #d14 } /* Literal.String.Backtick */ -.highlight .sc { color: #d14 } /* Literal.String.Char */ -.highlight .sd { color: #d14 } /* Literal.String.Doc */ -.highlight .s2 { color: #d14 } /* Literal.String.Double */ -.highlight .se { color: #d14 } /* Literal.String.Escape */ -.highlight .sh { color: #d14 } /* Literal.String.Heredoc */ -.highlight .si { color: #d14 } /* Literal.String.Interpol */ -.highlight .sx { color: #d14 } /* Literal.String.Other */ -.highlight .sr { color: #009926 } /* Literal.String.Regex */ -.highlight .s1 { color: #d14 } /* Literal.String.Single */ -.highlight .ss { color: #990073 } /* Literal.String.Symbol */ -.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ -.highlight .vc { color: #008080 } /* Name.Variable.Class */ -.highlight .vg { color: #008080 } /* Name.Variable.Global */ -.highlight .vi { color: #008080 } /* Name.Variable.Instance */ -.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ +.highlight table td { padding: 5px; } +.highlight table pre { margin: 0; } +.highlight .cm { + color: #999988; + font-style: italic; +} +.highlight .cp { + color: #999999; + font-weight: bold; +} +.highlight .c1 { + color: #999988; + font-style: italic; +} +.highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; +} +.highlight .c, .highlight .ch, .highlight .cd, .highlight .cpf { + color: #999988; + font-style: italic; +} +.highlight .err { + color: #a61717; + background-color: #e3d2d2; +} +.highlight .gd { + color: #000000; + background-color: #ffdddd; +} +.highlight .ge { + color: #000000; + font-style: italic; +} +.highlight .gr { + color: #aa0000; +} +.highlight .gh { + color: #999999; +} +.highlight .gi { + color: #000000; + background-color: #ddffdd; +} +.highlight .go { + color: #888888; +} +.highlight .gp { + color: #555555; +} +.highlight .gs { + font-weight: bold; +} +.highlight .gu { + color: #aaaaaa; +} +.highlight .gt { + color: #aa0000; +} +.highlight .kc { + color: #000000; + font-weight: bold; +} +.highlight .kd { + color: #000000; + font-weight: bold; +} +.highlight .kn { + color: #000000; + font-weight: bold; +} +.highlight .kp { + color: #000000; + font-weight: bold; +} +.highlight .kr { + color: #000000; + font-weight: bold; +} +.highlight .kt { + color: #445588; + font-weight: bold; +} +.highlight .k, .highlight .kv { + color: #000000; + font-weight: bold; +} +.highlight .mf { + color: #009999; +} +.highlight .mh { + color: #009999; +} +.highlight .il { + color: #009999; +} +.highlight .mi { + color: #009999; +} +.highlight .mo { + color: #009999; +} +.highlight .m, .highlight .mb, .highlight .mx { + color: #009999; +} +.highlight .sa { + color: #000000; + font-weight: bold; +} +.highlight .sb { + color: #d14; +} +.highlight .sc { + color: #d14; +} +.highlight .sd { + color: #d14; +} +.highlight .s2 { + color: #d14; +} +.highlight .se { + color: #d14; +} +.highlight .sh { + color: #d14; +} +.highlight .si { + color: #d14; +} +.highlight .sx { + color: #d14; +} +.highlight .sr { + color: #009926; +} +.highlight .s1 { + color: #d14; +} +.highlight .ss { + color: #990073; +} +.highlight .s, .highlight .dl { + color: #d14; +} +.highlight .na { + color: #008080; +} +.highlight .bp { + color: #999999; +} +.highlight .nb { + color: #0086B3; +} +.highlight .nc { + color: #445588; + font-weight: bold; +} +.highlight .no { + color: #008080; +} +.highlight .nd { + color: #3c5d5d; + font-weight: bold; +} +.highlight .ni { + color: #800080; +} +.highlight .ne { + color: #990000; + font-weight: bold; +} +.highlight .nf, .highlight .fm { + color: #990000; + font-weight: bold; +} +.highlight .nl { + color: #990000; + font-weight: bold; +} +.highlight .nn { + color: #555555; +} +.highlight .nt { + color: #000080; +} +.highlight .vc { + color: #008080; +} +.highlight .vg { + color: #008080; +} +.highlight .vi { + color: #008080; +} +.highlight .nv, .highlight .vm { + color: #008080; +} +.highlight .ow { + color: #000000; + font-weight: bold; +} +.highlight .o { + color: #000000; + font-weight: bold; +} +.highlight .w { + color: #bbbbbb; +} +.highlight { + background-color: #f8f8f8; +} diff --git a/source/mail.md b/source/mail.md index 0168fd126..8fcfbd57a 100644 --- a/source/mail.md +++ b/source/mail.md @@ -14,7 +14,7 @@ A message sent to a public mailing list cannot be unpublished. Although we might the message is mirrored to a lot of other archiving systems which we do not have under control. Therefore almost 100% of all delete requests are denied. Please make sure you **do not send any potential sensitive information to the mailing list**, including passwords, server names, ips and so on. -{:.alert .alert-block .alert-error} +{:.alert .alert-info} ## Subscribing @@ -72,7 +72,7 @@ is a common set of etiquette guidelines that you should observe. Please keep on Please make sure that you are joining the list that is appropriate for the topic or product that you would like to discuss. For example, please do not join the Struts mailing list and ask questions about Tomcat. Instead, you should join the Tomcat User list and ask your questions there. -{:.alert .alert-box .alert-error} +{:.alert .alert-warning} ### Respect the mailing list type @@ -99,7 +99,7 @@ it will go to the list and not to the original author directly. The reason is be on the list for everyone to benefit from. Be careful of this as sometimes you may intend to reply to a message directly to someone instead of the entire list. -### Do not send HTMLÂ emails to the list. +### Do not send HTML emails to the list. If you are using Outlook or Outlook Express or Eudora, chances are that you are sending HTML email by default. There is usually a setting that will allow you to send "Plain Text" email. diff --git a/source/updating-website.md b/source/updating-website.md index 50429b521..c35548515 100644 --- a/source/updating-website.md +++ b/source/updating-website.md @@ -40,3 +40,202 @@ There is a dedicated [Jenkins job](https://builds.apache.org/job/Struts/job/Stru used to update the JavaDocs based on the latest release. If you have a proper privileges you can start the job and provide a Git tag of the latest release, eg. `STRUTS_2_5_22`. Based on the tag, Jenkins will generate a proper JavaDocs and deploy them directly into the website. You can verify them by using this [link](https://struts.staged.apache.org/maven/struts2-core/apidocs/index). + +## Example styles + +Below you will find an example styles and panels you can use when developing the webpage + + +### Text alignment + +Text right +{:.text-right} + +```xml +Text right +{:.text-right} +``` + +Text center +{:.text-center} + +``` +Text center +{:.text-center} +``` + +Text left +{:.text-left} + +``` +Text left +{:.text-left} +``` + +Text justify +{:.text-justify} + +``` +Text justify +{:.text-justify} +``` + +### Text color + +Text primary +{:.text-primary} + +``` +Text primary +{:.text-primary} +``` + +Text info +{:.text-info} + +``` +Text info +{:.text-info} +``` + +Text success +{:.text-success} + +``` +Text success +{:.text-success} +``` + +Text warning +{:.text-warning} + +``` +Text warning +{:.text-warning} +``` + +Text danger +{:.text-danger} + +``` +Text danger +{:.text-danger} +``` + +### Background + +Background primary +{:.bg-primary} + +``` +Background primary +{:.bg-primary} +``` + +Background info +{:.bg-info} + +``` +Background info +{:.bg-info} +``` + +Background success +{:.bg-success} + +``` +Background success +{:.bg-success} +``` + +Background warning +{:.bg-warning} + +``` +Background warning +{:.bg-warning} +``` + +Background danger +{:.bg-danger} + +``` +Background danger +{:.bg-danger} +``` + +### Label + +Label primary +{:.label .label-primary} + +``` +Label primary +{:.label .label-primary} +``` + +Label info +{:.label .label-info} + +``` +Label info +{:.label .label-info} +``` + +Label success +{:.label .label-success} + +``` +Label success +{:.label .label-success} +``` + +Label warning +{:.label .label-warning} + +``` +Label warning +{:.label .label-warning} +``` + +Label danger +{:.label .label-danger} + +``` +Label danger +{:.label .label-danger} +``` + +### Panel + +Info panel +{:.alert .alert-info} + +``` +Info panel +{:.alert alert-info} +``` + +Success panel +{:.alert .alert-success} + +``` +Success panel +{:.alert alert-success} +``` + +Warning panel +{:.alert .alert-warning} + +``` +Warning panel +{:.alert alert-warning} +``` + +Danger panel +{:.alert .alert-danger} + +``` +Danger panel +{:.alert alert-danger} +```