Comments (5)
While I would not mind this, it would be better if someone else who actually uses RTL did it since I know nothing about it.
from snap2html.
I don't think it will be difficult.
As far as I understand, it just needs to inject, dir attribute (dir="rtl"), where needed.
https://www.w3schools.com/tags/att_global_dir.asp
https://www.w3schools.com/cssref/pr_text_direction.asp
https://www.w3schools.com/jsref/prop_style_direction.asp
The difficulty (for me) will be:
- How to make the Toggle mechanism
- Identify exactly which
<div>
s need to to be flipped
and making them<div dir="rtl">
Searching the web, I can see they played with the CSS:
https://www.youtube.com/watch?v=3qQeCPl3cjk
http://www.moreonfew.com/how-to-convert-ltr-website-to-rtl-website/
from snap2html.
@Stamimail Add this into the template.html
file:
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
var location = document.getElementsByClassName("app_header_stats")[0];
var button = document.createElement("button");
button.appendChild(document.createTextNode("Toggle LTR - RTL"));
button.onclick = LtrRtlToggle;
location.appendChild(button)
});
function LtrRtlToggle() {
var button = document.getElementById("wrapper");
button.dir = button.dir == "rtl" ? "ltr" : "rtl";
}
</script>
Does that work as expected?
from snap2html.
@pyrescene It does make changes and toggling LTR / RTL.
The problem is how to mark those elements that should be inverted, and which not.
- Identify exactly which
<div>
s need to to be flipped
and making them<div dir="rtl">
For example:
The whole header shouldn't be inverted.
The navigation pane should be to the right of the main pane.
Folders and files in the NameColumn should be aligned to the right, with their icon to the right.
from snap2html.
Maybe we'll try to use class, inserting class in some elements, something like:
class="RTL_mark"
Can you make a script for class?
I guess a hotkey (Alt+V, View) for toggling LTR / RTL will be better for testing than a button.
Perhaps by trial and error of class injection we can solve this out.
from snap2html.
Related Issues (20)
- Update "open folder selection dialog box" HOT 3
- List only folders
- Suggestion for template: sticky header
- Merging multiple html’s HOT 8
- Support pasting directory HOT 1
- [Feature Request] Please let the user exclude some files like $RECYCLE.BIN HOT 1
- Display the relative or absolute path to the file in the file information field HOT 2
- Make HTML mobile friendly HOT 2
- [Possible Bug] Does Not Create HTML File of Complete Folder (Posssibly Due to Size Limit) HOT 8
- Path HTML decode bug
- The html is too big to open very slowly HOT 3
- Is there a way to automatically run snap2html? HOT 1
- Incomplete report generation (Missed 90% of the folders) HOT 4
- Snap2HTML does not like long paths HOT 2
- Suggestion / Request: File path on mouse-over in the search results
- Suppress path in url HOT 1
- error with persian name with space in command line HOT 1
- date format in 2.14 HOT 1
- Suggestion / Request: Remove full path when 'link files' is disabled HOT 2
- How do I fill a single-digit date with "0"? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snap2html.